Direct-BT
2.3.1
Direct-BT - Direct Bluetooth Programming.
|
Go to the documentation of this file.
26 #ifndef DBT_DEV_ACCOUNTING_HPP_
27 #define DBT_DEV_ACCOUNTING_HPP_
40 namespace BTDeviceRegistry {
110 return "["+addressAndType.
toString()+
", '"+name+
"']";
124 return lhs.addressAndType == rhs.addressAndType;
127 {
return !(lhs == rhs); }
239 template<>
struct hash<
direct_bt::BTDeviceRegistry::DeviceID> {
241 return a.hash_code();
std::string getWaitForDevicesString() noexcept
bool areAllDevicesProcessed(DeviceQueryMatchFunc m) noexcept
Returns.
std::string getProcessedDevicesString() noexcept
std::size_t hash_code() const noexcept
Implementation uses a lock-free volatile cache.
jau::darray< DeviceID > getProcessedDevices() noexcept
Returns a copy of the current collection of processed DeviceID.
bool contains(const EUI48Sub &needle) const noexcept
std::string toString() const noexcept
Returns the EUI48 sub-string representation, less or equal 17 characters representing less or equal 6...
size_t getProcessingDeviceCount() noexcept
std::string toString() const noexcept
void clearProcessingDevices() noexcept
Clears internal list.
void addToProcessingDevices(const BDAddressAndType &a, const std::string &n) noexcept
void clearProcessedDevices() noexcept
Clears internal list.
void clearWaitForDevices() noexcept
Clears internal list.
bool isWaitingForDevice(const EUI48 &address, const std::string &name, DeviceQueryMatchFunc m) noexcept
Returns.
A 48 bit EUI-48 sub-identifier, see EUI48.
DeviceID(const BDAddressAndType &a, const std::string &n)
std::string toString() const
@ EUI48SUB
DeviceQuery type, using a sensor device EUI48Sub.
std::string toString() const
void addToWaitForDevices(const std::string &addrOrNameSub) noexcept
bool removeFromProcessingDevices(const BDAddressAndType &a) noexcept
@ NAME
DeviceQuery type, using a sensor device std::string name.
DeviceQuery(const EUI48Sub &as)
bool isEUI48Sub() const noexcept
void addToProcessedDevices(const BDAddressAndType &a, const std::string &n) noexcept
bool isDeviceProcessing(const BDAddressAndType &a) noexcept
Type
DeviceQuery type, i.e.
std::size_t operator()(direct_bt::BTDeviceRegistry::DeviceID const &a) const noexcept
Specifies unique device identities, using BDAddressAndType as key.
bool operator==(const DeviceID &lhs, const DeviceID &rhs) noexcept
A packed 48 bit EUI-48 identifier, formerly known as MAC-48 or simply network device MAC address (Med...
DeviceQuery(const std::string &ns)
jau::darray< DeviceQuery > & getWaitForDevices() noexcept
Returns the reference of the current list of DeviceQuery, not a copy.
Specifies devices queries to act upon.
bool isWaitingForAnyDevice() noexcept
size_t getProcessedDeviceCount() noexcept
std::size_t hash_code() const noexcept
bool operator!=(const DeviceID &lhs, const DeviceID &rhs) noexcept
BDAddressAndType addressAndType
bool isDeviceProcessed(const BDAddressAndType &a) noexcept
size_t getWaitForDevicesCount() noexcept
bool(* DeviceQueryMatchFunc)(const EUI48 &address, const std::string &name, const DeviceQuery &q)
Function for user defined BTDeviceRegistry::DeviceQuery matching criteria and algorithm.
Unique Bluetooth EUI48 address and BDAddressType tuple.
jau::darray< DeviceID > getProcessingDevices() noexcept
Returns a copy of the current collection of processing DeviceID.