BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions
BeeeOn::IQRFDevice Class Reference

IQRFDevice represents information about a particular device from the IQRF network. Each IQRF device is identified by network address. Network address is a unique identifier in IQRF network. Each IQRF device has IQRF transceiver. The MID (Module ID) is globally unique. Each IQRF device can communicate using own or general protocol. More...

#include <IQRFDevice.h>

Inheritance diagram for BeeeOn::IQRFDevice:
BeeeOn::PollableDevice BeeeOn::Loggable

Public Types

typedef Poco::SharedPtr
< IQRFDevice
Ptr
 
- Public Types inherited from BeeeOn::PollableDevice
typedef Poco::SharedPtr
< PollableDevice
Ptr
 

Public Member Functions

 IQRFDevice (IQRFMqttConnector::Ptr connector, const Poco::Timespan &receiveTimeout, DPAMessage::NetworkAddress address, DPAProtocol::Ptr protocol, const RefreshTime &refreshTime, const RefreshTime &refreshTimePeripheralInfo, IQRFEventFirer::Ptr eventFirer)
 
DPAMessage::NetworkAddress networkAddress () const
 
uint32_t mid () const
 
DPAProtocol::Ptr protocol () const
 Protocol that communicates with the coordinator.
 
std::list< ModuleTypemodules () const
 Supported modules on the device. More...
 
uint16_t HWPID () const
 Identification of node in the IQRF repository. Device name and manufacturer can be obtained on the basis of the number.
 
void setHWPID (uint16_t HWPID)
 
DeviceID id () const override
 
std::string vendorName () const
 
std::string productName () const
 
RefreshTime refresh () const override
 Regular period telling how often to call the method PollableDevice::poll(). The refresh must contain a valid time.
 
void poll (Distributor::Ptr distributor) override
 Perform polling for data and ship them via the given distributor.
 
std::string toString () const
 Converts all device parameters into one string for easy viewing.
 
void probe (const Poco::Timespan &methodTimeout)
 Probes information about IQRF device in a network.
 
SensorData obtainValues ()
 
SensorData obtainPeripheralInfo ()
 

Detailed Description

IQRFDevice represents information about a particular device from the IQRF network. Each IQRF device is identified by network address. Network address is a unique identifier in IQRF network. Each IQRF device has IQRF transceiver. The MID (Module ID) is globally unique. Each IQRF device can communicate using own or general protocol.

The class allows to get basic device information such as Mid, supported modules, HWPID, and peripheral info.

Member Function Documentation

DeviceID IQRFDevice::id ( ) const
overridevirtual
Returns
Creates deviceID from:
  • Device Prefix (1B)
  • Zero byte (1B)
  • IQRF MID (4B)
  • HWPID (2B)

Implements BeeeOn::PollableDevice.

uint32_t IQRFDevice::mid ( ) const
Returns
mid unique identification of IQRF transceiver.
list< ModuleType > IQRFDevice::modules ( ) const

Supported modules on the device.

Returns
empty list if device can not obtain modules from device.
DPAMessage::NetworkAddress IQRFDevice::networkAddress ( ) const
Returns
identification of node in the IQRF network.
SensorData IQRFDevice::obtainPeripheralInfo ( )
Returns
SensorData from peripheral info (battery and RSSI) of the sensor.
SensorData IQRFDevice::obtainValues ( )
Returns
SensorData from values measured by the sensor.

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