Skip to main content

Subscribe/Unsubscribe COV

In addition to above commands, the concept of COV can be implemented with subscribe/unsubscribe points command. If a point in agent is subscribed, values for that point must be published only when there occured any change in its value. It will be helpful in real time monitoring, as the point value is pushed instantly to the cloud on change, instead of regular intervals.

This command subscribes/unsubscribes any point/points in a controller.

Command#

{  "agent": "agent-name",  "command": 335,  "msgid": 1007,  "controllerType": 0,  "controller": {}      "name": "spinfo_23"  },  "points": [    {      "name": "point-name-1",      "path": "path/of/the/point1    },    {      "name": "point-name-2",      "path": "path/of/the/point2    }  ],  "publishType": 4}

Agent Response#

{  "agent": "agent-name",  "controller": {      "name":"controller-name-1"  }  "controllerType": 0,  "publishType": 4,  "data": [    {      "name": "point-name-1",      "path": "path/of/the/point1",      "subscribed": true    },    {      "name": "point-name-2",      "path": "path/of/the/point2",      "subscribed": false    }  ]}