![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Base class for responses. More...
#include <group_table.h>
Public Member Functions | |
Response (Common::Result code=Common::Result::FAIL_UNKNOWN, uint16_t group=0x0000, uint8_t unit=0x00) | |
Constructor. More... | |
Response (Common::Result code, const Entry &entry) | |
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... | |
![]() | |
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... | |
![]() | |
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... | |
Static Public Attributes | |
static constexpr uint16_t | min_size |
Minimum pack/unpack required data size. | |
![]() | |
static constexpr uint16_t | min_size = sizeof(uint8_t) |
Minimum number of bytes required by this message. | |
![]() | |
static constexpr uint16_t | min_size |
Minimum pack/unpack required data size. | |
Additional Inherited Members | |
![]() | |
uint16_t | group |
Group address the entry belongs to. More... | |
uint8_t | unit |
Unit ID to route the group messages to. More... | |
Base class for responses.
Definition at line 156 of file group_table.h.
|
inline |
Constructor.
[in] | code | response code. |
[in] | group | group address for response. |
[in] | unit | unit ID for response. |
Definition at line 165 of file group_table.h.
|
inline |
Constructor.
[in] | code | response code. |
[in] | entry | group entry for response. |
Definition at line 175 of file group_table.h.
|
inline |
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. |
Definition at line 193 of file group_table.h.
References HF_SERIALIZABLE_CHECK, HF::Core::GroupTable::Entry::pack(), HF::Protocol::Response::pack(), and size().
|
inline |
Number bytes needed to serialize the message.
Definition at line 187 of file group_table.h.
References HF::Core::GroupTable::Entry::size(), and HF::Protocol::Response::size().
Referenced by pack(), and unpack().
|
inline |
Read a message from a ByteArray.
[in] | array | ByteArray reference to read the message from. |
[in] | offset | offset to start reading from. |
Definition at line 206 of file group_table.h.
References HF_SERIALIZABLE_CHECK, size(), HF::Core::GroupTable::Entry::unpack(), and HF::Protocol::Response::unpack().