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 
37 typedef enum
38 {
48 
54 typedef struct
55 {
57  uint8_t type;
59  uint8_t length;
61  int8_t rssi;
63  uint8_t * payload;
65 
75  (const app_lib_beacon_rx_received_t * packet);
76 
107 typedef void
109 
128 typedef app_res_e
130 
136 typedef app_res_e
138 
185 typedef bool
187 
188 
192 typedef struct
193 {
199 
200 #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:194
app_lib_beacon_rx_received_t::type
uint8_t type
Definition: wms_beacon_rx.h:57
app_lib_beacon_rx_stop
app_res_e(* app_lib_beacon_rx_stop)(void)
Stop BLE advertisement scanner.
Definition: wms_beacon_rx.h:137
APP_LIB_BEACON_RX_CHANNEL_39
@ APP_LIB_BEACON_RX_CHANNEL_39
Definition: wms_beacon_rx.h:44
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:63
APP_LIB_BEACON_RX_CHANNEL_37
@ APP_LIB_BEACON_RX_CHANNEL_37
Definition: wms_beacon_rx.h:40
wms_app.h
app_lib_beacon_rx_received_t::length
uint8_t length
Definition: wms_beacon_rx.h:59
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:54
app_lib_beacon_rx_t::isScannerStarted
app_lib_beacon_rx_started isScannerStarted
Definition: wms_beacon_rx.h:197
APP_LIB_BEACON_RX_CHANNEL_ALL
@ APP_LIB_BEACON_RX_CHANNEL_ALL
Definition: wms_beacon_rx.h:46
app_lib_beacon_rx_t
List of library functions.
Definition: wms_beacon_rx.h:192
app_lib_beacon_rx_t::startScanner
app_lib_beacon_rx_start startScanner
Definition: wms_beacon_rx.h:195
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:108
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:75
app_lib_beacon_rx_t::stopScanner
app_lib_beacon_rx_stop stopScanner
Definition: wms_beacon_rx.h:196
APP_LIB_BEACON_RX_CHANNEL_38
@ APP_LIB_BEACON_RX_CHANNEL_38
Definition: wms_beacon_rx.h:42
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:129
app_lib_beacon_rx_received_t::rssi
int8_t rssi
Definition: wms_beacon_rx.h:61
app_lib_beacon_rx_started
bool(* app_lib_beacon_rx_started)(void)
Check if BLE advertisement scanner is running.
Definition: wms_beacon_rx.h:186
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:37