Skip to content

Communication protocol

Jaume Martin edited this page Nov 29, 2017 · 7 revisions

Message type

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

Communication protocol

     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        |
        <------------------------------------------------+

Back

Clone this wiki locally