|
TinyCTS
Bluetooth Current Time Service client and server for Arduino
|
The server side (peripheral role) of the Bluetooth stack of the operating system: offers the Current Time Service (0x1805) with the characteristics Current Time (read, notify, write), Local Time Information (read, write) and Reference Time Information (read), and advertises it. More...
#include <TinyCTSDesktop.h>
Public Member Functions | |
| virtual void | notify (uint16_t uuid, const std::vector< uint8_t > &value)=0 |
| virtual void | process ()=0 |
| virtual bool | start (const std::string &name, bool settable, bool encrypted, TinyCTSPeripheralHandler *handler, std::string &error)=0 |
| virtual void | stop ()=0 |
The server side (peripheral role) of the Bluetooth stack of the operating system: offers the Current Time Service (0x1805) with the characteristics Current Time (read, notify, write), Local Time Information (read, write) and Reference Time Information (read), and advertises it.
The values are not stored: the requests of the clients are given to a TinyCTSPeripheralHandler. BlueZ (Linux), CoreBluetooth (macOS) and WinRT (Windows) each implement it; TinyCTSServer uses it. Get an object with ctsCreatePeripheral().
|
pure virtual |
Send the new value of a characteristic to the subscribed clients.
Implemented in anonymous_namespace{TinyCTSCoreBluetooth.mm}::CoreBluetoothPeripheral, anonymous_namespace{TinyCTSWinRT.cpp}::WinPeripheral, and tiny_cts::TinyCTSBlueZPeripheral.
|
pure virtual |
Handle the requests, if the stack needs the application to do that.
Implemented in anonymous_namespace{TinyCTSCoreBluetooth.mm}::CoreBluetoothPeripheral, anonymous_namespace{TinyCTSWinRT.cpp}::WinPeripheral, and tiny_cts::TinyCTSBlueZPeripheral.
|
pure virtual |
Register the service and start the advertising.
| settable | The clients may write Current Time and Local Time Information. |
| encrypted | Writing needs an encrypted (paired) connection. |
Implemented in anonymous_namespace{TinyCTSCoreBluetooth.mm}::CoreBluetoothPeripheral, anonymous_namespace{TinyCTSWinRT.cpp}::WinPeripheral, and tiny_cts::TinyCTSBlueZPeripheral.
|
pure virtual |