Trident IoT Zigbee SDK
 
Loading...
Searching...
No Matches
+ Collaboration diagram for Door Lock Server APIs:

Functions

void tr_door_lock_server_update_lock_state (zb_uint8_t endpoint, zb_uint8_t lock_state, zb_uint8_t source, zb_uint16_t user, zb_uint8_t *pin_code)
 API used to notify the door lock server plugin of lock state changes.
 
void tr_door_lock_server_send_op_event_notification (zb_uint8_t endpoint, zb_uint8_t source, zb_uint8_t code, zb_uint16_t user, zb_uint8_t *pin, zb_uint8_t mask_bit)
 API used to send an operation event notification.
 
zb_bool_t tr_door_lock_server_verify_user (zb_uint8_t endpoint, zb_bool_t rf_operation, zb_char_t *pin_code, zb_uint16_t *user)
 API used to verify a PIN code.
 
tr_door_lock_set_pin_or_id_status_t tr_door_lock_server_add_user (zb_uint16_t user, tr_door_lock_user_status_t status, tr_door_lock_user_type_t type, zb_char_t *pin_code)
 API used to add a user to the table.
 
zb_bool_t tr_door_lock_server_get_user (zb_uint16_t user, tr_door_lock_server_pin_code_arg_t *user_info)
 API used to get a user table entry.
 
zb_bool_t tr_door_lock_server_delete_user (zb_uint16_t user)
 API to delete an entry from the user table.
 
void tr_door_lock_server_delete_all_pin_users (void)
 API to delete ALL entries from the user table.
 
zb_bool_t tr_door_lock_server_set_user_status (zb_uint16_t user, zb_uint8_t user_status)
 API to set the status for a user in the user able.
 
zb_bool_t tr_door_lock_server_get_user_status (zb_uint16_t user, tr_door_lock_server_user_status_arg_t *user_info)
 API to get the status of a user in the user table.
 
zb_bool_t tr_door_lock_server_set_user_type (zb_uint16_t user, zb_uint8_t user_type)
 API to set the type of a user in the user table.
 
zb_bool_t tr_door_lock_server_get_user_type (zb_uint16_t user, tr_door_lock_server_user_type_arg_t *user_info)
 API to get the type of a user from the user table.
 
void tr_door_lock_server_print_users (void)
 API to print the user table.
 

Detailed Description



Function Documentation

◆ tr_door_lock_server_add_user()

tr_door_lock_set_pin_or_id_status_t tr_door_lock_server_add_user ( zb_uint16_t user,
tr_door_lock_user_status_t status,
tr_door_lock_user_type_t type,
zb_char_t * pin_code )

API used to add a user to the table.

Parameters
userindex of user table entry
statusZCL user status
typeZCL user type
pin_codepointer to ZCL octect string (length prefixed) pin code in ASCII
Returns
ZCL set pin status code

◆ tr_door_lock_server_delete_all_pin_users()

void tr_door_lock_server_delete_all_pin_users ( void )

API to delete ALL entries from the user table.

◆ tr_door_lock_server_delete_user()

zb_bool_t tr_door_lock_server_delete_user ( zb_uint16_t user)

API to delete an entry from the user table.

Parameters
userindex of user table entry
Returns
ZB_TRUE if successful, ZB_FALSE if not

◆ tr_door_lock_server_get_user()

zb_bool_t tr_door_lock_server_get_user ( zb_uint16_t user,
tr_door_lock_server_pin_code_arg_t * user_info )

API used to get a user table entry.

Parameters
userindex of user table entry
user_infopointer to ZCL user table entry
Returns
ZB_TRUE if successful, ZB_FALSE if not

◆ tr_door_lock_server_get_user_status()

zb_bool_t tr_door_lock_server_get_user_status ( zb_uint16_t user,
tr_door_lock_server_user_status_arg_t * user_info )

API to get the status of a user in the user table.

Parameters
userindex of user table entry
user_infopointer for returned user status info
Returns
ZB_TRUE if successful, ZB_FALSE if not

◆ tr_door_lock_server_get_user_type()

zb_bool_t tr_door_lock_server_get_user_type ( zb_uint16_t user,
tr_door_lock_server_user_type_arg_t * user_info )

API to get the type of a user from the user table.

Parameters
userindex of user table entry
user_infopointer for returned user type info
Returns
ZB_TRUE if successful, ZB_FALSE if not

◆ tr_door_lock_server_print_users()

void tr_door_lock_server_print_users ( void )

API to print the user table.

◆ tr_door_lock_server_send_op_event_notification()

void tr_door_lock_server_send_op_event_notification ( zb_uint8_t endpoint,
zb_uint8_t source,
zb_uint8_t code,
zb_uint16_t user,
zb_uint8_t * pin,
zb_uint8_t mask_bit )

API used to send an operation event notification.

Parameters
endpointdevice endpoint
sourceZCL source of operation event notification
codeZCL operation event code
useruser id
pinuser pin code
mask_bitbit to compare against the event mask attribute

◆ tr_door_lock_server_set_user_status()

zb_bool_t tr_door_lock_server_set_user_status ( zb_uint16_t user,
zb_uint8_t user_status )

API to set the status for a user in the user able.

Parameters
userindex of user table entry
user_statusZCL user status
Returns
ZB_TRUE if successful, ZB_FALSE if not

◆ tr_door_lock_server_set_user_type()

zb_bool_t tr_door_lock_server_set_user_type ( zb_uint16_t user,
zb_uint8_t user_type )

API to set the type of a user in the user table.

Parameters
userindex of user table entry
user_typeZCL user type
Returns
ZB_TRUE if successful, ZB_FALSE if not

◆ tr_door_lock_server_update_lock_state()

void tr_door_lock_server_update_lock_state ( zb_uint8_t endpoint,
zb_uint8_t lock_state,
zb_uint8_t source,
zb_uint16_t user,
zb_uint8_t * pin_code )

API used to notify the door lock server plugin of lock state changes.

Parameters
endpointdevice endpoint
lock_statenew ZCL lock state
sourceZCL source for change
useruser id
pin_codeuser pin code

◆ tr_door_lock_server_verify_user()

zb_bool_t tr_door_lock_server_verify_user ( zb_uint8_t endpoint,
zb_bool_t rf_operation,
zb_char_t * pin_code,
zb_uint16_t * user )

API used to verify a PIN code.

Parameters
endpointdevice endpoint
rf_operationZB_TRUE if this is an RF operation, ZB_FALSE is manual
pin_codepointer to ZCL octet string (length prefixed) pin code in ASCII
userpointer used to return the user associated with the pin_code. only valid if return is ZB_TRUE
Returns
ZB_TRUE if user is valid, ZB_FALSE if not