BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions
BeeeOn::DPAMessage Class Referenceabstract

The class represents DPA message that can be sent/received from IQRF network. More...

#include <DPAMessage.h>

Inheritance diagram for BeeeOn::DPAMessage:
BeeeOn::DPARequest BeeeOn::DPAResponse BeeeOn::DPABatchRequest BeeeOn::DPACoordBondedNodesRequest BeeeOn::DPACoordBondNodeRequest BeeeOn::DPACoordClearAllBondsRequest BeeeOn::DPACoordDiscoveryRequest BeeeOn::DPACoordRemoveNodeRequest BeeeOn::DPANodeRemoveBondRequest BeeeOn::DPAOSPeripheralInfoRequest BeeeOn::DPAOSRestartRequest BeeeOn::DPACoordBondedNodesResponse BeeeOn::DPACoordBondNodeResponse BeeeOn::DPACoordRemoveNodeResponse BeeeOn::DPAOSPeripheralInfoResponse

Public Types

typedef Poco::SharedPtr
< DPAMessage
Ptr
 
typedef uint16_t NetworkAddress
 

Public Member Functions

void setNetworkAddress (NetworkAddress node)
 Network device address. More...
 
NetworkAddress networkAddress () const
 
void setPeripheralNumber (uint8_t pNumber)
 Peripheral number: More...
 
uint8_t peripheralNumber () const
 
void setPeripheralCommand (uint8_t pCommand)
 Command specifying an action to be taken. Actually allowed value range depends on the peripheral type. The most significant bit is reserved for indication of DPA response message. More...
 
uint8_t peripheralCommand () const
 
void setHWPID (uint16_t hwPID)
 HW profile ID uniquely specifies the functionality of the device, the user peripherals it implements, its behavior etc. The only device having the same HWPID as the DPA request will execute the request. When 0xFFFF is specified then the device with any HW profile ID will execute the request. Note - HWPID numbers used throughout this document are fictitious ones. More...
 
uint16_t HWPID () const
 
virtual std::string toDPAString () const =0
 Converts vector of values to dpa string. Dpa string contains hex values separated by dot. More...
 
void setPeripheralData (const std::vector< uint8_t > &data)
 An array of bytes. More...
 
std::vector< uint8_t > peripheralData () const
 

Static Public Attributes

static uint16_t COORDINATOR_NODE_ADDRESS = 0x0000
 
static uint16_t DEFAULT_HWPID = 0xffff
 

Protected Member Functions

 DPAMessage (NetworkAddress node, uint8_t pNumber, uint8_t pCommand, uint16_t hwPID, const std::vector< uint8_t > &pData)
 Creates message with DPA content that includes address of node, number of peripheral, command for peripheral and hw PID.
 

Detailed Description

The class represents DPA message that can be sent/received from IQRF network.

Each message contains a header:

Member Function Documentation

void DPAMessage::setHWPID ( uint16_t  hwPID)

HW profile ID uniquely specifies the functionality of the device, the user peripherals it implements, its behavior etc. The only device having the same HWPID as the DPA request will execute the request. When 0xFFFF is specified then the device with any HW profile ID will execute the request. Note - HWPID numbers used throughout this document are fictitious ones.

Value:

  • 0000 Default HW Profile
  • 0001-xxxE Certified HW Profiles
  • xxxF User HW Profiles
  • FFFF Reserved
See Also
https://www.iqrf.org/DpaTechGuide/start.htm (2.5 Message parameters)
void DPAMessage::setNetworkAddress ( DPAMessage::NetworkAddress  node)

Network device address.

Value:

  • 00 IQMESH Coordinator
  • 01-EF IQMESH Node address
  • F0-FB Reserved
  • FC Local (over interface) device
  • FD Reserved
  • FE IQMESH temporary address
  • FF IQMESH broadcast address
  • 100-FFFF Reserved
See Also
https://www.iqrf.org/DpaTechGuide/start.htm (2.5 Message parameters)
void DPAMessage::setPeripheralCommand ( uint8_t  pCommand)

Command specifying an action to be taken. Actually allowed value range depends on the peripheral type. The most significant bit is reserved for indication of DPA response message.

Value:

  • 0-3E command value
  • 3F not available
  • 40-7F command value
  • 80-FF not available
See Also
https://www.iqrf.org/DpaTechGuide/start.htm (2.5 Message parameters)
void DPAMessage::setPeripheralData ( const std::vector< uint8_t > &  data)

An array of bytes.

See Also
https://www.iqrf.org/DpaTechGuide/start.htm (2.5 Message parameters)
void DPAMessage::setPeripheralNumber ( uint8_t  pNumber)

Peripheral number:

  • (0x00 - 0x1F reserved for embedded peripherals)
  • (0x40 - 0x7F reserved for IQRF standard peripherals)

Value:

  • 00 COORDINATOR
  • 01 NODE
  • 02 OS
  • 03 EEPROM
  • 04 EEEPROM
  • 05 RAM
  • 06 LEDR
  • 07 LEDG
  • 08 SPI
  • 09 IO
  • 0A Thermometer
  • 0B PWM [*]
  • 0C UART
  • 0D FRC
  • 0E-1F Reserved
  • 20-3E User peripherals
  • 3F Not available
  • 40-7F Reserved
  • 80-FF Not available
See Also
https://www.iqrf.org/DpaTechGuide/start.htm (2.5 Message parameters)
virtual std::string BeeeOn::DPAMessage::toDPAString ( ) const
pure virtual

Converts vector of values to dpa string. Dpa string contains hex values separated by dot.

Example: 01.00.06.83.ff.ff

Implemented in BeeeOn::DPAResponse, BeeeOn::DPARequest, and BeeeOn::DPABatchRequest.


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