Wirepas SDK
wms_beacon_rx.h
Go to the documentation of this file.
1 /* Copyright 2018 Wirepas Ltd. All Rights Reserved.
2  *
3  * See file LICENSE.txt for full license details.
4  *
5  */
6 
15 #ifndef APP_LIB_BEACON_RX_H_
16 #define APP_LIB_BEACON_RX_H_
17 
18 #include <stdlib.h>
19 #include <stdint.h>
20 #include <stdbool.h>
21 
22 #include "wms_app.h"
23 
25 #define APP_LIB_BEACON_RX_NAME 0x0cb93068
26 
28 #define APP_LIB_BEACON_RX_VERSION 0x200
29 
34 typedef enum
35 {
45 
51 typedef struct
52 {
54  uint8_t type;
56  uint8_t length;
58  int8_t rssi;
60  uint8_t * payload;
62 
72  (const app_lib_beacon_rx_received_t * packet);
73 
104 typedef void
106 
125 typedef app_res_e
127 
133 typedef app_res_e
135 
182 typedef bool
184 
185 
189 typedef struct
190 {
196 
197 #endif /* APP_LIB_BEACON_RX_H_ */
app_lib_beacon_rx_t::setBeaconReceivedCb
app_lib_beacon_rx_set_data_received_cb_f setBeaconReceivedCb
Definition: wms_beacon_rx.h:191
app_lib_beacon_rx_received_t::type
uint8_t type
Definition: wms_beacon_rx.h:54
app_lib_beacon_rx_stop
app_res_e(* app_lib_beacon_rx_stop)(void)
Stop BLE advertisement scanner.
Definition: wms_beacon_rx.h:134
APP_LIB_BEACON_RX_CHANNEL_39
@ APP_LIB_BEACON_RX_CHANNEL_39
Definition: wms_beacon_rx.h:41
app_res_e
app_res_e
Definition: wms_app.h:201
app_lib_beacon_rx_received_t::payload
uint8_t * payload
Definition: wms_beacon_rx.h:60
APP_LIB_BEACON_RX_CHANNEL_37
@ APP_LIB_BEACON_RX_CHANNEL_37
Definition: wms_beacon_rx.h:37
wms_app.h
app_lib_beacon_rx_received_t::length
uint8_t length
Definition: wms_beacon_rx.h:56
app_lib_beacon_rx_received_t
BLE structure received from network. Used in callback function set with lib_beacon_rx->setBeaconRecei...
Definition: wms_beacon_rx.h:51
app_lib_beacon_rx_t::isScannerStarted
app_lib_beacon_rx_started isScannerStarted
Definition: wms_beacon_rx.h:194
APP_LIB_BEACON_RX_CHANNEL_ALL
@ APP_LIB_BEACON_RX_CHANNEL_ALL
Definition: wms_beacon_rx.h:43
app_lib_beacon_rx_t
List of library functions.
Definition: wms_beacon_rx.h:189
app_lib_beacon_rx_t::startScanner
app_lib_beacon_rx_start startScanner
Definition: wms_beacon_rx.h:192
app_lib_beacon_rx_set_data_received_cb_f
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.
Definition: wms_beacon_rx.h:105
app_lib_beacon_rx_data_received_cb_f
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.
Definition: wms_beacon_rx.h:72
app_lib_beacon_rx_t::stopScanner
app_lib_beacon_rx_stop stopScanner
Definition: wms_beacon_rx.h:193
APP_LIB_BEACON_RX_CHANNEL_38
@ APP_LIB_BEACON_RX_CHANNEL_38
Definition: wms_beacon_rx.h:39
app_lib_beacon_rx_start
app_res_e(* app_lib_beacon_rx_start)(app_lib_beacon_rx_channels_mask_e channel)
Start BLE advertisement scanner.
Definition: wms_beacon_rx.h:126
app_lib_beacon_rx_received_t::rssi
int8_t rssi
Definition: wms_beacon_rx.h:58
app_lib_beacon_rx_started
bool(* app_lib_beacon_rx_started)(void)
Check if BLE advertisement scanner is running.
Definition: wms_beacon_rx.h:183
app_lib_beacon_rx_channels_mask_e
app_lib_beacon_rx_channels_mask_e
BLE Advertising channels to listen, used with lib_beacon_rx->startScanner() service.
Definition: wms_beacon_rx.h:34