Developing with ZBOSS for Zigbee
ZCL Level control cluster

Data Structures

struct  zb_zcl_level_control_req_options_s
 Structured representation of Level Control command payload (optional part) More...
 
struct  zb_zcl_level_control_move_to_level_req_s
 Structured representation of MOVE_TO_LEVEL command payload. More...
 
struct  zb_zcl_level_control_move_req_s
 Structured representation of MOVE command payload. More...
 
struct  zb_zcl_level_control_step_req_s
 Structured representation of STEP command payload. More...
 

Level Control cluster attributes

enum  zb_zcl_level_control_attr_e {
  ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_LEVEL_ID = 0x0000, ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME_ID = 0x0001, ZB_ZCL_ATTR_LEVEL_CONTROL_MIN_LEVEL_ID = 0x0002, ZB_ZCL_ATTR_LEVEL_CONTROL_MAX_LEVEL_ID = 0x0003,
  ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_FREQUENCY_ID = 0x0004, ZB_ZCL_ATTR_LEVEL_CONTROL_MIN_FREQUENCY_ID = 0x0005, ZB_ZCL_ATTR_LEVEL_CONTROL_MAX_FREQUENCY_ID = 0x0006, ZB_ZCL_ATTR_LEVEL_CONTROL_ON_OFF_TRANSITION_TIME_ID = 0x0010,
  ZB_ZCL_ATTR_LEVEL_CONTROL_ON_LEVEL_ID = 0x0011, ZB_ZCL_ATTR_LEVEL_CONTROL_ON_TRANSITION_TIME_ID = 0x0012, ZB_ZCL_ATTR_LEVEL_CONTROL_OFF_TRANSITION_TIME_ID = 0x0013, ZB_ZCL_ATTR_LEVEL_CONTROL_DEFAULT_MOVE_RATE_ID = 0x0014,
  ZB_ZCL_ATTR_LEVEL_CONTROL_OPTIONS_ID = 0x000F, ZB_ZCL_ATTR_LEVEL_CONTROL_START_UP_CURRENT_LEVEL_ID = 0x4000, ZB_ZCL_ATTR_LEVEL_CONTROL_MOVE_STATUS_ID = 0xefff
}
 Level Control cluster information attribute identifiers. More...
 
enum  zb_zcl_level_control_options_e { ZB_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF = 0, ZB_ZCL_LEVEL_CONTROL_OPTIONS_RESERVED = 1 }
 Level control Options attribute, ZCL spec 3.10.2.2.8. More...
 
#define ZB_ZCL_LEVEL_CONTROL_LEVEL_MIN_VALUE   0x00
 Current Level attribute minimum value.
 
#define ZB_ZCL_LEVEL_CONTROL_LEVEL_MAX_VALUE   0xff
 Current Level attribute maximum value.
 
#define ZB_ZCL_LEVEL_CONTROL_LEVEL_MAX_VALUE_SHADE   0xff
 Current Level attribute maximum value.
 
#define ZB_ZCL_LEVEL_CONTROL_CURRENT_LEVEL_DEFAULT_VALUE   ((zb_uint8_t)0xFF)
 Current Level attribute default value.
 
#define ZB_ZCL_LEVEL_CONTROL_REMAINING_TIME_DEFAULT_VALUE   ((zb_uint16_t)0x0000)
 Default value for RemainingTime attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_MIN_LEVEL_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for MinLevel attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_MAX_LEVEL_DEFAULT_VALUE   ((zb_uint8_t)0xFF)
 Default value for MaxLevel attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_CURRENT_FREQUENCY_DEFAULT_VALUE   ((zb_uint16_t)0x0000)
 Default value for CurrentFrequency attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_MIN_FREQUENCY_DEFAULT_VALUE   ((zb_uint16_t)0x0000)
 Default value for MinFrequency attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_MAX_FREQUENCY_DEFAULT_VALUE   ((zb_uint16_t)0x0000)
 Default value for MaxFrequency attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_ON_OFF_TRANSITION_TIME_DEFAULT_VALUE   ((zb_uint16_t)0x0000)
 Default value for OnOffTransitionTime attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_ON_LEVEL_DEFAULT_VALUE   ((zb_uint8_t)0xFF)
 Default value for OnLevel attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_ON_TRANSITION_TIME_DEFAULT_VALUE   ((zb_uint16_t)0xFFFF)
 Default value for OnTransitionTime attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_OFF_TRANSITION_TIME_DEFAULT_VALUE   ((zb_uint16_t)0xFFFF)
 Default value for OffTransitionTime attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_OPTIONS_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for Options attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_START_UP_CURRENT_LEVEL_USE_PREVIOUS_VALUE   ((zb_uint8_t)0xFF)
 Default value for OnLevel attribute.
 
#define ZB_ZCL_LEVEL_CONTROL_TRANSITION_TIME_AS_FAST_AS_ABLE   0xffff
 Transition Time as fast as able value see ZCL spec 3.10.2.3.1.2.
 
#define ZB_ZCL_DECLARE_LEVEL_CONTROL_ATTRIB_LIST(attr_list, current_level, remaining_time)
 Declare attribute list for Level Control cluster. More...
 
#define ZB_ZCL_DECLARE_LEVEL_CONTROL_ATTRIB_LIST_EXT(attr_list, current_level, remaining_time, start_up_current_level, options)
 Declare attribute list for Level Control cluster. More...
 

Level Control cluster commands

enum  zb_zcl_level_control_cmd_e {
  ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_LEVEL = 0x00, ZB_ZCL_CMD_LEVEL_CONTROL_MOVE = 0x01, ZB_ZCL_CMD_LEVEL_CONTROL_STEP = 0x02, ZB_ZCL_CMD_LEVEL_CONTROL_STOP = 0x03,
  ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_LEVEL_WITH_ON_OFF = 0x04, ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_WITH_ON_OFF = 0x05, ZB_ZCL_CMD_LEVEL_CONTROL_STEP_WITH_ON_OFF = 0x06, ZB_ZCL_CMD_LEVEL_CONTROL_STOP_WITH_ON_OFF = 0x07,
  ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_CLOSEST_FREQUENCY = 0x08
}
 Level control cluster command identifiers. More...
 
enum  zb_zcl_level_control_move_mode_e { ZB_ZCL_LEVEL_CONTROL_MOVE_MODE_UP = 0x00, ZB_ZCL_LEVEL_CONTROL_MOVE_MODE_DOWN = 0x01 }
 
enum  zb_zcl_level_control_step_mode_e { ZB_ZCL_LEVEL_CONTROL_STEP_MODE_UP = 0x00, ZB_ZCL_LEVEL_CONTROL_STEP_MODE_DOWN = 0x01 }
 
typedef struct zb_zcl_level_control_req_options_s zb_zcl_level_control_req_options_t
 Structured representation of Level Control command payload (optional part) More...
 
typedef struct zb_zcl_level_control_move_to_level_req_s zb_zcl_level_control_move_to_level_req_t
 Structured representation of MOVE_TO_LEVEL command payload. More...
 
typedef struct zb_zcl_level_control_move_req_s zb_zcl_level_control_move_req_t
 Structured representation of MOVE command payload.
 
typedef struct zb_zcl_level_control_step_req_s zb_zcl_level_control_step_req_t
 Structured representation of STEP command payload.
 
#define ZB_ZCL_LEVEL_CONTROL_REQ_OPTIONS_PAYLOAD_LEN   sizeof(zb_zcl_level_control_req_options_t)
 Move to Level payload length macro.
 
#define ZB_ZCL_LEVEL_CONTROL_GET_CMD_OPTIONS(data_buf, req_options, status)
 
#define ZB_ZCL_LEVEL_CONTROL_MOVE_TO_LEVEL_REQ_PAYLOAD_LEN   sizeof(zb_zcl_level_control_move_to_level_req_t)
 Move to Level payload length macro.
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_CMD(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, level, transition_time, cmd_id)
 
#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_CMD(data_buf, move_to_level_req, status)
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_REQ(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, level, transition_time)
 Send Move to Level command. More...
 
#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_REQ(data_buf, move_to_level_req, status)
 Parses Get Move to Level command and fills data request structure. More...
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_WITH_ON_OFF_REQ(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, level, transition_time)
 Send Move to Level with On/Off command. More...
 
#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_WITH_ON_OFF_REQ( data_buf, move_to_level_req, status)
 Parses Get Move to Level with On/Off command and fills data request structure. More...
 
#define ZB_ZCL_LEVEL_CONTROL_MOVE_REQ_PAYLOAD_LEN   sizeof(zb_zcl_level_control_move_req_t)
 Move payload length macro.
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_CMD( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, move_mode, rate, cmd_id)
 
#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_CMD(data_buf, move_req, status)
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_REQ(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, move_mode, rate)
 Send Move command. More...
 
#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_REQ(data_buf, move_req, status)
 Parses Get Move command and fills data request structure. More...
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_WITH_ON_OFF_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, move_mode, rate)
 Send Move with On/Off command. More...
 
#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_WITH_ON_OFF_REQ(data_buf, move_req, status)
 Parses Get Move with On/Off command and fills data request structure. More...
 
#define ZB_ZCL_LEVEL_CONTROL_STEP_REQ_PAYLOAD_LEN   sizeof(zb_zcl_level_control_step_req_t)
 Step payload length macro.
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_STEP_CMD(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, step_mode, step_size, transition_time, cmd_id)
 
#define ZB_ZCL_LEVEL_CONTROL_GET_STEP_CMD(data_buf, step_req, status)
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_STEP_REQ(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, step_mode, step_size, transition_time)
 Send Step command. More...
 
#define ZB_ZCL_LEVEL_CONTROL_GET_STEP_REQ(data_buf, step_req, status)
 Parses Get Step command and fills data request structure. More...
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_STEP_WITH_ON_OFF_REQ(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb, step_mode, step_size, transition_time)
 Send Step with On/Off command. More...
 
#define ZB_ZCL_LEVEL_CONTROL_GET_STEP_WITH_ON_OFF_REQ(data_buf, step_req, status)
 Parses Get Step with On/Off command and fills data request structure. More...
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_STOP_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb)
 Send Stop command. More...
 
#define ZB_ZCL_LEVEL_CONTROL_SEND_STOP_WITH_ON_OFF_REQ( buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb)   ZB_ZCL_LEVEL_CONTROL_SEND_STOP_REQ(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb)
 Send Stop with On/off command. More...
 

Detailed Description

Macro Definition Documentation

◆ ZB_ZCL_DECLARE_LEVEL_CONTROL_ATTRIB_LIST

#define ZB_ZCL_DECLARE_LEVEL_CONTROL_ATTRIB_LIST (   attr_list,
  current_level,
  remaining_time 
)
Value:
zb_zcl_level_control_move_status_t move_status_data_ctx## _attr_list; \
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_LEVEL_ID, (current_level)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME_ID, (remaining_time)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_LEVEL_CONTROL_MOVE_STATUS_ID, \
(&(move_status_data_ctx## _attr_list))) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Level Control cluster.

Parameters
attr_list- attribute list name
current_level- pointer to variable to store current_level attribute value
remaining_time- pointer to variable to store remaining_time attribute value

◆ ZB_ZCL_DECLARE_LEVEL_CONTROL_ATTRIB_LIST_EXT

#define ZB_ZCL_DECLARE_LEVEL_CONTROL_ATTRIB_LIST_EXT (   attr_list,
  current_level,
  remaining_time,
  start_up_current_level,
  options 
)
Value:
zb_zcl_level_control_move_status_t move_status_data_ctx## _attr_list; \
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_LEVEL_ID, (current_level)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME_ID, (remaining_time)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_LEVEL_CONTROL_OPTIONS_ID, (options)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_LEVEL_CONTROL_START_UP_CURRENT_LEVEL_ID, (start_up_current_level)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_LEVEL_CONTROL_MOVE_STATUS_ID, \
(&(move_status_data_ctx## _attr_list))) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Level Control cluster.

Parameters
attr_list- attribute list name
current_level- pointer to variable to store current_level attribute value
remaining_time- pointer to variable to store remaining_time attribute value
options- pointer to variable to store options attribute value
start_up_current_level- pointer to variable to store start_up_current_level attribute value

◆ ZB_ZCL_LEVEL_CONTROL_GET_CMD_OPTIONS

#define ZB_ZCL_LEVEL_CONTROL_GET_CMD_OPTIONS (   data_buf,
  req_options,
  status 
)
Value:
{ \
zb_zcl_level_control_req_options_t *req_options_ptr; \
(req_options_ptr) = zb_buf_len(data_buf) >= \
ZB_ZCL_LEVEL_CONTROL_REQ_OPTIONS_PAYLOAD_LEN ? \
if (req_options_ptr != NULL) \
{ \
req_options.options_mask = req_options_ptr->options_mask; \
req_options.options_override = req_options_ptr->options_override; \
status = ZB_TRUE; \
} \
else \
{ \
status = ZB_FALSE; \
} \
}

◆ ZB_ZCL_LEVEL_CONTROL_GET_MOVE_CMD

#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_CMD (   data_buf,
  move_req,
  status 
)
Value:
{ \
zb_zcl_level_control_move_req_t *move_req_ptr; \
(move_req_ptr) = zb_buf_len(data_buf) >= ZB_ZCL_LEVEL_CONTROL_MOVE_REQ_PAYLOAD_LEN ? \
if (move_req_ptr != NULL) \
{ \
ZB_MEMCPY(&(move_req), move_req_ptr, sizeof(zb_zcl_level_control_move_req_t)); \
status = ZB_TRUE; \
} \
else \
{ \
status = ZB_FALSE; \
} \
}

◆ ZB_ZCL_LEVEL_CONTROL_GET_MOVE_REQ

#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_REQ (   data_buf,
  move_req,
  status 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_GET_MOVE_CMD(data_buf, move_req, status); \
}

Parses Get Move command and fills data request structure.

Parameters
data_buf- pointer to zb_buf_t buffer containing command request data
move_req- variable to save command request
status- success or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.

◆ ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_CMD

#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_CMD (   data_buf,
  move_to_level_req,
  status 
)
Value:
{ \
zb_zcl_level_control_move_to_level_req_t *move_to_level_req_ptr; \
(move_to_level_req_ptr) = zb_buf_len(data_buf) >= \
ZB_ZCL_LEVEL_CONTROL_MOVE_TO_LEVEL_REQ_PAYLOAD_LEN ? \
if (move_to_level_req_ptr != NULL) \
{ \
ZB_HTOLE16(&(move_to_level_req).transition_time, &(move_to_level_req_ptr->transition_time)); \
move_to_level_req.level = move_to_level_req_ptr->level; \
status = ZB_TRUE; \
} \
else \
{ \
status = ZB_FALSE; \
} \
}

◆ ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_REQ

#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_REQ (   data_buf,
  move_to_level_req,
  status 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_CMD(data_buf, move_to_level_req, status); \
}

Parses Get Move to Level command and fills data request structure.

Parameters
data_buf- pointer to zb_buf_t buffer containing command request data
move_to_level_req- variable to save command request
status- success or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.

◆ ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_WITH_ON_OFF_REQ

#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_WITH_ON_OFF_REQ (   data_buf,
  move_to_level_req,
  status 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_CMD(data_buf, move_to_level_req, status); \
}

Parses Get Move to Level with On/Off command and fills data request structure.

Parameters
data_buf- pointer to zb_buf_t buffer containing command request data
move_to_level_req- variable to save command request.
status- success or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.

◆ ZB_ZCL_LEVEL_CONTROL_GET_MOVE_WITH_ON_OFF_REQ

#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_WITH_ON_OFF_REQ (   data_buf,
  move_req,
  status 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_GET_MOVE_CMD(data_buf, move_req, status); \
}

Parses Get Move with On/Off command and fills data request structure.

Parameters
data_buf- pointer to zb_buf_t buffer containing command request data
move_req- variable to save command request
status- success or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.

◆ ZB_ZCL_LEVEL_CONTROL_GET_STEP_CMD

#define ZB_ZCL_LEVEL_CONTROL_GET_STEP_CMD (   data_buf,
  step_req,
  status 
)
Value:
{ \
zb_zcl_level_control_step_req_t *step_req_ptr; \
(step_req_ptr) = zb_buf_len(data_buf) >= ZB_ZCL_LEVEL_CONTROL_STEP_REQ_PAYLOAD_LEN ? \
if (step_req_ptr != NULL) \
{ \
step_req.step_mode = step_req_ptr->step_mode; \
step_req.step_size = step_req_ptr->step_size; \
ZB_HTOLE16(&(step_req).transition_time, &step_req_ptr->transition_time); \
status = ZB_TRUE; \
} \
else \
{ \
status = ZB_FALSE; \
} \
}

◆ ZB_ZCL_LEVEL_CONTROL_GET_STEP_REQ

#define ZB_ZCL_LEVEL_CONTROL_GET_STEP_REQ (   data_buf,
  step_req,
  status 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_GET_STEP_CMD(data_buf, step_req, status); \
}

Parses Get Step command and fills data request structure.

Parameters
data_buf- pointer to zb_buf_t buffer containing command request data
step_req- variable to save command request
status- success or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.

◆ ZB_ZCL_LEVEL_CONTROL_GET_STEP_WITH_ON_OFF_REQ

#define ZB_ZCL_LEVEL_CONTROL_GET_STEP_WITH_ON_OFF_REQ (   data_buf,
  step_req,
  status 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_GET_STEP_CMD(data_buf, step_req, status); \
}

Parses Get Step with On/Off command and fills data request structure.

Parameters
data_buf- pointer to zb_buf_t buffer containing command request data
step_req- variable to save command request
status- success or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.

◆ ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_CMD

#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_CMD (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  move_mode,
  rate,
  cmd_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, def_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), cmd_id); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (move_mode)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (rate)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL, cb); \
}

◆ ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_REQ

#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  move_mode,
  rate 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_CMD(buffer, \
addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prfl_id, \
def_resp, \
cb, \
move_mode, \
rate, \
}

Send Move command.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status
move_mode- Move Mode value
rate- Rate value

◆ ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_CMD

#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_CMD (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  level,
  transition_time,
  cmd_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, (def_resp)) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), (cmd_id)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (level)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (transition_time)); \
ZB_ZCL_FINISH_PACKET((buffer), ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL, cb); \
}

◆ ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_REQ

#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  level,
  transition_time 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_CMD(buffer, \
addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prfl_id, \
def_resp, \
cb, \
level, \
transition_time, \
}

Send Move to Level command.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status
level- Level value
transition_time- Transition Time value

◆ ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_WITH_ON_OFF_REQ

#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_WITH_ON_OFF_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  level,
  transition_time 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_TO_LEVEL_CMD(buffer, \
addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prfl_id, \
def_resp, \
cb, \
level, \
transition_time, \
}

Send Move to Level with On/Off command.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status
level- Level value
transition_time- Transition Time value

◆ ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_WITH_ON_OFF_REQ

#define ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_WITH_ON_OFF_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  move_mode,
  rate 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_SEND_MOVE_CMD(buffer, \
addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prfl_id, \
def_resp, \
cb, \
move_mode, \
rate, \
}

Send Move with On/Off command.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status
move_mode- Move Mode value
rate- Rate value

◆ ZB_ZCL_LEVEL_CONTROL_SEND_STEP_CMD

#define ZB_ZCL_LEVEL_CONTROL_SEND_STEP_CMD (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  step_mode,
  step_size,
  transition_time,
  cmd_id 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, def_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), cmd_id); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (step_mode)); \
ZB_ZCL_PACKET_PUT_DATA8(ptr, (step_size)); \
ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, (transition_time)); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT(buffer, \
addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prfl_id, \
cb); \
}

◆ ZB_ZCL_LEVEL_CONTROL_SEND_STEP_REQ

#define ZB_ZCL_LEVEL_CONTROL_SEND_STEP_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  step_mode,
  step_size,
  transition_time 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_SEND_STEP_CMD(buffer, \
addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prfl_id, \
def_resp, \
cb, \
step_mode, \
step_size, \
transition_time, \
}

Send Step command.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status
step_mode- Step Mode value
step_size- Step Size value
transition_time- Transition Time value

◆ ZB_ZCL_LEVEL_CONTROL_SEND_STEP_WITH_ON_OFF_REQ

#define ZB_ZCL_LEVEL_CONTROL_SEND_STEP_WITH_ON_OFF_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb,
  step_mode,
  step_size,
  transition_time 
)
Value:
{ \
ZB_ZCL_LEVEL_CONTROL_SEND_STEP_CMD(buffer, \
addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prfl_id, \
def_resp, \
cb, \
step_mode, \
step_size, \
transition_time, \
}

Send Step with On/Off command.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status
step_mode- Step Mode value
step_size- Step Size value
transition_time- Transition Time value

◆ ZB_ZCL_LEVEL_CONTROL_SEND_STOP_REQ

#define ZB_ZCL_LEVEL_CONTROL_SEND_STOP_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb 
)
Value:
{ \
zb_uint8_t* ptr = ZB_ZCL_START_PACKET_REQ(buffer) \
ZB_ZCL_CONSTRUCT_SPECIFIC_COMMAND_REQ_FRAME_CONTROL(ptr, def_resp) \
ZB_ZCL_CONSTRUCT_COMMAND_HEADER_REQ(ptr, ZB_ZCL_GET_SEQ_NUM(), ZB_ZCL_CMD_LEVEL_CONTROL_STOP); \
ZB_ZCL_FINISH_PACKET(buffer, ptr) \
ZB_ZCL_SEND_COMMAND_SHORT( \
buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL, cb); \
}

Send Stop command.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status

◆ ZB_ZCL_LEVEL_CONTROL_SEND_STOP_WITH_ON_OFF_REQ

#define ZB_ZCL_LEVEL_CONTROL_SEND_STOP_WITH_ON_OFF_REQ (   buffer,
  addr,
  dst_addr_mode,
  dst_ep,
  ep,
  prfl_id,
  def_resp,
  cb 
)    ZB_ZCL_LEVEL_CONTROL_SEND_STOP_REQ(buffer, addr, dst_addr_mode, dst_ep, ep, prfl_id, def_resp, cb)

Send Stop with On/off command.

Parameters
buffer- to put packet to
addr- address to send packet to
dst_addr_mode- addressing mode
dst_ep- destination endpoint
ep- sending endpoint
prfl_id- profile identifier
def_resp- enable/disable default response
cb- callback for getting command send status

Typedef Documentation

◆ zb_zcl_level_control_move_to_level_req_t

Structured representation of MOVE_TO_LEVEL command payload.

See also
ZCL spec, subclause 3.10.2.3.1.1

◆ zb_zcl_level_control_req_options_t

Structured representation of Level Control command payload (optional part)

See also
ZCL spec, subclause 3.10.2.3.1.1

Enumeration Type Documentation

◆ zb_zcl_level_control_attr_e

Level Control cluster information attribute identifiers.

See also
ZCL spec, subclause 3.10.2.2

Level control attribute list

Enumerator
ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_LEVEL_ID 

Current Level attribute.

ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME_ID 

Remaining Time attribute.

ZB_ZCL_ATTR_LEVEL_CONTROL_MIN_LEVEL_ID 

On Off Transition Time attribute.

The MinLevel attribute indicates the minimum value of CurrentLevel that is capable of being assigned.

ZB_ZCL_ATTR_LEVEL_CONTROL_MAX_LEVEL_ID 

The MaxLevel attribute indicates the maximum value of CurrentLevel that is capable of being assigned.

ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_FREQUENCY_ID 

The CurrentFrequency attribute represents the frequency that the devices is at CurrentLevel.

ZB_ZCL_ATTR_LEVEL_CONTROL_MIN_FREQUENCY_ID 

The MinFrequency attribute indicates the minimum value of CurrentFrequency that is capable of being assigned.

ZB_ZCL_ATTR_LEVEL_CONTROL_MAX_FREQUENCY_ID 

The MaxFrequency attribute indicates the maximum value of CurrentFrequency that is capable of being assigned.

ZB_ZCL_ATTR_LEVEL_CONTROL_ON_LEVEL_ID 

On Level attribute.

ZB_ZCL_ATTR_LEVEL_CONTROL_ON_TRANSITION_TIME_ID 

The OnTransitionTime attribute represents the time taken to move the current level from the minimum level to the maximum level when an On command is received by an On/Off cluster on the same endpoint.

ZB_ZCL_ATTR_LEVEL_CONTROL_OFF_TRANSITION_TIME_ID 

The OffTransitionTime attribute represents the time taken to move the current level from the maximum level to the minimum level when an Off command is received by an On/Off cluster on the same endpoint.

ZB_ZCL_ATTR_LEVEL_CONTROL_DEFAULT_MOVE_RATE_ID 

The DefaultMoveRate attribute determines the movement rate, in units per second, when a Move command is received with a Rate parameter of 0xFF.

ZB_ZCL_ATTR_LEVEL_CONTROL_OPTIONS_ID 

The Options attribute is a bitmap that determines the default behavior of some cluster commands.

ZB_ZCL_ATTR_LEVEL_CONTROL_START_UP_CURRENT_LEVEL_ID 

The StartUpCurrentLevel attribute SHALL define the desired startup level for a device when it is supplied with power and this level SHALL be reflected in the CurrentLevel attribute.

◆ zb_zcl_level_control_cmd_e

Level control cluster command identifiers.

See also
ZCL spec, subclause 3.10.2.3
Enumerator
ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_LEVEL 

Move To Level command

ZB_ZCL_CMD_LEVEL_CONTROL_MOVE 

Move command

ZB_ZCL_CMD_LEVEL_CONTROL_STEP 

Step command

ZB_ZCL_CMD_LEVEL_CONTROL_STOP 

Stop command

ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_LEVEL_WITH_ON_OFF 

Move To Level with On/Off command

ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_WITH_ON_OFF 

Move with On/Off command

ZB_ZCL_CMD_LEVEL_CONTROL_STEP_WITH_ON_OFF 

Step with On/Off command

ZB_ZCL_CMD_LEVEL_CONTROL_STOP_WITH_ON_OFF 

Step with On/Off command

ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_CLOSEST_FREQUENCY 

Upon receipt of "Move to Closest Frequency" command, the device shall change its current frequency to the requested frequency, or to the closest frequency that it can generate

◆ zb_zcl_level_control_options_e

Level control Options attribute, ZCL spec 3.10.2.2.8.

Enumerator
ZB_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF 

ExecuteIfOff bit.

ZB_ZCL_CMD_LEVEL_CONTROL_STEP_WITH_ON_OFF
@ ZB_ZCL_CMD_LEVEL_CONTROL_STEP_WITH_ON_OFF
Definition: zb_zcl_level_control.h:320
ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_WITH_ON_OFF
@ ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_WITH_ON_OFF
Definition: zb_zcl_level_control.h:318
ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_LEVEL_ID
@ ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_LEVEL_ID
Current Level attribute.
Definition: zb_zcl_level_control.h:53
ZB_ZCL_CMD_LEVEL_CONTROL_MOVE
@ ZB_ZCL_CMD_LEVEL_CONTROL_MOVE
Definition: zb_zcl_level_control.h:310
zb_zcl_level_control_move_req_s
Structured representation of MOVE command payload.
Definition: zb_zcl_level_control.h:529
zb_zcl_level_control_req_options_s
Structured representation of Level Control command payload (optional part)
Definition: zb_zcl_level_control.h:355
ZB_ZCL_GET_SEQ_NUM
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1345
ZB_ZCL_CMD_LEVEL_CONTROL_STOP
@ ZB_ZCL_CMD_LEVEL_CONTROL_STOP
Definition: zb_zcl_level_control.h:314
ZB_ZCL_LEVEL_CONTROL_STEP_REQ_PAYLOAD_LEN
#define ZB_ZCL_LEVEL_CONTROL_STEP_REQ_PAYLOAD_LEN
Step payload length macro.
Definition: zb_zcl_level_control.h:676
ZB_ZCL_ATTR_LEVEL_CONTROL_OPTIONS_ID
@ ZB_ZCL_ATTR_LEVEL_CONTROL_OPTIONS_ID
Definition: zb_zcl_level_control.h:93
zb_buf_cut_left
#define zb_buf_cut_left(buf, size)
Definition: zboss_api_buf.h:473
ZB_TRUE
#define ZB_TRUE
Definition: zb_types.h:367
ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_LEVEL_WITH_ON_OFF
@ ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_LEVEL_WITH_ON_OFF
Definition: zb_zcl_level_control.h:316
zb_buf_begin
#define zb_buf_begin(buf)
Definition: zboss_api_buf.h:344
ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL
#define ZB_ZCL_CLUSTER_ID_LEVEL_CONTROL
Definition: zb_zcl_common.h:209
ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_LEVEL
@ ZB_ZCL_CMD_LEVEL_CONTROL_MOVE_TO_LEVEL
Definition: zb_zcl_level_control.h:308
ZB_ZCL_CMD_LEVEL_CONTROL_STEP
@ ZB_ZCL_CMD_LEVEL_CONTROL_STEP
Definition: zb_zcl_level_control.h:312
zb_zcl_level_control_move_to_level_req_s
Structured representation of MOVE_TO_LEVEL command payload.
Definition: zb_zcl_level_control.h:389
ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME_ID
@ ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME_ID
Remaining Time attribute.
Definition: zb_zcl_level_control.h:55
ZB_ZCL_ATTR_LEVEL_CONTROL_START_UP_CURRENT_LEVEL_ID
@ ZB_ZCL_ATTR_LEVEL_CONTROL_START_UP_CURRENT_LEVEL_ID
Definition: zb_zcl_level_control.h:97
zb_zcl_level_control_step_req_s
Structured representation of STEP command payload.
Definition: zb_zcl_level_control.h:665
ZB_FALSE
#define ZB_FALSE
Definition: zb_types.h:366
zb_buf_len
#define zb_buf_len(buf)
Definition: zboss_api_buf.h:362
ZB_ZCL_LEVEL_CONTROL_MOVE_REQ_PAYLOAD_LEN
#define ZB_ZCL_LEVEL_CONTROL_MOVE_REQ_PAYLOAD_LEN
Move payload length macro.
Definition: zb_zcl_level_control.h:538