The controller is a special node which is specified in ECHONETLite to control other nodes, and the controller must implement the following special node profile class object which has all children objects of the node [1].
The uecho
adds the node profile class objects automatically when the controller is created, and so the developer doesn't need to add the objects yourself.
The uecho
handles all messages from other nodes automatically. However, the developer can listen the messages directly using some listener functions . After a node is received a message from other nodes, the controller listeners are called as the following sequences:
The developer can set a listener using uecho_controller_setmessagelistener()
to listen to all received messages from other nodes. Also, the developer can set a listern using uecho_controller_setnodelistener()
to know the node update status when the node is updated by the received messages.