58 AvailablePowerSources,
158 uint16_t instance_id);
172 uint16_t instance_id = 0);
186 uint16_t instance_id = 0);
198 uint16_t instance_id = 0)
const;
210 uint16_t instance_id = 0)
const;
237 uint16_t instance_id)
const;
239 static const char* resource_name(DeviceResource resource);
241 static bool check_value_range(DeviceResource resource,
const int64_t value);
251 friend class Test_M2MDevice;
252 friend class Test_M2MInterfaceFactory;
255 #endif // M2M_DEVICE_H The base class for Client Objects.
Definition: m2mobject.h:39
bool set_resource_value(DeviceResource resource, const String &value, uint16_t instance_id=0)
Sets the value of the given resource enum.
M2MResource * create_resource(DeviceResource resource, const String &value)
Creates a new resource for the given resource enum.
bool delete_resource(DeviceResource resource)
Deletes the resource with the given resource enum. Mandatory resources cannot be deleted.
M2MObject. This class is the base class for the mbed Client Objects.
bool is_resource_present(DeviceResource resource) const
Indicates whether the resource instance with the given resource enum exists or not.
Definition: m2mobjectinstance.h:36
A class representin the Device Object model of the LwM2M framework.
Definition: m2mdevice.h:38
DeviceResource
An enum defining all the resources associated with the Device Object in the LWM2M framework...
Definition: m2mdevice.h:48
uint16_t per_resource_count(DeviceResource resource) const
Returns the number of resources for a given resource enum.
int64_t resource_value_int(DeviceResource resource, uint16_t instance_id=0) const
Returns the value of the given resource key name, in integer format.
String resource_value_string(DeviceResource resource, uint16_t instance_id=0) const
Returns the value of the given resource enum, in string format.
Definition: m2mstring.h:33
static void delete_instance()
Deletes an M2MDevice instance.
Definition: m2mresourceinstance.h:32
Definition: m2mresourcebase.h:43
uint16_t total_resource_count() const
Returns the number of resources for the whole device object.
The base class for Client Resources.
Definition: m2mresource.h:40
M2MResourceInstance * create_resource_instance(DeviceResource resource, int64_t value, uint16_t instance_id)
Creates a new resource instance for the given resource enum.
bool delete_resource_instance(DeviceResource resource, uint16_t instance_id)
Deletes the resource with the given resource enum. Mandatory resources cannot be deleted.
Definition: m2minterfacefactory.h:36
uint16_t instance_id() const
Returns the object's instance ID.