Skip to main content

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#

CommandCode
PING110
SHUTDOWN112
UPGRADE114
PROPERTY116
THREAD_DUMP118
STATS119
DISCOVER_CONTROLLERS151
ADD_CONTROLLER152
EDIT_CONTROLLER153
DISCOVER_POINTS251
CONTROLLER_STATUS253
CONFIGURE255
REMOVE257
RESET259
GET331
SET333
SUBSCRIBE335
UNSUBSCRIBE337

ACK List#

ACKCode
MESSAGE_SENT110
MESSAGE_RECEIVED120
MESSAGE_PROCESSING130
MESSAGE_PROCESSING_SUCCESS140
MESSAGE_PROCESSING_FAILED150
MESSAGE_DUPLICATE160
MESSAGE_INVALID170

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}