Developing with ZBOSS for Zigbee
|
Typedefs | |
typedef enum zb_bdb_commissioning_mode_mask_e | zb_bdb_commissioning_mode_mask_t |
BDB commissioning mode mask bits This bitmask is out of BDB 3.1 spec but will continue to be used internally and as a parameter to the commissioning API. | |
Enumerations | |
enum | zb_bdb_commissioning_mode_mask_e { ZB_BDB_NETWORK_STEERING = 2, ZB_BDB_NETWORK_FORMATION = 4, ZB_BDB_FINDING_N_BINDING = 8 } |
BDB commissioning mode mask bits This bitmask is out of BDB 3.1 spec but will continue to be used internally and as a parameter to the commissioning API. More... | |
Functions | |
zb_bool_t | bdb_start_top_level_commissioning (zb_uint8_t mode_mask) |
Start device commissioning procedure specified step. More... | |
void | bdb_cancel_joining (zb_bufid_t buf) |
Cancel Steering procedure for a node not on a network started with bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING). The ZBOSS signal ZB_BDB_SIGNAL_STEERING_CANCELLED with the status of this operation will be raised. Possible statuses: More... | |
void | bdb_cancel_formation (zb_bufid_t buf) |
Cancel Formation procedure started with bdb_start_top_level_commissioning(ZB_BDB_NETWORK_FORMATION). The ZBOSS signal ZB_BDB_SIGNAL_FORMATION_CANCELLED with the status of the operation will be raised. Possible statuses: More... | |
void | bdb_set_scan_duration (zb_uint8_t duration) |
Set scan duration for ED and Active scan. More... | |
zb_ret_t | zb_bdb_close_network (zb_bufid_t buf) |
Close the network. More... | |
zb_bool_t | zb_bdb_is_factory_new (void) |
void | zb_set_bdb_commissioning_mode (zb_uint8_t commissioning_mode) |
Set commissioning mode. More... | |
BDB commissioning mode mask bits This bitmask is out of BDB 3.1 spec but will continue to be used internally and as a parameter to the commissioning API.
Enumerator | |
---|---|
ZB_BDB_NETWORK_STEERING | Network steering: 0 = Do not attempt network steering; 1 = Attempt network steering |
ZB_BDB_NETWORK_FORMATION | Network formation: 0 = Do not attempt to form a network; 1 = Attempt to form a network, according to device type2 |
ZB_BDB_FINDING_N_BINDING | Finding and binding: 0 = Do not attempt finding and binding; 1 = Attempt finding and binding
|
void bdb_cancel_formation | ( | zb_bufid_t | buf | ) |
Cancel Formation procedure started with bdb_start_top_level_commissioning(ZB_BDB_NETWORK_FORMATION). The ZBOSS signal ZB_BDB_SIGNAL_FORMATION_CANCELLED with the status of the operation will be raised. Possible statuses:
If the formation is cancelled the signal ZB_BDB_SIGNAL_FORMATION with the status ZB_BDB_STATUS_FORMATION will be raised as well.
buf | - a ZBOSS buffer |
void bdb_cancel_joining | ( | zb_bufid_t | buf | ) |
Cancel Steering procedure for a node not on a network started with bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING). The ZBOSS signal ZB_BDB_SIGNAL_STEERING_CANCELLED with the status of this operation will be raised. Possible statuses:
If the steering is cancelled the signal ZB_BDB_SIGNAL_STEERING with the status ZB_BDB_STATUS_CANCELLED will be raised as well.
buf | - a ZBOSS buffer |
void bdb_set_scan_duration | ( | zb_uint8_t | duration | ) |
Set scan duration for ED and Active scan.
duration | - scan duration. Scan time is (aBaseSuperframeDuration * ((1<<duration) + 1)). In seconds - ((1l << duration) + 1) * 15360 / 1000000. For duration 8 ~4s For duration 5 ~0.5s For duration 2 ~0.08s For duration 1 ~0.05s (0.046s) |
zb_bool_t bdb_start_top_level_commissioning | ( | zb_uint8_t | mode_mask | ) |
Start device commissioning procedure specified step.
Performs steering and network formation if appropriate for the device type. Finding and binding is not performed by this function (see note at ZB_BDB_FINDING_N_BINDING)
When the selected commissioning procedure finishes one of the following ZBOSS signals is generated:
mode_mask | - bitmask of commissioning steps to perform, see zb_bdb_commissioning_mode_mask_e |
Example:
zb_ret_t zb_bdb_close_network | ( | zb_bufid_t | buf | ) |
Close the network.
Implements BDB 3.0.1 - 8.1.1 "Local disabling of Network Steering."
Will broadcast a Mgmt_Permit_Joining_req with PermitDuration of 0
In case it is a router or coordinator it will also issue NLME-PERMIT-JOINING.request primitive with PermitDuration of 0 The ZBOSS signal ZB_NWK_SIGNAL_PERMIT_JOIN_STATUS will be raised with zb_zdo_mgmt_permit_joining_req_param_t::permit_duration of 0
buf | - a ZBOSS buffer, if zero is passed, a new buffer will be allocated |
zb_bool_t zb_bdb_is_factory_new | ( | void | ) |
Check if device is factory new.
void zb_set_bdb_commissioning_mode | ( | zb_uint8_t | commissioning_mode | ) |
Set commissioning mode.
commissioning_mode | - bitfield with the bdbCommissioningMode attribute. Set 1 to the corresponding bit to enable, 0 to disable. All the possible mask bits are stored in zb_bdb_commissioning_mode_mask_t |