Developing with ZBOSS
|
Typedefs | |
typedef enum zb_bdb_comm_binding_cb_state_e | zb_bdb_comm_binding_cb_state_t |
typedef zb_bool_t(* | zb_bdb_comm_binding_callback_t) (zb_int16_t status, zb_ieee_addr_t addr, zb_uint8_t ep, zb_uint16_t cluster) |
BDB finding and binding callback template. More... | |
Enumerations | |
enum | zb_bdb_comm_binding_cb_state_e { ZB_BDB_COMM_BIND_SUCCESS = 0, ZB_BDB_COMM_BIND_FAIL = 1, ZB_BDB_COMM_BIND_ASK_USER = 2 } |
Functions | |
zb_ret_t | zb_bdb_finding_binding_target (zb_uint8_t endpoint) |
Starts EZ-Mode Finding and binding mechanism at the target's endpoint. More... | |
zb_ret_t | zb_bdb_finding_binding_initiator (zb_uint8_t endpoint, zb_bdb_comm_binding_callback_t user_binding_cb) |
Start BDB finding and binding procedure on initiator. More... | |
void | zb_bdb_finding_binding_target_cancel (void) |
void | zb_bdb_finding_binding_initiator_cancel (void) |
typedef zb_bool_t( * zb_bdb_comm_binding_callback_t) (zb_int16_t status, zb_ieee_addr_t addr, zb_uint8_t ep, zb_uint16_t cluster) |
BDB finding and binding callback template.
Function is used both to interact with user application, get decision if new binding is needed or not, and to report the binding result
status | - status of the binding (ask user, success or fail) |
addr | - extended address of a device to bind |
ep | - endpoint of a device to bind |
cluster | - cluster id to bind |
Example:
List of EZ-Mode binding callback states
zb_ret_t zb_bdb_finding_binding_initiator | ( | zb_uint8_t | endpoint, |
zb_bdb_comm_binding_callback_t | user_binding_cb | ||
) |
Start BDB finding and binding procedure on initiator.
Summary: Finding and binding as initiator zb_bdb_finding_binding_initiator() returns RET_OK if procedure was started successfully, error code otherwise. To report procedure status, user callback is called. It may be called several times with Success status and only once with error status. If any error appears, finding and binding stops.
endpoint | - initiator endpoint |
user_binding_cb | - user callback, see zb_bdb_comm_binding_callback_t |
Example:
Define callback:
Start finding and binding as initiator:
void zb_bdb_finding_binding_initiator_cancel | ( | void | ) |
Cancel previously started finding and binding procedure on initiator
zb_ret_t zb_bdb_finding_binding_target | ( | zb_uint8_t | endpoint | ) |
Starts EZ-Mode Finding and binding mechanism at the target's endpoint.
Put device into identifying mode; default duration is 3 minutes.
endpoint | - target endpoint |
Example
void zb_bdb_finding_binding_target_cancel | ( | void | ) |
Cancel previously started finding and binding procedure on target