Exported Functions
- group FN_Exported_Functions
-
Functions for managing friendships at the friend node.
Functions
-
bool fn_init(uint8_t lpn_num, fn_params_t *pfn_params, pf_fn_cb_t pf_fn_cb)
-
Initialize the friend node.
This function initializes the friend node, preparing it for managing friendships with low power nodes (LPN). It enables the friend node to buffer and manage messages on behalf of LPNs.
- Parameters:
lpn_num – [in] The maximum number of LPN supported.
pfn_params – [in] Pointer to fn_params_t containing configuration parameters like
queue_size
.pf_fn_cb – [in] Function pointer for callbacks to handle various friend node events.
- Return values:
true – If initialization is successful.
false – If initialization fails due to invalid parameters or insufficient resources. To resolve, ensure that valid parameters are provided and resources are available.
- Returns:
-
Operation result.
-
void fn_deinit(void)
-
Deinitialize the friend node to release resources.
This function cleanly shuts down the friend node operations and frees associated resources.
-
void fn_clear(void)
-
Clear all existing LPNs.
Clears all Low Power Nodes currently associated with the friend node, effectively terminating all existing friendships.
-
bool fn_init(uint8_t lpn_num, fn_params_t *pfn_params, pf_fn_cb_t pf_fn_cb)