Developing with ZBOSS for Zigbee
ZCL Scenes cluster

Data Structures

struct  zb_zcl_scene_table_record_fixed_s
 Fixed-size part of the Scene table. More...
 
struct  zb_zcl_scenes_fieldset_common_s
 Common part of the field set definition. More...
 
struct  zb_zcl_scenes_add_scene_req_s
 
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_recall_scene_transition_time_req_s
 Recall scene command transition_time payload structure. More...
 
struct  zb_zcl_scenes_get_scene_membership_req_s
 Get scene membership command payload structure. More...
 
struct  zb_zcl_scenes_copy_scene_mode_s
 Scene copying mode bitfield. More...
 
struct  zb_zcl_scenes_copy_scene_req_s
 Copy scene 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_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_scenes_fieldset_common_s zb_zcl_scenes_fieldset_common_t
 Common part of the field set definition.
 
#define ZB_ZCL_SCENES_CLUSTER_REVISION_DEFAULT   ((zb_uint16_t)0x0003u)
 Default value for Scenes cluster revision global attribute.
 
#define ZB_ZCL_SCENES_CLUSTER_REVISION_MAX   ZB_ZCL_SCENES_CLUSTER_REVISION_DEFAULT
 Maximal value for implemented Scenes cluster revision global attribute.
 
#define ZB_ZCL_SCENES_NAME_SUPPORT_BIT_MASK   0x80
 Mask to extract Name support bit.
 
#define ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_MIN_VALUE   0x0001
 
#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_RECALL_SCENES_TRANSITION_TIME_NOT_USED_VALUE   0xffff
 "Not used" value for Recall scene transition time
 
#define ZB_ZCL_SCENES_NAME_SUPPORT_DEFAULT_VALUE   0
 Default value for Name support attribute The Stack does not support scene names, the default value for the attribute can be declared until name support will be added.
 
#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_SCENES_FREE_SCENE_TABLE_RECORD   0xffff
 Declares a "free record" marker for a scene table Used as a value of a group_id field in a corresponding table record.
 
#define ZB_ZCL_SCENES_TRANSITION_TIME_DEFAULT_VALUE   0
 Default value for scene transition time.
 
#define ZB_ZCL_DECLARE_SCENES_ATTRIB_LIST( attr_list, scene_count, current_scene, current_group, scene_valid, name_support)
 Declares Scenes attribute list. More...
 

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, ZB_ZCL_CMD_SCENES_ENHANCED_ADD_SCENE = 0x40,
  ZB_ZCL_CMD_SCENES_ENHANCED_VIEW_SCENE = 0x41, ZB_ZCL_CMD_SCENES_COPY_SCENE = 0x42
}
 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_RESPONSE = 0x03,
  ZB_ZCL_CMD_SCENES_STORE_SCENE_RESPONSE = 0x04, ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP_RESPONSE = 0x06, ZB_ZCL_CMD_SCENES_ENHANCED_ADD_SCENE_RESPONSE = 0x40, ZB_ZCL_CMD_SCENES_ENHANCED_VIEW_SCENE_RESPONSE = 0x41,
  ZB_ZCL_CMD_SCENES_COPY_SCENE_RESPONSE = 0x42
}
 Command response identifiers for Scenes Cluster. More...
 
typedef struct zb_zcl_scenes_add_scene_req_s zb_zcl_scenes_add_scene_req_t
 
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_recall_scene_transition_time_req_s zb_zcl_scenes_recall_scene_transition_time_req_t
 Recall scene command transition_time 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_copy_scene_mode_s zb_zcl_scenes_copy_scene_mode_t
 Scene copying mode bitfield.
 
typedef struct zb_zcl_scenes_copy_scene_req_s zb_zcl_scenes_copy_scene_req_t
 Copy scene 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_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.
 
void zb_zcl_scenes_send_recall_scene_req_zcl8 (zb_bufid_t buffer, const zb_addr_u *dst_addr, zb_uint8_t dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t ep, zb_uint16_t prof_id, zb_uint8_t dis_default_resp, zb_callback_t callback, zb_uint16_t group_id, zb_uint8_t scene_id, zb_uint16_t transition_time)
 Send Recall scene command The command can be sent to device or group of devices either. More...
 
void zb_zcl_scenes_send_recall_scene_req (zb_bufid_t buffer, const zb_addr_u *dst_addr, zb_uint8_t dst_addr_mode, zb_uint8_t dst_ep, zb_uint8_t ep, zb_uint16_t prof_id, zb_uint8_t dis_default_resp, zb_callback_t callback, zb_uint16_t group_id, zb_uint8_t scene_id)
 Send Recall scene command (pre-ZCL8) Use zb_zcl_scenes_send_recall_scene_req_zcl8 for ZCL8 revision call. The command can be sent to device or group of devices either. More...
 
#define ZB_ZCL_SCENES_INIT_ADD_SCENE_REQ_COMMON( buffer, cmd_struct_ptr, dis_default_resp, group_id, scene_id, transition_time, add_scene_cmd_id)
 Common macro to start filling Add scene command frame. More...
 
#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_INIT_ENHANCED_ADD_SCENE_REQ( buffer, cmd_struct_ptr, dis_default_resp, group_id, scene_id, transition_time)
 Start filling Enhanced 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_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_SEND_VIEW_SCENE_REQ_COMMON( buffer, dst_addr, dst_ep, ep, prof_id, dis_default_resp, callback, group_id, scene_id, view_scene_cmd_id)
 Common macro to send View Scene commands. 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 commands. More...
 
#define ZB_ZCL_SCENES_SEND_ENHANCED_VIEW_SCENE_REQ( buffer, dst_addr, dst_ep, ep, prof_id, dis_default_resp, callback, group_id, scene_id)
 Send Enhanced 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_ZCL8(buffer, dst_addr, dst_addr_mode, dst_ep, ep, prof_id, dis_default_resp, callback, group_id, scene_id, transition_time)
 
#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)
 
#define ZB_ZCL_SCENES_RECALL_SCENE_REQ_PAYLOAD_LEN   sizeof(zb_zcl_scenes_recall_scene_req_t)
 Recall scene payload length macro.
 
#define ZB_ZCL_SCENES_RECALL_SCENE_REQ_TRANSITION_TIME_PAYLOAD_LEN   sizeof(zb_uint16_t)
 Transition Time field of Recall scene payload length macro.
 
#define ZB_ZCL_SCENES_RECALL_SCENE_REQ_TRANSITION_TIME_INVALID_VALUE   (zb_uint16_t)0xFFFF
 Transition Time field invalid value.
 
#define ZB_ZCL_SCENES_GET_RECALL_SCENE_REQ(buffer, cmd_struct_ptr, req_len)
 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_SEND_COPY_SCENE_REQ( buffer, dst_addr, dst_ep, ep, prof_id, dis_default_resp, callback, mode, group_id_from, scene_id_from, group_id_to, scene_id_to)
 Send Copy scene command. More...
 
#define ZB_ZCL_SCENES_SEND_COPY_SCENE_RES( buffer, cmd_struct_ptr, seq_num, dst_addr, dst_ep, ep, prof_id, callback, status, group_id_from, scene_id_from)
 Send Copy scene Response command. More...
 
#define ZB_ZCL_SCENES_GET_GET_SCENE_MEMBERSHIP_REQ(buffer, cmd_struct_ptr)
 Parses Scenes.GetSceneMembership command payload. More...
 
#define ZB_ZCL_COPY_ALL_SCENES_ENABLED   0x01U
 
#define ZB_ZCL_COPY_ALL_SCENES_DISABLED   0x00U
 
#define ZB_ZCL_SCENES_GET_COPY_SCENE_REQ(buffer, cmd_struct_ptr)
 
#define ZB_ZCL_SCENES_SEND_ADD_SCENE_RES_COMMON( buffer, seq_num, dst_addr, dst_ep, ep, prof_id, callback, status, group_id, scene_id, cmd_id)
 Common macro to send Add Scene response. 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_SEND_ENHANCED_ADD_SCENE_RES( buffer, seq_num, dst_addr, dst_ep, ep, prof_id, callback, status, group_id, scene_id)
 Send Enhanced 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_COMMON( buffer, cmd_struct_ptr, seq_num, status, group_id, scene_id, view_res_cmd_id)
 Common macro to start filling View scene response frame. 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_INIT_ENHANCED_VIEW_SCENE_RES( buffer, cmd_struct_ptr, seq_num, status, group_id, scene_id)
 Start filling Enhanced 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 common part of the Scenes.ViewSceneResponse. More...
 
#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

◆ ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_MAX_VALUE

#define ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_MAX_VALUE   0xfff7

Maximal permissible value for Current group attribute

◆ ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_MIN_VALUE

#define ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_MIN_VALUE   0x0001

Minimal permissible value for Current group attribute

◆ ZB_ZCL_DECLARE_SCENES_ATTRIB_LIST

#define ZB_ZCL_DECLARE_SCENES_ATTRIB_LIST (   attr_list,
  scene_count,
  current_scene,
  current_group,
  scene_valid,
  name_support 
)
Value:
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

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

◆ ZB_ZCL_MAX_SCENE_TABLE_RECORDS

#define ZB_ZCL_MAX_SCENE_TABLE_RECORDS   16

Maximal number of scene table records

◆ ZB_ZCL_SCENES_ADD_SCENE_COUNT_GET_SCENE_MEMBERSHIP_RES

#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

◆ ZB_ZCL_SCENES_ADD_SCENE_ID_GET_SCENE_MEMBERSHIP_RES

#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

◆ ZB_ZCL_SCENES_ADD_SCENE_NAME_VIEW_SCENE_RES

#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 the Stack does not support scene names, the define 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)

◆ ZB_ZCL_SCENES_ADD_TRANSITION_TIME_VIEW_SCENE_RES

#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

◆ ZB_ZCL_SCENES_CAPACITY_ONE_MORE

#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

◆ ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_COMMON

#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); \
(void)zb_buf_cut_left( \
(buffer), \
(cmd_struct_ptr)->scene_name[0]); \
(cmd_struct_ptr)->scene_name[0] = 0; \
} \
}

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_t 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

◆ ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_NEXT_FIELDSET_DESC

#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_zcl_scenes_fieldset_common_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)); \
(void)zb_buf_cut_left((buffer), (content_length)); \
} \
} \
}

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

◆ ZB_ZCL_SCENES_GET_ADD_SCENE_REQ_STORE_FIELDSET_COMMON

#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); \
}

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

◆ ZB_ZCL_SCENES_GET_ADD_SCENE_RES

#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); \
} \
}

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

◆ ZB_ZCL_SCENES_GET_COPY_SCENE_REQ

#define ZB_ZCL_SCENES_GET_COPY_SCENE_REQ (   buffer,
  cmd_struct_ptr 
)
Value:
{ \
if (sizeof(zb_zcl_scenes_copy_scene_req_t) > zb_buf_len((buffer))) \
{ \
(cmd_struct_ptr) = NULL; \
} \
else \
{ \
(cmd_struct_ptr) = \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id_from); \
ZB_ZCL_HTOLE16_INPLACE(&(cmd_struct_ptr)->group_id_to); \
} \
}

◆ ZB_ZCL_SCENES_GET_GET_SCENE_MEMBERSHIP_REQ

#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); \
} \
}

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

◆ ZB_ZCL_SCENES_GET_GET_SCENE_MEMBERSHIP_RES

#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); \
} \
}

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

◆ ZB_ZCL_SCENES_GET_RECALL_SCENE_REQ

#define ZB_ZCL_SCENES_GET_RECALL_SCENE_REQ (   buffer,
  cmd_struct_ptr,
  req_len 
)
Value:
{ \
zb_zcl_scenes_recall_scene_req_t *recall_scene_req_ptr; \
req_len = zb_buf_len(buffer); \
(recall_scene_req_ptr) = (req_len) >= \
if (recall_scene_req_ptr) \
{ \
ZB_ZCL_HTOLE16_INPLACE(zb_buf_begin((buffer))); \
(cmd_struct_ptr) = \
(void)zb_buf_cut_left( \
(buffer), \
(req_len)); \
} \
else \
{ \
cmd_struct_ptr = NULL; \
} \
}

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
req_len- length of ZCL command
Attention
The macro changes content of the buffer

◆ ZB_ZCL_SCENES_GET_REMOVE_ALL_SCENES_REQ

#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); \
} \
}

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

◆ ZB_ZCL_SCENES_GET_REMOVE_ALL_SCENES_RES

#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); \
} \
}

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

◆ ZB_ZCL_SCENES_GET_REMOVE_SCENE_REQ

#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); \
} \
}

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

◆ ZB_ZCL_SCENES_GET_REMOVE_SCENE_RES

#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); \
} \
}

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

◆ ZB_ZCL_SCENES_GET_STORE_SCENE_REQ

#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) = \
(void)zb_buf_cut_left( \
(buffer), \
} \
}

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

◆ ZB_ZCL_SCENES_GET_STORE_SCENE_RES

#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); \
} \
}

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

◆ ZB_ZCL_SCENES_GET_VIEW_SCENE_REQ

#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); \
} \
}

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

◆ ZB_ZCL_SCENES_GET_VIEW_SCENE_RES_COMMON

#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)); \
(response_ptr)->scene_name[0]); \
(response_ptr)->scene_name[0] = 0; \
} \
else \
{ \
(void)zb_buf_cut_left( \
(buffer), \
(2 * sizeof(zb_uint8_t) + sizeof(zb_uint16_t))); \
} \
} \
}

Parses common part of the Scenes.ViewSceneResponse.

Parameters
buffercontaining data
response_ptr- pointer to the extracted data

◆ ZB_ZCL_SCENES_INIT_ADD_SCENE_REQ

#define ZB_ZCL_SCENES_INIT_ADD_SCENE_REQ (   buffer,
  cmd_struct_ptr,
  dis_default_resp,
  group_id,
  scene_id,
  transition_time 
)
Value:
(buffer), \
(cmd_struct_ptr), \
(dis_default_resp), \
(group_id), \
(scene_id), \
(transition_time), \

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 (in seconds)

◆ ZB_ZCL_SCENES_INIT_ADD_SCENE_REQ_COMMON

#define ZB_ZCL_SCENES_INIT_ADD_SCENE_REQ_COMMON (   buffer,
  cmd_struct_ptr,
  dis_default_resp,
  group_id,
  scene_id,
  transition_time,
  add_scene_cmd_id 
)
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, \
add_scene_cmd_id); \
ZB_ZCL_PACKET_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); \
}

Common macro to 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
add_scene_cmd_id- a scene cmd ID (Add Scene or Enh Add Scene)

◆ ZB_ZCL_SCENES_INIT_ENHANCED_ADD_SCENE_REQ

#define ZB_ZCL_SCENES_INIT_ENHANCED_ADD_SCENE_REQ (   buffer,
  cmd_struct_ptr,
  dis_default_resp,
  group_id,
  scene_id,
  transition_time 
)
Value:
(buffer), \
(cmd_struct_ptr), \
(dis_default_resp), \
(group_id), \
(scene_id), \
(transition_time), \

Start filling Enhanced 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 (in tenths of a second)

◆ ZB_ZCL_SCENES_INIT_ENHANCED_VIEW_SCENE_RES

#define ZB_ZCL_SCENES_INIT_ENHANCED_VIEW_SCENE_RES (   buffer,
  cmd_struct_ptr,
  seq_num,
  status,
  group_id,
  scene_id 
)
Value:
buffer, \
cmd_struct_ptr, \
seq_num, \
status, \
group_id, \
scene_id, \

Start filling Enhanced 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 zcl_status 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

◆ ZB_ZCL_SCENES_INIT_FIELDSET

#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)); \
}

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

◆ ZB_ZCL_SCENES_INIT_GET_SCENE_MEMBERSHIP_RES

#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); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL( \
cmd_struct_ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER( \
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)); \
}

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 zcl_status 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

◆ ZB_ZCL_SCENES_INIT_VIEW_SCENE_RES

#define ZB_ZCL_SCENES_INIT_VIEW_SCENE_RES (   buffer,
  cmd_struct_ptr,
  seq_num,
  status,
  group_id,
  scene_id 
)
Value:
buffer, \
cmd_struct_ptr, \
seq_num, \
status, \
group_id, \
scene_id, \

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 zcl_status 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

◆ ZB_ZCL_SCENES_INIT_VIEW_SCENE_RES_COMMON

#define ZB_ZCL_SCENES_INIT_VIEW_SCENE_RES_COMMON (   buffer,
  cmd_struct_ptr,
  seq_num,
  status,
  group_id,
  scene_id,
  view_res_cmd_id 
)
Value:
{ \
cmd_struct_ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL( \
cmd_struct_ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER( \
cmd_struct_ptr, \
seq_num, \
view_res_cmd_id); \
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)); \
}

Common macro to 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 zcl_status 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
view_res_cmd_id- a command ID (View Response or Enh View Response)

◆ ZB_ZCL_SCENES_SEND_ADD_SCENE_REQ

#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); \
}

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

◆ ZB_ZCL_SCENES_SEND_ADD_SCENE_RES

#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:
buffer, \
seq_num, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback, \
status, \
group_id, \
scene_id, \

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 zcl_status enumeration)are:
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store

◆ ZB_ZCL_SCENES_SEND_ADD_SCENE_RES_COMMON

#define ZB_ZCL_SCENES_SEND_ADD_SCENE_RES_COMMON (   buffer,
  seq_num,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback,
  status,
  group_id,
  scene_id,
  cmd_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER( \
ptr, \
seq_num, \
cmd_id); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (group_id)); \
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); \
}

Common macro to 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 zcl_status enumeration)are:
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store
cmd_id- a response cmd ID (Add Scene or Enh Add Scene)

◆ ZB_ZCL_SCENES_SEND_COPY_SCENE_REQ

#define ZB_ZCL_SCENES_SEND_COPY_SCENE_REQ (   buffer,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  callback,
  mode,
  group_id_from,
  scene_id_from,
  group_id_to,
  scene_id_to 
)
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, (mode)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (group_id_from)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (scene_id_from)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (group_id_to)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (scene_id_to)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}

Send Copy 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_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
mode- a scene copying mode
group_id_from- group identifier for the scene to copy from
scene_id_from- scene identifier to copy from
group_id_to- group identifier for the scene to copy to
scene_id_to- scene identifier to copy to

◆ ZB_ZCL_SCENES_SEND_COPY_SCENE_RES

#define ZB_ZCL_SCENES_SEND_COPY_SCENE_RES (   buffer,
  cmd_struct_ptr,
  seq_num,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback,
  status,
  group_id_from,
  scene_id_from 
)
Value:
{ \
cmd_struct_ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL( \
cmd_struct_ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER( \
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_from)); \
ZB_ZCL_PACKET_PUT_DATA8(cmd_struct_ptr, (scene_id_from)); \
ZB_ZCL_FINISH_PACKET(buffer, cmd_struct_ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}

Send Copy scene Response command.

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

Attention
- Application must send reply for this command.
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
dst_addr- address to send packet to
dst_ep- destination endpoint (if sendting to a particular device)
ep- sending endpoint
prof_id- profile identifier
callback- for getting command send status
status- copying status
group_id_from- a group ID to copy from
scene_id_from- a scene ID to copy from

◆ ZB_ZCL_SCENES_SEND_ENHANCED_ADD_SCENE_RES

#define ZB_ZCL_SCENES_SEND_ENHANCED_ADD_SCENE_RES (   buffer,
  seq_num,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback,
  status,
  group_id,
  scene_id 
)
Value:
buffer, \
seq_num, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback, \
status, \
group_id, \
scene_id, \

Send Enhanced 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 zcl_status enumeration)are:
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store

◆ ZB_ZCL_SCENES_SEND_ENHANCED_VIEW_SCENE_REQ

#define ZB_ZCL_SCENES_SEND_ENHANCED_VIEW_SCENE_REQ (   buffer,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  callback,
  group_id,
  scene_id 
)
Value:
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
dis_default_resp, \
callback, \
group_id, \
scene_id, \

Send Enhanced 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

◆ ZB_ZCL_SCENES_SEND_GET_SCENE_MEMBERSHIP_REQ

#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_PACKET_PUT_DATA16_VAL(ptr, (group_id)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prof_id, \
callback); \
}

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

◆ ZB_ZCL_SCENES_SEND_GET_SCENE_MEMBERSHIP_RES

#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); \
}

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

◆ ZB_ZCL_SCENES_SEND_RECALL_SCENE_REQ

#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_zcl_scenes_send_recall_scene_req( \
buffer, \
ZB_ADDR_U_CAST(dst_addr), \
dst_addr_mode, \
dst_ep, \
ep, \
prof_id, \
dis_default_resp, \
callback, \
group_id, \
scene_id); \
}

Macro for calling zb_zcl_scenes_send_recall_scene_req function

◆ ZB_ZCL_SCENES_SEND_RECALL_SCENE_REQ_ZCL8

#define ZB_ZCL_SCENES_SEND_RECALL_SCENE_REQ_ZCL8 (   buffer,
  dst_addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  callback,
  group_id,
  scene_id,
  transition_time 
)
Value:
{ \
zb_zcl_scenes_send_recall_scene_req_zcl8( \
buffer, \
ZB_ADDR_U_CAST(dst_addr), \
dst_addr_mode, \
dst_ep, \
ep, \
prof_id, \
dis_default_resp, \
callback, \
group_id, \
scene_id, \
transition_time); \
}

Macro for call zb_zcl_scenes_send_recall_scene_req_zcl8 function

◆ ZB_ZCL_SCENES_SEND_REMOVE_ALL_SCENES_REQ

#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_PACKET_PUT_DATA16_VAL(ptr, (group_id)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prof_id, \
callback); \
}

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

◆ ZB_ZCL_SCENES_SEND_REMOVE_ALL_SCENES_RES

#define ZB_ZCL_SCENES_SEND_REMOVE_ALL_SCENES_RES (   buffer,
  seq_num,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  callback,
  status,
  group_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER( \
ptr, \
seq_num, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (group_id)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
callback); \
}

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 zcl_status enumeration)are:
group_id- group identifier for the scene to store

◆ ZB_ZCL_SCENES_SEND_REMOVE_SCENE_REQ

#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_DATA16_VAL(ptr, (group_id)); \
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); \
}

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

◆ ZB_ZCL_SCENES_SEND_REMOVE_SCENE_RES

#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:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER( \
ptr, \
seq_num, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (group_id)); \
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); \
}

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 zcl_status enumeration)are:
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store

◆ ZB_ZCL_SCENES_SEND_STORE_SCENE_REQ

#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_DATA16_VAL(ptr, (group_id)); \
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); \
}

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

◆ ZB_ZCL_SCENES_SEND_STORE_SCENE_RES

#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:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET(buffer); \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(ptr); \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER( \
ptr, \
seq_num, \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (status)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (group_id)); \
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); \
}

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 zcl_status enumeration)are:
group_id- group identifier for the scene to store
scene_id- scene identifier for the scene to store

◆ ZB_ZCL_SCENES_SEND_VIEW_SCENE_REQ

#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:
buffer, \
dst_addr, \
dst_ep, \
ep, \
prof_id, \
dis_default_resp, \
callback, \
group_id, \
scene_id, \

Send View Scene commands.

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

◆ ZB_ZCL_SCENES_SEND_VIEW_SCENE_REQ_COMMON

#define ZB_ZCL_SCENES_SEND_VIEW_SCENE_REQ_COMMON (   buffer,
  dst_addr,
  dst_ep,
  ep,
  prof_id,
  dis_default_resp,
  callback,
  group_id,
  scene_id,
  view_scene_cmd_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, \
view_scene_cmd_id); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (group_id)); \
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); \
}

Common macro to send View Scene commands.

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
view_scene_cmd_id- command ID (View Scene or Enhanced View Scene)

◆ ZB_ZCL_SCENES_SEND_VIEW_SCENE_RES

#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); \
}

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

Typedef Documentation

◆ zb_zcl_scenes_add_scene_req_t

Inform User App about Scene cluster Add Scene command.

Enumeration Type Documentation

◆ zb_zcl_scene_attr_e

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

SceneValid attribute has to be maintained by the application according to ZCL spec snippet below:

Before a scene has been stored or recalled, this attribute is set to FALSE. After a successful Store Scene or Recall Scene command it is set to TRUE. If, after a scene is stored or recalled, the state of the device is modified, this attribute is set to FALSE.

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!

◆ zb_zcl_scenes_cmd_e

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

ZB_ZCL_CMD_SCENES_ENHANCED_ADD_SCENE 

The Enhanced Add Scene command allows a scene to be added using a finer scene transition time than the Add Scene command.

ZB_ZCL_CMD_SCENES_ENHANCED_VIEW_SCENE 

The Enhanced View Scene command allows a scene to be retrieved using a finer scene transition time than the View Scene command.

ZB_ZCL_CMD_SCENES_COPY_SCENE 

The Copy Scene command allows a device to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair.

◆ zb_zcl_scenes_cmd_resp_e

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_RESPONSE 

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

ZB_ZCL_CMD_SCENES_ENHANCED_ADD_SCENE_RESPONSE 

The Enhanced Add Scene Response command allows a device to respond to an Enhanced Add Scene command.

ZB_ZCL_CMD_SCENES_ENHANCED_VIEW_SCENE_RESPONSE 

The Enhanced View Scene Response command allows a device to respond to an Enhanced View Scene command using a finer scene transition time that was available in the ZCL.

ZB_ZCL_CMD_SCENES_COPY_SCENE_RESPONSE 

The Copy Scene Response command allows a device to respond to a Copy Scene command.

Function Documentation

◆ zb_zcl_scenes_send_recall_scene_req()

void zb_zcl_scenes_send_recall_scene_req ( zb_bufid_t  buffer,
const zb_addr_u dst_addr,
zb_uint8_t  dst_addr_mode,
zb_uint8_t  dst_ep,
zb_uint8_t  ep,
zb_uint16_t  prof_id,
zb_uint8_t  dis_default_resp,
zb_callback_t  callback,
zb_uint16_t  group_id,
zb_uint8_t  scene_id 
)

Send Recall scene command (pre-ZCL8) Use zb_zcl_scenes_send_recall_scene_req_zcl8 for ZCL8 revision call. 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

◆ zb_zcl_scenes_send_recall_scene_req_zcl8()

void zb_zcl_scenes_send_recall_scene_req_zcl8 ( zb_bufid_t  buffer,
const zb_addr_u dst_addr,
zb_uint8_t  dst_addr_mode,
zb_uint8_t  dst_ep,
zb_uint8_t  ep,
zb_uint16_t  prof_id,
zb_uint8_t  dis_default_resp,
zb_callback_t  callback,
zb_uint16_t  group_id,
zb_uint8_t  scene_id,
zb_uint16_t  transition_time 
)

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
transition_time- determines how long the transition takes from the old cluster state to the new cluster state
ZB_ZCL_SCENES_SEND_ADD_SCENE_RES_COMMON
#define ZB_ZCL_SCENES_SEND_ADD_SCENE_RES_COMMON( buffer, seq_num, dst_addr, dst_ep, ep, prof_id, callback, status, group_id, scene_id, cmd_id)
Common macro to send Add Scene response.
Definition: zb_zcl_scenes.h:1436
ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP_RESPONSE
@ ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP_RESPONSE
Definition: zb_zcl_scenes.h:322
zb_zcl_scenes_remove_all_scenes_req_s
Remove all scenes command payload structure.
Definition: zb_zcl_scenes.h:853
zb_zcl_scenes_get_scene_membership_req_s
Get scene membership command payload structure.
Definition: zb_zcl_scenes.h:1177
ZB_ZCL_START_PACKET
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1518
zb_uint8_t
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:153
ZB_ZCL_CMD_SCENES_ENHANCED_ADD_SCENE
@ ZB_ZCL_CMD_SCENES_ENHANCED_ADD_SCENE
Definition: zb_zcl_scenes.h:297
ZB_ZCL_ATTR_SCENES_CURRENT_SCENE_ID
@ ZB_ZCL_ATTR_SCENES_CURRENT_SCENE_ID
Definition: zb_zcl_scenes.h:51
ZB_ZCL_CMD_SCENES_STORE_SCENE
@ ZB_ZCL_CMD_SCENES_STORE_SCENE
Definition: zb_zcl_scenes.h:290
ZB_ZCL_CMD_SCENES_VIEW_SCENE
@ ZB_ZCL_CMD_SCENES_VIEW_SCENE
Definition: zb_zcl_scenes.h:284
zb_zcl_scenes_store_scene_req_s
Store scene command payload structure.
Definition: zb_zcl_scenes.h:928
ZB_ZCL_CMD_SCENES_REMOVE_SCENE
@ ZB_ZCL_CMD_SCENES_REMOVE_SCENE
Definition: zb_zcl_scenes.h:286
ZB_ZCL_SCENES_SEND_VIEW_SCENE_REQ_COMMON
#define ZB_ZCL_SCENES_SEND_VIEW_SCENE_REQ_COMMON( buffer, dst_addr, dst_ep, ep, prof_id, dis_default_resp, callback, group_id, scene_id, view_scene_cmd_id)
Common macro to send View Scene commands.
Definition: zb_zcl_scenes.h:641
ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP
@ ZB_ZCL_CMD_SCENES_GET_SCENE_MEMBERSHIP
Definition: zb_zcl_scenes.h:294
ZB_ZCL_SCENES_RECALL_SCENE_REQ_TRANSITION_TIME_PAYLOAD_LEN
#define ZB_ZCL_SCENES_RECALL_SCENE_REQ_TRANSITION_TIME_PAYLOAD_LEN
Transition Time field of Recall scene payload length macro.
Definition: zb_zcl_scenes.h:1139
ZB_ZCL_GET_SEQ_NUM
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1438
zb_zcl_scenes_view_scene_res_fixed_size_s
Mandatory part of the Scenes.ViewSceneResponse payload.
Definition: zb_zcl_scenes.h:1580
zb_buf_cut_left
#define zb_buf_cut_left(buf, size)
Definition: zboss_api_buf.h:464
ZB_ZCL_SCENES_RECALL_SCENE_REQ_PAYLOAD_LEN
#define ZB_ZCL_SCENES_RECALL_SCENE_REQ_PAYLOAD_LEN
Recall scene payload length macro.
Definition: zb_zcl_scenes.h:1135
zb_zcl_scenes_view_scene_req_s
View scene command payload structure.
Definition: zb_zcl_scenes.h:619
zb_zcl_scenes_store_scene_res_s
Store scene response payload structure.
Definition: zb_zcl_scenes.h:1952
ZB_ZCL_CMD_SCENES_STORE_SCENE_RESPONSE
@ ZB_ZCL_CMD_SCENES_STORE_SCENE_RESPONSE
Definition: zb_zcl_scenes.h:320
ZB_ZCL_CMD_SCENES_REMOVE_ALL_SCENES_RESPONSE
@ ZB_ZCL_CMD_SCENES_REMOVE_ALL_SCENES_RESPONSE
Definition: zb_zcl_scenes.h:318
ZB_ZCL_CMD_SCENES_REMOVE_SCENE_RESPONSE
@ ZB_ZCL_CMD_SCENES_REMOVE_SCENE_RESPONSE
Definition: zb_zcl_scenes.h:316
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.
ZB_ZCL_CMD_SCENES_COPY_SCENE
@ ZB_ZCL_CMD_SCENES_COPY_SCENE
Definition: zb_zcl_scenes.h:303
ZB_ZCL_CMD_SCENES_ADD_SCENE_RESPONSE
@ ZB_ZCL_CMD_SCENES_ADD_SCENE_RESPONSE
Definition: zb_zcl_scenes.h:312
zb_zcl_scenes_fieldset_common_s
Common part of the field set definition.
Definition: zb_zcl_scenes.h:180
ZB_ZCL_CMD_SCENES_VIEW_SCENE_RESPONSE
@ ZB_ZCL_CMD_SCENES_VIEW_SCENE_RESPONSE
Definition: zb_zcl_scenes.h:314
zb_buf_begin
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:343
ZB_ZCL_CMD_SCENES_COPY_SCENE_RESPONSE
@ ZB_ZCL_CMD_SCENES_COPY_SCENE_RESPONSE
Definition: zb_zcl_scenes.h:332
ZB_ZCL_CMD_SCENES_REMOVE_ALL_SCENES
@ ZB_ZCL_CMD_SCENES_REMOVE_ALL_SCENES
Definition: zb_zcl_scenes.h:288
ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION
#define ZB_ZCL_START_DECLARE_ATTRIB_LIST_CLUSTER_REVISION(attrs_desc_name, cluster_name)
Start declaration of attributes list with cluster revision.
Definition: zb_zcl_common.h:785
ZB_APS_ADDR_MODE_16_ENDP_PRESENT
#define ZB_APS_ADDR_MODE_16_ENDP_PRESENT
Definition: zboss_api_aps.h:107
ZB_ZCL_CMD_SCENES_ENHANCED_ADD_SCENE_RESPONSE
@ ZB_ZCL_CMD_SCENES_ENHANCED_ADD_SCENE_RESPONSE
Definition: zb_zcl_scenes.h:325
zb_zcl_scenes_get_scene_membership_res_s
Get scene membership response.
Definition: zb_zcl_scenes.h:2080
zb_zcl_scenes_remove_scene_req_s
Remove scene command payload structure.
Definition: zb_zcl_scenes.h:775
zb_uint16_t
unsigned short zb_uint16_t
Project-local 2-byte unsigned int type.
Definition: zb_types.h:157
ZB_ZCL_ATTR_SCENES_NAME_SUPPORT_ID
@ ZB_ZCL_ATTR_SCENES_NAME_SUPPORT_ID
Indicates support for scene names.
Definition: zb_zcl_scenes.h:81
ZB_ZCL_SCENES_INIT_VIEW_SCENE_RES_COMMON
#define ZB_ZCL_SCENES_INIT_VIEW_SCENE_RES_COMMON( buffer, cmd_struct_ptr, seq_num, status, group_id, scene_id, view_res_cmd_id)
Common macro to start filling View scene response frame.
Definition: zb_zcl_scenes.h:1617
zb_zcl_scenes_copy_scene_req_s
Copy scene command payload structure.
Definition: zb_zcl_scenes.h:1381
ZB_ZCL_STATUS_SUCCESS
#define ZB_ZCL_STATUS_SUCCESS
Definition: zb_zcl_common.h:346
ZB_ZCL_ATTR_SCENES_SCENE_VALID_ID
@ ZB_ZCL_ATTR_SCENES_SCENE_VALID_ID
Indicates whether the state of the device corresponds to that associated with the CurrentScene and Cu...
Definition: zb_zcl_scenes.h:69
zb_zcl_scenes_recall_scene_req_s
Recall scene command payload structure.
Definition: zb_zcl_scenes.h:1009
ZB_ZCL_CMD_SCENES_ENHANCED_VIEW_SCENE_RESPONSE
@ ZB_ZCL_CMD_SCENES_ENHANCED_VIEW_SCENE_RESPONSE
Definition: zb_zcl_scenes.h:329
zb_zcl_scenes_view_scene_res_fixed_size_t
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.
ZB_ZCL_CMD_SCENES_ADD_SCENE
@ ZB_ZCL_CMD_SCENES_ADD_SCENE
Definition: zb_zcl_scenes.h:282
zb_zcl_scenes_add_scene_res_s
Add scene response payload structure.
Definition: zb_zcl_scenes.h:1410
zb_zcl_scenes_remove_all_scenes_res_s
Remove all scenes response payload structure.
Definition: zb_zcl_scenes.h:1876
ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_ID
@ ZB_ZCL_ATTR_SCENES_CURRENT_GROUP_ID
Group ID of the scene last invoked.
Definition: zb_zcl_scenes.h:56
ZB_ZCL_CMD_SCENES_ENHANCED_VIEW_SCENE
@ ZB_ZCL_CMD_SCENES_ENHANCED_VIEW_SCENE
Definition: zb_zcl_scenes.h:300
ZB_ZCL_SCENES_INIT_ADD_SCENE_REQ_COMMON
#define ZB_ZCL_SCENES_INIT_ADD_SCENE_REQ_COMMON( buffer, cmd_struct_ptr, dis_default_resp, group_id, scene_id, transition_time, add_scene_cmd_id)
Common macro to start filling Add scene command frame.
Definition: zb_zcl_scenes.h:394
zb_buf_len
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:361
zb_zcl_scenes_add_scene_req_s
Definition: zb_zcl_scenes.h:364
ZB_ZCL_ATTR_SCENES_SCENE_COUNT_ID
@ ZB_ZCL_ATTR_SCENES_SCENE_COUNT_ID
Definition: zb_zcl_scenes.h:49
ZB_ZCL_CLUSTER_ID_SCENES
#define ZB_ZCL_CLUSTER_ID_SCENES
Definition: zb_zcl_common.h:210
zb_zcl_scenes_remove_scene_res_s
Remove scene response payload structure.
Definition: zb_zcl_scenes.h:1796