Commands, Responses and Acknowledgements
Commands are JSON messages originated from the server, targeting a specific agent. On receiving the command, a two way agent will receive, process and respond accordingly. Once a command is received ,it should respond with a MESSAGE_RECEIVED acknowledgement. Then with a MESSAGE_PROCESSING acknowledgement. If the processing is successful, it should respond with an appropriate RESPONSE and MESSAGE_PROCESSING_SUCCESS acks. If unsuccessful it should respond with a MESSAGE_PROCESSING_UNSUCCESSFUL ack
Command List#
| Command | Code | 
|---|---|
| PING | 110 | 
| SHUTDOWN | 112 | 
| UPGRADE | 114 | 
| PROPERTY | 116 | 
| THREAD_DUMP | 118 | 
| STATS | 119 | 
| DISCOVER_CONTROLLERS | 151 | 
| ADD_CONTROLLER | 152 | 
| EDIT_CONTROLLER | 153 | 
| DISCOVER_POINTS | 251 | 
| CONTROLLER_STATUS | 253 | 
| CONFIGURE | 255 | 
| REMOVE | 257 | 
| RESET | 259 | 
| GET | 331 | 
| SET | 333 | 
| SUBSCRIBE | 335 | 
| UNSUBSCRIBE | 337 | 
ACK List#
| ACK | Code | 
|---|---|
| MESSAGE_SENT | 110 | 
| MESSAGE_RECEIVED | 120 | 
| MESSAGE_PROCESSING | 130 | 
| MESSAGE_PROCESSING_SUCCESS | 140 | 
| MESSAGE_PROCESSING_FAILED | 150 | 
| MESSAGE_DUPLICATE | 160 | 
| MESSAGE_INVALID | 170 | 
Sample Command Received ACK
{  "agent": "agent-name",  "publishType": 1,  "msgid": 1725,  "command": 255,  "status": 120,  "timestamp": 1598451824244}Sample Command Processing ACK
{  "agent": "agent-name",  "publishType": 1,  "msgid": 1725,  "command": 255,  "status": 130,  "timestamp": 1598451824244}Sample Command Executed ACK
{  "agent": "agent-name",  "publishType": 1,  "msgid": 1725,  "command": 255,  "status": 140,  "timestamp": 1598451824244}Sample Command Execution Failed ACK
{  "agent": "agent-name",  "publishType": 1,  "msgid": 1725,  "command": 255,  "status": 150,  "timestamp": 1598451824244}