|
TinyCTS
Bluetooth Current Time Service client and server for Arduino
|
The client side for Linux: scans, connects and reads or writes the characteristics through BlueZ (org.bluez.Adapter1, Device1 and GattCharacteristic1) with the functions of TinyCTSBlueZ. More...
#include <TinyCTSBlueZBackend.h>
Public Member Functions | |
| TinyCTSBlueZCentral (const std::string &adapter) | |
| bool | connect (const std::string &wanted, uint32_t timeoutMs, TinyCTSScanEntry &found, std::string &error) override |
| void | disconnect () override |
| bool | read (uint16_t uuid, std::vector< uint8_t > &value, std::string &error) override |
| bool | scan (uint32_t timeoutMs, std::vector< TinyCTSScanEntry > &result, std::string &error) override |
| bool | write (uint16_t uuid, const uint8_t *data, size_t len, std::string &error) override |
The client side for Linux: scans, connects and reads or writes the characteristics through BlueZ (org.bluez.Adapter1, Device1 and GattCharacteristic1) with the functions of TinyCTSBlueZ.
|
inlineoverridevirtual |
Find a device, connect and discover the Current Time Service.
| device | Address, identifier or name. Empty: the first device that advertises the service. |
| timeoutMs | Time to look for the device. |
Implements tiny_cts::TinyCTSCentral.
|
inlineoverridevirtual |
Disconnect.
Implements tiny_cts::TinyCTSCentral.
|
inlineoverridevirtual |
Read a characteristic of the connected device (16 bit UUID).
Implements tiny_cts::TinyCTSCentral.
|
inlineoverridevirtual |
List the devices in range.
Implements tiny_cts::TinyCTSCentral.
|
inlineoverridevirtual |
Write a characteristic of the connected device (with response).
Implements tiny_cts::TinyCTSCentral.