Illuminance Sensor object implementation for LwM2M client using Wakaama. More...
Illuminance Sensor object implementation for LwM2M client using Wakaama.
The sensor value can be updated by the application using the lwm2m_object_illuminance_update_value function, or polled when required if a callback is registered upon object instantiation via lwm2m_obj_illuminance_args_t::read_cb.
To use this object add USEMODULE += wakaama_objects_illuminance
to the application Makefile.
For an XML description of the object see https://raw.githubusercontent.com/OpenMobileAlliance/lwm2m-registry/prod/version_history/3301-1_0.xml
This object is based on the IPSO Sensor base object, therefore it shares the same resources.
Modules | |
LwM2M Illuminance Sensor object compile configurations | |
Files | |
file | illuminance.h |
Macros | |
#define | LWM2M_ILLUMINANCE_OBJECT_ID 3301 |
LwM2M Illuminance Sensor object ID. | |
Typedefs | |
typedef lwm2m_obj_ipso_base_sensor_args_t | lwm2m_obj_illuminance_args_t |
Arguments for the creation of a Illuminance Sensor object instance. | |
Functions | |
lwm2m_object_t * | lwm2m_object_illuminance_init (lwm2m_client_data_t *client_data) |
Initialize the Illuminance Sensor object handle. | |
int32_t | lwm2m_object_illuminance_instance_create (const lwm2m_obj_illuminance_args_t *args) |
Create a new Illuminance Sensor instance. | |
void | lwm2m_object_illuminance_update_value (const lwm2m_client_data_t *client_data, uint16_t instance_id, int16_t value) |
Update the value of the illuminance sensor and trigger a notification to the observing servers, if any. | |
#define LWM2M_ILLUMINANCE_OBJECT_ID 3301 |
LwM2M Illuminance Sensor object ID.
Definition at line 115 of file illuminance.h.
Arguments for the creation of a Illuminance Sensor object instance.
Definition at line 120 of file illuminance.h.
lwm2m_object_t * lwm2m_object_illuminance_init | ( | lwm2m_client_data_t * | client_data | ) |
Initialize the Illuminance Sensor object handle.
[in] | client_data | Pointer to the LwM2M client data. |
int32_t lwm2m_object_illuminance_instance_create | ( | const lwm2m_obj_illuminance_args_t * | args | ) |
Create a new Illuminance Sensor instance.
[in] | args | Initialize structure with the parameter for the instance. Must not be NULL. |
void lwm2m_object_illuminance_update_value | ( | const lwm2m_client_data_t * | client_data, |
uint16_t | instance_id, | ||
int16_t | value | ||
) |
Update the value of the illuminance sensor and trigger a notification to the observing servers, if any.
[in] | client_data | Pointer to the LwM2M client. |
[in] | instance_id | ID of the instance to update. |
[in] | value | New value for the sensor. |