53 AvailablePowerSources,
153 uint16_t instance_id);
167 uint16_t instance_id = 0);
181 uint16_t instance_id = 0);
193 uint16_t instance_id = 0)
const;
205 uint16_t instance_id = 0)
const;
232 uint16_t instance_id)
const;
234 static const char* resource_name(DeviceResource resource);
236 static bool check_value_range(DeviceResource resource,
const int64_t value);
246 friend class Test_M2MDevice;
247 friend class Test_M2MInterfaceFactory;
250 #endif // M2M_DEVICE_H Definition: m2mobject.h:35
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.
bool is_resource_present(DeviceResource resource) const
Indicates whether the resource instance with the given resource enum exists or not.
Definition: m2mobjectinstance.h:42
Definition: m2mdevice.h:33
DeviceResource
An enum defining all the resources associated with the Device Object in the LWM2M framework...
Definition: m2mdevice.h:43
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.
static void delete_instance()
Deletes an M2MDevice instance.
Definition: m2mresourceinstance.h:38
Definition: m2mresourcebase.h:49
uint16_t total_resource_count() const
Returns the number of resources for the whole device object.
Definition: m2mresource.h:38
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.