![]() |
Wirepas SDK
|
Application library for Bluetooth LE beacon RX
Library services are accessed via lib_beacon_rx handle.
Definition in file wms_beacon_rx.h.
Go to the source code of this file.
Typedefs | |
| typedef void(* | app_lib_beacon_rx_data_received_cb_f) (const app_lib_beacon_rx_received_t *packet) |
| Function type for BLE Advertisement packet received callback. More... | |
| typedef void(* | app_lib_beacon_rx_set_data_received_cb_f) (app_lib_beacon_rx_data_received_cb_f cb) |
| Set a callback to be called when data packet received. More... | |
| typedef app_res_e(* | app_lib_beacon_rx_start) (app_lib_beacon_rx_channels_mask_e channel) |
| Start BLE advertisement scanner. More... | |
| typedef app_res_e(* | app_lib_beacon_rx_stop) (void) |
| Stop BLE advertisement scanner. More... | |
| typedef bool(* | app_lib_beacon_rx_started) (void) |
| Check if BLE advertisement scanner is running. More... | |
Data Structures | |
| struct | app_lib_beacon_rx_received_t |
| BLE structure received from network. Used in callback function set with lib_beacon_rx->setBeaconReceivedCb() service. More... | |
| struct | app_lib_beacon_rx_t |
| List of library functions. More... | |
Enumerations | |
| enum | app_lib_beacon_rx_channels_mask_e { APP_LIB_BEACON_RX_CHANNEL_37 = 0x1, APP_LIB_BEACON_RX_CHANNEL_38 = 0x2, APP_LIB_BEACON_RX_CHANNEL_39 = 0x4, APP_LIB_BEACON_RX_CHANNEL_ALL = 0x7 } |
| BLE Advertising channels to listen, used with lib_beacon_rx->startScanner() service. More... | |
Macros | |
| #define | APP_LIB_BEACON_RX_NAME 0x0cb93068 |
| Library symbolic name More... | |
| #define | APP_LIB_BEACON_RX_VERSION 0x200 |
| Maximum supported library version. More... | |
| typedef void(* app_lib_beacon_rx_data_received_cb_f) (const app_lib_beacon_rx_received_t *packet) |
Function type for BLE Advertisement packet received callback.
| packet | Received packet |
Used with lib_beacon_rx->setBeaconReceivedCb() service.
Definition at line 72 of file wms_beacon_rx.h.
| typedef void(* app_lib_beacon_rx_set_data_received_cb_f) (app_lib_beacon_rx_data_received_cb_f cb) |
Set a callback to be called when data packet received.
Example on use:
| cb | The function to be executed, or NULL to unset |
Definition at line 105 of file wms_beacon_rx.h.
| typedef app_res_e(* app_lib_beacon_rx_start) (app_lib_beacon_rx_channels_mask_e channel) |
Start BLE advertisement scanner.
For example on how to use this function, check lib_beacon_rx->isScannerStarted().
| channel | mask BlueTooth advertisement channel mask to use |
Definition at line 126 of file wms_beacon_rx.h.
| typedef bool(* app_lib_beacon_rx_started) (void) |
Check if BLE advertisement scanner is running.
Example on use. When device receives a packet to destination endpoint 10, it checks whether BLE scanner is active. If not, it will start it.
Definition at line 183 of file wms_beacon_rx.h.
| typedef app_res_e(* app_lib_beacon_rx_stop) (void) |
Stop BLE advertisement scanner.
Definition at line 134 of file wms_beacon_rx.h.
| struct app_lib_beacon_rx_received_t |
BLE structure received from network. Used in callback function set with lib_beacon_rx->setBeaconReceivedCb() service.
Definition at line 51 of file wms_beacon_rx.h.
| Data Fields | ||
|---|---|---|
| uint8_t | length |
Number of bytes of data payload |
| uint8_t * | payload |
Data payload |
| int8_t | rssi |
RSSI from packet received |
| uint8_t | type |
PDU type (BlueTooth Core_v5.0.pdf, p2567) |
| struct app_lib_beacon_rx_t |
List of library functions.
Definition at line 189 of file wms_beacon_rx.h.
| Data Fields | ||
|---|---|---|
| app_lib_beacon_rx_started | isScannerStarted | |
| app_lib_beacon_rx_set_data_received_cb_f | setBeaconReceivedCb | |
| app_lib_beacon_rx_start | startScanner | |
| app_lib_beacon_rx_stop | stopScanner | |
BLE Advertising channels to listen, used with lib_beacon_rx->startScanner() service.
Definition at line 34 of file wms_beacon_rx.h.
| #define APP_LIB_BEACON_RX_NAME 0x0cb93068 |
Library symbolic name
Definition at line 25 of file wms_beacon_rx.h.
| #define APP_LIB_BEACON_RX_VERSION 0x200 |
Maximum supported library version.
Definition at line 28 of file wms_beacon_rx.h.