|
enum | zb_zcl_door_lock_attr_e {
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_ID = 0x0000,
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_ID = 0x0001,
ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_ID = 0x0002,
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_ID = 0x0003,
ZB_ZCL_ATTR_DOOR_LOCK_NUM_OF_DOOR_OPEN_EVENTS_ID = 0x0004,
ZB_ZCL_ATTR_DOOR_LOCK_NUM_OF_DOOR_CLOSED_EVENTS_ID = 0x0005,
ZB_ZCL_ATTR_DOOR_LOCK_OPEN_PERIOD_ID = 0x0006,
ZB_ZCL_ATTR_DOOR_LOCK_NUM_TOTAL_USERS_ID = 0x0011,
ZB_ZCL_ATTR_DOOR_LOCK_NUM_PIN_USERS_ID = 0x0012,
ZB_ZCL_ATTR_DOOR_LOCK_NUM_WEEK_DAY_SCHEDULE_PER_USER_ID = 0x0014,
ZB_ZCL_ATTR_DOOR_LOCK_NUM_YEAR_DAY_SCHEDULE_PER_USER_ID = 0x0015,
ZB_ZCL_ATTR_DOOR_LOCK_NUM_HOLIDAY_SCHEDULE_ID = 0x0016,
ZB_ZCL_ATTR_DOOR_LOCK_MAX_PIN_LEN_ID = 0x0017,
ZB_ZCL_ATTR_DOOR_LOCK_MIN_PIN_LEN_ID = 0x0018,
ZB_ZCL_ATTR_DOOR_LOCK_OPERATING_MODE_ID = 0x0025,
ZB_ZCL_ATTR_DOOR_LOCK_OPERATION_MODES_SUPPORTED_ID = 0x0026,
ZB_ZCL_ATTR_DOOR_LOCK_ENABLE_LOCAL_PROGRAMMING_ID = 0x0028,
ZB_ZCL_ATTR_DOOR_LOCK_REQUIRE_PIN_RF_ID = 0x0033
} |
| Door Lock cluster attribute identifiers. More...
|
|
enum | zb_zcl_door_lock_lock_state_e { ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_NOT_FULLY_LOCKED = 0x00,
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_LOCKED = 0x01,
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_UNLOCKED = 0x02,
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_UNDEFINED = 0xff
} |
| Values for LockState attribute. More...
|
|
enum | zb_zcl_door_lock_lock_type_e { ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_DEADBOLT = 0x00,
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_MAGNETIC = 0x01,
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_OTHER = 0x02,
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_UNDEFINED = 0xff
} |
| Values for LockType attribute. More...
|
|
enum | zb_zcl_door_lock_actuator_enabled_e { ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_DISABLED = 0x0b0,
ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_ENABLED = 0x0b1
} |
| Values for ActuatorEnabled attribute. More...
|
|
enum | zb_zcl_door_lock_door_state_e {
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_OPEN = 0x00,
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_CLOSED = 0x01,
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_ERROR_JAMMED = 0x02,
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_ERROR_FORCED_OPEN = 0x03,
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_ERROR_UNSPECIFIED = 0x04
} |
| Values for DoorState attribute. More...
|
|
#define | ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_DEFAULT_VALUE ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_UNDEFINED |
| Default value for Lock State attribute.
|
|
#define | ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_DEFAULT_VALUE ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_UNDEFINED |
| Default value for Lock Type attribute.
|
|
#define | ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_DEFAULT_VALUE ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_ENABLED |
| Default value for Actuator Enabled attribute.
|
|
|
enum | zb_zcl_door_lock_cmd_e { ZB_ZCL_CMD_DOOR_LOCK_LOCK_DOOR = 0x00,
ZB_ZCL_CMD_DOOR_LOCK_UNLOCK_DOOR = 0x01
} |
| DoorLock cluster commands. More...
|
|
enum | zb_zcl_door_lock_cmd_resp_e { ZB_ZCL_CMD_DOOR_LOCK_LOCK_DOOR_RES = 0x00,
ZB_ZCL_CMD_DOOR_LOCK_UNLOCK_DOOR_RES = 0x01,
ZB_ZCL_CMD_DOOR_LOCK_OPERATION_EVENT_NOTIFICATION_ID = 0x20
} |
| DoorLock cluster commands response. More...
|
|
enum | zb_zcl_door_lock_operation_event_code_e {
ZB_ZCL_DOOR_LOCK_OPERATION_EVENT_CODE_UNKNOWN = 0x00,
ZB_ZCL_DOOR_LOCK_OPERATION_EVENT_CODE_LOCK = 0x01,
ZB_ZCL_DOOR_LOCK_OPERATION_EVENT_CODE_UNLOCK = 0x02,
ZB_ZCL_DOOR_LOCK_OPERATION_EVENT_CODE_MANUAL_LOCK = 0x0D,
ZB_ZCL_DOOR_LOCK_OPERATION_EVENT_CODE_MANUAL_UNLOCK = 0x0E
} |
|
typedef struct
zb_zcl_door_lock_read_lock_door_res_payload_s | zb_zcl_door_lock_read_lock_door_res_payload_t |
|
typedef struct
zb_zcl_door_lock_read_unlock_door_res_payload_s | zb_zcl_door_lock_read_unlock_door_res_payload_t |
|
#define | ZB_ZCL_DOOR_LOCK_SEND_LOCK_DOOR_REQ(buffer,dst_addr,dst_addr_mode,dst_ep,ep,dis_default_resp, cb) |
| General macro for sending a "Door Lock" cluster command. More...
|
|
#define | ZB_ZCL_DOOR_LOCK_SEND_UNLOCK_DOOR_REQ(buffer,dst_addr,dst_addr_mode,dst_ep,ep,dis_default_resp,cb) |
| General macro for sending a "Door Unlock" cluster command. More...
|
|
#define | ZB_ZCL_DOOR_LOCK_SEND_LOCK_DOOR_RES(buffer,addr,dst_addr_mode,dst_ep,ep,prfl_id,seq_num,status) |
| Door Lock command send response macro. More...
|
|
#define | ZB_ZCL_DOOR_LOCK_SEND_UNLOCK_DOOR_RES(buffer,addr,dst_addr_mode,dst_ep,ep,prfl_id,seq_num,status) |
| Door Unlock command send response macro. More...
|
|
#define | ZB_ZCL_DOOR_LOCK_READ_LOCK_DOOR_RES(buffer) |
| Door Lock response structured reading. More...
|
|
#define | ZB_ZCL_DOOR_LOCK_READ_UNLOCK_DOOR_RES(buffer) |
| Door unLock response structured reading. More...
|
|
Door Lock cluster defined in ZCL spec, clause 7.3.
The cluster contains 2 command sets:
- Lock Door request and response;
- Unlock Door request and response.
Both requests have no payload and could be scheduled for sending with corresponding macros. Both responses have simple payload, and their sending and parsing with corresponding macros is almost trivial.
- Examples:
Send Door Lock command:
DST_ADDR,
DST_ADDR_MODE,
DST_ENDPOINT,
HA_DOOR_LOCK_CONTROLLER_ENDPOINT,
NULL);
Send Door Lock response:
cmd_info->profile_id,
cmd_info->seq_number,
status);
Parse Door Lock response:
Send Door Unlock command:
DST_ADDR,
DST_ADDR_MODE,
DST_ENDPOINT,
HA_DOOR_LOCK_CONTROLLER_ENDPOINT,
NULL);
Send Door Unlock response:
cmd_info->profile_id,
cmd_info->seq_number,
status);
Parse Door Unlock response:
For more information see devices_closures, 538_door_lock samples
#define ZB_ZCL_DOOR_LOCK_READ_LOCK_DOOR_RES |
( |
|
buffer | ) |
|
Value:
? NULL \
Definition: zb_zcl_door_lock.h:364
#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_door_lock_read_lock_door_res_payload_s zb_zcl_door_lock_read_lock_door_res_payload_t
Door Lock response structured reading.
- Parameters
-
buffer | - pointer to the message buffer (of type zb_buf_t) containing payload |
- Returns
- pointer to zb_zcl_door_lock_read_lock_door_res_payload_s structure
- Attention
- returned pointer will point to the same data in the buffer thus being valid until buffer data will be overwritten.
#define ZB_ZCL_DOOR_LOCK_READ_UNLOCK_DOOR_RES |
( |
|
buffer | ) |
|
Value:
? NULL \
#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_door_lock_read_unlock_door_res_payload_s zb_zcl_door_lock_read_unlock_door_res_payload_t
Definition: zb_zcl_door_lock.h:381
Door unLock response structured reading.
- Parameters
-
buffer | - pointer to the message buffer (of type zb_buf_t) containing payload |
- Returns
- pointer to zb_zcl_door_lock_read_unlock_door_res_payload_s structure
- Attention
- returned pointer will point to the same data in the buffer thus being valid until buffer data will be overwritten.
#define ZB_ZCL_DOOR_LOCK_SEND_LOCK_DOOR_REQ |
( |
|
buffer, |
|
|
|
dst_addr, |
|
|
|
dst_addr_mode, |
|
|
|
dst_ep, |
|
|
|
ep, |
|
|
|
dis_default_resp, |
|
|
|
cb |
|
) |
| |
Value:
dst_addr, \
dst_addr_mode, \
dst_ep, \
ep, \
dis_default_resp, \
ZB_ZCL_CMD_DOOR_LOCK_LOCK_DOOR, \
cb)
Definition: zb_zcl_common.h:177
Definition: zboss_api_af.h:444
#define ZB_ZCL_SEND_CMD(buffer,addr,dst_addr_mode,dst_ep,ep,prof_id,dis_default_resp,cluster_id,command_id, cb)
General macro for sending a command with empty payload.
Definition: zb_zcl_common.h:1215
General macro for sending a "Door Lock" cluster command.
- Parameters
-
buffer | to put command payload and headers to |
dst_addr | address to send to |
dst_addr_mode | destination address mode |
dst_ep | destination endpoint |
ep | source endpoint |
dis_default_resp | "Disable default response" flag |
cb | command send status callback |
#define ZB_ZCL_DOOR_LOCK_SEND_LOCK_DOOR_RES |
( |
|
buffer, |
|
|
|
addr, |
|
|
|
dst_addr_mode, |
|
|
|
dst_ep, |
|
|
|
ep, |
|
|
|
prfl_id, |
|
|
|
seq_num, |
|
|
|
status |
|
) |
| |
Value:
ZB_ZCL_SEND_COMMAND_SHORT(buffer, \
addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prfl_id, \
NULL); \
}
Definition: zb_zcl_common.h:177
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1252
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1127
#define ZB_ZCL_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_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1114
Door Lock command send response macro.
- 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 |
seq_num | - sequence number |
status | - result of command execute |
#define ZB_ZCL_DOOR_LOCK_SEND_UNLOCK_DOOR_REQ |
( |
|
buffer, |
|
|
|
dst_addr, |
|
|
|
dst_addr_mode, |
|
|
|
dst_ep, |
|
|
|
ep, |
|
|
|
dis_default_resp, |
|
|
|
cb |
|
) |
| |
Value:
dst_addr, \
dst_addr_mode, \
dst_ep, \
ep, \
dis_default_resp, \
ZB_ZCL_CMD_DOOR_LOCK_UNLOCK_DOOR, cb)
Definition: zb_zcl_common.h:177
Definition: zboss_api_af.h:444
#define ZB_ZCL_SEND_CMD(buffer,addr,dst_addr_mode,dst_ep,ep,prof_id,dis_default_resp,cluster_id,command_id, cb)
General macro for sending a command with empty payload.
Definition: zb_zcl_common.h:1215
General macro for sending a "Door Unlock" cluster command.
- Parameters
-
buffer | to put command payload and headers to |
dst_addr | address to send to |
dst_addr_mode | destination address mode |
dst_ep | destination endpoint |
ep | source endpoint |
dis_default_resp | "Disable default response" flag |
cb | command send status callback |
#define ZB_ZCL_DOOR_LOCK_SEND_UNLOCK_DOOR_RES |
( |
|
buffer, |
|
|
|
addr, |
|
|
|
dst_addr_mode, |
|
|
|
dst_ep, |
|
|
|
ep, |
|
|
|
prfl_id, |
|
|
|
seq_num, |
|
|
|
status |
|
) |
| |
Value:
ZB_ZCL_SEND_COMMAND_SHORT(buffer, \
addr, \
dst_addr_mode, \
dst_ep, \
ep, \
prfl_id, \
NULL); \
}
Definition: zb_zcl_common.h:177
#define ZB_ZCL_PACKET_PUT_DATA8(ptr, val)
Put 8 bit value to packet.
Definition: zb_zcl_common.h:1273
#define ZB_ZCL_START_PACKET(zbbuf)
Initializes zb_buf_t buffer and returns pointer to the beginning of array.
Definition: zb_zcl_common.h:1252
#define ZB_ZCL_CONSTRUCT_COMMAND_HEADER(data_ptr, tsn, cmd_id)
Construct ZCL header.
Definition: zb_zcl_common.h:1127
#define ZB_ZCL_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_CONSTRUCT_SPECIFIC_COMMAND_RES_FRAME_CONTROL(buf_ptr)
Construct ZCL header frame control value for cluster-specific command response.
Definition: zb_zcl_common.h:1114
Door Unlock command send response macro.
- 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 |
seq_num | - sequence number |
status | - result of command execute |
Door lock commands response payload structure
Door unlock commands response payload structure
Values for ActuatorEnabled attribute.
- See also
- ZCL spec, subclause 7.3.2.2.3
Enumerator |
---|
ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_DISABLED |
"Disabled" value
|
ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_ENABLED |
"Enabled" value
|
Door Lock cluster attribute identifiers.
- See also
- ZCL spec, subclause 7.3.2.2
Enumerator |
---|
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_ID |
LockState attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_ID |
LockType attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_ACTUATOR_ENABLED_ID |
ActuatorEnabled attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_ID |
DoorState attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_NUM_OF_DOOR_OPEN_EVENTS_ID |
DoorOpenEvents attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_NUM_OF_DOOR_CLOSED_EVENTS_ID |
DoorClosedEvents attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_OPEN_PERIOD_ID |
OpenPeriod attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_NUM_TOTAL_USERS_ID |
NumberOfTotalUsersSupported attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_NUM_PIN_USERS_ID |
NumberOfPINUsersSupported attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_NUM_WEEK_DAY_SCHEDULE_PER_USER_ID |
NumberOfWeekDaySchedulesSupportedPerUser attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_NUM_YEAR_DAY_SCHEDULE_PER_USER_ID |
NumberOfYearDaySchedulesSupportedPerUser attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_NUM_HOLIDAY_SCHEDULE_ID |
NumberOfHolidaySchedulesSupported attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_MAX_PIN_LEN_ID |
Max PIN code length attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_MIN_PIN_LEN_ID |
Min PIN code length attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_OPERATING_MODE_ID |
OperatingMode attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_OPERATION_MODES_SUPPORTED_ID |
SupportedOperatingModes attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_ENABLE_LOCAL_PROGRAMMING_ID |
EnableLocalProgramming attribute.
|
ZB_ZCL_ATTR_DOOR_LOCK_REQUIRE_PIN_RF_ID |
Require PIN for RF operation attribute.
|
DoorLock cluster commands.
- See also
- ZCL spec, subclause 7.3.2.3 Commands Received
DoorLock cluster commands response.
- See also
- ZCL spec, subclause 7.3.2.4 Commands Generated
Values for DoorState attribute.
- See also
- ZCL specx, subclause 7.3.2.2.4
Enumerator |
---|
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_OPEN |
"Open" value
|
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_CLOSED |
"Closed" value
|
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_ERROR_JAMMED |
"Error (jammed)" value
|
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_ERROR_FORCED_OPEN |
"Error (forced open)" value
|
ZB_ZCL_ATTR_DOOR_LOCK_DOOR_STATE_ERROR_UNSPECIFIED |
"Error (unspecified)" value
|
Values for LockState attribute.
- See also
- ZCL spec, subclause 7.3.2.2.1
Enumerator |
---|
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_NOT_FULLY_LOCKED |
"Not fully locked" value
|
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_LOCKED |
"Locked" value
|
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_UNLOCKED |
"Unlocked" value
|
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_STATE_UNDEFINED |
"Not Defined" value
|
Values for LockType attribute.
- See also
- ZCL spec, subclause 7.3.2.2.2
Enumerator |
---|
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_DEADBOLT |
"Deadbolt" value
|
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_MAGNETIC |
"Magnetic" value
|
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_OTHER |
"Other" value
|
ZB_ZCL_ATTR_DOOR_LOCK_LOCK_TYPE_UNDEFINED |
"Not Defined" value
|