Trident IoT Zigbee SDK
Loading...
Searching...
No Matches
Collaboration diagram for Door Lock server Callbacks:

Functions

void tr_door_lock_server_init_cb (zb_uint8_t endpoint)
 Callback fires when the Door Lock server cluster plugin is initialized.
zb_bool_t tr_door_lock_server_command_received_cb (zb_zcl_parsed_hdr_t *cmd_info)
 Callback that user can declare to handle any Door Lock server commands.
void tr_door_lock_server_write_attr_cb (zb_uint8_t endpoint, zb_uint16_t attr_id, zb_uint8_t *new_value, zb_uint16_t manuf_code)
 Callback fires when an Door Lock server attribute is about to be written.
zb_bool_t tr_door_lock_server_lock_door_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, tr_door_lock_event_source_t event_source, zb_uint8_t *pin)
 Callback that user can declare to handle door lock cluster lock door command.
zb_bool_t tr_door_lock_server_unlock_door_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, tr_door_lock_event_source_t event_source, zb_uint8_t *pin)
 Callback that user can declare to handle door lock cluster unlock door command.
zb_bool_t tr_door_lock_server_set_pin_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t user_id, tr_door_lock_user_status_t user_status, tr_door_lock_user_type_t user_type, zb_uint8_t *pin)
 Callback that user can declare to handle door lock cluster set pin command.
zb_bool_t tr_door_lock_server_get_pin_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t user_id)
 Callback that user can declare to handle door lock cluster get pin command.
zb_bool_t tr_door_lock_server_clear_pin_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t user_id)
 Callback that user can declare to handle door lock cluster clear pin command.
zb_bool_t tr_door_lock_server_clear_all_pins_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint)
 Callback that user can declare to handle door lock cluster clear all pins command.
zb_bool_t tr_door_lock_server_set_user_status_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t user_id, tr_door_lock_user_status_t user_status)
 Callback that user can declare to handle door lock cluster set user status command.
zb_bool_t tr_door_lock_server_get_user_status_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t user_id)
 Callback that user can declare to handle door lock cluster get user status command.
zb_bool_t tr_door_lock_server_set_user_type_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t user_id, tr_door_lock_user_type_t user_type)
 Callback that user can declare to handle door lock cluster set user type command.
zb_bool_t tr_door_lock_server_get_user_type_cb (zb_zcl_parsed_hdr_t *cmd_info, zb_uint8_t endpoint, zb_uint16_t user_id)
 Callback that user can declare to handle door lock cluster get user type command.
void tr_door_lock_server_resp_sent_cb (zb_bufid_t param)
 Callback fires when door lock server response completes.

Detailed Description



Function Documentation

◆ tr_door_lock_server_clear_all_pins_cb()

zb_bool_t tr_door_lock_server_clear_all_pins_cb ( zb_zcl_parsed_hdr_t * cmd_info,
zb_uint8_t endpoint )

Callback that user can declare to handle door lock cluster clear all pins command.

Parameters
cmd_infostruct that contains zcl header info
endpointdestination endpoint of the lock command
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_clear_pin_cb()

zb_bool_t tr_door_lock_server_clear_pin_cb ( zb_zcl_parsed_hdr_t * cmd_info,
zb_uint8_t endpoint,
zb_uint16_t user_id )

Callback that user can declare to handle door lock cluster clear pin command.

Parameters
cmd_infostruct that contains zcl header info
endpointdestination endpoint of the lock command
user_iduser id for pin to clear
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_command_received_cb()

zb_bool_t tr_door_lock_server_command_received_cb ( zb_zcl_parsed_hdr_t * cmd_info)

Callback that user can declare to handle any Door Lock server commands.

Parameters
cmd_infostruct that contains zcl header info
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_get_pin_cb()

zb_bool_t tr_door_lock_server_get_pin_cb ( zb_zcl_parsed_hdr_t * cmd_info,
zb_uint8_t endpoint,
zb_uint16_t user_id )

Callback that user can declare to handle door lock cluster get pin command.

Parameters
cmd_infostruct that contains zcl header info
endpointdestination endpoint of the lock command
user_iduser id for pin to return
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_get_user_status_cb()

zb_bool_t tr_door_lock_server_get_user_status_cb ( zb_zcl_parsed_hdr_t * cmd_info,
zb_uint8_t endpoint,
zb_uint16_t user_id )

Callback that user can declare to handle door lock cluster get user status command.

Parameters
cmd_infostruct that contains zcl header info
endpointdestination endpoint of the lock command
user_iduser id for status to get
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_get_user_type_cb()

zb_bool_t tr_door_lock_server_get_user_type_cb ( zb_zcl_parsed_hdr_t * cmd_info,
zb_uint8_t endpoint,
zb_uint16_t user_id )

Callback that user can declare to handle door lock cluster get user type command.

Parameters
cmd_infostruct that contains zcl header info
endpointdestination endpoint of the lock command
user_iduser id for type to get
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_init_cb()

void tr_door_lock_server_init_cb ( zb_uint8_t endpoint)

Callback fires when the Door Lock server cluster plugin is initialized.

Parameters
endpointdevice endpoint being initialized

◆ tr_door_lock_server_lock_door_cb()

zb_bool_t tr_door_lock_server_lock_door_cb ( zb_zcl_parsed_hdr_t * cmd_info,
zb_uint8_t endpoint,
tr_door_lock_event_source_t event_source,
zb_uint8_t * pin )

Callback that user can declare to handle door lock cluster lock door command.

Parameters
cmd_infostruct that contains zcl header info
endpointdestination endpoint of the lock operation
event_sourcesource of the lock event operation
pinpointer to ZCL octet string (length prefixed) pin code in ASCII
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_resp_sent_cb()

void tr_door_lock_server_resp_sent_cb ( zb_bufid_t param)

Callback fires when door lock server response completes.

This callback is triggered when the door lock server response either receives an APS Ack or times out. To check the status:

zb_zcl_command_send_status_t *cmd_send_status = ZB_BUF_GET_PARAM(param, zb_zcl_command_send_status_t);
if (cmd_send_status->status == 0)
{
// APS ACK received
}
else
{
// APS ACK not received
}
Parameters
parambuffer with information on the response sent. This buffer must be freed using zb_buf_free().

◆ tr_door_lock_server_set_pin_cb()

zb_bool_t tr_door_lock_server_set_pin_cb ( zb_zcl_parsed_hdr_t * cmd_info,
zb_uint8_t endpoint,
zb_uint16_t user_id,
tr_door_lock_user_status_t user_status,
tr_door_lock_user_type_t user_type,
zb_uint8_t * pin )

Callback that user can declare to handle door lock cluster set pin command.

Parameters
cmd_infostruct that contains zcl header info
endpointdestination endpoint of the lock command
user_idid of the user for this pin code
user_statususer status for this pin code
user_typeuser type for this pin code
pinpointer to ZCL octet string (length prefixed) pin code in ASCII
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_set_user_status_cb()

zb_bool_t tr_door_lock_server_set_user_status_cb ( zb_zcl_parsed_hdr_t * cmd_info,
zb_uint8_t endpoint,
zb_uint16_t user_id,
tr_door_lock_user_status_t user_status )

Callback that user can declare to handle door lock cluster set user status command.

Parameters
cmd_infostruct that contains zcl header info
endpointdestination endpoint of the lock command
user_iduser id for status to set
user_statususer status to set
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_set_user_type_cb()

zb_bool_t tr_door_lock_server_set_user_type_cb ( zb_zcl_parsed_hdr_t * cmd_info,
zb_uint8_t endpoint,
zb_uint16_t user_id,
tr_door_lock_user_type_t user_type )

Callback that user can declare to handle door lock cluster set user type command.

Parameters
cmd_infostruct that contains zcl header info
endpointdestination endpoint of the lock command
user_iduser id for type to set
user_typeuser type to set
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_unlock_door_cb()

zb_bool_t tr_door_lock_server_unlock_door_cb ( zb_zcl_parsed_hdr_t * cmd_info,
zb_uint8_t endpoint,
tr_door_lock_event_source_t event_source,
zb_uint8_t * pin )

Callback that user can declare to handle door lock cluster unlock door command.

Parameters
cmd_infostruct that contains zcl header info
endpointdestination endpoint of the unlock operation
event_sourcesource of the unlock event operation
pinpointer to ZCL octet string (length prefixed) pin code in ASCII
Returns
ZB_FALSE to allow framework to continue processing the command

◆ tr_door_lock_server_write_attr_cb()

void tr_door_lock_server_write_attr_cb ( zb_uint8_t endpoint,
zb_uint16_t attr_id,
zb_uint8_t * new_value,
zb_uint16_t manuf_code )

Callback fires when an Door Lock server attribute is about to be written.

Parameters
endpointdevice endpoint
attr_idZCL attribute id
new_valuepointer to the new attribute value
manuf_codemanufacturer specific code