9#include <NimBLEDevice.h>
12#define BLE_NAME "ESP32"
15#define BLE_SERVICE_INPUT_UUID "76847a0a-2748-4fda-bcd7-74425f0e4a10"
16#define BLE_CHARAKTERISTIK_DEVICE_POSITION_UUID "76847a0a-2748-4fda-bcd7-74425f0e4a11"
17#define BLE_DESCRIPTOR_DEVICE_POSITION_UUID "76847a0a-2748-4fda-bcd7-74425f0e4a12"
18#define BLE_CHARAKTERISTIK_SAVE_CONFIG_UUID "76847a0a-2748-4fda-bcd7-74425f0e4a13"
19#define BLE_DESCRIPTOR_SAVE_CONFIG_UUID "76847a0a-2748-4fda-bcd7-74425f0e4a14"
22#define BLE_SERVICE_OUTPUT_UUID "76847a0a-2748-4fda-bcd7-74425f0e4a20"
23#define BLE_CHARAKTERISTIK_ANCHOR_POSITIONS_UUID "76847a0a-2748-4fda-bcd7-74425f0e4a21"
24#define BLE_DESCRIPTOR_ANCHOR_POSITIONS_UUID "76847a0a-2748-4fda-bcd7-74425f0e4a22"
25#define BLE_CHARAKTERISTIK_OWN_POSITION_UUID "76847a0a-2748-4fda-bcd7-74425f0e4a23"
26#define BLE_DESCRIPTOR_OWN_POSITION_UUID "76847a0a-2748-4fda-bcd7-74425f0e4a24"
29#define BLE_MIN_INTERVAL 0x06
30#define BLE_MAX_INTERVAL 0x12
60 std::string
read_value(
const std::string uuid);
69 void send_value(std::string uuid,
const std::string data);
#define BLE_CHARAKTERISTIK_OWN_POSITION_UUID
Definition: ble-server.h:25
#define BLE_DESCRIPTOR_ANCHOR_POSITIONS_UUID
Definition: ble-server.h:24
#define BLE_DESCRIPTOR_DEVICE_POSITION_UUID
Definition: ble-server.h:17
#define BLE_CHARAKTERISTIK_ANCHOR_POSITIONS_UUID
Definition: ble-server.h:23
#define BLE_DESCRIPTOR_SAVE_CONFIG_UUID
Definition: ble-server.h:19
#define BLE_DESCRIPTOR_OWN_POSITION_UUID
Definition: ble-server.h:26
#define BLE_SERVICE_INPUT_UUID
Definition: ble-server.h:15
#define BLE_CHARAKTERISTIK_SAVE_CONFIG_UUID
Definition: ble-server.h:18
#define BLE_CHARAKTERISTIK_DEVICE_POSITION_UUID
Definition: ble-server.h:16
#define BLE_SERVICE_OUTPUT_UUID
Definition: ble-server.h:22
Represents a Bluetooth Server for ESP32.
Definition: ble-server.h:37
void init_services()
Initializes all services for the BLE server.
Definition: ble-server.cpp:32
const std::array< Service, 2 > my_services
Definition: ble-server.h:105
BleServer()
Constructor for BleServer class.
Definition: ble-server.h:42
void add_Characteristic(BLEService *service, BleServer::Characteristic characteristic)
Adds a new characteristic with the given UUID to a service.
Definition: ble-server.cpp:50
void send_value(std::string uuid, const std::string data)
Sends a new value to a Characteristic with the given UUID. The Characteristic can be referenced witho...
Definition: ble-server.cpp:80
size_t getConnectedCount()
Get the number of connected devices.
Definition: ble-server.h:76
BLEServer * pServer
Definition: ble-server.h:79
std::list< BLEService * > mServices
Definition: ble-server.h:81
void init_server()
Initializes the Bluetooth Server.
Definition: ble-server.cpp:3
BLEAdvertising * pAdvertising
Definition: ble-server.h:80
std::string read_value(const std::string uuid)
Reads the value from a characteristic with the given UUID.
Definition: ble-server.cpp:63
Represents a Bluetooth characteristic with a name, UUID, and descriptor UUID.
Definition: ble-server.h:88
std::string descriptor_uuid
Definition: ble-server.h:91
std::string name
Definition: ble-server.h:89
std::string characteristic_uuid
Definition: ble-server.h:90
Represents a Bluetooth service with a UUID and an array of characteristics.
Definition: ble-server.h:99
std::string uuid
Definition: ble-server.h:100
const std::array< Characteristic, 2 > characteristics
Definition: ble-server.h:101