Events
This page documents events sent from the Nimbus CloudWash Payment Panel to the host system.
Overview
The device sends event notifications when user interactions occur. Events use the same command protocol as screen commands but are sent from the device to the host.
Event Structure
Events follow the standard command structure:
| Field | Size | Value | Description |
|---|---|---|---|
| type | 1 byte | 0x21 ('!') | WRITE command |
| group | 1 byte | 0x02 | EVENTS group |
| id | 1 byte | varies | Event type ID |
| payload_len | 1 byte | varies | Length of payload |
| payload | variable | — | Event data |
| crc16 | 2 bytes | — | CRC16 checksum (little-endian) |
Button Press Event
Event ID: 0x01
The device has 5 physical buttons (B1-B5). This event is sent when any button is pressed.
Structure
| Field | Size | Value | Description |
|---|---|---|---|
| type | 1 byte | 0x21 | WRITE |
| group | 1 byte | 0x02 | EVENTS |
| id | 1 byte | 0x01 | BUTTON_PRESS |
| payload_len | 1 byte | 0x01 | 1 byte payload |
| payload | 1 byte | 0x01-0x05 | Button ID |
| crc16 | 2 bytes | — | CRC16 |
Button IDs
| ID | Button | Description |
|---|---|---|
0x01 | B1 | Button 1 (leftmost) |
0x02 | B2 | Button 2 |
0x03 | B3 | Button 3 (center) |
0x04 | B4 | Button 4 |
0x05 | B5 | Button 5 (rightmost) |
Binary Examples
Button 1 Press Event
Command Structure:
type: 0x21 (WRITE)
group: 0x02 (EVENTS)
id: 0x01 (BUTTON_PRESS)
payload_len: 0x01 (1 byte)
payload: 0x01 (Button B1)
crc16: 0xE5F1 (little-endian: F1 E5)
Binary: 21 02 01 01 01 F1 E5Button 3 Press Event
Command Structure:
type: 0x21 (WRITE)
group: 0x02 (EVENTS)
id: 0x01 (BUTTON_PRESS)
payload_len: 0x01 (1 byte)
payload: 0x03 (Button B3)
crc16: 0xA5B3 (little-endian: B3 A5)
Binary: 21 02 01 01 03 B3 A5Implementation Reference
Event definitions are located in Inc/communication/commands.h under the CMD::EVENTS namespace.
cpp
namespace EVENTS {
static const uint8_t GROUP = 0x02;
namespace ID {
static const uint8_t BUTTON_PRESS = 0x01;
}
namespace BUTTON {
static const uint8_t B1 = 1;
static const uint8_t B2 = 2;
static const uint8_t B3 = 3;
static const uint8_t B4 = 4;
static const uint8_t B5 = 5;
}
}Related Documentation
- Command Protocol - Protocol structure and CRC calculation
- Screens - Available screens and their parameters