BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions
BeeeOn::HciInterface Class Referenceabstract
Inheritance diagram for BeeeOn::HciInterface:
BeeeOn::BluezHciInterface BeeeOn::DBusHciInterface

Public Types

typedef Poco::SharedPtr
< HciInterface
Ptr
 
typedef std::function< void(const
MACAddress &, std::vector
< unsigned char > &)> 
WatchCallback
 

Public Member Functions

virtual void up () const =0
 
virtual void reset () const =0
 
virtual bool detect (const MACAddress &address) const =0
 
virtual std::map< MACAddress,
std::string > 
scan () const =0
 
virtual std::map< MACAddress,
std::string > 
lescan (const Poco::Timespan &seconds) const =0
 
virtual HciInfo info () const =0
 
virtual HciConnection::Ptr connect (const MACAddress &address, const Poco::Timespan &timeout) const =0
 
virtual void watch (const MACAddress &address, Poco::SharedPtr< WatchCallback > callBack)=0
 
virtual void unwatch (const MACAddress &address)=0
 

Member Function Documentation

virtual HciConnection::Ptr BeeeOn::HciInterface::connect ( const MACAddress address,
const Poco::Timespan &  timeout 
) const
pure virtual

Connects to device defined by MAC address and loads it's services.

Exceptions
IOExceptionin case of a failure

Implemented in BeeeOn::DBusHciInterface, and BeeeOn::BluezHciInterface.

virtual bool BeeeOn::HciInterface::detect ( const MACAddress address) const
pure virtual

Check state of device with MACAddress.

Returns
true if the device was detected or false
Exceptions
IOExceptionwhen the detection fails for some reason

Implemented in BeeeOn::DBusHciInterface, and BeeeOn::BluezHciInterface.

virtual HciInfo BeeeOn::HciInterface::info ( ) const
pure virtual

Read information about the iterface.

Implemented in BeeeOn::DBusHciInterface, and BeeeOn::BluezHciInterface.

virtual std::map<MACAddress, std::string> BeeeOn::HciInterface::lescan ( const Poco::Timespan &  seconds) const
pure virtual

Full scan of low energy bluetooth network. Sets parameters for low energy scan and open socket.

Returns
list of MAC addresses with names
Exceptions
IOExceptionwhen the detection fails for some reason

Implemented in BeeeOn::DBusHciInterface, and BeeeOn::BluezHciInterface.

virtual void BeeeOn::HciInterface::reset ( ) const
pure virtual

Reset hci interface - turn down & up.

Exceptions
IOExceptionin case of a failure

Implemented in BeeeOn::DBusHciInterface, and BeeeOn::BluezHciInterface.

virtual std::map<MACAddress, std::string> BeeeOn::HciInterface::scan ( ) const
pure virtual

Full scan of bluetooth network. This can find only visible devices.

Returns
map of MAC addresses with names

Implemented in BeeeOn::DBusHciInterface, and BeeeOn::BluezHciInterface.

virtual void BeeeOn::HciInterface::unwatch ( const MACAddress address)
pure virtual

Unregister device to process advertising data.

Implemented in BeeeOn::DBusHciInterface, and BeeeOn::BluezHciInterface.

virtual void BeeeOn::HciInterface::up ( ) const
pure virtual

Try to set hci interface up. The root priviledges of the system might be required.

Exceptions
IOExceptionin case of a failure

Implemented in BeeeOn::DBusHciInterface, and BeeeOn::BluezHciInterface.

virtual void BeeeOn::HciInterface::watch ( const MACAddress address,
Poco::SharedPtr< WatchCallback >  callBack 
)
pure virtual

Register device to process advertising data. After recieving advertising data, the callBack is called.

Exceptions
IOExceptionin case of a failure

Implemented in BeeeOn::DBusHciInterface, and BeeeOn::BluezHciInterface.


The documentation for this class was generated from the following files: