Microcontroller Wireless Solutions


Generic API Functions

Functions

nwk_enum_t nwk_init (void)
 Initialization of RF4CE network layer.
bool nwk_task (void)
 Task handling of RF4CE network layer.
bool nwk_ready_to_sleep (void)
 Checks if the entire stack is idle.
bool nwk_stack_idle (void)
 Checks if the network stack is idle.
void read_pairing_ref (uint8_t *pairing_ref, uint8_t length)
 Reads pairing reference from EEPROM.
void store_pairing_ref (uint8_t *pairing_ref, uint8_t length)
 Stores pairing references to EEPROM.
void clear_pairing_ref (uint8_t first_ref, uint8_t length)
 Clears pairing references within EEPROM.
uint8_t nwk_get_nib_attribute_size (uint8_t nib_attribute_id)
 Gets the NIB attribute value size.

Detailed Description

In this group of functions are implemented that are provided by the RF4Control stack, but not defined by the ZigBee RF4CE standard.


Function Documentation

void clear_pairing_ref ( uint8_t  first_ref,
uint8_t  length 
)

Clears pairing references within EEPROM.

The function clear_pairing_ref() clears pairing references within the EEPROM for the application scope. It's a function supporting the application

  • not used by NWK.
Parameters:
first_refFirst entry to clear
lengthNumber of entries to clear
See also:
store_pairing_ref
uint8_t nwk_get_nib_attribute_size ( uint8_t  nib_attribute_id)

Gets the NIB attribute value size.

Parameters:
nib_attribute_idNIB attribute ID
Returns:
Size of NIB attribute value in bytes
See also:
nlme_get_confirm
nwk_enum_t nwk_init ( void  )

Initialization of RF4CE network layer.

The RF4CE network layer needs to initialize after power-up of the MCU. The function nwk_init() initializes the network layer including the underlying layers, like MAC and queue and buffer management.

Returns:
Status of the initialization
bool nwk_ready_to_sleep ( void  )

Checks if the entire stack is idle.

The function nwk_ready_to_sleep() checks the RF4CE network layer and layers below if they are busy or idle. The function can be used to determine if the MCU can be set to a power save mode.

Returns:
true if all layers are idle; else false
bool nwk_stack_idle ( void  )

Checks if the network stack is idle.

The function nwk_state_idle() checks the RF4CE network layer is busy or idle.

Returns:
true if nwk layer is idle; else false
bool nwk_task ( void  )

Task handling of RF4CE network layer.

The function nwk_task() handles the RF4CE network layer and layers below. It needs to called frequently.

Returns:
true if request has been added to NHLE-NWK queue successfully; else false
void read_pairing_ref ( uint8_t *  pairing_ref,
uint8_t  length 
)

Reads pairing reference from EEPROM.

The function read_pairing_ref() reads the pairing references from the EEPROM for the application scope. It's a function supporting the application - not used by NWK. If a pairing reference is equal to 0xFF, it is unused.

Parameters:
pairing_refPointer to storage location
lengthNumber of entries to read
See also:
store_pairing_ref
void store_pairing_ref ( uint8_t *  pairing_ref,
uint8_t  length 
)

Stores pairing references to EEPROM.

The function store_pairing_ref() stores the pairing references to the EEPROM for the application scope. It's a function supporting the application - not used by NWK.

Parameters:
pairing_refPointer to storage location
lengthNumber of entries to store
See also:
read_pairing_ref