Mistake on this page? Email us
M2MObservationHandler Class Referenceabstract

Public Member Functions

virtual bool observation_to_be_sent (M2MBase *object, uint16_t obs_number, const m2m::Vector< uint16_t > &changed_instance_ids, bool send_object=false)=0
 The observation callback to be sent to the server due to a change in a parameter under observation. More...
 
virtual void resource_to_be_deleted (M2MBase *base)=0
 A callback for removing an NSDL resource from the data structures. More...
 
virtual void value_updated (M2MBase *base)=0
 A callback indicating that the value of the resource object is updated by server. More...
 
virtual void remove_object (M2MBase *object)=0
 A callback for removing an object from the list. More...
 
virtual void send_delayed_response (M2MBase *base)=0
 Sends a delayed post response to the server with 'COAP_MSG_CODE_RESPONSE_CHANGED' response code. More...
 

Member Function Documentation

virtual bool M2MObservationHandler::observation_to_be_sent ( M2MBase object,
uint16_t  obs_number,
const m2m::Vector< uint16_t > &  changed_instance_ids,
bool  send_object = false 
)
pure virtual

The observation callback to be sent to the server due to a change in a parameter under observation.

Parameters
objectThe observed object whose information needs to be sent.
obs_numberThe observation number.
changed_instance_idsA list of changed object instance IDs.
send_objectIndicates whether the whole object will be sent or not.
Returns
True if the message was send, False if there is already ongoing notification.
virtual void M2MObservationHandler::remove_object ( M2MBase object)
pure virtual

A callback for removing an object from the list.

Parameters
objectThe M2MObject to be removed.
virtual void M2MObservationHandler::resource_to_be_deleted ( M2MBase base)
pure virtual

A callback for removing an NSDL resource from the data structures.

Parameters
TheM2MBase derived observed object whose information needs to be removed.
virtual void M2MObservationHandler::send_delayed_response ( M2MBase base)
pure virtual

Sends a delayed post response to the server with 'COAP_MSG_CODE_RESPONSE_CHANGED' response code.

Parameters
baseThe resource sending the response.
virtual void M2MObservationHandler::value_updated ( M2MBase base)
pure virtual

A callback indicating that the value of the resource object is updated by server.

Parameters
baseThe object whose value is updated.
object_nameThe name of the updated resource, default is empty.

The documentation for this class was generated from the following file: