Loading...
Searching...
No Matches

Detailed Description

#include "liblwm2m.h"
+ Include dependency graph for light_control.h:

Go to the source code of this file.

Data Structures

struct  lwm2m_obj_light_control_args
 Arguments for the creation of a Light Control object instance. More...
 

Macros

#define CONFIG_LWM2M_LIGHT_INSTANCES_MAX   (3U)
 Maximum number of instances of the object.
 
#define CONFIG_LWM2M_LIGHT_CONTROL_COLOR_MAX_SIZE   (16U)
 Maximum size for the color string.
 
#define CONFIG_LWM2M_LIGHT_CONTROL_APP_TYPE_MAX_SIZE   (16U)
 Maximum size for the application type string.
 
#define LWM2M_LIGHT_CONTROL_OBJECT_ID   3311
 Light Control object ID.
 

Typedefs

typedef void(* lwm2m_obj_light_control_cb_t) (lwm2m_object_t *object, uint16_t instance_id, bool status, uint8_t dimmer, const char *color, const char *app_type, void *arg)
 Signature of the callback called when the light resources are updated.
 
typedef struct lwm2m_obj_light_control_args lwm2m_obj_light_control_args_t
 Arguments for the creation of a Light Control object instance.
 

Functions

lwm2m_object_t * lwm2m_object_light_control_init (lwm2m_client_data_t *client_data)
 Initialize the Light Control object.
 
int lwm2m_object_light_control_instance_create (const lwm2m_obj_light_control_args_t *args, int32_t instance_id)
 Create a new Light Control instance and add it to the object list.
 
int lwm2m_object_light_control_update_status (uint16_t instance_id, bool status, bool call_cb)
 Update the status of a light control instance.
 
int lwm2m_object_light_control_update_dimmer (uint16_t instance_id, uint8_t dimmer, bool call_cb)
 Update the dimmer value of a light control instance.
 
int lwm2m_object_light_control_update_color (uint16_t instance_id, const char *color, size_t len, bool call_cb)
 Update the color of a light control instance.
 
int lwm2m_object_light_control_update_app_type (uint16_t instance_id, const char *app_type, size_t len, bool call_cb)
 Update the application type of a light control instance.
 

Light Control object resource's IDs.

#define LWM2M_LIGHT_CONTROL_ON_OFF_ID   5850
 Light status resource ID.
 
#define LWM2M_LIGHT_CONTROL_DIMMER_ID   5851
 Dimmer value resource ID.
 
#define LWM2M_LIGHT_CONTROL_ON_TIME_ID   5852
 On Time resource ID.
 
#define LWM2M_LIGHT_CONTROL_ACT_PWR_ID   5805
 Light active power resource ID.
 
#define LWM2M_LIGHT_CONTROL_PWR_FACTOR_ID   5820
 Light power factor resource ID.
 
#define LWM2M_LIGHT_CONTROL_COLOUR_ID   5706
 Light color resource ID.
 
#define LWM2M_LIGHT_CONTROL_UNITS_ID   5701
 Units of the power sensing resource ID.
 
#define LWM2M_LIGHT_CONTROL_APP_TYPE_ID   5750
 Light application type resource ID.