24 typedef Vector<M2MObjectInstance *> M2MObjectInstanceList;
39 friend class M2MEndpoint;
40 friend class TestFactory;
53 bool external_blockwise_store =
false);
109 const M2MObjectInstanceList&
instances()
const;
150 sn_coap_hdr_s *received_coap_header,
163 sn_coap_hdr_s *received_coap_header,
177 sn_coap_hdr_s *received_coap_header,
179 bool &execute_value_updated,
180 sn_nsdl_addr_s *address = NULL);
182 void notification_update(uint16_t obj_instance_id);
184 #ifdef MBED_CLOUD_CLIENT_EDGE_EXTENSION 185 void set_endpoint(M2MEndpoint *endpoint);
187 M2MEndpoint* get_endpoint()
const;
198 M2MObjectInstanceList _instance_list;
202 #ifdef MBED_CLOUD_CLIENT_EDGE_EXTENSION 203 M2MEndpoint *_endpoint;
206 friend class Test_M2MObject;
207 friend class Test_M2MEndpoint;
208 friend class Test_M2MInterfaceImpl;
209 friend class Test_M2MInterfaceFactory;
210 friend class Test_M2MNsdlInterface;
211 friend class Test_M2MTLVSerializer;
212 friend class Test_M2MTLVDeserializer;
213 friend class Test_M2MDevice;
214 friend class Test_M2MBase;
215 friend class Test_M2MObjectInstance;
216 friend class Test_M2MResource;
217 friend class Test_M2MSecurity;
218 friend class Test_M2MServer;
219 friend class Test_M2MReportHandler;
220 friend class Test_M2MResourceInstance;
223 #endif // M2M_OBJECT_H Definition: m2mobject.h:35
Definition: m2mobservationhandler.h:30
virtual M2MBase * get_parent() const
Returns the owner object. Can return NULL if the object has no parent.
virtual void set_observation_handler(M2MObservationHandler *handler)
Sets the observation handler.
virtual ~M2MObject()
Destructor.
Observation
Enum to define observation level.
Definition: m2mbase.h:74
virtual void add_observation_level(M2MBase::Observation observation_level)
Adds the observation level for the object.
header for M2MObjectInstance
Definition: m2mobjectinstance.h:42
LwM2M parameters.
Definition: m2mbase.h:199
const M2MObjectInstanceList & instances() const
Returns a list of object instances.
Header for M2MBase class.
virtual sn_coap_hdr_s * handle_put_request(nsdl_s *nsdl, sn_coap_hdr_s *received_coap_header, M2MObservationHandler *observation_handler, bool &execute_value_updated)
Handles PUT request for the registered objects.
virtual M2MObservationHandler * observation_handler() const
Returns the Observation Handler object.
virtual sn_coap_hdr_s * handle_get_request(nsdl_s *nsdl, sn_coap_hdr_s *received_coap_header, M2MObservationHandler *observation_handler=NULL)
Handles GET request for the registered objects.
M2MObjectInstance * create_object_instance(uint16_t instance_id=0)
Creates a new object instance for a given mbed Client Interface object. With this, the client can respond to server's GET methods with the provided value.
M2MBase::Observation observation_level() const
Returns the observation level of the object.
Definition: m2minterfacefactory.h:35
uint16_t instance_id() const
Returns the object's instance ID.
bool remove_object_instance(uint16_t instance_id=0)
Removes the object instance resource with the given instance id.
void execute_value_updated(const String &name)
Calls the function that is set in the "set_value_updated_function".
M2MObjectInstance * object_instance(uint16_t instance_id=0) const
Returns the object instance with the the given instance ID.
virtual void remove_observation_level(M2MBase::Observation observation_level)
Removes the observation level from the object.
uint16_t instance_count() const
Returns the total number of object instances-.
virtual sn_coap_hdr_s * handle_post_request(nsdl_s *nsdl, sn_coap_hdr_s *received_coap_header, M2MObservationHandler *observation_handler, bool &execute_value_updated, sn_nsdl_addr_s *address=NULL)
Handles GET request for the registered objects.