6 #include <Poco/SharedPtr.h>
7 #include <Poco/JSON/Object.h>
24 typedef Poco::SharedPtr<DPAMessage> Ptr;
25 typedef uint16_t NetworkAddress;
27 static uint16_t COORDINATOR_NODE_ADDRESS;
28 static uint16_t DEFAULT_HWPID;
49 NetworkAddress networkAddress()
const;
82 uint8_t peripheralNumber()
const;
99 uint8_t peripheralCommand()
const;
119 uint16_t HWPID()
const;
135 std::vector<uint8_t> peripheralData()
const;
147 const std::vector<uint8_t> &pData
151 NetworkAddress m_nodeAddress;
152 uint8_t m_peripheralNumber;
153 uint8_t m_peripheralCommand;
155 std::vector<uint8_t> m_peripheralData;
The class represents DPA message that can be sent/received from IQRF network.
Definition: DPAMessage.h:22
void setPeripheralCommand(uint8_t pCommand)
Command specifying an action to be taken. Actually allowed value range depends on the peripheral type...
Definition: DPAMessage.cpp:44
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.
Definition: DPAMessage.cpp:10
void setPeripheralData(const std::vector< uint8_t > &data)
An array of bytes.
Definition: DPAMessage.cpp:64
void setHWPID(uint16_t hwPID)
HW profile ID uniquely specifies the functionality of the device, the user peripherals it implements...
Definition: DPAMessage.cpp:54
void setPeripheralNumber(uint8_t pNumber)
Peripheral number:
Definition: DPAMessage.cpp:34
virtual std::string toDPAString() const =0
Converts vector of values to dpa string. Dpa string contains hex values separated by dot...
void setNetworkAddress(NetworkAddress node)
Network device address.
Definition: DPAMessage.cpp:24