|
TinyCTS
Bluetooth Current Time Service client and server for Arduino
|
The functions to talk to BlueZ (all static); the BlueZ client and server use them. More...
#include <TinyCTSBlueZ.h>
Classes | |
| struct | Device |
| A device that BlueZ knows. More... | |
Static Public Member Functions | |
| static GDBusConnection * | bus (std::string &error) |
| The connection to the system bus (nullptr and the message in error if not possible). | |
| static GVariant * | call (const std::string &path, const char *iface, const char *method, GVariant *params, std::string &error, int timeoutMs=20000) |
| A synchronous call to BlueZ. Returns nullptr and the message in error. | |
| template<typename Found> | |
| static std::vector< Device > | discover (const std::string &adapter, uint32_t timeoutMs, Found found, std::string &error) |
| Look for devices. The scan stops when found(devices) returns true, or at the timeout. | |
| static bool | equalsIgnoreCase (const std::string &a, const std::string &b) |
| static std::string | findAdapter (const std::string &name, std::string &error) |
| The object path of the Bluetooth adapter (empty and the message in error if not found). | |
| static std::string | findCharacteristic (const std::string &devicePath, uint16_t uuid16) |
| The object path of a characteristic of a connected device (empty if not found). | |
| static std::string | fullUuid (uint16_t uuid16) |
| The 128 bit UUID of a 16 bit UUID. | |
| static std::vector< Device > | listDevices (const std::string &adapter) |
| static bool | readValue (const std::string &characteristic, std::vector< uint8_t > &out, std::string &error) |
| static bool & | verbose () |
| Print the D-Bus calls to stderr. | |
| static bool | writeValue (const std::string &characteristic, const uint8_t *data, size_t len, std::string &error) |
The functions to talk to BlueZ (all static); the BlueZ client and server use them.