|
| BluezHciInterface (const std::string &name) |
|
void | up () const override |
|
void | reset () const override |
|
bool | detect (const MACAddress &address) const override |
|
std::map< MACAddress, std::string > | scan () const override |
|
std::map< MACAddress, std::string > | lescan (const Poco::Timespan &seconds) const override |
|
HciInfo | info () const override |
|
HciConnection::Ptr | connect (const MACAddress &address, const Poco::Timespan &timeout) const override |
|
void | watch (const MACAddress &address, Poco::SharedPtr< WatchCallback > callBack) override |
|
void | unwatch (const MACAddress &address) override |
|
|
static std::string | parseLEName (uint8_t *eir, size_t length) |
|
|
typedef Poco::SharedPtr
< HciInterface > | Ptr |
|
typedef std::function< void(const
MACAddress &, std::vector
< unsigned char > &)> | WatchCallback |
|
HciConnection::Ptr BluezHciInterface::connect |
( |
const MACAddress & |
address, |
|
|
const Poco::Timespan & |
timeout |
|
) |
| const |
|
overridevirtual |
Connects to device defined by MAC address and loads it's services.
- Exceptions
-
IOException | in case of a failure |
Implements BeeeOn::HciInterface.
bool BluezHciInterface::detect |
( |
const MACAddress & |
address | ) |
const |
|
overridevirtual |
Check state of device with MACAddress.
- Returns
- true if the device was detected or false
- Exceptions
-
IOException | when the detection fails for some reason |
Implements BeeeOn::HciInterface.
HciInfo BluezHciInterface::info |
( |
| ) |
const |
|
overridevirtual |
map< MACAddress, string > BluezHciInterface::lescan |
( |
const Poco::Timespan & |
seconds | ) |
const |
|
overridevirtual |
Full scan of low energy bluetooth network. Sets parameters for low energy scan and open socket.
- Returns
- list of MAC addresses with names
- Exceptions
-
IOException | when the detection fails for some reason |
Implements BeeeOn::HciInterface.
string BluezHciInterface::parseLEName |
( |
uint8_t * |
eir, |
|
|
size_t |
length |
|
) |
| |
|
staticprotected |
Find device name in le_advertising_info struct
- Returns
- name of found device or an empty string otherwise
void BluezHciInterface::reset |
( |
| ) |
const |
|
overridevirtual |
Reset hci interface - turn down & up.
- Exceptions
-
IOException | in case of a failure |
Implements BeeeOn::HciInterface.
map< MACAddress, string > BluezHciInterface::scan |
( |
| ) |
const |
|
overridevirtual |
Full scan of bluetooth network. This can find only visible devices.
- Returns
- map of MAC addresses with names
Implements BeeeOn::HciInterface.
void BluezHciInterface::unwatch |
( |
const MACAddress & |
address | ) |
|
|
overridevirtual |
void BluezHciInterface::up |
( |
| ) |
const |
|
overridevirtual |
Try to set hci interface up. The root priviledges of the system might be required.
- Exceptions
-
IOException | in case of a failure |
Implements BeeeOn::HciInterface.
void BluezHciInterface::watch |
( |
const MACAddress & |
address, |
|
|
Poco::SharedPtr< WatchCallback > |
callBack |
|
) |
| |
|
overridevirtual |
Register device to process advertising data. After recieving advertising data, the callBack is called.
- Exceptions
-
IOException | in case of a failure |
Implements BeeeOn::HciInterface.
The documentation for this class was generated from the following files:
- /var/lib/jenkins/workspace/beeeon-gateway-master/src/bluetooth/BluezHciInterface.h
- /var/lib/jenkins/workspace/beeeon-gateway-master/src/bluetooth/BluezHciInterface.cpp