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

Functions

void tr_door_lock_server_lock (zb_uint8_t endpoint, tr_door_lock_event_source_t event_source, zb_uint8_t *pin)
 API that can be used to lock the door.
void tr_door_lock_server_unlock (zb_uint8_t endpoint, tr_door_lock_event_source_t event_source, zb_uint8_t *pin)
 API that can be used to unlock the door.
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)
 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_uint32_t tr_get_auto_relock_time_seconds (zb_uint8_t endpoint)
 API for getting the auto-relock time.
zb_bool_t tr_door_lock_server_verify_user (zb_uint8_t endpoint, zb_bool_t rf_operation, zb_uint8_t *pin, 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_uint8_t *pin)
 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_get_pin_resp_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, tr_door_lock_user_status_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_get_user_status_resp_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, tr_door_lock_user_type_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_get_user_type_resp_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_uint8_t * pin )

API used to add a user to the table.

Parameters
userindex of user table entry
statusZCL user status
typeZCL user type
pinpointer to ZCL octet 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_get_pin_resp_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_get_user_status_resp_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_get_user_type_resp_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_lock()

void tr_door_lock_server_lock ( zb_uint8_t endpoint,
tr_door_lock_event_source_t event_source,
zb_uint8_t * pin )

API that can be used to lock the door.

Parameters
endpointdevice endpoint
event_sourcesource of the lock door event
pinpointer to ZCL octet string (length prefixed) pin code in ASCII

◆ 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
pinpointer to ZCL octet string (length prefixed) pin code in ASCII
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,
tr_door_lock_user_status_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,
tr_door_lock_user_type_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_unlock()

void tr_door_lock_server_unlock ( zb_uint8_t endpoint,
tr_door_lock_event_source_t event_source,
zb_uint8_t * pin )

API that can be used to unlock the door.

Parameters
endpointdevice endpoint
event_sourcesource of the unlock door event
pinpointer to ZCL octet string (length prefixed) pin code in ASCII

◆ 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 )

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
pinpointer to ZCL octet string (length prefixed) pin code in ASCII

◆ 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_uint8_t * pin,
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
pinpointer to ZCL octet string (length prefixed) pin code in ASCII
userpointer used to return the user associated with the pin. only valid if return is ZB_TRUE
Returns
ZB_TRUE if user is valid, ZB_FALSE if not

◆ tr_get_auto_relock_time_seconds()

zb_uint32_t tr_get_auto_relock_time_seconds ( zb_uint8_t endpoint)

API for getting the auto-relock time.

Parameters
endpointdevice endpoint
Returns
Auto-relock time in seconds. 0 indicates auto-relock is disabled