-
Notifications
You must be signed in to change notification settings - Fork 29
Communication protocol
Jaume Martin edited this page Nov 29, 2017
·
7 revisions
| Field | Type | Comment |
|---|---|---|
| ULID | String | Unique identifier |
| CMD | Enum | Command |
| Params | String | Parameters for the command |
| Result | String | Command result |
| Data | String | Extra field for commands or resutls |
| Error | Boolean | |
| ErrorMsg | String | Error message |
Endpoint Server
ULID: Nil, CMD: Register
+------------------------------------------------>
|
| Register and
ULID: ulid, Result: OK | Generate ULID
<------------------------------------------------+
ULID: ulid, CMD: Ping
+------------------------------------------------>
|
| Check schedule
ULID: ulid, CMD: Ping, Result: Pong |
<------------------------------------------------+
ULID: ulid, CMD: Ping
+------------------------------------------------>
|
| Check schedule
ULID: ulid, CMD: Scan, Data: Rules |
<------------------------------------------------+
| ULID: ulid, CMD: Ping
|
+------------------------------------------------>
Execute | ULID: ulid, CMD: Ping, Result: Pong |
command |<-----------------------------------------------+
|
| ULID: ulid, CMD: Scan, Result: Result
+------------------------------------------------>
|
| Update report
ULID: ulid, CMD: nil, Data: ACK |
<------------------------------------------------+