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

Data Structures

struct  zb_zcl_level_control_move_addr_s
 
struct  zb_zcl_level_control_move_variables_s
 
struct  zb_zcl_level_control_move_status_s
 
struct  zb_zcl_level_control_move_to_level_req_s
 Structured representsation of MOVE_TO_LEVEL command payload. More...
 
struct  zb_zcl_level_control_move_req_s
 Structured representsation of MOVE command payload. More...
 
struct  zb_zcl_level_control_step_req_s
 Structured representsation of STEP command payload. More...
 
struct  zb_zcl_level_control_set_value_param_s
 

Level Control cluster attributes

enum  zb_zcl_level_control_attr_e {
  ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_LEVEL_ID = 0, ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME_ID = 1, ZB_ZCL_ATTR_LEVEL_CONTROL_ON_OFF_TRANSITION_TIME_ID = 0x10, ZB_ZCL_ATTR_LEVEL_CONTROL_ON_LEVEL_ID = 0x11,
  ZB_ZCL_ATTR_LEVEL_CONTROL_MOVE_STATUS_ID = 0xffff
}
 Level Control cluster information attribute identifiers. 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_ZCL_LEVEL_CONTROL_LEVEL_MIN_VALUE
 Current Level attribute default value.
 
#define ZB_ZCL_LEVEL_CONTROL_REMAINING_TIME_DEFFAULT_VALUE_ZLL   0
 
#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_LEVEL_CONTROL_RATE_AS_FAST_AS_ABLE   0xff
 

Level Control cluster internals

Internal structures for Level Control cluster

typedef struct
zb_zcl_level_control_move_addr_s 
zb_zcl_level_control_move_addr_t
 
typedef struct
zb_zcl_level_control_move_variables_s 
zb_zcl_level_control_move_variables_t
 
typedef void(* zb_zcl_level_control_handler_t )(zb_uint8_t ep, zb_uint8_t new_level)
 
typedef struct
zb_zcl_level_control_move_status_s 
zb_zcl_level_control_move_status_t
 
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_LEVEL_ID(data_ptr)
 
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME_ID(data_ptr)
 
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_LEVEL_CONTROL_MOVE_STATUS_ID(data_ptr)
 
#define ZB_ZCL_DECLARE_LEVEL_CONTROL_ATTRIB_LIST(attr_list, current_level, remaining_time)
 
#define ZB_ZCL_LEVEL_CONTROL_REPORT_ATTR_COUNT   1
 

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
}
 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_move_to_level_req_s 
zb_zcl_level_control_move_to_level_req_t
 Structured representsation of MOVE_TO_LEVEL command payload. More...
 
typedef struct
zb_zcl_level_control_move_req_s 
zb_zcl_level_control_move_req_t
 Structured representsation of MOVE command payload.
 
typedef struct
zb_zcl_level_control_step_req_s 
zb_zcl_level_control_step_req_t
 Structured representsation of STEP command payload.
 
typedef struct
zb_zcl_level_control_set_value_param_s 
zb_zcl_level_control_set_value_param_t
 
#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...
 
#define ZB_ZCL_LEVEL_CONTROL_SET_LEVEL_VALUE(ep, value)
 
#define ZB_ZCL_LEVEL_CONTROL_SET_ON_OFF_VALUE(ep, on_off_value)
 
#define ZB_ZCL_LEVEL_CONTROL_SET_HANDLER(ep, handler)
 

Detailed Description

Macro Definition Documentation

#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_LEVEL_CONTROL_CURRENT_LEVEL_ID (   data_ptr)
Value:
{ \
(zb_voidp_t) data_ptr \
}
Definition: zb_zcl_common.h:492
Definition: zb_zcl_common.h:495
Definition: zb_zcl_common.h:490
void * zb_voidp_t
Project-local "pointer to void" type.
Definition: zb_types.h:293
Definition: zb_zcl_common.h:455
Current Level attribute.
Definition: zb_zcl_level_control.h:73
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_LEVEL_CONTROL_MOVE_STATUS_ID (   data_ptr)
Value:
{ \
ZB_ZCL_ATTR_LEVEL_CONTROL_MOVE_STATUS_ID, \
(zb_voidp_t) data_ptr \
}
Definition: zb_zcl_common.h:437
Definition: zb_zcl_common.h:490
void * zb_voidp_t
Project-local "pointer to void" type.
Definition: zb_types.h:293
#define ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_LEVEL_CONTROL_REMAINING_TIME_ID (   data_ptr)
Value:
{ \
(zb_voidp_t) data_ptr \
}
Definition: zb_zcl_common.h:456
Definition: zb_zcl_common.h:490
void * zb_voidp_t
Project-local "pointer to void" type.
Definition: zb_types.h:293
Remaining Time attribute.
Definition: zb_zcl_level_control.h:75
#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
Remaining Time attribute.
Definition: zb_zcl_level_control.h:75
Current Level attribute.
Definition: zb_zcl_level_control.h:73
Definition: zb_zcl_level_control.h:198

Declare attribute list for Level Control cluster

Parameters
attr_list- attribure list name
current_level- pointer to variable to store current_level attribute value
remaining_time- pointer to variable to store remaining_time attribute value
#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_CMD (   data_buf,
  move_req,
  status 
)
Value:
{ \
(move_req_ptr) = ZB_BUF_LEN(data_buf) >= ZB_ZCL_LEVEL_CONTROL_MOVE_REQ_PAYLOAD_LEN ? \
if (move_req_ptr) \
{ \
ZB_MEMCPY(&(move_req), move_req_ptr, sizeof(zb_zcl_level_control_move_req_t)); \
status = ZB_TRUE; \
} \
else \
{ \
status = ZB_FALSE; \
} \
}
Structured representsation of MOVE command payload.
Definition: zb_zcl_level_control.h:423
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
Definition: zb_types.h:100
struct zb_zcl_level_control_move_req_s zb_zcl_level_control_move_req_t
Structured representsation of MOVE command payload.
#define ZB_ZCL_LEVEL_CONTROL_MOVE_REQ_PAYLOAD_LEN
Move payload length macro.
Definition: zb_zcl_level_control.h:432
Definition: zb_types.h:99
#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- succsess or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.
#define ZB_ZCL_LEVEL_CONTROL_GET_MOVE_TO_LEVEL_CMD (   data_buf,
  move_to_level_req,
  status 
)
Value:
{ \
(move_to_level_req_ptr) = ZB_BUF_LEN(data_buf) >= \
if (move_to_level_req_ptr) \
{ \
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; \
} \
}
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
struct zb_zcl_level_control_move_to_level_req_s zb_zcl_level_control_move_to_level_req_t
Structured representsation of MOVE_TO_LEVEL command payload.
Structured representsation of MOVE_TO_LEVEL command payload.
Definition: zb_zcl_level_control.h:280
#define ZB_ZCL_LEVEL_CONTROL_MOVE_TO_LEVEL_REQ_PAYLOAD_LEN
Move to Level payload length macro.
Definition: zb_zcl_level_control.h:289
Definition: zb_types.h:100
Definition: zb_types.h:99
#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- succsess or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.
#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- succsess or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.
#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- succsess or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.
#define ZB_ZCL_LEVEL_CONTROL_GET_STEP_CMD (   data_buf,
  step_req,
  status 
)
Value:
{ \
(step_req_ptr) = ZB_BUF_LEN(data_buf) == ZB_ZCL_LEVEL_CONTROL_STEP_REQ_PAYLOAD_LEN ? \
if (step_req_ptr) \
{ \
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; \
} \
}
#define ZB_ZCL_LEVEL_CONTROL_STEP_REQ_PAYLOAD_LEN
Step payload length macro.
Definition: zb_zcl_level_control.h:569
#define ZB_BUF_BEGIN(zbbuf)
Definition: zboss_api_core.h:722
#define ZB_BUF_LEN(zbbuf)
Definition: zboss_api_core.h:731
struct zb_zcl_level_control_step_req_s zb_zcl_level_control_step_req_t
Structured representsation of STEP command payload.
Structured representsation of STEP command payload.
Definition: zb_zcl_level_control.h:558
Definition: zb_types.h:100
Definition: zb_types.h:99
#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- succsess or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.
#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- succsess or not read parameters - ZB_TRUE or ZB_FALSE
Note
data_buf buffer should contain command request payload without ZCL header.
#define ZB_ZCL_LEVEL_CONTROL_REPORT_ATTR_COUNT   1

Number of attributes mandatory for reporting in Level Control cluster

#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_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); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
Definition: zb_zcl_common.h:147
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
#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, \
}
Definition: zb_zcl_level_control.h:259

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
#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_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); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
Definition: zb_zcl_common.h:147
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
#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, \
}
Definition: zb_zcl_level_control.h:257

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
#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, \
}
Definition: zb_zcl_level_control.h:265

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
#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, \
}
Definition: zb_zcl_level_control.h:267

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
#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); \
}
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
Definition: zb_zcl_common.h:147
#define ZB_ZCL_PACKET_PUT_DATA16_VAL(ptr, val)
Definition: zb_zcl_common.h:1291
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
#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, \
}
Definition: zb_zcl_level_control.h:261

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
#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, \
}
Definition: zb_zcl_level_control.h:269

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
#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); \
}
Definition: zb_zcl_level_control.h:263
#define ZB_ZCL_GET_SEQ_NUM()
Return next sequence number for ZCL frame.
Definition: zb_zcl_common.h:1170
Definition: zb_zcl_common.h:147
#define ZB_ZCL_FINISH_PACKET(zbbuf, ptr)
Definition: zb_zcl_common.h:1538
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115

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
#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
#define ZB_ZCL_LEVEL_CONTROL_SET_HANDLER (   ep,
  handler 
)
Value:
{ \
zb_zcl_attr_t* move_status_desc; \
zb_zcl_level_control_move_status_t* move_status; \
\
move_status_desc = zb_zcl_get_attr_desc_a((ep), \
ZB_ZCL_ATTR_LEVEL_CONTROL_MOVE_STATUS_ID); \
ZB_ASSERT(move_status_desc != NULL); \
move_status = (zb_zcl_level_control_move_status_t*)move_status_desc->data_p; \
move_status->level_control_handler = (handler); \
}
struct zb_zcl_attr_s zb_zcl_attr_t
ZCL attribute definiton structure.
Definition: zb_zcl_common.h:147
zb_zcl_attr_t * zb_zcl_get_attr_desc_a(zb_uint8_t ep, zb_uint16_t cluster_id, zb_uint8_t cluster_role, zb_uint16_t attr_id)
Definition: zb_zcl_level_control.h:198
#define ZB_ZCL_LEVEL_CONTROL_SET_LEVEL_VALUE (   ep,
  value 
)
Value:
{ \
zb_uint8_t val = (value); \
&val, \
}
Definition: zb_zcl_common.h:147
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Current Level attribute.
Definition: zb_zcl_level_control.h:73
Definition: zb_types.h:99
#define ZB_ZCL_LEVEL_CONTROL_SET_ON_OFF_VALUE (   ep,
  on_off_value 
)
Value:
{ \
zb_uint8_t val = (on_off_value); \
&val, \
}
OnOff attribute.
Definition: zb_zcl_on_off.h:85
unsigned char zb_uint8_t
Project-local 1-byte unsigned int type.
Definition: zb_types.h:115
Definition: zb_zcl_common.h:124
#define ZB_ZCL_SET_ATTRIBUTE(ep, cluster_id, cluster_role, attr_id, value_ptr, check_access)
Sets attribute value, perform all needed checks before and after setting new value, including read-only check and marking for reporting.
Definition: zb_zcl_common.h:656
Definition: zb_zcl_common.h:144
Definition: zb_types.h:99

Typedef Documentation

Structured representsation of MOVE_TO_LEVEL command payload.

See also
ZCL spec, subclause 3.10.2.3.1.1

Enumeration Type Documentation

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_ON_OFF_TRANSITION_TIME_ID 

On Off Transition Time attribute.

ZB_ZCL_ATTR_LEVEL_CONTROL_ON_LEVEL_ID 

On Level attribute.

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