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 |
PANID reference
Should be used inside protocol tables instead of 64 bit PANID
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, optionaly 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's not exists |
lock | - if TRUE, lock address entry |
ref_p | - (out) address reference |
Note: never call zb_address_by_ieee() with empty (zero) ieee_address
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 by address ref Get existing ieee and short addresses by address ref. 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 ref by long address, create if not exist, optionally lock. Update address alive time if not locked.
short_address | - 16bit device address |
create | - if TRUE, create address entry if it's not exists |
lock | - if TRUE, lock address entry |
ref_p | - (out) address reference |
Note: never call zb_address_by_short() with empty (-1) short_address
Example
See nwk_addr 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 ref
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 by extended pan id.
pan_id | - PANID |
ref | - (output) reference to panid |
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 by reference.
pan_id_ref | - reference to panid |
pan_id_p | - (output) PANID. |
Example
void zb_address_ieee_by_ref | ( | zb_ieee_addr_t | ieee_address, |
zb_address_ieee_ref_t | ref | ||
) |
Get ieee address by address ref Get existing ieee by address ref. 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 long (ieee) address by short address
short_addr | - short address |
ieee_address | - (out)long address |
Example
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 |
See nwk_addr sample
zb_uint16_t zb_address_short_by_ieee | ( | zb_ieee_addr_t | ieee_address | ) |
Get short address by long (ieee) address
ieee_address | - long address |
See tp_aps_bv_09 sample
void zb_address_short_by_ref | ( | zb_uint16_t * | short_address_p, |
zb_address_ieee_ref_t | ref | ||
) |
Get short address by address ref Get existing short address by address ref. 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. Move address to lru head if lock counter is zero.
ref | - ieee/network address pair reference |
See nwk_addr sample
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 if not exist, optionally lock. Reaction on device annonce etc. We have both long and short address. Must syncronize with this information address translation table.
Note: never call zb_address_update() with empty (zero) ieee_address or empty (-1) short_address.
ieee_address | - long address |
short_address | - short address |
lock | - if TRUE, lock address entry |
ref_p | - (out) address reference |
Example
See nwk_addr sample