43#ifndef OBJECTS_IPSO_SENSOR_BASE_H
44#define OBJECTS_IPSO_SENSOR_BASE_H
62#ifndef CONFIG_LWM2M_IPSO_SENSOR_BASE_UNITS_MAX_SIZE
63#define CONFIG_LWM2M_IPSO_SENSOR_BASE_UNITS_MAX_SIZE (4U)
74#define LWM2M_IPSO_BASE_SENSOR_VALUE_ID 5700
78#define LWM2M_IPSO_BASE_SENSOR_MIN_MEASURED_VALUE_ID 5601
82#define LWM2M_IPSO_BASE_SENSOR_MAX_MEASURED_VALUE_ID 5602
86#define LWM2M_IPSO_BASE_SENSOR_MIN_RANGE_VALUE_ID 5603
90#define LWM2M_IPSO_BASE_SENSOR_MAX_RANGE_VALUE_ID 5604
94#define LWM2M_IPSO_BASE_SENSOR_RESET_MIN_MAX_MEASURED_VALUES_ID 5605
98#define LWM2M_IPSO_BASE_SENSOR_UNITS_ID 5701
182 size_t instance_count);
195 uint16_t instance_id, int16_t value);
#define CONFIG_LWM2M_IPSO_SENSOR_BASE_UNITS_MAX_SIZE
Maximum size for the units resource string.
struct lwm2m_obj_ipso_sensor_base lwm2m_obj_ipso_sensor_base_t
LwM2M IPSO sensor base object.
void lwm2m_object_ipso_sensor_base_update_value(const lwm2m_client_data_t *client_data, const lwm2m_obj_ipso_sensor_base_t *object, uint16_t instance_id, int16_t value)
Update the value of the illuminance sensor and trigger a notification to the observing servers,...
struct lwm2m_obj_ipso_sensor_base_inst lwm2m_obj_ipso_sensor_base_inst_t
LwM2M IPSO sensor base instance.
int lwm2m_object_ipso_sensor_base_init_derived(lwm2m_client_data_t *client_data, lwm2m_obj_ipso_sensor_base_t *object, uint16_t object_id, lwm2m_obj_ipso_sensor_base_inst_t *instances, size_t instance_count)
Initialize the a LwM2M object derived from the IPSO Sensor Base object.
int32_t lwm2m_object_ipso_sensor_base_instance_create(lwm2m_obj_ipso_sensor_base_t *object, const lwm2m_obj_ipso_base_sensor_args_t *args)
Create a new object instance based on the IPSO Sensor Base and add it to the object list.
struct lwm2m_obj_ipso_sensor_base_args lwm2m_obj_ipso_base_sensor_args_t
Arguments for the creation of an object based on the IPSO Sensor Base object instance.
int lwm2m_obj_ipso_base_sensor_read_cb_t(void *read_cb_arg, int16_t *value)
Callback for reading the sensor value.
Definitions and public API for a LwM2M client using Wakaama.
Mutex for thread synchronization.
Arguments for the creation of an object based on the IPSO Sensor Base object instance.
int32_t instance_id
ID for the new instance.
char * units
Null-terminated string of the "Sensor Units" resource.
lwm2m_obj_ipso_base_sensor_read_cb_t * read_cb
Callback to read the sensor value.
int16_t max_range_value
Maximum value that can be measured by the sensor.
size_t units_len
Length of units.
int16_t min_range_value
Minimum value that can be measured by the sensor.
void * read_cb_arg
Data to pass to the read callback.
LwM2M IPSO sensor base instance.
int16_t min_sensor_value
minimum sensor value
lwm2m_list_t list
list handle
lwm2m_obj_ipso_base_sensor_read_cb_t * read_cb
Callback to read the sensor value.
int16_t min_range_value
minimum range value
char units[CONFIG_LWM2M_IPSO_SENSOR_BASE_UNITS_MAX_SIZE]
units
void * read_cb_arg
Data to pass to the read callback.
int16_t max_sensor_value
maximum sensor value
int16_t max_range_value
maximum range value
int16_t sensor_value
sensor value
LwM2M IPSO sensor base object.
lwm2m_obj_ipso_sensor_base_inst_t * free_instances
List of instances.
lwm2m_object_t object
LwM2M object base.
mutex_t mutex
Mutex for the object.
uint16_t object_id
Object ID.