Developing with ZBOSS
|
Typedefs | |
typedef zb_uint8_t | zb_address_pan_id_ref_t |
typedef zb_uint8_t | zb_address_ieee_ref_t |
typedef zb_uint8_t zb_address_ieee_ref_t |
IEEE address reference
Should be used inside protocol tables instead of 64/16-bit IEEE.
typedef zb_uint8_t zb_address_pan_id_ref_t |
Pan ID reference
Should be used inside protocol tables instead of 64-bit Pan ID
zb_ret_t zb_address_by_ieee | ( | zb_ieee_addr_t | ieee, |
zb_bool_t | create, | ||
zb_bool_t | lock, | ||
zb_address_ieee_ref_t * | ref_p | ||
) |
Get address ref by long address, optionally create if not exist, optionally lock. Update address alive time if not locked.
ieee | - IEEE device address |
create | - if TRUE, create address entry if it does not exist |
lock | - if TRUE, lock address entry |
ref_p | - (out) address reference |
Example
See nwk_addr sample
void zb_address_by_ref | ( | zb_ieee_addr_t | ieee_address, |
zb_uint16_t * | short_address_p, | ||
zb_address_ieee_ref_t | ref | ||
) |
Get address with address reference.
Get existing IEEE (long) and short addresses with address reference. Update address alive time if it not locked.
ieee_address | - (out) long address |
short_address_p | - (out) short address |
ref | - address reference |
Example
See nwk_addr sample
zb_ret_t zb_address_by_short | ( | zb_uint16_t | short_address, |
zb_bool_t | create, | ||
zb_bool_t | lock, | ||
zb_address_ieee_ref_t * | ref_p | ||
) |
Get address reference with long address. Create the reference if it does not exist. Optionally, lock the address. Update address alive time if not locked.
short_address | - 16bit device address |
create | - if TRUE, create address entry if it does not exist |
lock | - if TRUE, lock address entry |
ref_p | - (out) address reference |
Example
See simple_gw sample
zb_bool_t zb_address_cmp_pan_id_by_ref | ( | zb_address_pan_id_ref_t | pan_id_ref, |
zb_ext_pan_id_t | pan_id | ||
) |
Compare Pan ID in the source form with Pan ID reference.
pan_id_ref | - Pan ID ref |
pan_id | - Pan ID (64-bit) |
Example
zb_ret_t zb_address_delete | ( | zb_address_ieee_ref_t | ref | ) |
Delete address.
ref | - IEEE/network address pair reference |
zb_ret_t zb_address_get_pan_id_ref | ( | zb_ext_pan_id_t | pan_id, |
zb_address_pan_id_ref_t * | ref | ||
) |
Get Pan ID reference with extended Pan ID.
pan_id | - Pan ID |
ref | - (output) reference to Pan ID |
Example
void zb_address_get_short_pan_id | ( | zb_address_pan_id_ref_t | pan_id_ref, |
zb_uint16_t * | pan_id_p | ||
) |
Get short Pan ID with reference.
pan_id_ref | - reference to Pan ID |
pan_id_p | - (output) Pan ID. |
Example
void zb_address_ieee_by_ref | ( | zb_ieee_addr_t | ieee_address, |
zb_address_ieee_ref_t | ref | ||
) |
Get IEEE address with address reference.
Get existing IEEE address(long address) with address reference. Update address alive time if it not locked.
ieee_address | - (out) long address |
ref | - address reference |
Example
See tp_pro_bv-32 sample
zb_ret_t zb_address_ieee_by_short | ( | zb_uint16_t | short_addr, |
zb_ieee_addr_t | ieee_address | ||
) |
Get IEEE address (long) with short address.
short_addr | - short address |
ieee_address | - (out)long address |
Example
See light_sample
zb_ret_t zb_address_lock | ( | zb_address_ieee_ref_t | ref | ) |
Increase address lock counter, when it used in some table. Address must be already locked.
ref | - IEEE/network address pair reference |
zb_uint16_t zb_address_short_by_ieee | ( | zb_ieee_addr_t | ieee_address | ) |
Get short address by IEEE address (long).
ieee_address | - long address |
See thermostat sample
void zb_address_short_by_ref | ( | zb_uint16_t * | short_address_p, |
zb_address_ieee_ref_t | ref | ||
) |
Get short address by address reference.
Get existing short address with address reference. Update address alive time if it not locked.
short_address_p | - (out) short address |
ref | - address reference |
Example
See tp_pro_bv-32 sample
zb_ret_t zb_address_unlock | ( | zb_address_ieee_ref_t | ref | ) |
Unlock address counter. Decrease lock counter.
ref | - IEEE/network address pair reference |
zb_ret_t zb_address_update | ( | zb_ieee_addr_t | ieee_address, |
zb_uint16_t | short_address, | ||
zb_bool_t | lock, | ||
zb_address_ieee_ref_t * | ref_p | ||
) |
Update long/short address pair. Create the pair if not exist. Optionally, lock. Reaction on device announce etc. Long and short addresses are present. Must synchronize the address translation table with this information.
ieee_address | - long address |
short_address | - short address |
lock | - if TRUE, lock address entry |
ref_p | - (out) address reference |
Example
See nwk_addr sample