![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Parent class for the message payload for a HF::GroupManagement::ADD_CMD
and HF::GroupManagement::REMOVE_CMD
requests.
More...
#include <group_management.h>
Public Member Functions | |
Message (uint16_t group, uint16_t device, uint8_t unit) | |
Constructor. More... | |
Message () | |
Empty 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... | |
![]() | |
GroupAddress (uint16_t address=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... | |
![]() | |
Address (uint16_t _dev=BROADCAST_ADDR, uint8_t _unit=BROADCAST_UNIT, Type _mod=DEVICE) | |
Create a new message address. 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... | |
bool | is_broadcast () |
Checks if this address if for the Protocol::BROADCAST_ADDR and Protocol::BROADCAST_UNIT. More... | |
bool | is_local (uint16_t address) |
Checks if the given device address is equal to the device address present in this Protocol::Address object. More... | |
int | compare (const Address &other) const |
Compare this address with the given address in other . More... | |
Static Public Attributes | |
static constexpr uint16_t | min_size |
Minimum pack/unpack required data size. | |
![]() | |
static constexpr uint16_t | NO_ADDR = 0x0000 |
Empty Group Address. More... | |
static constexpr uint16_t | START_ADDR = 0x0001 |
First HAN-FUN Group Address. More... | |
static constexpr uint16_t | END_ADDR = 0x7FFF |
Last HAN-FUN Group Address. More... | |
static constexpr uint16_t | min_size = sizeof(uint16_t) |
Minimum pack/unpack required data size. | |
![]() | |
static constexpr uint16_t | min_size |
Minimum pack/unpack required data size. | |
Additional Inherited Members | |
![]() | |
enum | Type { DEVICE = 0, GROUP = 1 } |
HAN-FUN Network Destination Address Types. More... | |
![]() | |
uint16_t | address |
Group Address | |
![]() | |
uint16_t | mod: 1 |
Address modifier. More... | |
uint16_t | device: 15 |
Device Address. More... | |
uint8_t | unit |
Source Unit. More... | |
Parent class for the message payload for a HF::GroupManagement::ADD_CMD
and HF::GroupManagement::REMOVE_CMD
requests.
Definition at line 447 of file group_management.h.
|
inline |
Constructor.
[in] | group | the group's address. |
[in] | device | the device's address to add/remove to/from the group. |
[in] | unit | the device's unit ID to add/remove to/from the group. |
Definition at line 456 of file group_management.h.
|
inline |
Empty Constructor.
Mainly used for the unpack function.
Definition at line 465 of file group_management.h.
uint16_t HF::Core::GroupManagement::Message::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::Core::GroupManagement::Message::size | ( | ) | const |
Number bytes needed to serialize the message.
uint16_t HF::Core::GroupManagement::Message::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. |