![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
#include <protocol.h>
Public Member Functions | |
Interface (uint16_t uid=0, uint8_t role=0, uint8_t member=0) | |
Constructor. More... | |
uint16_t | size () const |
Number bytes needed to serialize the message. More... | |
uint16_t | pack (Common::ByteArray &array, uint16_t offset=0) const |
Write the object on to a ByteArray so it can be sent over the network. More... | |
uint16_t | unpack (const Common::ByteArray &array, uint16_t offset=0) |
Read a message from a ByteArray. More... | |
![]() | |
Interface (uint16_t id=0, uint8_t role=0) | |
Constructor. More... | |
uint16_t | size () const |
Number bytes needed to serialize the message. More... | |
uint16_t | pack (Common::ByteArray &array, uint16_t offset=0) const |
Write the object on to a ByteArray so it can be sent over the network. More... | |
uint16_t | unpack (const Common::ByteArray &array, uint16_t offset=0) |
Read a message from a ByteArray. More... | |
Data Fields | |
uint8_t | member |
Interface destination member. More... | |
![]() | |
uint16_t | role: 1 |
Interface role : Server or Client. More... | |
uint16_t | id: 15 |
Identifier of the interface. More... | |
Static Public Attributes | |
static const uint16_t | min_size |
Minimum pack/unpack required data size. | |
![]() | |
static constexpr uint16_t | min_size = sizeof(uint16_t) |
Minimum pack/unpack required data size. | |
Definition at line 93 of file protocol.h.
|
inline |
Constructor.
[in] | uid | interface UID. |
[in] | role | interface role. |
[in] | member | interface member. |
Definition at line 108 of file protocol.h.
uint16_t HF::Protocol::Message::Interface::pack | ( | Common::ByteArray & | array, |
uint16_t | offset = 0 |
||
) | const |
Write the object on to a ByteArray so it can be sent over the network.
The buffer passed in MUST have enough size to hold the serialized object, e.g.,
[in,out] | array | ByteArray reference to write the object to. |
[in] | offset | offset to start writing to. |
uint16_t HF::Protocol::Message::Interface::size | ( | ) | const |
Number bytes needed to serialize the message.
uint16_t HF::Protocol::Message::Interface::unpack | ( | const Common::ByteArray & | array, |
uint16_t | offset = 0 |
||
) |
Read a message from a ByteArray.
[in] | array | ByteArray reference to read the message from. |
[in] | offset | offset to start reading from. |
uint8_t HF::Protocol::Message::Interface::member |
Interface destination member.
Definition at line 99 of file protocol.h.
Referenced by HF::Core::SessionManagement::AbstractClient::get_entries(), HF::Interfaces::SimpleHumidity::Client::read(), HF::Interfaces::SimpleTemperature::Client::read(), HF::Interfaces::SimpleLightSensor::Client::read(), and HF::Core::SessionManagement::AbstractClient::request().