herald  2.0.0
ble_sensor_configuration.h
1 // Copyright 2020-2021 Herald Project Contributors
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #ifndef HERALD_BLE_SENSOR_CONFIGURATION_H
6 #define HERALD_BLE_SENSOR_CONFIGURATION_H
7 
8 #include "../datatype/time_interval.h"
9 #include "../datatype/uuid.h"
10 
11 namespace herald {
12 namespace ble {
13 
14 using namespace herald::datatype;
15 
17 static const UUID legacyAustraliaServiceUUID("00000000-0000-4000-8000-000000000000"); // TODO fill this value in
19 static const UUID legacyOpenTraceUUID("00000000-0000-4000-8000-000000000000"); // TODO fill this value in
20 
21 
26  ~BLESensorConfiguration() = default;
27 
28  // MARK:- BLE service and characteristic UUID, and manufacturer ID
29 
45 
51 
52  // MARK:- BLE signal characteristic action codes
53 
62 
63  // MARK:- App configurable BLE features
64 
66  //SensorLoggerLevel logLevel = SensorLoggerLevel.debug;
67 
74 
77 
80 
90 
93  int maxBluetoothConnections; // Same as NRF 52840 max connections
94 
95  // Does this Herald application support advertising?
96  bool advertisingEnabled;
97  // Does this Herald application support scanning? (Simple Venue Beacons don't)
98  bool scanningEnabled;
99 
100 
101 }; // end struct
102 
103 } // end namespace
104 } // end namespace
105 
106 #endif
Definition: time_interval.h:19
Definition: uuid.h:18
Contains all low-level Herald datatype implementations.
Definition: base64_string.h:14
Acts as a non-global memory arena for arbitrary classes.
Definition: aggregates.h:15
Defines BLE sensor configuration data, e.g. service and characteristic UUIDs.
Definition: ble_sensor_configuration.h:23
std::byte signalCharacteristicActionWritePayload
Signal characteristic action code for write payload, expect 1 byte action code followed by 2 byte lit...
Definition: ble_sensor_configuration.h:55
UUID androidSignalCharacteristicUUID
Definition: ble_sensor_configuration.h:38
UUID payloadCharacteristicUUID
Definition: ble_sensor_configuration.h:44
std::byte signalCharacteristicActionWritePayloadSharing
Signal characteristic action code for write payload, expect 1 byte action code followed by 2 byte lit...
Definition: ble_sensor_configuration.h:59
int manufacturerIdForApple
BLE advert manufacturer ID for Apple, for scanning of background iOS devices.
Definition: ble_sensor_configuration.h:50
TimeInterval payloadDataUpdateTimeInterval
Log level for BLESensor.
Definition: ble_sensor_configuration.h:73
std::byte signalCharacteristicActionWriteRSSI
Signal characteristic action code for write RSSI, expect 1 byte action code followed by 4 byte little...
Definition: ble_sensor_configuration.h:57
TimeInterval payloadSharingExpiryTimeInterval
Expiry time for shared payloads, to ensure only recently seen payloads are shared.
Definition: ble_sensor_configuration.h:76
UUID iosSignalCharacteristicUUID
Definition: ble_sensor_configuration.h:41
UUID serviceUUID
Definition: ble_sensor_configuration.h:35
TimeInterval advertRefreshTimeInterval
Advert refresh time interval.
Definition: ble_sensor_configuration.h:79
int manufacturerIdForSensor
Definition: ble_sensor_configuration.h:48
int maxBluetoothConnections
Definition: ble_sensor_configuration.h:93
TimeInterval peripheralCleanInterval
Definition: ble_sensor_configuration.h:89
std::byte signalCharacteristicActionWriteImmediate
Arbitrary immediate write.
Definition: ble_sensor_configuration.h:61