Wirepas SDK
shared_beacon.h File Reference

Go to the source code of this file.

Functions

shared_beacon_res_e Shared_Beacon_init (void)
 Initialize the Shared_Beacon library. More...
 
shared_beacon_res_e Shared_Beacon_startBeacon (uint16_t interval_ms, int8_t *power, app_lib_beacon_tx_channels_mask_e channels_mask, const uint8_t *content, uint8_t length, uint8_t *shared_beacon_index)
 Starts sending of beacon content defined in the parameters. There is possibility to start multiple beacons after another beacons started. The limitation is that there cannot be set individual beacon sending interval for each beacons. The smallest interval defined for beacons is selected as common interval for all beacons. More...
 
shared_beacon_res_e Shared_Beacon_stopBeacon (uint8_t shared_beacon_index)
 Stops beacon with the given index. Shared beacon used interval is checked and selected smaller interval from active beacons after shared_beacon_index is set as not active. More...
 

Enumerations

enum  shared_beacon_res_e {
  SHARED_BEACON_RES_OK = 0, SHARED_BEACON_INIT_NOT_DONE = 1, SHARED_BEACON_INDEX_NOT_AVAILABLE = 2, SHARED_BEACON_INDEX_NOT_ACTIVE = 3,
  SHARED_BEACON_INVALID_PARAM = 4
}
 List of return code. More...
 

Function Documentation

◆ Shared_Beacon_init()

shared_beacon_res_e Shared_Beacon_init ( void  )

Initialize the Shared_Beacon library.

Note
If Shared_Beacon library is used in application, functions offered by lib_beacon_tx library MUST NOT be used outside of this module.
Returns
shared_beacon_res_e.

◆ Shared_Beacon_startBeacon()

shared_beacon_res_e Shared_Beacon_startBeacon ( uint16_t  interval_ms,
int8_t *  power,
app_lib_beacon_tx_channels_mask_e  channels_mask,
const uint8_t *  content,
uint8_t  length,
uint8_t *  shared_beacon_index 
)

Starts sending of beacon content defined in the parameters. There is possibility to start multiple beacons after another beacons started. The limitation is that there cannot be set individual beacon sending interval for each beacons. The smallest interval defined for beacons is selected as common interval for all beacons.

Parameters
interval_msbeacon sending interval in ms
powerrf power level in dBm
channel_maskchannels to be used for defined beacon
contentdata to be sent out
lengthlength of content to be sent out
shared_beacon_indexreturns index which is used when Shared_Beacon_stopBeacon used, used indexes: (0 .. APP_LIB_BEACONTX_MAX_INDEX)
Returns
shared_beacon_res_e.

◆ Shared_Beacon_stopBeacon()

shared_beacon_res_e Shared_Beacon_stopBeacon ( uint8_t  shared_beacon_index)

Stops beacon with the given index. Shared beacon used interval is checked and selected smaller interval from active beacons after shared_beacon_index is set as not active.

Parameters
shared_beacon_indexThe index received in Shared_Beacon_startBeacon
Returns
shared_beacon_res_e.

Enumeration Type Documentation

◆ shared_beacon_res_e

List of return code.

Enumerator
SHARED_BEACON_RES_OK 

Operation is successful

SHARED_BEACON_INIT_NOT_DONE 

Initialization is not done

SHARED_BEACON_INDEX_NOT_AVAILABLE 

No free index in shared_beacon or in lib_beacon_tx library

SHARED_BEACON_INDEX_NOT_ACTIVE 

No active index in in lib_beacon_tx library

SHARED_BEACON_INVALID_PARAM 

Given parameter(s) invalid

Definition at line 15 of file shared_beacon.h.

SHARED_BEACON_INDEX_NOT_ACTIVE
@ SHARED_BEACON_INDEX_NOT_ACTIVE
Definition: shared_beacon.h:24
SHARED_BEACON_INIT_NOT_DONE
@ SHARED_BEACON_INIT_NOT_DONE
Definition: shared_beacon.h:20
shared_beacon_res_e
shared_beacon_res_e
List of return code.
Definition: shared_beacon.h:15
SHARED_BEACON_INDEX_NOT_AVAILABLE
@ SHARED_BEACON_INDEX_NOT_AVAILABLE
Definition: shared_beacon.h:22
SHARED_BEACON_RES_OK
@ SHARED_BEACON_RES_OK
Definition: shared_beacon.h:18
SHARED_BEACON_INVALID_PARAM
@ SHARED_BEACON_INVALID_PARAM
Definition: shared_beacon.h:26