nRF5 SDK for Thread and Zigbee v1.0.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
ZCL Scenes cluster

Data Structures

struct  zb_zcl_scene_table_record_fixed_s
 Fixed-size part of the Scene table. More...
 
struct  zb_zcl_scene_table_record_type_s
 Typical Scene table record structure. More...
 
struct  zb_zcl_scenes_fieldset_common_s
 Common part of the field set definition. More...
 
struct  zb_zcl_scenes_on_off_fieldset_content_s
 Scenes fieldsets representation structure for On/Off cluster-specific content. More...
 
struct  zb_zcl_scenes_fieldset_on_off_s
 Scenes fieldsets representation structure for On/Off cluster. More...
 
struct  zb_zcl_scenes_level_control_fieldset_content_s
 Scenes fieldsets representation structure for Level control cluster-specific content. More...
 
struct  zb_zcl_scenes_fieldset_level_control_s
 Scenes fieldsets representation structure for LevelControl cluster. More...
 
struct  zb_zcl_scenes_color_control_fieldset_content_s
 Scenes fieldsets representation structure for Color control cluster-specific content. More...
 
struct  zb_zcl_scenes_fieldset_color_control_s
 Scenes fieldsets representation structure for ColorControl cluster. More...
 
struct  zb_zcl_scenes_door_lock_fieldset_content_s
 Scenes fieldsets representation structure for Door lock cluster-specific content. More...
 
struct  zb_zcl_scenes_fieldset_door_lock_s
 Scenes fieldsets representation structure for Door lock cluster. More...
 
struct  zb_zcl_scenes_thermostat_fieldset_content_s
 Scenes fieldsets representation structure for Thermostat cluster-specific content. More...
 
struct  zb_zcl_scenes_fieldset_thermostat_s
 Scenes fieldsets representation structure for Thermostat cluster. More...
 
struct  zb_zcl_scenes_window_covering_fieldset_content_s
 Scenes fieldsets representation structure for Window covering cluster-specific content. More...
 
struct  zb_zcl_scenes_fieldset_window_covering_s
 Scenes fieldsets representation structure for WindowCovering cluster. More...
 
struct  zb_zcl_scenes_add_scene_req_s
 Add scene command payload constant-structure part. More...
 
struct  zb_zcl_scenes_view_scene_req_s
 View scene command payload structure. More...
 
struct  zb_zcl_scenes_remove_scene_req_s
 Remove scene command payload structure. More...
 
struct  zb_zcl_scenes_remove_all_scenes_req_s
 Remove all scenes command payload structure. More...
 
struct  zb_zcl_scenes_store_scene_req_s
 Store scene command payload structure. More...
 
struct  zb_zcl_scenes_recall_scene_req_s
 Recall scene command payload structure. More...
 
struct  zb_zcl_scenes_get_scene_membership_req_s
 Get scene membership command payload structure. More...
 
struct  zb_zcl_scenes_add_scene_res_s
 Add scene response payload structure. More...
 
struct  zb_zcl_scenes_view_scene_res_fixed_size_s
 Mandatory part of the Scenes.ViewSceneResponse payload. More...
 
struct  zb_zcl_scenes_view_scene_res_variable_size_s
 Optional part of the Scenes.ViewSceneResponse payload. More...
 
struct  zb_zcl_scenes_view_scene_res_s
 View scene response payload structure. More...
 
struct  zb_zcl_scenes_fieldset_view_scene_res_s
 
struct  zb_zcl_scenes_remove_scene_res_s
 Remove scene response payload structure. More...
 
struct  zb_zcl_scenes_remove_all_scenes_res_s
 Remove all scenes response payload structure. More...
 
struct  zb_zcl_scenes_store_scene_res_s
 Store scene response payload structure. More...
 
struct  zb_zcl_scenes_get_scene_membership_res_mandatory_s
 Get scene membership response fixed-structure payload part representation. More...
 
struct  zb_zcl_scenes_get_scene_membership_res_optional_s
 Get scene membership response optional payload part representation. More...
 
struct  zb_zcl_scenes_get_scene_membership_res_s
 Get scene membership response. More...
 

Scenes cluster attributes

enum  zb_zcl_scene_attr_e {
  ZB_ZCL_ATTR_SCENES_SCENE_COUNT_ID = 0x0000, ZB_ZCL_ATTR_SCENES_CURRENT_SCENE_ID = 0x001, ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_ID = 0x002, ZB_ZCL_ATTR_SCENES_SCENE_VALID_ID = 0x003,
  ZB_ZCL_ATTR_SCENES_NAME_SUPPORT_ID = 0x004, ZB_ZCL_ATTR_SCENES_LAST_CONFIGURED_BY_ID = 0x005
}
 Scene cluster attribute identifiers. More...
 
typedef struct
zb_zcl_scene_table_record_fixed_s 
zb_zcl_scene_table_record_fixed_t
 Fixed-size part of the Scene table.
 
typedef struct
zb_zcl_scene_table_record_type_s 
zb_zcl_scene_table_record_type_t
 Typical Scene table record structure. More...
 
typedef struct
zb_zcl_scenes_fieldset_common_s 
zb_zcl_scenes_fieldset_common_t
 Common part of the field set definition.
 
zb_zcl_status_t zb_zcl_scenes_process_store_scene (zb_uint8_t endpoint, zb_uint8_t group_id, zb_uint8_t scene_id)
 Store scene. More...
 
zb_ret_t zb_zcl_scenes_recall_global_scene (zb_uint8_t param, zb_uint8_t endpoint)
 Recall Global scene. More...
 
zb_void_t zb_zcl_scenes_remove_scenes_in_all_endpoints (zb_uint16_t group_id)
 Removes All scenes corresponding to a group identifiers in a whole device. More...
 
#define ZB_ZCL_SCENES_NAME_SUPPORT_BIT_MASK   0x80
 Mask to extract Name support bit.
 
#define ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_MAX_VALUE   0xfff7
 
#define ZB_ZCL_MAX_SCENE_TABLE_RECORDS   16
 
#define ZB_ZCL_SCENES_SCENE_COUNT_DEFAULT_VALUE   0
 Default value for Scene count attribute.
 
#define ZB_ZCL_SCENES_CURRENT_SCENE_DEFAULT_VALUE   0
 Default value for Current scene attribute.
 
#define ZB_ZCL_SCENES_CURRENT_GROUP_DEFAULT_VALUE   0
 Default value for Current group attribute.
 
#define ZB_ZCL_SCENES_SCENE_VALID_DEFAULT_VALUE   0
 Default value for Scene valid attribute.
 
#define ZB_ZCL_SCENES_NAME_SUPPORT_DEFAULT_VALUE   0
 Default value for Name support attribute. More...
 
#define ZB_ZCL_SCENE_GLOBAL_SCENE_GROUP_ID   0x00
 Global Scene - group identifier see ZLL spec 6.5.1.3.1.
 
#define ZB_ZCL_SCENE_GLOBAL_SCENE_ID   0x00
 Global Scene - scene identifier see ZLL spec 6.5.1.3.1.
 
#define ZB_ZCL_DECLARE_DEVICE_SCENE_TABLE_RECORD_TYPE(type_name,FIELD_SETS_LENGTH)
 Declares Scene table record type. More...
 
#define ZB_ZCL_SCENES_TABLE_RECORD_SIZE(FIELD_SETS_LENGTH)   (FIELD_SETS_LENGTH + sizeof(zb_zcl_scene_table_record_fixed_t))
 Evaluates Scene table record size. More...
 
#define ZB_ZCL_DEFINE_DEVICE_SCENE_TABLE(type_name, table_name)   type_name table_name[ZB_ZCL_MAX_SCENE_TABLE_RECORDS]
 
#define ZB_ZCL_SCENES_FREE_SCENE_TABLE_RECORD   0xffff
 Declares a "free record" marker for a scene table. More...
 
#define ZB_ZCL_SCENES_TRANSITION_TIME_DEFAULT_VALUE   0
 Default value for scene transition time.
 
#define ZB_ZCL_SCENES_CLEAR_SCENE_TABLE(table_name)
 Marks all records in a table as free. More...
 
#define ZB_ZCL_SCENES_CLEAR_ENDPOINT_SCENE_TABLE(endpoint_desc, remove_zero_group, status)
 Marks all records in a table as free. More...
 
#define ZB_AF_SET_ENDPOINT_SCENE_TABLE_INFO(endpoint, record_size, table)
 Sets endpoint scene table information. More...
 
#define ZB_ZCL_DECLARE_SCENES_ATTRIB_LIST(attr_list,scene_count,current_scene,current_group,scene_valid,name_support)
 Declares Scenes attribute list. More...
 
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH(CLUSTER_SYMBOL)   (CLUSTER_SYMBOL ## _SCENE_FIELD_SETS_LENGTH)
 Evaluates length if a fieldset for a particular cluster. More...
 
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH_2(CLUSTER_SYMBOL1, CLUSTER_SYMBOL2)
 Evaluates length if a fieldset for a particular cluster. More...
 
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH_3(CLUSTER_SYMBOL1,CLUSTER_SYMBOL2,CLUSTER_SYMBOL3)
 Evaluates length if a fieldset for a particular cluster. More...
 
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH_4(CLUSTER_SYMBOL1,CLUSTER_SYMBOL2,CLUSTER_SYMBOL3,CLUSTER_SYMBOL4)
 Evaluates length if a fieldset for a particular cluster. More...
 
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH_5(CLUSTER_SYMBOL1,CLUSTER_SYMBOL2,CLUSTER_SYMBOL3,CLUSTER_SYMBOL4,CLUSTER_SYMBOL5)
 Evaluates length if a fieldset for a particular cluster. More...
 

Scenes cluster internals

Internal structures for Scenes cluster

typedef struct
zb_zcl_scenes_on_off_fieldset_content_s 
zb_zcl_scenes_on_off_fieldset_content_t
 Scenes fieldsets representation structure for On/Off cluster-specific content.
 
typedef struct
zb_zcl_scenes_fieldset_on_off_s 
zb_zcl_scenes_fieldset_on_off_t
 Scenes fieldsets representation structure for On/Off cluster.
 
typedef struct
zb_zcl_scenes_level_control_fieldset_content_s 
zb_zcl_scenes_level_control_fieldset_content_t
 Scenes fieldsets representation structure for Level control cluster-specific content.
 
typedef struct
zb_zcl_scenes_fieldset_level_control_s 
zb_zcl_scenes_fieldset_level_control_t
 Scenes fieldsets representation structure for LevelControl cluster.
 
typedef struct
zb_zcl_scenes_color_control_fieldset_content_s 
zb_zcl_scenes_color_control_fieldset_content_t
 Scenes fieldsets representation structure for Color control cluster-specific content.
 
typedef struct
zb_zcl_scenes_fieldset_color_control_s 
zb_zcl_scenes_fieldset_color_control_t
 Scenes fieldsets representation structure for ColorControl cluster.
 
typedef struct
zb_zcl_scenes_door_lock_fieldset_content_s 
zb_zcl_scenes_door_lock_fieldset_content_t
 Scenes fieldsets representation structure for Door lock cluster-specific content.
 
typedef struct
zb_zcl_scenes_fieldset_door_lock_s 
zb_zcl_scenes_fieldset_door_lock_t
 Scenes fieldsets representation structure for Door lock cluster.
 
typedef struct
zb_zcl_scenes_thermostat_fieldset_content_s 
zb_zcl_scenes_thermostat_fieldset_content_t
 Scenes fieldsets representation structure for Thermostat cluster-specific content.
 
typedef struct
zb_zcl_scenes_fieldset_thermostat_s 
zb_zcl_scenes_fieldset_thermostat_t
 Scenes fieldsets representation structure for Thermostat cluster.
 
typedef struct
zb_zcl_scenes_window_covering_fieldset_content_s 
zb_zcl_scenes_window_covering_fieldset_content_t
 Scenes fieldsets representation structure for Window covering cluster-specific content.
 
typedef struct
zb_zcl_scenes_fieldset_window_covering_s 
zb_zcl_scenes_fieldset_window_covering_t
 Scenes fieldsets representation structure for WindowCovering cluster.
 
zb_uint8_t zb_zcl_scenes_remove_all_scenes_action (zb_uint8_t endpoint, zb_uint16_t group)
 
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_SCENES_SCENE_COUNT_ID(data_ptr)
 
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_SCENES_CURRENT_SCENE_ID(data_ptr)
 
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_ID(data_ptr)
 
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_SCENES_SCENE_VALID_ID(data_ptr)
 
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_SCENES_NAME_SUPPORT_ID(data_ptr)
 
#define ZB_ZCL_CLUSTER_ID_SCENES_SCENE_FIELD_SETS_LENGTH   0
 
#define ZB_ZCL_CLUSTER_ID_ON_OFF_SCENE_FIELD_SETS_LENGTH   (sizeof(zb_zcl_scenes_fieldset_on_off_t))
 
#define ZB_ZCL_SCENES_STORE_ON_OFF_FIELDSET(endpoint,data_ptr,max_data_size,field_sets_length,status)
 
#define ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL_SCENE_FIELD_SETS_LENGTH   (sizeof(zb_zcl_scenes_fieldset_level_control_t))
 
#define ZB_ZCL_SCENES_STORE_LEVEL_CONTROL_FIELDSET(endpoint,data_ptr,max_data_size,field_sets_length,status)
 
#define ZB_ZCL_CLUSTER_ID_COLOR_CONTROL_SCENE_FIELD_SETS_LENGTH   (sizeof(zb_zcl_scenes_fieldset_color_control_t))
 
#define ZB_ZCL_SCENES_STORE_COLOR_CONTROL_FIELDSET(endpoint,data_ptr,max_data_size,field_sets_length,status)
 
#define ZB_ZCL_CLUSTER_ID_DOOR_LOCK_SCENE_FIELD_SETS_LENGTH   (sizeof(zb_zcl_scenes_fieldset_door_lock_t))
 
#define ZB_ZCL_SCENES_STORE_DOOR_LOCK_FIELDSET(endpoint,data_ptr,max_data_size,field_sets_length,status)
 
#define ZB_ZCL_CLUSTER_ID_THERMOSTAT_SCENE_FIELD_SETS_LENGTH   (sizeof(zb_zcl_scenes_fieldset_thermostat_t))
 
#define ZB_ZCL_SCENES_STORE_THERMOSTAT_FIELDSET(endpoint,data_ptr,max_data_size,field_sets_length,status)
 
#define ZB_ZCL_CLUSTER_ID_WINDOW_COVERING_SCENE_FIELD_SETS_LENGTH   (sizeof(zb_zcl_scenes_fieldset_window_covering_t))
 
#define ZB_ZCL_SCENES_STORE_WINDOW_COVERING_FIELDSET(endpoint,data_ptr,max_data_size,field_sets_length,status)
 
#define ZB_ZCL_SCENES_GET_16BIT_VALUE(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length,status)
 
#define ZB_ZCL_SCENES_GET_TABLE_FIELDSETS_BEGIN(scene_table_record)
 
#define ZB_ZCL_SCENES_ADJUST_FIELDSET_PTR_INCONDITIONAL(cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_ADJUST_FIELDSET_PTR(cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_ON_OFF_ON_OFF(endpoint, cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_ON_OFF_FIELDSET(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_LEVEL_CONTROL_CURRENT_LEVEL(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_LEVEL_CONTROL_FIELDSET(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_CURRENT_X(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_CURRENT_Y(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_CURRENT_SATURATION(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_FIELDSET(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_DOOR_LOCK_LOCK_STATE(endpoint, cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_DOOR_LOCK_FIELDSET(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_THERMOSTAT_OCCUPIED_COOLING_SETPOINT(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_THERMOSTAT_OCCUPIED_HEATING_SETPOINT(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_THERMOSTAT_SYSTEM_MODE(endpoint, cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_THERMOSTAT_FIELDSET(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_RECALL_WINDOW_COVERING_FIELDSET(endpoint,cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_ADD_COMMON_FIELDSET_PART(cmd_struct_ptr, dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_ON_OFF_ON_OFF(cmd_struct_ptr, dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_ON_OFF_FIELDSET(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_LEVEL_CONTROL_CURRENT_LEVEL(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_LEVEL_CONTROL_FIELDSET(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_COLOR_CONTROL_FIELDSET(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_DOOR_LOCK_LOCK_STATE(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_DOOR_LOCK_FIELDSET(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_OCCUPIED_COOLING_SETPOINT(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_OCCUPIED_HEATING_SETPOINT(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_SYSTEM_MODE(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_FIELDSET(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE(cmd_struct_ptr,dst_data_ptr)
 
#define ZB_ZCL_SCENES_VIEW_SCENE_WINDOW_COVERING_FIELDSET(cmd_struct_ptr,dst_data_ptr)
 

Scenes cluster commands

enum  zb_zcl_scenes_cmd_e {
  ZB_ZCL_CMD_SCENES_ADD_SCENE = 0x00, ZB_ZCL_CMD_SCENES_VIEW_SCENE = 0x01, ZB_ZCL_CMD_SCENES_REMOVE_SCENE = 0x02, ZB_ZCL_CMD_SCENES_REMOVE_ALL_SCENES = 0x03,
  ZB_ZCL_CMD_SCENES_STORE_SCENE = 0x04, ZB_ZCL_CMD_SCENES_RECALL_SCENE = 0x05, ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP = 0x06
}
 Command identifiers for Scenes Cluster. More...
 
enum  zb_zcl_scenes_cmd_resp_e {
  ZB_ZCL_CMD_SCENES_ADD_SCENE_RESPONSE = 0x00, ZB_ZCL_CMD_SCENES_VIEW_SCENE_RESPONSE = 0x01, ZB_ZCL_CMD_SCENES_REMOVE_SCENE_RESPONSE = 0x02, ZB_ZCL_CMD_SCENES_REMOVE_ALL_SCENES_REPONSE = 0x03,
  ZB_ZCL_CMD_SCENES_STORE_SCENE_RESPONSE = 0x04, ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP_RESPONSE = 0x06
}
 Command response identifiers for Scenes Cluster. More...
 
typedef struct
zb_zcl_scenes_add_scene_req_s 
zb_zcl_scenes_add_scene_req_t
 Add scene command payload constant-structure part.
 
typedef struct
zb_zcl_scenes_view_scene_req_s 
zb_zcl_scenes_view_scene_req_t
 View scene command payload structure.
 
typedef struct
zb_zcl_scenes_remove_scene_req_s 
zb_zcl_scenes_remove_scene_req_t
 Remove scene command payload structure.
 
typedef struct
zb_zcl_scenes_remove_all_scenes_req_s 
zb_zcl_scenes_remove_all_scenes_req_t
 Remove all scenes command payload structure.
 
typedef struct
zb_zcl_scenes_store_scene_req_s 
zb_zcl_scenes_store_scene_req_t
 Store scene command payload structure.
 
typedef struct
zb_zcl_scenes_recall_scene_req_s 
zb_zcl_scenes_recall_scene_req_t
 Recall scene command payload structure.
 
typedef struct
zb_zcl_scenes_get_scene_membership_req_s 
zb_zcl_scenes_get_scene_membership_req_t
 Get scene membership command payload structure.
 
typedef struct
zb_zcl_scenes_add_scene_res_s 
zb_zcl_scenes_add_scene_res_t
 Add scene response payload structure.
 
typedef struct
zb_zcl_scenes_view_scene_res_fixed_size_s 
zb_zcl_scenes_view_scene_res_fixed_size_t
 Mandatory part of the Scenes.ViewSceneResponse payload.
 
typedef struct
zb_zcl_scenes_view_scene_res_variable_size_s 
zb_zcl_scenes_view_scene_res_variable_size_t
 Optional part of the Scenes.ViewSceneResponse payload.
 
typedef struct
zb_zcl_scenes_view_scene_res_s 
zb_zcl_scenes_view_scene_res_t
 View scene response payload structure.
 
typedef struct
zb_zcl_scenes_fieldset_view_scene_res_s 
zb_zcl_scenes_fieldset_view_scene_res_t
 
typedef struct
zb_zcl_scenes_remove_scene_res_s 
zb_zcl_scenes_remove_scene_res_t
 Remove scene response payload structure.
 
typedef struct
zb_zcl_scenes_remove_all_scenes_res_s 
zb_zcl_scenes_remove_all_scenes_res_t
 Remove all scenes response payload structure.
 
typedef struct
zb_zcl_scenes_store_scene_res_s 
zb_zcl_scenes_store_scene_res_t
 Store scene response payload structure.
 
typedef struct
zb_zcl_scenes_get_scene_membership_res_mandatory_s 
zb_zcl_scenes_get_scene_membership_res_mandatory_t
 Get scene membership response fixed-structure payload part representation.
 
typedef struct
zb_zcl_scenes_get_scene_membership_res_optional_s 
zb_zcl_scenes_get_scene_membership_res_optional_t
 Get scene membership response optional payload part representation.
 
typedef struct
zb_zcl_scenes_get_scene_membership_res_s 
zb_zcl_scenes_get_scene_membership_res_t
 Get scene membership response.
 
#define ZB_ZCL_SCENES_INIT_ADD_SCENE_REQ(buffer,cmd_struct_ptr,dis_default_resp,group_id,scene_id,transition_time)
 Start filling Add scene command frame. More...
 
#define ZB_ZCL_SCENES_SEND_ADD_SCENE_REQ(buffer,cmd_struct_ptr,dst_addr,dst_ep,ep,prof_id,callback)
 Sends Add scene command. More...
 
#define ZB_ZCL_SCENES_INIT_FIELDSET(cmd_struct_ptr, cluster, fs_length)
 Adds fieldset into the buffer for sending command. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_ON_OFF_ATTR_ON_OFF(cmd_struct_ptr,on_off_value)   ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, on_off_value)
 Adds OnOff.OnOff attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_LEVEL_CONTROL_ATTR_CURRENT_LEVEL(cmd_struct_ptr,current_level_value)   ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, current_level_value)
 Adds LevelControl.CurrentLevel attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_X(cmd_struct_ptr,current_x_value)   ZB_ZCL_PACKET_PUT_DATA16_VAL(cmd_struct_ptr, current_x_value)
 Adds ColorControl.CurrentX attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_Y(cmd_struct_ptr,current_y_value)   ZB_ZCL_PACKET_PUT_DATA16_VAL(cmd_struct_ptr, current_y_value)
 Adds ColorControl.CurrentY attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_SATURATION(cmd_struct_ptr,current_saturation_value)   ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, current_saturation_value)
 Adds ColorControl.CurrentSaturation attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_DOOR_LOCK_ATTR_LOCK_STATE(cmd_struct_ptr,lock_state_value)   ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, lock_state_value)
 Adds DoorLock.LockState attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_OCCUPIED_COOLING_SETPOINT(cmd_struct_ptr,occupied_cooling_setpoint_value)   ZB_ZCL_PACKET_PUT_DATA16(cmd_struct_ptr, occupied_cooling_setpoint_value)
 Adds Thermostat.OccupiedCoolingSetpoint attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_OCCUPIED_HEATING_SETPOINT(cmd_struct_ptr,occupied_heating_setpoint_value)   ZB_ZCL_PACKET_PUT_DATA16(cmd_struct_ptr, occupied_heating_setpoint_value)
 Adds Thermostat.OccupiedHeatingSetpoint attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_SYSTEM_MODE(cmd_struct_ptr,system_mode_value)   ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, system_mode_value)
 Adds Thermostat.SystemMode attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_WINDOW_COVERING_ATTR_CURRENT_POSITION_LIFT_PERCENTAGE(cmd_struct_ptr,current_position_lift_percentage_value)
 Adds WindowCovering.CurrentPositionLiftPercentage attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_FIELDSET_WINDOW_COVERING_ATTR_CURRENT_POSITION_TILT_PERCENTAGE(cmd_struct_ptr,current_position_tilt_percentage_value)
 Adds WindowCovering.CurrentPositionTiltPercentage attribute value to the fieldset. More...
 
#define ZB_ZCL_SCENES_ADD_ON_OFF_FIELDSET(cmd_struct_ptr, on_off_value)
 Adds fieldset for On/Off cluster. More...
 
#define ZB_ZCL_SCENES_ADD_LEVEL_CONTROL_FIELDSET(cmd_struct_ptr,current_level_value)
 Adds fieldset for Level control cluster. More...
 
#define ZB_ZCL_SCENES_ADD_COLOR_CONTROL_FIELDSET(cmd_struct_ptr,current_x_value,current_y_value)
 Adds fieldset for Color control cluster. More...
 
#define ZB_ZCL_SCENES_ADD_DOOR_LOCK_FIELDSET(cmd_struct_ptr, lock_state_value)
 Adds fieldset for Door lock cluster. More...
 
#define ZB_ZCL_SCENES_ADD_THERMOSTAT_FIELDSET(cmd_struct_ptr,occupied_cooling_setpoint_value,occupied_heating_setpoint_value,system_mode_value)
 Adds fieldset for Thermostat cluster. More...
 
#define ZB_ZCL_SCENES_ADD_WINDOW_COVERING_FIELDSET(cmd_struct_ptr,current_position_lift_percentage_value,current_position_tilt_percentage_value)
 Adds fieldset for Window covering cluster. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COMMON(buffer, cmd_struct_ptr)
 Parse common part of Add Scene command. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_NEXT_FIELDSET_DESC(buffer,cmd_struct_ptr,content_length)
 Parses fieldset description. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_STORE_FIELDSET_COMMON(src_data_ptr,dst_data_ptr,content_length)
 Copies parsed fieldset description into designated memory area. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_ON_OFF_ON_OFF(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies OnOff.OnOff attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_ON_OFF_FIELDSET(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Extracts OnOff fieldset value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_LEVEL_CONTROL_CURRENT_LEVEL(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies LevelControl.CurrentLevel attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_LEVEL_CONTROL_FIELDSET(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Extracts LevelControl fieldset value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_CURRENT_X(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies ColorControl.CurrentX attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_CURRENT_Y(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies ColorControl.CurrentY attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_CURRENT_SATURATION(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies ColorControl.CurrentSaturation attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_FIELDSET(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Extracts ColorControl fieldset value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_DOOR_LOCK_LOCK_STATE(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies DoorLock.LockState attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_DOOR_LOCK_FIELDSET(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Extracts DoorLock fieldset value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_OCCUPIED_COOLING_SETPOINT(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies Thermostat.OccupiedCoolingSetpoint attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_OCCUPIED_HEATING_SETPOINT(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies Thermostat.OccupiedHeatingSetpoint attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_SYSTEM_MODE(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies Thermostat.SystemMode attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_FIELDSET(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Extracts Thermostat fieldset value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_WINDOW_COVERING_LIFT_PERCENTAGE(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies WindowCovering.LiftPercentage attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_WINDOW_COVERING_TILT_PERCENTAGE(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Copies WindowCovering.TiltPercentage attribute value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_WINDOW_COVERING_FIELDSET(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
 Extracts WindowCovering fieldset value from Scenes.AddScene command payload into the specified point in memory. More...
 
#define ZB_ZCL_SCENES_SEND_VIEW_SCENE_REQ(buffer,dst_addr,dst_ep,ep,prof_id,dis_default_resp,callback,group_id,scene_id)
 Send View Scene command. More...
 
#define ZB_ZCL_SCENES_GET_VIEW_SCENE_REQ(buffer, cmd_struct_ptr)
 Parses Scenes.ViewScene command payload. More...
 
#define ZB_ZCL_SCENES_SEND_REMOVE_SCENE_REQ(buffer,dst_addr,dst_addr_mode,dst_ep,ep,prof_id,dis_default_resp,callback,group_id,scene_id)
 Send Remove scene command. More...
 
#define ZB_ZCL_SCENES_GET_REMOVE_SCENE_REQ(buffer, cmd_struct_ptr)
 Parses Scenes.RemoveScene command payload. More...
 
#define ZB_ZCL_SCENES_SEND_REMOVE_ALL_SCENES_REQ(buffer,dst_addr,dst_addr_mode,dst_ep,ep,prof_id,dis_default_resp,callback,group_id)
 Send Remove all scenes command. More...
 
#define ZB_ZCL_SCENES_GET_REMOVE_ALL_SCENES_REQ(buffer, cmd_struct_ptr)
 Parses Scenes.RemoveScene command payload. More...
 
#define ZB_ZCL_SCENES_SEND_STORE_SCENE_REQ(buffer,dst_addr,dst_addr_mode,dst_ep,ep,prof_id,dis_default_resp,callback,group_id,scene_id)
 Send Store Scene command. More...
 
#define ZB_ZCL_SCENES_GET_STORE_SCENE_REQ(buffer, cmd_struct_ptr)
 Parse Store Scene command. More...
 
#define ZB_ZCL_SCENES_SEND_RECALL_SCENE_REQ(buffer,dst_addr,dst_addr_mode,dst_ep,ep,prof_id,dis_default_resp,callback,group_id,scene_id)
 Send Recall scene command. More...
 
#define ZB_ZCL_SCENES_GET_RECALL_SCENE_REQ(buffer, cmd_struct_ptr)
 Parse Recall Scene command. More...
 
#define ZB_ZCL_SCENES_SEND_GET_SCENE_MEMBERSHIP_REQ(buffer,dst_addr,dst_addr_mode,dst_ep,ep,prof_id,dis_default_resp,callback,group_id)
 Send Remove all scenes command. More...
 
#define ZB_ZCL_SCENES_GET_GET_SCENE_MEMBERSHIP_REQ(buffer, cmd_struct_ptr)
 Parses Scenes.GetSceneMembership command payload. More...
 
#define ZB_ZCL_SCENES_SEND_ADD_SCENE_RES(buffer,seq_num,dst_addr,dst_ep,ep,prof_id,callback,status,group_id,scene_id)
 Send Add Scene response. More...
 
#define ZB_ZCL_SCENES_GET_ADD_SCENE_RES(buffer, cmd_struct_ptr)
 Parses Scenes.AddSceneResponse command payload. More...
 
#define ZB_ZCL_SCENES_INIT_VIEW_SCENE_RES(buffer,cmd_struct_ptr,seq_num,status,group_id,scene_id)
 Start filling View scene response frame. More...
 
#define ZB_ZCL_SCENES_SEND_VIEW_SCENE_RES(buffer,cmd_struct_ptr,dst_addr,dst_ep,ep,prof_id,callback)
 Sends View scene response. More...
 
#define ZB_ZCL_SCENES_ADD_TRANSITION_TIME_VIEW_SCENE_RES(cmd_struct_ptr,trans_time)   ZB_ZCL_PACKET_PUT_DATA16((cmd_struct_ptr), &(trans_time))
 Adds transition time into Scenes.ViewSceneResponse payload. More...
 
#define ZB_ZCL_SCENES_ADD_SCENE_NAME_VIEW_SCENE_RES(cmd_struct_ptr,scene_name)   ZB_ZCL_PACKET_PUT_DATA8((cmd_struct_ptr), 0)
 Adds scene name into Scenes.ViewSceneResponse payload. More...
 
#define ZB_ZCL_SCENES_GET_VIEW_SCENE_RES_COMMON(buffer, response_ptr)
 Parses comon part of the Scenes.ViewSceneResponse. More...
 
#define ZB_ZCL_SCENES_GET_NEXT_FIELDSET_VIEW_SCENE_RES(buffer, fieldset_ptr)
 
#define ZB_ZCL_SCENES_SEND_REMOVE_SCENE_RES(buffer,seq_num,dst_addr,dst_ep,ep,prof_id,callback,status,group_id,scene_id)
 Send Remove Scene response. More...
 
#define ZB_ZCL_SCENES_GET_REMOVE_SCENE_RES(buffer, cmd_struct_ptr)
 Parses Scenes.RemoveSceneResponse command payload. More...
 
#define ZB_ZCL_SCENES_SEND_REMOVE_ALL_SCENES_RES(buffer,seq_num,dst_addr,dst_ep,ep,prof_id,callback,status,group_id)
 Send Remove all scenes response. More...
 
#define ZB_ZCL_SCENES_GET_REMOVE_ALL_SCENES_RES(buffer, cmd_struct_ptr)
 Parses Scenes.RemoveAllScenesResponse command payload. More...
 
#define ZB_ZCL_SCENES_SEND_STORE_SCENE_RES(buffer,seq_num,dst_addr,dst_ep,ep,prof_id,callback,status,group_id,scene_id)
 Send Store scene response. More...
 
#define ZB_ZCL_SCENES_GET_STORE_SCENE_RES(buffer, cmd_struct_ptr)
 Parses Scenes.StoreScene command payload. More...
 
#define ZB_ZCL_SCENES_CAPACITY_ONE_MORE   ((zb_uint8_t)0xfe)
 Scene table capacity: at least one scene can be added. More...
 
#define ZB_ZCL_SCENES_CAPACITY_UNKNOWN   ((zb_uint8_t)0xff)
 Scene table capacity unknown.
 
#define ZB_ZCL_SCENES_INIT_GET_SCENE_MEMBERSHIP_RES(buffer,cmd_struct_ptr,seq_num,cap_ptr,status,capacity,group_id)
 Start filling Get scene membership response frame. More...
 
#define ZB_ZCL_SCENES_ADD_SCENE_COUNT_GET_SCENE_MEMBERSHIP_RES(cmd_struct_ptr,scene_count)   ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, (scene_count))
 Appends Scene count value to Get scene membership response constant-structure payload part. More...
 
#define ZB_ZCL_SCENES_ADD_SCENE_ID_GET_SCENE_MEMBERSHIP_RES(cmd_struct_ptr,scene_id)   ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, (scene_id))
 Appends a scene identifier to the Scene list in Get scene membership response payload. More...
 
#define ZB_ZCL_SCENES_SEND_GET_SCENE_MEMBERSHIP_RES(buffer,cmd_struct_ptr,dst_addr,dst_ep,ep,prof_id,callback)
 Sends Get scene membership response. More...
 
#define ZB_ZCL_SCENES_GET_GET_SCENE_MEMBERSHIP_RES(buffer, cmd_struct_ptr)
 Parses Scenes.RemoveAllScenesResponse command payload. More...
 

Detailed Description

ZCL Scenes cluster definitions

Macro Definition Documentation

#define ZB_AF_SET_ENDPOINT_SCENE_TABLE_INFO (   endpoint,
  record_size,
  table 
)
Value:
{ \
ep->scene_table_record_size = record_size; \
ep->scene_table = table; \
}
struct zb_af_endpoint_desc_s zb_af_endpoint_desc_t
Endpoint descriptor.
zb_af_endpoint_desc_t * zb_af_get_endpoint_desc(zb_uint8_t ep_id)
Search for endpoint (device) descriptor by endpoint ID.

Sets endpoint scene table information.

Parameters
endpointscene table belongs to
record_size- scene table record size for the endpoint
table- pointer to the scen table in the userspace
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_ID (   data_ptr)
Value:
{ \
(zb_voidp_t) data_ptr \
}
Definition: zb_zcl_common.h:456
Definition: zb_zcl_common.h:490
void * zb_voidp_t
Project-local "pointer to void" type.
Definition: zb_types.h:293
Group ID of the scene last invoked.
Definition: zb_zcl_scenes.h:76
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_SCENES_CURRENT_SCENE_ID (   data_ptr)
Value:
{ \
(zb_voidp_t) data_ptr \
}
Definition: zb_zcl_scenes.h:71
Definition: zb_zcl_common.h:490
void * zb_voidp_t
Project-local "pointer to void" type.
Definition: zb_types.h:293
Definition: zb_zcl_common.h:455
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_SCENES_NAME_SUPPORT_ID (   data_ptr)
Value:
{ \
(zb_voidp_t) data_ptr \
}
Definition: zb_zcl_common.h:490
void * zb_voidp_t
Project-local "pointer to void" type.
Definition: zb_types.h:293
Indicates support for scene names.
Definition: zb_zcl_scenes.h:94
Definition: zb_zcl_common.h:447
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_SCENES_SCENE_COUNT_ID (   data_ptr)
Value:
{ \
(zb_voidp_t) data_ptr \
}
Definition: zb_zcl_scenes.h:69
Definition: zb_zcl_common.h:490
void * zb_voidp_t
Project-local "pointer to void" type.
Definition: zb_types.h:293
Definition: zb_zcl_common.h:455
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_SCENES_SCENE_VALID_ID (   data_ptr)
Value:
{ \
(zb_voidp_t) data_ptr \
}
Indicates whether the state of the device corresponds to that associated with the CurrentScene and Cu...
Definition: zb_zcl_scenes.h:82
Definition: zb_zcl_common.h:490
void * zb_voidp_t
Project-local "pointer to void" type.
Definition: zb_types.h:293
Definition: zb_zcl_common.h:446
#define ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_MAX_VALUE   0xfff7

Maximal permissible value for Current group attribute

#define ZB_ZCL_CLUSTER_ID_SCENES_SCENE_FIELD_SETS_LENGTH   0

Scenes fieldset length for Scenes cluster

#define ZB_ZCL_DECLARE_DEVICE_SCENE_TABLE_RECORD_TYPE (   type_name,
  FIELD_SETS_LENGTH 
)
Value:
typedef ZB_PACKED_PRE struct type_name ## _s \
{ \
zb_uint8_t field_sets[FIELD_SETS_LENGTH]; \
} ZB_PACKED_STRUCT type_name
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
struct zb_zcl_scene_table_record_fixed_s zb_zcl_scene_table_record_fixed_t
Fixed-size part of the Scene table.

Declares Scene table record type.

Parameters
type_namename of the type for scene table record
FIELD_SETS_LENGTHlength of the field sets for this particular device. Can be evaluated with ... macro.
Note
For detail information on fields see zb_zcl_scene_table_record_type_s
Attention
Scene table record structure will have a tag of the form type_name with "_s" appended.
#define ZB_ZCL_DECLARE_SCENES_ATTRIB_LIST (   attr_list,
  scene_count,
  current_scene,
  current_group,
  scene_valid,
  name_support 
)
Value:
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_SCENES_SCENE_COUNT_ID, (scene_count)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_SCENES_CURRENT_SCENE_ID, (current_scene)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_ID, (current_group)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_SCENES_SCENE_VALID_ID, (scene_valid)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_SCENES_NAME_SUPPORT_ID, (name_support)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST
Definition: zb_zcl_scenes.h:69
Indicates whether the state of the device corresponds to that associated with the CurrentScene and Cu...
Definition: zb_zcl_scenes.h:82
Definition: zb_zcl_scenes.h:71
Indicates support for scene names.
Definition: zb_zcl_scenes.h:94
Group ID of the scene last invoked.
Definition: zb_zcl_scenes.h:76

Declares Scenes attribute list.

Parameters
attr_listAttribute list name
scene_countZB_ZCL_ATTR_SCENES_SCENE_COUNT_ID placeholder
current_sceneZB_ZCL_ATTR_SCENES_CURRENT_SCENE_ID placeholder
current_groupZB_ZCL_ATTR_SCENES_CURRENT_GROUP_ID placeholder
scene_validZB_ZCL_ATTR_SCENES_SCENE_VALID_ID placeholder
name_supportZB_ZCL_ATTR_SCENES_NAME_SUPPORT_ID placeholder
#define ZB_ZCL_DEFINE_DEVICE_SCENE_TABLE (   type_name,
  table_name 
)    type_name table_name[ZB_ZCL_MAX_SCENE_TABLE_RECORDS]

Defines Scene table

Parameters
type_nameScene table record type name
table_nameScene table variable name
#define ZB_ZCL_MAX_SCENE_TABLE_RECORDS   16

Maximal number of scene table records

#define ZB_ZCL_SCENES_ADD_COLOR_CONTROL_FIELDSET (   cmd_struct_ptr,
  current_x_value,
  current_y_value 
)
Value:
{ \
cmd_struct_ptr, \
cmd_struct_ptr, \
current_x_value); \
cmd_struct_ptr, \
current_y_value); \
}
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_Y(cmd_struct_ptr,current_y_value)
Adds ColorControl.CurrentY attribute value to the fieldset.
Definition: zb_zcl_scenes.h:1948
Scenes fieldsets representation structure for Color control cluster-specific content.
Definition: zb_zcl_scenes.h:616
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_X(cmd_struct_ptr,current_x_value)
Adds ColorControl.CurrentX attribute value to the fieldset.
Definition: zb_zcl_scenes.h:1939
#define ZB_ZCL_SCENES_INIT_FIELDSET(cmd_struct_ptr, cluster, fs_length)
Adds fieldset into the buffer for sending command.
Definition: zb_zcl_scenes.h:1911
Definition: zb_zcl_common.h:190

Adds fieldset for Color control cluster.

Parameters
cmd_struct_ptr- pionter to the place to put fieldset to
current_x_value- value of the ColorControl.CurrentX attribute to put into the fieldset
current_y_value- value of the ColorControl.CurrentY attribute to put into the fieldset
#define ZB_ZCL_SCENES_ADD_COMMON_FIELDSET_PART (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
ZB_HTOLE16(dst_data_ptr, cmd_struct_ptr); \
((zb_zcl_scenes_fieldset_common_t*)dst_data_ptr)->fieldset_length = \
((zb_zcl_scenes_fieldset_common_t*)cmd_struct_ptr)->fieldset_length; \
dst_data_ptr += sizeof(zb_zcl_scenes_fieldset_common_t); \
}
struct zb_zcl_scenes_fieldset_common_s zb_zcl_scenes_fieldset_common_t
Common part of the field set definition.
Common part of the field set definition.
Definition: zb_zcl_scenes.h:323
#define ZB_ZCL_SCENES_ADD_DOOR_LOCK_FIELDSET (   cmd_struct_ptr,
  lock_state_value 
)
Value:
{ \
cmd_struct_ptr, \
cmd_struct_ptr, \
lock_state_value); \
}
Definition: zb_zcl_common.h:177
Scenes fieldsets representation structure for Door lock cluster-specific content. ...
Definition: zb_zcl_scenes.h:865
#define ZB_ZCL_SCENES_ADD_FIELDSET_DOOR_LOCK_ATTR_LOCK_STATE(cmd_struct_ptr,lock_state_value)
Adds DoorLock.LockState attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2006
#define ZB_ZCL_SCENES_INIT_FIELDSET(cmd_struct_ptr, cluster, fs_length)
Adds fieldset into the buffer for sending command.
Definition: zb_zcl_scenes.h:1911

Adds fieldset for Door lock cluster.

Parameters
cmd_struct_ptr- pionter to the place to put fieldset to
lock_state_value- value of the DoorLock.LockState attribute to put into the fieldset
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_SATURATION (   cmd_struct_ptr,
  current_saturation_value 
)    ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, current_saturation_value)

Adds ColorControl.CurrentSaturation attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
current_saturation_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_X (   cmd_struct_ptr,
  current_x_value 
)    ZB_ZCL_PACKET_PUT_DATA16_VAL(cmd_struct_ptr, current_x_value)

Adds ColorControl.CurrentX attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
current_x_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_Y (   cmd_struct_ptr,
  current_y_value 
)    ZB_ZCL_PACKET_PUT_DATA16_VAL(cmd_struct_ptr, current_y_value)

Adds ColorControl.CurrentY attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
current_y_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_FIELDSET_DOOR_LOCK_ATTR_LOCK_STATE (   cmd_struct_ptr,
  lock_state_value 
)    ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, lock_state_value)

Adds DoorLock.LockState attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
lock_state_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_FIELDSET_LEVEL_CONTROL_ATTR_CURRENT_LEVEL (   cmd_struct_ptr,
  current_level_value 
)    ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, current_level_value)

Adds LevelControl.CurrentLevel attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
current_level_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_FIELDSET_ON_OFF_ATTR_ON_OFF (   cmd_struct_ptr,
  on_off_value 
)    ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, on_off_value)

Adds OnOff.OnOff attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
on_off_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_OCCUPIED_COOLING_SETPOINT (   cmd_struct_ptr,
  occupied_cooling_setpoint_value 
)    ZB_ZCL_PACKET_PUT_DATA16(cmd_struct_ptr, occupied_cooling_setpoint_value)

Adds Thermostat.OccupiedCoolingSetpoint attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
occupied_cooling_setpoint_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_OCCUPIED_HEATING_SETPOINT (   cmd_struct_ptr,
  occupied_heating_setpoint_value 
)    ZB_ZCL_PACKET_PUT_DATA16(cmd_struct_ptr, occupied_heating_setpoint_value)

Adds Thermostat.OccupiedHeatingSetpoint attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
occupied_heating_setpoint_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_SYSTEM_MODE (   cmd_struct_ptr,
  system_mode_value 
)    ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, system_mode_value)

Adds Thermostat.SystemMode attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
system_mode_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_FIELDSET_WINDOW_COVERING_ATTR_CURRENT_POSITION_LIFT_PERCENTAGE (   cmd_struct_ptr,
  current_position_lift_percentage_value 
)
Value:
cmd_struct_ptr, \
current_position_lift_percentage_value)
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273

Adds WindowCovering.CurrentPositionLiftPercentage attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
current_position_lift_percentage_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_FIELDSET_WINDOW_COVERING_ATTR_CURRENT_POSITION_TILT_PERCENTAGE (   cmd_struct_ptr,
  current_position_tilt_percentage_value 
)
Value:
cmd_struct_ptr, \
current_position_tilt_percentage_value)
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273

Adds WindowCovering.CurrentPositionTiltPercentage attribute value to the fieldset.

Parameters
cmd_struct_ptr- pointer to the place to put attribute value to
current_position_tilt_percentage_value- value to put into the buffer
#define ZB_ZCL_SCENES_ADD_LEVEL_CONTROL_FIELDSET (   cmd_struct_ptr,
  current_level_value 
)
Value:
{ \
cmd_struct_ptr, \
cmd_struct_ptr, \
current_level_value); \
}
#define ZB_ZCL_SCENES_ADD_FIELDSET_LEVEL_CONTROL_ATTR_CURRENT_LEVEL(cmd_struct_ptr,current_level_value)
Adds LevelControl.CurrentLevel attribute value to the fieldset.
Definition: zb_zcl_scenes.h:1930
Scenes fieldsets representation structure for Level control cluster-specific content.
Definition: zb_zcl_scenes.h:540
Definition: zb_zcl_common.h:147
#define ZB_ZCL_SCENES_INIT_FIELDSET(cmd_struct_ptr, cluster, fs_length)
Adds fieldset into the buffer for sending command.
Definition: zb_zcl_scenes.h:1911

Adds fieldset for Level control cluster.

Parameters
cmd_struct_ptr- pionter to the place to put fieldset to
current_level_value- value of the LevelControl.CurrentLevel attribute to put into the fieldset
#define ZB_ZCL_SCENES_ADD_ON_OFF_FIELDSET (   cmd_struct_ptr,
  on_off_value 
)
Value:
{ \
cmd_struct_ptr, \
cmd_struct_ptr, \
on_off_value); \
}
Scenes fieldsets representation structure for On/Off cluster-specific content.
Definition: zb_zcl_scenes.h:466
#define ZB_ZCL_SCENES_ADD_FIELDSET_ON_OFF_ATTR_ON_OFF(cmd_struct_ptr,on_off_value)
Adds OnOff.OnOff attribute value to the fieldset.
Definition: zb_zcl_scenes.h:1921
#define ZB_ZCL_SCENES_INIT_FIELDSET(cmd_struct_ptr, cluster, fs_length)
Adds fieldset into the buffer for sending command.
Definition: zb_zcl_scenes.h:1911
Definition: zb_zcl_common.h:144

Adds fieldset for On/Off cluster.

Parameters
cmd_struct_ptr- pionter to the place to put fieldset to
on_off_value- value of the OnOff.OnOff attribute to put into the fieldset
#define ZB_ZCL_SCENES_ADD_SCENE_COUNT_GET_SCENE_MEMBERSHIP_RES (   cmd_struct_ptr,
  scene_count 
)    ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, (scene_count))

Appends Scene count value to Get scene membership response constant-structure payload part.

Note
Should not be used if command status is not ZB_ZCL_STATUS_SUCCESS
Parameters
cmd_struct_ptr- pointer to the memory area SceneCount value should be put to
scene_count- number of scenes in the scene list
#define ZB_ZCL_SCENES_ADD_SCENE_ID_GET_SCENE_MEMBERSHIP_RES (   cmd_struct_ptr,
  scene_id 
)    ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, (scene_id))

Appends a scene identifier to the Scene list in Get scene membership response payload.

Note
Should be preceded with ZB_ZCL_SCENES_ADD_SCENE_COUNT_GET_SCENE_MEMBERSHIP_RES macro invocation.
Parameters
cmd_struct_ptr- pointer to the memory area scene identifier should be put to
scene_id- scene identifier
#define ZB_ZCL_SCENES_ADD_SCENE_NAME_VIEW_SCENE_RES (   cmd_struct_ptr,
  scene_name 
)    ZB_ZCL_PACKET_PUT_DATA8((cmd_struct_ptr), 0)

Adds scene name into Scenes.ViewSceneResponse payload.

Since we don't support scene names, puts only zero scene name length byte to preserve payload format.

Parameters
cmd_struct_ptr- pointer to the place in buffer to put data to
scene_name- scene name to put (currently ignored)
#define ZB_ZCL_SCENES_ADD_THERMOSTAT_FIELDSET (   cmd_struct_ptr,
  occupied_cooling_setpoint_value,
  occupied_heating_setpoint_value,
  system_mode_value 
)
Value:
{ \
cmd_struct_ptr, \
cmd_struct_ptr, \
occupied_cooling_setpoint_value); \
cmd_struct_ptr, \
occupied_heating_setpoint_value); \
cmd_struct_ptr, \
system_mode_value); \
}
Scenes fieldsets representation structure for Thermostat cluster-specific content.
Definition: zb_zcl_scenes.h:940
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_OCCUPIED_COOLING_SETPOINT(cmd_struct_ptr,occupied_cooling_setpoint_value)
Adds Thermostat.OccupiedCoolingSetpoint attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2016
Definition: zb_zcl_common.h:182
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_OCCUPIED_HEATING_SETPOINT(cmd_struct_ptr,occupied_heating_setpoint_value)
Adds Thermostat.OccupiedHeatingSetpoint attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2026
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_SYSTEM_MODE(cmd_struct_ptr,system_mode_value)
Adds Thermostat.SystemMode attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2036
#define ZB_ZCL_SCENES_INIT_FIELDSET(cmd_struct_ptr, cluster, fs_length)
Adds fieldset into the buffer for sending command.
Definition: zb_zcl_scenes.h:1911

Adds fieldset for Thermostat cluster.

Parameters
cmd_struct_ptr- pionter to the place to put fieldset to
occupied_cooling_setpoint_value- value of the Thermostat.OccupiedCoolingSetpoint attribute to put into the fieldset
occupied_heating_setpoint_value- value of the Thermostat.OccupiedHeatingSetpoint attribute to put into the fieldset
system_mode_value- value of the Thermostat.SystemMode attribute to put into the fieldset
#define ZB_ZCL_SCENES_ADD_TRANSITION_TIME_VIEW_SCENE_RES (   cmd_struct_ptr,
  trans_time 
)    ZB_ZCL_PACKET_PUT_DATA16((cmd_struct_ptr), &(trans_time))

Adds transition time into Scenes.ViewSceneResponse payload.

Parameters
cmd_struct_ptr- pointer to the place in buffer to put data to
trans_time- transition time to put
#define ZB_ZCL_SCENES_ADD_WINDOW_COVERING_FIELDSET (   cmd_struct_ptr,
  current_position_lift_percentage_value,
  current_position_tilt_percentage_value 
)
Value:
{ \
cmd_struct_ptr, \
cmd_struct_ptr, \
current_position_lift_percentage_value); \
cmd_struct_ptr, \
current_position_tilt_percentage_value); \
}
Definition: zb_zcl_common.h:178
Scenes fieldsets representation structure for Window covering cluster-specific content.
Definition: zb_zcl_scenes.h:1058
#define ZB_ZCL_SCENES_ADD_FIELDSET_WINDOW_COVERING_ATTR_CURRENT_POSITION_TILT_PERCENTAGE(cmd_struct_ptr,current_position_tilt_percentage_value)
Adds WindowCovering.CurrentPositionTiltPercentage attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2058
#define ZB_ZCL_SCENES_INIT_FIELDSET(cmd_struct_ptr, cluster, fs_length)
Adds fieldset into the buffer for sending command.
Definition: zb_zcl_scenes.h:1911
#define ZB_ZCL_SCENES_ADD_FIELDSET_WINDOW_COVERING_ATTR_CURRENT_POSITION_LIFT_PERCENTAGE(cmd_struct_ptr,current_position_lift_percentage_value)
Adds WindowCovering.CurrentPositionLiftPercentage attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2046

Adds fieldset for Window covering cluster.

Parameters
cmd_struct_ptr- pionter to the place to put fieldset to
current_position_lift_percentage_value- value of the WindowCovering.CurrentPositionLiftPercentage attribute to put into the fieldset
current_position_tilt_percentage_value- value of the WindowCovering.CurrentPositionTiltPercentage attribute to put into the fieldset
#define ZB_ZCL_SCENES_ADJUST_FIELDSET_PTR (   cmd_struct_ptr)
Value:
{ \
if (((zb_zcl_scenes_fieldset_common_t*)(cmd_struct_ptr))->fieldset_length) \
{ \
ZB_ZCL_SCENES_ADJUST_FIELDSET_PTR_INCONDITIONAL(cmd_struct_ptr) \
} \
}
Common part of the field set definition.
Definition: zb_zcl_scenes.h:323
#define ZB_ZCL_SCENES_ADJUST_FIELDSET_PTR_INCONDITIONAL (   cmd_struct_ptr)
Value:
{ \
(cmd_struct_ptr) += sizeof(zb_zcl_scenes_fieldset_common_t) + \
((zb_zcl_scenes_fieldset_common_t*)(cmd_struct_ptr))->fieldset_length; \
}
Common part of the field set definition.
Definition: zb_zcl_scenes.h:323
#define ZB_ZCL_SCENES_CAPACITY_ONE_MORE   ((zb_uint8_t)0xfe)

Scene table capacity: at least one scene can be added.

Exact number is unknown

#define ZB_ZCL_SCENES_CLEAR_ENDPOINT_SCENE_TABLE (   endpoint_desc,
  remove_zero_group,
  status 
)
Value:
{ \
zb_uint8_t scene_table_idx; \
if (! ( (endpoint_desc) \
&& (endpoint_desc)->scene_table_record_size \
&& (endpoint_desc)->scene_table)) \
{ \
} \
else \
{ \
scene_table = \
(zb_zcl_scene_table_record_fixed_t*)((endpoint_desc)->scene_table); \
for ( scene_table_idx = 0; \
scene_table_idx < ZB_ZCL_MAX_SCENE_TABLE_RECORDS; \
++scene_table_idx) \
{ \
if ((remove_zero_group) || scene_table->group_id) \
{ \
scene_table->group_id = ZB_ZCL_SCENES_FREE_SCENE_TABLE_RECORD; \
} \
((zb_uint8_t*)scene_table + (endpoint_desc)->scene_table_record_size); \
} \
} \
}
#define ZB_ZCL_SCENES_FREE_SCENE_TABLE_RECORD
Declares a "free record" marker for a scene table.
Definition: zb_zcl_scenes.h:254
Fixed-size part of the Scene table.
Definition: zb_zcl_scenes.h:166
#define ZB_ZCL_MAX_SCENE_TABLE_RECORDS
Definition: zb_zcl_scenes.h:112
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
struct zb_zcl_scene_table_record_fixed_s zb_zcl_scene_table_record_fixed_t
Fixed-size part of the Scene table.
Definition: zb_zcl_common.h:276

Marks all records in a table as free.

Parameters
endpoint_desc- pointer to the description of the endpoint (of type zb_af_endpoint_desc_s) a scene table belongs to
remove_zero_group- boolean flag indicating we need to clean scenes for groups with zero group identifier too.
statusof the operation
#define ZB_ZCL_SCENES_CLEAR_SCENE_TABLE (   table_name)
Value:
{ \
zb_uint8_t scene_table_idx; \
for ( scene_table_idx = 0; \
scene_table_idx < ZB_ZCL_MAX_SCENE_TABLE_RECORDS; \
++scene_table_idx) \
{ \
table_name[scene_table_idx].common.group_id = \
} \
}
#define ZB_ZCL_SCENES_FREE_SCENE_TABLE_RECORD
Declares a "free record" marker for a scene table.
Definition: zb_zcl_scenes.h:254
#define ZB_ZCL_MAX_SCENE_TABLE_RECORDS
Definition: zb_zcl_scenes.h:112
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115

Marks all records in a table as free.

Parameters
table_nameName of the scene table variable
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH (   CLUSTER_SYMBOL)    (CLUSTER_SYMBOL ## _SCENE_FIELD_SETS_LENGTH)

Evaluates length if a fieldset for a particular cluster.

CLUSTER_SYMBOL is a symbolic name for a cluster identifier, see literals in zb_zcl_cluster_id_e

Note
it is strongly recommended to use the macro only with clusters defining Scenes extensions
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH_2 (   CLUSTER_SYMBOL1,
  CLUSTER_SYMBOL2 
)
Value:
(ZB_ZCL_SCENES_FIELDSETS_LENGTH(CLUSTER_SYMBOL1) + \
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH(CLUSTER_SYMBOL)
Evaluates length if a fieldset for a particular cluster.
Definition: zb_zcl_scenes.h:359

Evaluates length if a fieldset for a particular cluster.

CLUSTER_SYMBOL is a symbolic name for a cluster identifier, see literals in zb_zcl_cluster_id_e

Note
it is strongly recommended to use the macro only with clusters defining Scenes extensions
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH_3 (   CLUSTER_SYMBOL1,
  CLUSTER_SYMBOL2,
  CLUSTER_SYMBOL3 
)
Value:
(ZB_ZCL_SCENES_FIELDSETS_LENGTH(CLUSTER_SYMBOL1) + \
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH(CLUSTER_SYMBOL)
Evaluates length if a fieldset for a particular cluster.
Definition: zb_zcl_scenes.h:359

Evaluates length if a fieldset for a particular cluster.

CLUSTER_SYMBOL is a symbolic name for a cluster identifier, see literals in zb_zcl_cluster_id_e

Note
it is strongly recommended to use the macro only with clusters defining Scenes extensions
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH_4 (   CLUSTER_SYMBOL1,
  CLUSTER_SYMBOL2,
  CLUSTER_SYMBOL3,
  CLUSTER_SYMBOL4 
)
Value:
(ZB_ZCL_SCENES_FIELDSETS_LENGTH_2(CLUSTER_SYMBOL1, CLUSTER_SYMBOL2) + \
ZB_ZCL_SCENES_FIELDSETS_LENGTH_2(CLUSTER_SYMBOL3, CLUSTER_SYMBOL4))
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH_2(CLUSTER_SYMBOL1, CLUSTER_SYMBOL2)
Evaluates length if a fieldset for a particular cluster.
Definition: zb_zcl_scenes.h:363

Evaluates length if a fieldset for a particular cluster.

CLUSTER_SYMBOL is a symbolic name for a cluster identifier, see literals in zb_zcl_cluster_id_e

Note
it is strongly recommended to use the macro only with clusters defining Scenes extensions
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH_5 (   CLUSTER_SYMBOL1,
  CLUSTER_SYMBOL2,
  CLUSTER_SYMBOL3,
  CLUSTER_SYMBOL4,
  CLUSTER_SYMBOL5 
)
Value:
(ZB_ZCL_SCENES_FIELDSETS_LENGTH_2(CLUSTER_SYMBOL1, CLUSTER_SYMBOL2) + \
ZB_ZCL_SCENES_FIELDSETS_LENGTH_2(CLUSTER_SYMBOL3, CLUSTER_SYMBOL4) + \
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH(CLUSTER_SYMBOL)
Evaluates length if a fieldset for a particular cluster.
Definition: zb_zcl_scenes.h:359
#define ZB_ZCL_SCENES_FIELDSETS_LENGTH_2(CLUSTER_SYMBOL1, CLUSTER_SYMBOL2)
Evaluates length if a fieldset for a particular cluster.
Definition: zb_zcl_scenes.h:363

Evaluates length if a fieldset for a particular cluster.

CLUSTER_SYMBOL is a symbolic name for a cluster identifier, see literals in zb_zcl_cluster_id_e

Note
it is strongly recommended to use the macro only with clusters defining Scenes extensions
#define ZB_ZCL_SCENES_FREE_SCENE_TABLE_RECORD   0xffff

Declares a "free record" marker for a scene table.

Used as a value of a group_id field (see zb_zcl_scene_table_record_type_s) in a corresponding table record

#define ZB_ZCL_SCENES_GET_16BIT_VALUE (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length,
  status 
)
Value:
{ \
if ( content_length < sizeof(zb_uint16_t) \
|| status != ZB_ZCL_STATUS_SUCCESS) \
{ \
} \
else \
{ \
ZB_LETOH16((dst_data_ptr), (src_data_ptr)); \
(dst_data_ptr) += sizeof(zb_uint16_t); \
(src_data_ptr) += sizeof(zb_uint16_t); \
(content_length) -= sizeof(zb_uint16_t); \
(*(dst_fieldset_length)) += sizeof(zb_uint16_t); \
} \
}
Definition: zb_zcl_common.h:268
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:119
#define ZB_LETOH16
Definition: zb_types.h:666
Definition: zb_zcl_common.h:276
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_CURRENT_SATURATION (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if ((content_length) >= sizeof(zb_uint16_t)) \
{ \
((zb_zcl_scenes_fieldset_color_control_t*)(dst_data_ptr))->specific.current_saturation = \
((zb_zcl_scenes_fieldset_color_control_t*)(src_data_ptr))->specific.current_saturation; \
(content_length) -= sizeof(zb_uint8_t); \
*(dst_fieldset_length) += sizeof(zb_uint8_t); \
} \
}
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:119
Scenes fieldsets representation structure for ColorControl cluster.
Definition: zb_zcl_scenes.h:636
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115

Copies ColorControl.CurrentSaturation attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_CURRENT_X (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if ((content_length) >= sizeof(zb_uint16_t)) \
{ \
ZB_HTOLE16( \
&(((zb_zcl_scenes_fieldset_color_control_t*)(dst_data_ptr))->specific.current_x), \
&(((zb_zcl_scenes_fieldset_color_control_t*)(src_data_ptr))->specific.current_x)); \
(content_length) -= sizeof(zb_uint16_t); \
*(dst_fieldset_length) += sizeof(zb_uint16_t); \
} \
}
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:119
Scenes fieldsets representation structure for ColorControl cluster.
Definition: zb_zcl_scenes.h:636

Copies ColorControl.CurrentX attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_CURRENT_Y (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if ((content_length) >= sizeof(zb_uint16_t)) \
{ \
ZB_HTOLE16( \
&(((zb_zcl_scenes_fieldset_color_control_t*)(dst_data_ptr))->specific.current_y), \
&(((zb_zcl_scenes_fieldset_color_control_t*)(src_data_ptr))->specific.current_y));\
(content_length) -= sizeof(zb_uint16_t); \
*(dst_fieldset_length) += sizeof(zb_uint16_t); \
} \
}
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:119
Scenes fieldsets representation structure for ColorControl cluster.
Definition: zb_zcl_scenes.h:636

Copies ColorControl.CurrentY attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_FIELDSET (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length); \
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length); \
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length); \
}
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_CURRENT_Y(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies ColorControl.CurrentY attribute value from Scenes.AddScene command payload into the specified ...
Definition: zb_zcl_scenes.h:2402
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_CURRENT_SATURATION(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies ColorControl.CurrentSaturation attribute value from Scenes.AddScene command payload into the s...
Definition: zb_zcl_scenes.h:2426
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COLOR_CONTROL_CURRENT_X(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies ColorControl.CurrentX attribute value from Scenes.AddScene command payload into the specified ...
Definition: zb_zcl_scenes.h:2378

Extracts ColorControl fieldset value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COMMON (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
if (sizeof(zb_zcl_scenes_add_scene_req_t) > ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id); \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->transition_time); \
ZB_BUF_CUT_LEFT2( \
(buffer), \
(cmd_struct_ptr)->scene_name[0]); \
(cmd_struct_ptr)->scene_name[0] = 0; \
} \
}
Add scene command payload constant-structure part.
Definition: zb_zcl_scenes.h:1822
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731

Parse common part of Add Scene command.

Parameters
buffercontaining Store scene command payload
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_add_scene_req_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
Note
The macro ignores scene name in the buffer, and, if it has non-zero size, skips it and directly sets length of the scene name to zero in the command representation structure
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_DOOR_LOCK_FIELDSET (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length)
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_DOOR_LOCK_LOCK_STATE(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies DoorLock.LockState attribute value from Scenes.AddScene command payload into the specified poi...
Definition: zb_zcl_scenes.h:2623

Extracts DoorLock fieldset value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_DOOR_LOCK_LOCK_STATE (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if (content_length) \
{ \
((zb_zcl_scenes_fieldset_door_lock_t*)(dst_data_ptr))->specific.lock_state = \
((zb_zcl_scenes_fieldset_door_lock_t*)(src_data_ptr))->specific.lock_state; \
--(content_length); \
++(*(dst_fieldset_length)); \
} \
}
Scenes fieldsets representation structure for Door lock cluster.
Definition: zb_zcl_scenes.h:876

Copies DoorLock.LockState attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_LEVEL_CONTROL_CURRENT_LEVEL (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if (content_length) \
{ \
((zb_zcl_scenes_fieldset_level_control_t*)(dst_data_ptr))->specific.current_level = \
((zb_zcl_scenes_fieldset_level_control_t*)(src_data_ptr))->specific.current_level; \
++(*dst_fieldset_length); \
--(content_length); \
} \
}
Scenes fieldsets representation structure for LevelControl cluster.
Definition: zb_zcl_scenes.h:551

Copies LevelControl.CurrentLevel attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_LEVEL_CONTROL_FIELDSET (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length)
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_LEVEL_CONTROL_CURRENT_LEVEL(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies LevelControl.CurrentLevel attribute value from Scenes.AddScene command payload into the specif...
Definition: zb_zcl_scenes.h:2336

Extracts LevelControl fieldset value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_NEXT_FIELDSET_DESC (   buffer,
  cmd_struct_ptr,
  content_length 
)
Value:
{ \
if (sizeof(zb_zcl_scenes_fieldset_common_t) > ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = (zb_uint8_t*)ZB_BUF_BEGIN(buffer); \
(content_length) = sizeof(zb_zcl_scenes_fieldset_common_t) + \
(cmd_struct_ptr))->fieldset_length; \
if ((content_length) > ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
(content_length) = 0; \
} \
else \
{ \
/* Cludgy: decoding cluster_id in the fieldset directly */ \
ZB_ZCL_HTOLE16_INPLACE((cmd_struct_ptr)); \
ZB_BUF_CUT_LEFT2((buffer), (content_length)); \
} \
} \
}
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
Common part of the field set definition.
Definition: zb_zcl_scenes.h:323
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115

Parses fieldset description.

Parameters
buffercontaining fieldset
cmd_struct_ptr- pointer to the fieldset description representation structure (of type zb_zcl_scenes_fieldset_common_s) or NULL pointer if payload size is too small
content_length- variable to contain size of the fieldset content left unprocessed
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_ON_OFF_FIELDSET (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length)
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_ON_OFF_ON_OFF(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies OnOff.OnOff attribute value from Scenes.AddScene command payload into the specified point in m...
Definition: zb_zcl_scenes.h:2294

Extracts OnOff fieldset value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_ON_OFF_ON_OFF (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if (content_length) \
{ \
((zb_zcl_scenes_fieldset_on_off_t*)(dst_data_ptr))->specific.on_off = \
((zb_zcl_scenes_fieldset_on_off_t*)(src_data_ptr))->specific.on_off; \
++(*dst_fieldset_length); \
--(content_length); \
} \
}
Scenes fieldsets representation structure for On/Off cluster.
Definition: zb_zcl_scenes.h:478

Copies OnOff.OnOff attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
Attention
src_data_ptr and dst_data_ptr will be incremented by the OnOff.OnOff attribute size, content_length will be decremented by the same value
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_STORE_FIELDSET_COMMON (   src_data_ptr,
  dst_data_ptr,
  content_length 
)
Value:
{ \
ZB_MEMCPY( \
(dst_data_ptr), \
(src_data_ptr), \
((zb_zcl_scenes_fieldset_common_t*)(dst_data_ptr))->fieldset_length = 0; \
content_length -= sizeof(zb_zcl_scenes_fieldset_common_t); \
}
struct zb_zcl_scenes_fieldset_common_s zb_zcl_scenes_fieldset_common_t
Common part of the field set definition.
Common part of the field set definition.
Definition: zb_zcl_scenes.h:323

Copies parsed fieldset description into designated memory area.

Parameters
src_data_ptr- pointer to the memory area containing parsed fieldset description
dst_data_ptr- pointer to the memory area to put fieldset description to
content_length- remaining length of the unprocessed fieldset content
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_FIELDSET (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length); \
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length); \
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length); \
}
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_OCCUPIED_HEATING_SETPOINT(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies Thermostat.OccupiedHeatingSetpoint attribute value from Scenes.AddScene command payload into t...
Definition: zb_zcl_scenes.h:2691
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_OCCUPIED_COOLING_SETPOINT(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies Thermostat.OccupiedCoolingSetpoint attribute value from Scenes.AddScene command payload into t...
Definition: zb_zcl_scenes.h:2665
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_SYSTEM_MODE(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies Thermostat.SystemMode attribute value from Scenes.AddScene command payload into the specified ...
Definition: zb_zcl_scenes.h:2717

Extracts Thermostat fieldset value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_OCCUPIED_COOLING_SETPOINT (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if ((content_length) >= sizeof(zb_uint16_t)) \
{ \
ZB_HTOLE16( \
&(((zb_zcl_scenes_fieldset_thermostat_t*)(dst_data_ptr))-> \
specific.occupied_cooling_setpoint), \
&(((zb_zcl_scenes_fieldset_thermostat_t*)(src_data_ptr))-> \
specific.occupied_cooling_setpoint)); \
(content_length) -= sizeof(zb_uint16_t); \
*(dst_fieldset_length) += sizeof(zb_uint16_t); \
} \
}
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:119
Scenes fieldsets representation structure for Thermostat cluster.
Definition: zb_zcl_scenes.h:950

Copies Thermostat.OccupiedCoolingSetpoint attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_OCCUPIED_HEATING_SETPOINT (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if ((content_length) >= sizeof(zb_uint16_t)) \
{ \
ZB_HTOLE16( \
&(((zb_zcl_scenes_fieldset_thermostat_t*)(dst_data_ptr))-> \
specific.occupied_heating_setpoint), \
&(((zb_zcl_scenes_fieldset_thermostat_t*)(src_data_ptr))-> \
specific.occupied_heating_setpoint)); \
(content_length) -= sizeof(zb_uint16_t); \
*(dst_fieldset_length) += sizeof(zb_uint16_t); \
} \
}
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:119
Scenes fieldsets representation structure for Thermostat cluster.
Definition: zb_zcl_scenes.h:950

Copies Thermostat.OccupiedHeatingSetpoint attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_THERMOSTAT_SYSTEM_MODE (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if (content_length) \
{ \
((zb_zcl_scenes_fieldset_thermostat_t*)(dst_data_ptr))->specific.system_mode = \
((zb_zcl_scenes_fieldset_thermostat_t*)(src_data_ptr))->specific.system_mode; \
--(content_length); \
++(*(dst_fieldset_length)); \
} \
}
Scenes fieldsets representation structure for Thermostat cluster.
Definition: zb_zcl_scenes.h:950

Copies Thermostat.SystemMode attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_WINDOW_COVERING_FIELDSET (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length) \
dst_data_ptr, \
src_data_ptr, \
content_length, \
dst_fieldset_length) \
}
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_WINDOW_COVERING_LIFT_PERCENTAGE(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies WindowCovering.LiftPercentage attribute value from Scenes.AddScene command payload into the sp...
Definition: zb_zcl_scenes.h:2771
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_WINDOW_COVERING_TILT_PERCENTAGE(dst_data_ptr,src_data_ptr,content_length,dst_fieldset_length)
Copies WindowCovering.TiltPercentage attribute value from Scenes.AddScene command payload into the sp...
Definition: zb_zcl_scenes.h:2796

Extracts WindowCovering fieldset value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_WINDOW_COVERING_LIFT_PERCENTAGE (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if (content_length) \
{ \
specific.current_position_lift_percentage = \
specific.current_position_lift_percentage; \
--(content_length); \
++(*(dst_fieldset_length)); \
} \
}
Scenes fieldsets representation structure for WindowCovering cluster.
Definition: zb_zcl_scenes.h:1068

Copies WindowCovering.LiftPercentage attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_WINDOW_COVERING_TILT_PERCENTAGE (   dst_data_ptr,
  src_data_ptr,
  content_length,
  dst_fieldset_length 
)
Value:
{ \
if (content_length) \
{ \
specific.current_position_tilt_percentage = \
specific.current_position_tilt_percentage; \
++(*(dst_fieldset_length)); \
--(content_length); \
} \
}
Scenes fieldsets representation structure for WindowCovering cluster.
Definition: zb_zcl_scenes.h:1068

Copies WindowCovering.TiltPercentage attribute value from Scenes.AddScene command payload into the specified point in memory.

Parameters
dst_data_ptr- address to put value to
src_data_ptr- address to get value from
content_length- length of the content wsiting processing
dst_fieldset_length- pointer to the length of the destination fieldset
#define ZB_ZCL_SCENES_GET_ADD_SCENE_RES (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
if (sizeof(zb_zcl_scenes_add_scene_res_t) > ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id); \
} \
}
Add scene response payload structure.
Definition: zb_zcl_scenes.h:3306
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731

Parses Scenes.AddSceneResponse command payload.

Parameters
bufferto get data from
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_add_scene_res_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_GET_SCENE_MEMBERSHIP_REQ (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
> ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id); \
} \
}
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
Get scene membership command payload structure.
Definition: zb_zcl_scenes.h:3231

Parses Scenes.GetSceneMembership command payload.

Parameters
bufferto get data from
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_get_scene_membership_req_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_GET_SCENE_MEMBERSHIP_RES (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
if (ZB_BUF_LEN((buffer)) < \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->mandatory.group_id); \
} \
}
Get scene membership response.
Definition: zb_zcl_scenes.h:3892
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731

Parses Scenes.RemoveAllScenesResponse command payload.

Parameters
bufferto get data from
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_get_scene_membership_res_s) or NULL pointer if payload size is too small to contain mandatory part
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_RECALL_SCENE_REQ (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
if (sizeof(zb_zcl_scenes_recall_scene_req_t) != ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
ZB_ZCL_HTOLE16_INPLACE(ZB_BUF_BEGIN((buffer))); \
(cmd_struct_ptr) = \
ZB_BUF_CUT_LEFT2( \
(buffer), \
} \
}
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
Recall scene command payload structure.
Definition: zb_zcl_scenes.h:3150

Parse Recall Scene command.

Parameters
buffercontaining Store scene command payload
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_recall_scene_req_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_REMOVE_ALL_SCENES_REQ (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
> ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id); \
} \
}
Remove all scenes command payload structure.
Definition: zb_zcl_scenes.h:2994
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731

Parses Scenes.RemoveScene command payload.

Parameters
bufferto get data from
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_remove_scene_req_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_REMOVE_ALL_SCENES_RES (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
> ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id); \
} \
}
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
Remove all scenes response payload structure.
Definition: zb_zcl_scenes.h:3688

Parses Scenes.RemoveAllScenesResponse command payload.

Parameters
bufferto get data from
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_remove_all_scenes_res_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_REMOVE_SCENE_REQ (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
if (sizeof(zb_zcl_scenes_remove_scene_req_t) > ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id); \
} \
}
Remove scene command payload structure.
Definition: zb_zcl_scenes.h:2916
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731

Parses Scenes.RemoveScene command payload.

Parameters
bufferto get data from
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_remove_scene_req_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_REMOVE_SCENE_RES (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
if (sizeof(zb_zcl_scenes_remove_scene_res_t) > ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id); \
} \
}
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
Remove scene response payload structure.
Definition: zb_zcl_scenes.h:3608

Parses Scenes.RemoveSceneResponse command payload.

Parameters
bufferto get data from
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_remove_scene_res_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_STORE_SCENE_REQ (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
if (sizeof(zb_zcl_scenes_store_scene_req_t) != ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
ZB_ZCL_HTOLE16_INPLACE(ZB_BUF_BEGIN((buffer))); \
(cmd_struct_ptr) = \
ZB_BUF_CUT_LEFT2( \
(buffer), \
} \
}
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
Store scene command payload structure.
Definition: zb_zcl_scenes.h:3069

Parse Store Scene command.

Parameters
buffercontaining Store scene command payload
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_store_scene_req_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_STORE_SCENE_RES (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
if (sizeof(zb_zcl_scenes_store_scene_res_t) > ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id); \
} \
}
Store scene response payload structure.
Definition: zb_zcl_scenes.h:3764
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731

Parses Scenes.StoreScene command payload.

Parameters
bufferto get data from
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_store_scene_res_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_TABLE_FIELDSETS_BEGIN (   scene_table_record)
Value:
( ((scene_table_record)->field_sets_length) \
? ((zb_uint8_t*)(scene_table_record) + \
: NULL)
Fixed-size part of the Scene table.
Definition: zb_zcl_scenes.h:166
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
#define ZB_ZCL_SCENES_GET_VIEW_SCENE_REQ (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
if (sizeof(zb_zcl_scenes_view_scene_req_t) > ZB_BUF_LEN((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id); \
} \
}
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
View scene command payload structure.
Definition: zb_zcl_scenes.h:2840

Parses Scenes.ViewScene command payload.

Parameters
bufferto get data from
cmd_struct_ptr- pointer to the request representation structure (of type zb_zcl_scenes_view_scene_req_s) or NULL pointer if payload size is too small
Attention
The macro changes content of the buffer
#define ZB_ZCL_SCENES_GET_VIEW_SCENE_RES_COMMON (   buffer,
  response_ptr 
)
Value:
{ \
if (ZB_BUF_LEN((buffer)) < \
(2 * sizeof(zb_uint8_t) + sizeof(zb_uint16_t))) \
{ \
(response_ptr) = NULL; \
} \
else \
{ \
(response_ptr) = \
ZB_BUF_BEGIN((buffer)); \
ZB_ZCL_HTOLE16_INPLACE(&((response_ptr)->group_id)); \
if ((response_ptr)->status == ZB_ZCL_STATUS_SUCCESS) \
{ \
ZB_ZCL_HTOLE16_INPLACE(&((response_ptr)->transition_time)); \
ZB_BUF_CUT_LEFT2((buffer), sizeof(zb_zcl_scenes_view_scene_res_fixed_size_t) + \
(response_ptr)->scene_name[0]); \
(response_ptr)->scene_name[0] = 0; \
} \
else \
{ \
ZB_BUF_CUT_LEFT2( \
(buffer), \
(2 * sizeof(zb_uint8_t) + sizeof(zb_uint16_t))); \
} \
} \
}
Definition: zb_zcl_common.h:268
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:119
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Mandatory part of the Scenes.ViewSceneResponse payload.
Definition: zb_zcl_scenes.h:3386

Parses comon part of the Scenes.ViewSceneResponse.

Parameters
buffercontaining data
response_ptr- pointer to the extracted data
#define ZB_ZCL_SCENES_INIT_ADD_SCENE_REQ (   buffer,
  cmd_struct_ptr,
  dis_default_resp,
  group_id,
  scene_id,
  transition_time 
)
Value:
{ \
cmd_struct_ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL( \
cmd_struct_ptr, \
dis_default_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ( \
cmd_struct_ptr, \
ZB_ZCL_PACKET_REQ_PUT_DATA16_VAL(cmd_struct_ptr, (group_id)); \
ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, (scene_id)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(cmd_struct_ptr, (transition_time)); \
ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, 0); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
Definition: zb_zcl_scenes.h:1787

Start filling Add scene command frame.

Fills the constant-structure part of the command payload only.

Command can contain no fieldsets defining empty scene. The new scene can be used, for example, for storing fieldsets with Store scene command.

Note
According to a 3.7.2.4.2. subclause of ZCL spec, the command shall be addressed to a single device (not a group).
Parameters
bufferto put packet to
cmd_struct_ptr- pointer to the place variable-structure part of the command payload (fieldsets) should be placed.
dis_default_resp- enable/disable default response
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store
transition_time- scene transition time
#define ZB_ZCL_SCENES_INIT_FIELDSET (   cmd_struct_ptr,
  cluster,
  fs_length 
)
Value:
{ \
ZB_ZCL_PACKET_PUT_DATA16_VAL((cmd_struct_ptr), (cluster)); \
ZB_ZCL_PACKET_PUT_DATA8((cmd_struct_ptr), (fs_length)); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291

Adds fieldset into the buffer for sending command.

Parameters
cmd_struct_ptr- pointer to the place in the buffer to put data to
clusteridentifier the fieldset under consideration belongs to
fs_length- summary length of the attributes in the fieldset
Attention
The order of the attribute values in the fieldset is significant
#define ZB_ZCL_SCENES_INIT_GET_SCENE_MEMBERSHIP_RES (   buffer,
  cmd_struct_ptr,
  seq_num,
  cap_ptr,
  status,
  capacity,
  group_id 
)
Value:
{ \
cmd_struct_ptr = ZB_ZCL_START_PACKET(buffer); \
cmd_struct_ptr); \
cmd_struct_ptr, \
seq_num, \
ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, (status)); \
(cap_ptr) = (cmd_struct_ptr); \
ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, (capacity)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(cmd_struct_ptr, (group_id)); \
}
Definition: zb_zcl_scenes.h:1818
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1252
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1127
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1114

Start filling Get scene membership response frame.

Fills the mandatory part of the Get scene membership scene response payload.

Parameters
bufferto put packet to
cmd_struct_ptr- pointer to the place variable-structure part of the command payload (fieldsets) should be placed.
seq_num- ZCL sequence number
cap_ptr- pointer to the capacity fields of the response
statusof the command execution. Appropriate values (defined in zb_zcl_status_e enumeration) are:
  • ZB_ZCL_STATUS_SUCCESS for successfull result
  • ZB_ZCL_STATUS_INVALID_FIELD if the group is not present in the
capacityof the scene table
group_id- group identifier for the scene to store
#define ZB_ZCL_SCENES_INIT_VIEW_SCENE_RES (   buffer,
  cmd_struct_ptr,
  seq_num,
  status,
  group_id,
  scene_id 
)
Value:
{ \
cmd_struct_ptr = ZB_ZCL_START_PACKET(buffer); \
cmd_struct_ptr); \
cmd_struct_ptr, \
seq_num, \
ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, (status)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(cmd_struct_ptr, (group_id)); \
ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, (scene_id)); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
Definition: zb_zcl_scenes.h:1810
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1252
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1127
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1114

Start filling View scene response frame.

Fills the mandatory part of the View scene response payload.

Parameters
bufferto put packet to
cmd_struct_ptr- pointer to the place variable-structure part of the command payload (fieldsets) should be placed.
seq_num- ZCL sequence number
statusof the command execution. Appropriate values (defined in zb_zcl_status_e enumeration) are:
  • ZB_ZCL_STATUS_SUCCESS for successfull result
  • ZB_ZCL_STATUS_INSUFF_SPACE if fieldsets don't fit into packet
  • ZB_ZCL_STATUS_INVALID_FIELD if the group is not present in the
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store
#define ZB_ZCL_SCENES_NAME_SUPPORT_DEFAULT_VALUE   0

Default value for Name support attribute.

Actually Name support attribute has no default value (see ZCL spec, subclause 3.7.2.2.1.5), but we don't support scene names, so we are able to declare default value for the attribute until name support will be added

#define ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_CURRENT_SATURATION (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
(endpoint), \
ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_SATURATION_ID, \
(zb_uint8_t*)&((((zb_zcl_scenes_fieldset_color_control_t*)(cmd_struct_ptr))-> \
specific.current_saturation)), \
}
Scenes fieldsets representation structure for ColorControl cluster.
Definition: zb_zcl_scenes.h:636
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zb_zcl_common.h:190
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Definition: zb_types.h:99
#define ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_CURRENT_X (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
(endpoint), \
ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_X_ID, \
(zb_uint8_t*)&((((zb_zcl_scenes_fieldset_color_control_t*)(cmd_struct_ptr))-> \
specific.current_x)), \
}
Scenes fieldsets representation structure for ColorControl cluster.
Definition: zb_zcl_scenes.h:636
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zb_zcl_common.h:190
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Definition: zb_types.h:99
#define ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_CURRENT_Y (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
(endpoint), \
ZB_ZCL_ATTR_COLOR_CONTROL_CURRENT_Y_ID, \
(zb_uint8_t*)&((((zb_zcl_scenes_fieldset_color_control_t*)(cmd_struct_ptr))-> \
specific.current_y)), \
}
Scenes fieldsets representation structure for ColorControl cluster.
Definition: zb_zcl_scenes.h:636
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zb_zcl_common.h:190
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Definition: zb_types.h:99
#define ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_FIELDSET (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_color_control_t*)(cmd_struct_ptr))->common.fieldset_length \
{ \
ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_CURRENT_X(endpoint, cmd_struct_ptr); \
ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_CURRENT_Y(endpoint, cmd_struct_ptr); \
ZB_ZCL_SCENES_RECALL_COLOR_CONTROL_CURRENT_SATURATION(endpoint, cmd_struct_ptr); \
} \
}
Scenes fieldsets representation structure for Color control cluster-specific content.
Definition: zb_zcl_scenes.h:616
Scenes fieldsets representation structure for ColorControl cluster.
Definition: zb_zcl_scenes.h:636
#define ZB_ZCL_SCENES_RECALL_DOOR_LOCK_FIELDSET (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
ZB_ZCL_SCENES_RECALL_DOOR_LOCK_LOCK_STATE(endpoint, cmd_struct_ptr); \
}
#define ZB_ZCL_SCENES_RECALL_DOOR_LOCK_LOCK_STATE (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_door_lock_t*)(cmd_struct_ptr))-> \
common.fieldset_length) \
{ \
(endpoint), \
&((((zb_zcl_scenes_fieldset_door_lock_t*)(cmd_struct_ptr))-> \
specific.lock_state)), \
} \
}
Definition: zb_zcl_common.h:177
LockState attribute.
Definition: zb_zcl_door_lock.h:100
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Scenes fieldsets representation structure for Door lock cluster.
Definition: zb_zcl_scenes.h:876
Definition: zb_types.h:99
#define ZB_ZCL_SCENES_RECALL_LEVEL_CONTROL_CURRENT_LEVEL (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_level_control_t*)(cmd_struct_ptr))-> \
common.fieldset_length) \
{ \
(endpoint), \
&((((zb_zcl_scenes_fieldset_level_control_t*)(cmd_struct_ptr))-> \
specific.current_level)), \
} \
}
Scenes fieldsets representation structure for LevelControl cluster.
Definition: zb_zcl_scenes.h:551
Definition: zb_zcl_common.h:147
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Current Level attribute.
Definition: zb_zcl_level_control.h:73
Definition: zb_types.h:99
#define ZB_ZCL_SCENES_RECALL_LEVEL_CONTROL_FIELDSET (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
ZB_ZCL_SCENES_RECALL_LEVEL_CONTROL_CURRENT_LEVEL( \
endpoint, \
cmd_struct_ptr); \
}
#define ZB_ZCL_SCENES_RECALL_ON_OFF_FIELDSET (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
ZB_ZCL_SCENES_RECALL_ON_OFF_ON_OFF(endpoint, cmd_struct_ptr); \
}
#define ZB_ZCL_SCENES_RECALL_ON_OFF_ON_OFF (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_on_off_t*)(cmd_struct_ptr))-> \
common.fieldset_length) \
{ \
(endpoint), \
&((((zb_zcl_scenes_fieldset_on_off_t*)(cmd_struct_ptr))-> \
specific.on_off)), \
} \
}
OnOff attribute.
Definition: zb_zcl_on_off.h:85
Scenes fieldsets representation structure for On/Off cluster.
Definition: zb_zcl_scenes.h:478
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Definition: zb_zcl_common.h:144
Definition: zb_types.h:99
#define ZB_ZCL_SCENES_RECALL_THERMOSTAT_FIELDSET (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
ZB_ZCL_SCENES_RECALL_THERMOSTAT_OCCUPIED_COOLING_SETPOINT( \
endpoint, cmd_struct_ptr); \
ZB_ZCL_SCENES_RECALL_THERMOSTAT_OCCUPIED_HEATING_SETPOINT( \
endpoint, cmd_struct_ptr); \
ZB_ZCL_SCENES_RECALL_THERMOSTAT_SYSTEM_MODE( \
endpoint, cmd_struct_ptr); \
}
#define ZB_ZCL_SCENES_RECALL_THERMOSTAT_OCCUPIED_COOLING_SETPOINT (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
common.fieldset_length >= sizeof(zb_uint16_t)) \
{ \
(endpoint), \
(zb_uint8_t *)&((((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
specific.occupied_cooling_setpoint)), \
} \
}
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:119
Occupied Cooling Setpoint attribute.
Definition: zb_zcl_thermostat.h:82
Definition: zb_zcl_common.h:182
Scenes fieldsets representation structure for Thermostat cluster.
Definition: zb_zcl_scenes.h:950
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Definition: zb_types.h:99
#define ZB_ZCL_SCENES_RECALL_THERMOSTAT_OCCUPIED_HEATING_SETPOINT (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
common.fieldset_length >= 2 * sizeof(zb_uint16_t)) \
{ \
(endpoint), \
(zb_uint8_t *)&((((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
specific.occupied_heating_setpoint)), \
} \
}
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:119
Definition: zb_zcl_common.h:182
Scenes fieldsets representation structure for Thermostat cluster.
Definition: zb_zcl_scenes.h:950
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Occupied Heating Setpoint attribute.
Definition: zb_zcl_thermostat.h:84
Definition: zb_types.h:99
#define ZB_ZCL_SCENES_RECALL_THERMOSTAT_SYSTEM_MODE (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
common.fieldset_length > 2 * sizeof(zb_uint16_t)) \
{ \
(endpoint), \
&((((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
specific.system_mode)), \
} \
}
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:119
System Mode attribute.
Definition: zb_zcl_thermostat.h:92
Definition: zb_zcl_common.h:182
Scenes fieldsets representation structure for Thermostat cluster.
Definition: zb_zcl_scenes.h:950
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Definition: zb_types.h:99
#define ZB_ZCL_SCENES_RECALL_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_window_covering_t*)(cmd_struct_ptr))-> \
common.fieldset_length) \
{ \
(endpoint), \
&((((zb_zcl_scenes_fieldset_window_covering_t*)(cmd_struct_ptr))-> \
specific.current_position_lift_percentage)), \
} \
}
Current Position Lift Percentage attribute.
Definition: zb_zcl_window_covering.h:150
Definition: zb_zcl_common.h:178
Scenes fieldsets representation structure for WindowCovering cluster.
Definition: zb_zcl_scenes.h:1068
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Definition: zb_types.h:99
#define ZB_ZCL_SCENES_RECALL_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_window_covering_t*)(cmd_struct_ptr))-> \
common.fieldset_length > sizeof(zb_uint8_t)) \
{ \
(endpoint), \
&((((zb_zcl_scenes_fieldset_window_covering_t*)(cmd_struct_ptr))-> \
specific.current_position_tilt_percentage)), \
} \
}
Definition: zb_zcl_common.h:178
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Scenes fieldsets representation structure for WindowCovering cluster.
Definition: zb_zcl_scenes.h:1068
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Definition: zb_types.h:99
Current Position Tilt Percentage attribute.
Definition: zb_zcl_window_covering.h:152
#define ZB_ZCL_SCENES_RECALL_WINDOW_COVERING_FIELDSET (   endpoint,
  cmd_struct_ptr 
)
Value:
{ \
ZB_ZCL_SCENES_RECALL_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE( \
endpoint, \
cmd_struct_ptr); \
ZB_ZCL_SCENES_RECALL_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE( \
endpoint, \
cmd_struct_ptr); \
}
#define ZB_ZCL_SCENES_SEND_ADD_SCENE_REQ (   buffer,
  cmd_struct_ptr,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback 
)
Value:
{ \
ZB_ZCL_FINISH_PACKET(buffer, cmd_struct_ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
Definition: zboss_api_aps.h:114

Sends Add scene command.

Note
According to a 3.7.2.4.2. subclause of ZCL spec, the command shall be addressed to a single device (not a group).
Parameters
buffer- with prepared command payload
cmd_struct_ptr- pointer to the place variable-structure part of the
dst_addr- address to send packet to
dst_ep- destination endpoint
ep- sending endpoint
prof_id- profile identifier
callbackfor getting command send status
#define ZB_ZCL_SCENES_SEND_ADD_SCENE_RES (   buffer,
  seq_num,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback,
  status,
  group_id,
  scene_id 
)
Value:
{ \
ptr, \
seq_num, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (scene_id)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1252
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1127
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
Definition: zb_zcl_scenes.h:1808
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zboss_api_aps.h:114
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1114

Send Add Scene response.

Parameters
bufferto put packet to
seq_num- ZCL sequence number
dst_addr- address to send packet to
dst_ep- destination endpoint
ep- sending endpoint
prof_id- profile identifier
callbackfor getting command send status
statusof the corresponding Add scene command execution. Appropriate values (defined in zb_zcl_status_e enumeration)are:
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store
#define ZB_ZCL_SCENES_SEND_GET_SCENE_MEMBERSHIP_REQ (   buffer,
  dst_addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  callback,
  group_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL( \
ptr, \
dis_default_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ( \
ptr, \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zb_zcl_scenes.h:1799

Send Remove all scenes command.

The command can be sent to device or group of devices either

Parameters
bufferto put packet to
dst_addr- address to send packet to
dst_addr_mode- addressing mode. Either ZB_APS_ADDR_MODE_16_ENDP_PRESENT or ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT will fit
dst_ep- destination endpoint (if sendting to a particular device)
ep- sending endpoint
prof_id- profile identifier
dis_default_resp- enable/disable default response
callbackfor getting command send status
group_id- group identifier for the scene to store
#define ZB_ZCL_SCENES_SEND_GET_SCENE_MEMBERSHIP_RES (   buffer,
  cmd_struct_ptr,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback 
)
Value:
{ \
ZB_ZCL_FINISH_PACKET(buffer, cmd_struct_ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
Definition: zboss_api_aps.h:114

Sends Get scene membership response.

Parameters
bufferwith prepared command payload
cmd_struct_ptr- pointer to the place directly after the payload
dst_addr- address to send packet to
dst_ep- destination endpoint
ep- sending endpoint
prof_id- profile identifier
callbackfor getting command send status
#define ZB_ZCL_SCENES_SEND_RECALL_SCENE_REQ (   buffer,
  dst_addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  callback,
  group_id,
  scene_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL \
(ptr \
, dis_default_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ( \
ptr, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (scene_id)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
Definition: zb_zcl_scenes.h:1797
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115

Send Recall scene command.

The command can be sent to device or group of devices either

Parameters
bufferto put packet to
dst_addr- address to send packet to
dst_addr_mode- addressing mode. Either ZB_APS_ADDR_MODE_16_ENDP_PRESENT or ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT will fit
dst_ep- destination endpoint (if sendting to a particular device)
ep- sending endpoint
prof_id- profile identifier
dis_default_resp- enable/disable default response
callbackfor getting command send status
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store
#define ZB_ZCL_SCENES_SEND_REMOVE_ALL_SCENES_REQ (   buffer,
  dst_addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  callback,
  group_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL( \
ptr, \
dis_default_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ( \
ptr, \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
Definition: zb_zcl_scenes.h:1793
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115

Send Remove all scenes command.

The command can be sent to device or group of devices either

Parameters
bufferto put packet to
dst_addr- address to send packet to
dst_addr_mode- addressing mode. Either ZB_APS_ADDR_MODE_16_ENDP_PRESENT or ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT will fit
dst_ep- destination endpoint (if sendting to a particular device)
ep- sending endpoint
prof_id- profile identifier
dis_default_resp- enable/disable default response
callbackfor getting command send status
group_id- group identifier for the scene to store
#define ZB_ZCL_SCENES_SEND_REMOVE_ALL_SCENES_RES (   buffer,
  seq_num,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback,
  status,
  group_id 
)
Value:
{ \
ptr, \
seq_num, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1252
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1127
Definition: zb_zcl_scenes.h:1814
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zboss_api_aps.h:114
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1114

Send Remove all scenes response.

Parameters
bufferto put packet to
seq_num- ZCL sequence number
dst_addr- address to send packet to
dst_ep- destination endpoint
ep- sending endpoint
prof_id- profile identifier
callbackfor getting command send status
statusof the corresponding Add scene command execution. Appropriate values (defined in zb_zcl_status_e enumeration)are:
group_id- group identifier for the scene to store
#define ZB_ZCL_SCENES_SEND_REMOVE_SCENE_REQ (   buffer,
  dst_addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  callback,
  group_id,
  scene_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL( \
ptr, \
dis_default_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ( \
ptr, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (scene_id)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
Definition: zb_zcl_scenes.h:1791
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115

Send Remove scene command.

The command can be sent to device or group of devices either

Parameters
bufferto put packet to
dst_addr- address to send packet to
dst_addr_mode- addressing mode. Either ZB_APS_ADDR_MODE_16_ENDP_PRESENT or ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT will fit
dst_ep- destination endpoint (if sendting to a particular device)
ep- sending endpoint
prof_id- profile identifier
dis_default_resp- enable/disable default response
callbackfor getting command send status
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store
#define ZB_ZCL_SCENES_SEND_REMOVE_SCENE_RES (   buffer,
  seq_num,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback,
  status,
  group_id,
  scene_id 
)
Value:
{ \
ptr, \
seq_num, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (scene_id)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1252
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1127
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zboss_api_aps.h:114
Definition: zb_zcl_scenes.h:1812
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1114

Send Remove Scene response.

Parameters
bufferto put packet to
seq_num- ZCL sequence number
dst_addr- address to send packet to
dst_ep- destination endpoint
ep- sending endpoint
prof_id- profile identifier
callbackfor getting command send status
statusof the corresponding Add scene command execution. Appropriate values (defined in zb_zcl_status_e enumeration)are:
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store
#define ZB_ZCL_SCENES_SEND_STORE_SCENE_REQ (   buffer,
  dst_addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  callback,
  group_id,
  scene_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL( \
ptr, \
dis_default_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ( \
ptr, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (scene_id)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_scenes.h:1795
Definition: zb_zcl_common.h:143
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115

Send Store Scene command.

The command can be sent to device or group of devices either

Parameters
bufferto put packet to
dst_addr- address to send packet to
dst_addr_mode- addressing mode. Either ZB_APS_ADDR_MODE_16_ENDP_PRESENT or ZB_APS_ADDR_MODE_16_GROUP_ENDP_NOT_PRESENT will fit
dst_ep- destination endpoint (if sendting to a particular device)
ep- sending endpoint
prof_id- profile identifier
dis_default_resp- enable/disable default response
callbackfor getting command send status
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store
#define ZB_ZCL_SCENES_SEND_STORE_SCENE_RES (   buffer,
  seq_num,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback,
  status,
  group_id,
  scene_id 
)
Value:
{ \
ptr, \
seq_num, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (scene_id)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
Definition: zb_zcl_scenes.h:1816
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1252
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1127
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zboss_api_aps.h:114
#define ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1114

Send Store scene response.

Parameters
bufferto put packet to
seq_num- ZCL sequence number
dst_addr- address to send packet to
dst_ep- destination endpoint
ep- sending endpoint
prof_id- profile identifier
callbackfor getting command send status
statusof the corresponding Add scene command execution. Appropriate values (defined in zb_zcl_status_e enumeration)are:
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store
#define ZB_ZCL_SCENES_SEND_VIEW_SCENE_REQ (   buffer,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  callback,
  group_id,
  scene_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL( \
ptr, \
dis_default_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ( \
ptr, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (scene_id)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
Definition: zb_zcl_scenes.h:1789
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zboss_api_aps.h:114

Send View Scene command.

Note
According to a 3.7.2.4.2. subclause of ZCL spec, the command shall be addressed to a single device (not a group). The command can be sent to device or group of devices either
Parameters
bufferto put packet to
dst_addr- address to send packet to
dst_ep- destination endpoint
ep- sending endpoint
prof_id- profile identifier
dis_default_resp- enable/disable default response
callbackfor getting command send status
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store
#define ZB_ZCL_SCENES_SEND_VIEW_SCENE_RES (   buffer,
  cmd_struct_ptr,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback 
)
Value:
{ \
ZB_ZCL_FINISH_PACKET(buffer, cmd_struct_ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
Definition: zb_zcl_common.h:143
Definition: zboss_api_aps.h:114

Sends View scene response.

Parameters
bufferwith prepared command payload
cmd_struct_ptr- pointer to the place variable-structure part of the
dst_addr- address to send packet to
dst_ep- destination endpoint
ep- sending endpoint
prof_id- profile identifier
callbackfor getting command send status
#define ZB_ZCL_SCENES_TABLE_RECORD_SIZE (   FIELD_SETS_LENGTH)    (FIELD_SETS_LENGTH + sizeof(zb_zcl_scene_table_record_fixed_t))

Evaluates Scene table record size.

Parameters
FIELD_SETS_LENGTHlength of the fieldsets (variable part of the record)
#define ZB_ZCL_SCENES_VIEW_SCENE_COLOR_CONTROL_FIELDSET (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_color_control_t*)(cmd_struct_ptr))-> \
common.fieldset_length >= \
{ \
(dst_data_ptr), \
((((zb_zcl_scenes_fieldset_color_control_t*)(cmd_struct_ptr))-> \
specific.current_x))); \
(dst_data_ptr), \
((((zb_zcl_scenes_fieldset_color_control_t*)(cmd_struct_ptr))-> \
specific.current_y))); \
(dst_data_ptr), \
((((zb_zcl_scenes_fieldset_color_control_t*)(cmd_struct_ptr))-> \
specific.current_saturation))); \
} \
}
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_SATURATION(cmd_struct_ptr,current_saturation_value)
Adds ColorControl.CurrentSaturation attribute value to the fieldset.
Definition: zb_zcl_scenes.h:1957
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_Y(cmd_struct_ptr,current_y_value)
Adds ColorControl.CurrentY attribute value to the fieldset.
Definition: zb_zcl_scenes.h:1948
Scenes fieldsets representation structure for Color control cluster-specific content.
Definition: zb_zcl_scenes.h:616
Scenes fieldsets representation structure for ColorControl cluster.
Definition: zb_zcl_scenes.h:636
#define ZB_ZCL_SCENES_ADD_FIELDSET_COLOR_CONTROL_ATTR_CURRENT_X(cmd_struct_ptr,current_x_value)
Adds ColorControl.CurrentX attribute value to the fieldset.
Definition: zb_zcl_scenes.h:1939
#define ZB_ZCL_SCENES_VIEW_SCENE_DOOR_LOCK_FIELDSET (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
ZB_ZCL_SCENES_VIEW_SCENE_DOOR_LOCK_LOCK_STATE( \
cmd_struct_ptr, \
dst_data_ptr); \
}
#define ZB_ZCL_SCENES_VIEW_SCENE_DOOR_LOCK_LOCK_STATE (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_door_lock_t*)(cmd_struct_ptr))-> \
common.fieldset_length) \
{ \
(dst_data_ptr), \
((((zb_zcl_scenes_fieldset_door_lock_t*)(cmd_struct_ptr))-> \
specific.lock_state))); \
} \
}
#define ZB_ZCL_SCENES_ADD_FIELDSET_DOOR_LOCK_ATTR_LOCK_STATE(cmd_struct_ptr,lock_state_value)
Adds DoorLock.LockState attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2006
Scenes fieldsets representation structure for Door lock cluster.
Definition: zb_zcl_scenes.h:876
#define ZB_ZCL_SCENES_VIEW_SCENE_LEVEL_CONTROL_CURRENT_LEVEL (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_level_control_t*)(cmd_struct_ptr))-> \
common.fieldset_length) \
{ \
(dst_data_ptr), \
((((zb_zcl_scenes_fieldset_level_control_t*)(cmd_struct_ptr))-> \
specific.current_level))); \
} \
}
#define ZB_ZCL_SCENES_ADD_FIELDSET_LEVEL_CONTROL_ATTR_CURRENT_LEVEL(cmd_struct_ptr,current_level_value)
Adds LevelControl.CurrentLevel attribute value to the fieldset.
Definition: zb_zcl_scenes.h:1930
Scenes fieldsets representation structure for LevelControl cluster.
Definition: zb_zcl_scenes.h:551
#define ZB_ZCL_SCENES_VIEW_SCENE_LEVEL_CONTROL_FIELDSET (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
ZB_ZCL_SCENES_VIEW_SCENE_LEVEL_CONTROL_CURRENT_LEVEL( \
cmd_struct_ptr, \
dst_data_ptr); \
}
#define ZB_ZCL_SCENES_VIEW_SCENE_ON_OFF_FIELDSET (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
ZB_ZCL_SCENES_VIEW_SCENE_ON_OFF_ON_OFF(cmd_struct_ptr, dst_data_ptr); \
}
#define ZB_ZCL_SCENES_VIEW_SCENE_ON_OFF_ON_OFF (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_on_off_t*)(cmd_struct_ptr))-> \
common.fieldset_length) \
{ \
(dst_data_ptr), \
((((zb_zcl_scenes_fieldset_on_off_t*)(cmd_struct_ptr))-> \
specific.on_off))); \
} \
}
#define ZB_ZCL_SCENES_ADD_FIELDSET_ON_OFF_ATTR_ON_OFF(cmd_struct_ptr,on_off_value)
Adds OnOff.OnOff attribute value to the fieldset.
Definition: zb_zcl_scenes.h:1921
Scenes fieldsets representation structure for On/Off cluster.
Definition: zb_zcl_scenes.h:478
#define ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_FIELDSET (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_OCCUPIED_COOLING_SETPOINT( \
cmd_struct_ptr, \
dst_data_ptr); \
ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_OCCUPIED_HEATING_SETPOINT( \
cmd_struct_ptr, \
dst_data_ptr); \
ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_SYSTEM_MODE( \
cmd_struct_ptr, \
dst_data_ptr); \
}
#define ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_OCCUPIED_COOLING_SETPOINT (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
common.fieldset_length >= sizeof(zb_int16_t)) \
{ \
(dst_data_ptr), \
((zb_uint8_t*)&(((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
specific.occupied_cooling_setpoint))); \
} \
}
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_OCCUPIED_COOLING_SETPOINT(cmd_struct_ptr,occupied_cooling_setpoint_value)
Adds Thermostat.OccupiedCoolingSetpoint attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2016
signed short zb_int16_t
Project-local 2-byte signed int type.
Definition: zb_types.h:121
Scenes fieldsets representation structure for Thermostat cluster.
Definition: zb_zcl_scenes.h:950
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
#define ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_OCCUPIED_HEATING_SETPOINT (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
common.fieldset_length >= 2 * sizeof(zb_int16_t)) \
{ \
(dst_data_ptr), \
((zb_uint8_t*)&(((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
specific.occupied_heating_setpoint))); \
} \
}
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_OCCUPIED_HEATING_SETPOINT(cmd_struct_ptr,occupied_heating_setpoint_value)
Adds Thermostat.OccupiedHeatingSetpoint attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2026
signed short zb_int16_t
Project-local 2-byte signed int type.
Definition: zb_types.h:121
Scenes fieldsets representation structure for Thermostat cluster.
Definition: zb_zcl_scenes.h:950
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
#define ZB_ZCL_SCENES_VIEW_SCENE_THERMOSTAT_SYSTEM_MODE (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
/* Checking size against 4 bytes - 2nd 2-byte field */ \
if (((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
common.fieldset_length > 2 * sizeof(zb_int16_t)) \
{ \
(dst_data_ptr), \
((((zb_zcl_scenes_fieldset_thermostat_t*)(cmd_struct_ptr))-> \
specific.system_mode))); \
} \
}
signed short zb_int16_t
Project-local 2-byte signed int type.
Definition: zb_types.h:121
Scenes fieldsets representation structure for Thermostat cluster.
Definition: zb_zcl_scenes.h:950
#define ZB_ZCL_SCENES_ADD_FIELDSET_THERMOSTAT_ATTR_SYSTEM_MODE(cmd_struct_ptr,system_mode_value)
Adds Thermostat.SystemMode attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2036
#define ZB_ZCL_SCENES_VIEW_SCENE_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_window_covering_t*)(cmd_struct_ptr))-> \
common.fieldset_length) \
{ \
(dst_data_ptr), \
((((zb_zcl_scenes_fieldset_window_covering_t*)(cmd_struct_ptr))-> \
specific.current_position_lift_percentage))); \
} \
}
Scenes fieldsets representation structure for WindowCovering cluster.
Definition: zb_zcl_scenes.h:1068
#define ZB_ZCL_SCENES_ADD_FIELDSET_WINDOW_COVERING_ATTR_CURRENT_POSITION_LIFT_PERCENTAGE(cmd_struct_ptr,current_position_lift_percentage_value)
Adds WindowCovering.CurrentPositionLiftPercentage attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2046
#define ZB_ZCL_SCENES_VIEW_SCENE_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
if (((zb_zcl_scenes_fieldset_window_covering_t*)(cmd_struct_ptr))-> \
common.fieldset_length > sizeof(zb_uint8_t)) \
{ \
(dst_data_ptr), \
((((zb_zcl_scenes_fieldset_window_covering_t*)(cmd_struct_ptr))-> \
specific.current_position_tilt_percentage))); \
} \
}
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Scenes fieldsets representation structure for WindowCovering cluster.
Definition: zb_zcl_scenes.h:1068
#define ZB_ZCL_SCENES_ADD_FIELDSET_WINDOW_COVERING_ATTR_CURRENT_POSITION_LIFT_PERCENTAGE(cmd_struct_ptr,current_position_lift_percentage_value)
Adds WindowCovering.CurrentPositionLiftPercentage attribute value to the fieldset.
Definition: zb_zcl_scenes.h:2046
#define ZB_ZCL_SCENES_VIEW_SCENE_WINDOW_COVERING_FIELDSET (   cmd_struct_ptr,
  dst_data_ptr 
)
Value:
{ \
ZB_ZCL_SCENES_VIEW_SCENE_WINDOW_COVERING_CURRENT_POSITION_LIFT_PERCENTAGE( \
cmd_struct_ptr, \
dst_data_ptr); \
ZB_ZCL_SCENES_VIEW_SCENE_WINDOW_COVERING_CURRENT_POSITION_TILT_PERCENTAGE( \
cmd_struct_ptr, \
dst_data_ptr); \
}

Typedef Documentation

Typical Scene table record structure.

For each endpoint corresponding type must be declared with ... macro.

Note
Scene names are optional and so are not supported.

Enumeration Type Documentation

Scene cluster attribute identifiers.

See also
ZCL specification, subclause 3.7.2.2
Enumerator
ZB_ZCL_ATTR_SCENES_SCENE_COUNT_ID 

Number of scenes currently in the device's scene table

ZB_ZCL_ATTR_SCENES_CURRENT_SCENE_ID 

Scene ID of the scene last invoked

ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_ID 

Group ID of the scene last invoked.

Can hold 0x0000 if the scene last invoked is not associated with a group

ZB_ZCL_ATTR_SCENES_SCENE_VALID_ID 

Indicates whether the state of the device corresponds to that associated with the CurrentScene and CurrentGroup attributes.

  • TRUE indicates that these attributes are valid
  • FALSE indicates that they are not valid
ZB_ZCL_ATTR_SCENES_NAME_SUPPORT_ID 

Indicates support for scene names.

The most significant bit of the NameSupport attribute indicates whether or not scene names are supported

  • 1 indicates that they are supported
  • 0 indicates that they are not supported
    Note
    Currently scene names are not supported
ZB_ZCL_ATTR_SCENES_LAST_CONFIGURED_BY_ID 

specifies the IEEE address of the device that last configured the scene table

The value 0xffffffffffffffff indicates that the device has not been configured, or that the address of the device that last configured the scenes cluster is not known

Attention
The attribute is not supported!

Command identifiers for Scenes Cluster.

See also
ZCL spec, subclause 3.7.2.4
Enumerator
ZB_ZCL_CMD_SCENES_ADD_SCENE 

Add scene command

ZB_ZCL_CMD_SCENES_VIEW_SCENE 

View scene command

ZB_ZCL_CMD_SCENES_REMOVE_SCENE 

Remove scene command

ZB_ZCL_CMD_SCENES_REMOVE_ALL_SCENES 

Remove all scenes command

ZB_ZCL_CMD_SCENES_STORE_SCENE 

Store scene command

ZB_ZCL_CMD_SCENES_RECALL_SCENE 

Recall scene command

ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP 

Get scene membership command

Command response identifiers for Scenes Cluster.

See also
ZCL spec, subclause 3.7.2.5
Enumerator
ZB_ZCL_CMD_SCENES_ADD_SCENE_RESPONSE 

Add scene response

ZB_ZCL_CMD_SCENES_VIEW_SCENE_RESPONSE 

View scene response

ZB_ZCL_CMD_SCENES_REMOVE_SCENE_RESPONSE 

Remove scene response

ZB_ZCL_CMD_SCENES_REMOVE_ALL_SCENES_REPONSE 

Remove all scenes response

ZB_ZCL_CMD_SCENES_STORE_SCENE_RESPONSE 

Store scene response

ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP_RESPONSE 

Get scene membership response

Function Documentation

zb_zcl_status_t zb_zcl_scenes_process_store_scene ( zb_uint8_t  endpoint,
zb_uint8_t  group_id,
zb_uint8_t  scene_id 
)

Store scene.

Parameters
endpoint- endpoint
group_id- scene group ID
scene_id- scene ID
Returns
status store scene
zb_ret_t zb_zcl_scenes_recall_global_scene ( zb_uint8_t  param,
zb_uint8_t  endpoint 
)

Recall Global scene.

Parameters
param- buffer for recall scene
endpoint- enpoint scene for recall
Returns
operation status
zb_void_t zb_zcl_scenes_remove_scenes_in_all_endpoints ( zb_uint16_t  group_id)

Removes All scenes corresponding to a group identifiers in a whole device.

Parameters
group_id- group identifier for which all scenes must be removed.