16 #ifndef M2M_OBJECT_INSTANCE_H 17 #define M2M_OBJECT_INSTANCE_H 52 bool external_blockwise_store =
false);
93 const String &resource_type,
96 const uint8_t value_length,
97 bool multiple_instance =
false,
98 bool external_blockwise_store =
false);
114 const String &resource_type,
117 bool multiple_instance =
false,
118 bool external_blockwise_store =
false);
134 const char *resource_type,
137 bool multiple_instance =
false,
138 bool external_blockwise_store =
false);
161 const String &resource_type,
163 const uint8_t *value,
164 const uint8_t value_length,
166 bool external_blockwise_store =
false);
181 const String &resource_type,
184 uint16_t instance_id,
185 bool external_blockwise_store =
false);
210 uint16_t instance_id);
284 sn_coap_hdr_s *received_coap_header,
296 sn_coap_hdr_s *received_coap_header,
310 sn_coap_hdr_s *received_coap_header,
312 bool &execute_value_updated,
313 sn_nsdl_addr_s *address = NULL);
315 inline M2MObject& get_parent_object()
const;
339 friend class Test_M2MObjectInstance;
340 friend class Test_M2MObject;
341 friend class Test_M2MDevice;
342 friend class Test_M2MSecurity;
343 friend class Test_M2MServer;
344 friend class Test_M2MInterfaceFactory;
345 friend class Test_M2MNsdlInterface;
346 friend class Test_M2MFirmware;
347 friend class Test_M2MTLVSerializer;
348 friend class Test_M2MTLVDeserializer;
349 friend class Test_M2MBase;
350 friend class Test_M2MResource;
351 friend class Test_M2MResourceInstance;
352 friend class TestFactory;
355 inline M2MObject& M2MObjectInstance::get_parent_object()
const 360 #endif // M2M_OBJECT_INSTANCE_H The base class for Client Objects.
Definition: m2mobject.h:39
Definition: m2mobservationhandler.h:31
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 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 POST request for the registered objects.
The base class based on which all LwM2M object models can be created.
Definition: m2mbase.h:63
M2MResource * create_static_resource(const lwm2m_parameters_s *static_res, M2MResourceInstance::ResourceType type)
TODO!
Observation
Enum to define observation level.
Definition: m2mbase.h:83
virtual void add_observation_level(M2MBase::Observation observation_level)
Adds the observation level for the object.
const char * name() const
Returns the object name.
Definition: m2mobjectinstance.h:36
ResourceType
Definition: m2mresourcebase.h:66
uint16_t resource_count() const
Returns the total number of resources with the object.
LwM2M parameters.
Definition: m2mbase.h:210
virtual M2MObservationHandler * observation_handler() const
Returns the Observation Handler object.
bool remove_resource(const String &name)
Removes the resource with the given name.
Definition: m2mstring.h:33
M2MResource. This class is the base class for mbed Client Resources.
DataType
Enum defining a resource data type.
Definition: m2mbase.h:107
M2MResourceInstance * create_static_resource_instance(const String &resource_name, const String &resource_type, M2MResourceInstance::ResourceType type, const uint8_t *value, const uint8_t value_length, uint16_t instance_id, bool external_blockwise_store=false)
Creates a static resource instance for a given mbed Client Inteface object. With this, the client can respond to server's GET methods with the provided value.
bool remove_resource_instance(const String &resource_name, uint16_t instance_id)
Removes the resource instance with the given name.
Definition: m2mresourceinstance.h:32
A simple C++ Vector class, used as replacement for std::vector.
M2MResource * resource(const uint16_t resource_id) const
Returns the resource with the given name.
virtual void set_observation_handler(M2MObservationHandler *handler)
Sets the observation handler.
virtual M2MBase * get_parent() const
Returns the owner object. Can return NULL if the object has no parent.
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.
M2MResourceInstance * create_dynamic_resource_instance(const String &resource_name, const String &resource_type, M2MResourceInstance::ResourceType type, bool observable, uint16_t instance_id, bool external_blockwise_store=false)
Creates a dynamic resource instance for a given mbed Client Inteface object. With this...
The base class for Client Resources.
Definition: m2mresource.h:40
const M2MResourceList & resources() const
Returns a list of M2MResourceBase objects.
const char * resource_type() const
Returns the resource type of the object.
M2MBase::Observation observation_level() const
Returns the observation level of the object.
M2MResource * create_dynamic_resource(const String &resource_name, const String &resource_type, M2MResourceInstance::ResourceType type, bool observable, bool multiple_instance=false, bool external_blockwise_store=false)
Creates a dynamic resource for a given mbed Client Inteface object. With this, the client can respond...
uint16_t instance_id() const
Returns the object's instance ID.
virtual void remove_observation_level(M2MBase::Observation observation_level)
Removes the observation level from the object.
void execute_value_updated(const String &name)
Calls the function that is set in the "set_value_updated_function".