The central represents your computer. The central is used to start up bluetooth on your computer and also look for peripherals to connect to and manage one once connected. You can only connect one peripheral per central. If you want to have multiple peripherals, just spawn more instances of central.
bluetooth::Central¶Represents a central manager.
Public Functions
start_bluetooth()¶Start bluetooth on your computer.
find_peripheral(const std::vector<std::string> &uuids)¶Find and connect to the peripheral_mac given the service UUIDs advertised by the peripheral_mac. If the peripheral is not found, return nullptr.
uuids: uuids advertised by the peripheral.
find_peripheral(const std::string &name)¶Find and connect to a peripheral_mac given the name of it. If the peripheral is not found, return nullptr.
name: the name advertised by the peripheral_mac.
peripheral(const std::string &uuid)¶Return the discovered peripheral. If the peripheral hasn’t been discovered and connected yet then return nullptr.
the peripheral or nullptr.
uuid: uuid of the peripheral.