Wirepas SDK
shared_neighbors.h File Reference

Go to the source code of this file.

Functions

app_res_e Shared_Neighbors_init (void)
 Initialize the shared neighbors library. More...
 
app_res_e Shared_Neighbors_addOnBeaconCb (app_lib_state_on_beacon_cb_f cb_scanned_neighbor, uint16_t *cb_id)
 Add a new callback about beacon received. More...
 
app_res_e Shared_Neighbors_removeBeaconCb (uint16_t cb_id)
 Remove a received beacon item from the list. Removed item fields are all set to 0. More...
 

Function Documentation

◆ Shared_Neighbors_addOnBeaconCb()

app_res_e Shared_Neighbors_addOnBeaconCb ( app_lib_state_on_beacon_cb_f  cb_scanned_neighbor,
uint16_t *  cb_id 
)

Add a new callback about beacon received.

Parameters
cb_scanned_neighborNew callback to set
cb_idid to be used with Shared_State_removeBeaconCb. Set only if return code is APP_RES_OK.
Returns
APP_RES_OK if ok. See app_res_e for other result codes.

◆ Shared_Neighbors_init()

app_res_e Shared_Neighbors_init ( void  )

Initialize the shared neighbors library.

Note
If shared state library is used in application, the lib_state->setOnBeaconCb(), lib_state->setOnScanNborsCb(), functions offered by state library MUST NOT be used outside of this module.
Returns
APP_RES_OK.

◆ Shared_Neighbors_removeBeaconCb()

app_res_e Shared_Neighbors_removeBeaconCb ( uint16_t  cb_id)

Remove a received beacon item from the list. Removed item fields are all set to 0.

Parameters
cb_iditem to remove.