HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
HF::Protocol::GetAttributePack::Request Struct Reference

This class represents the payload of a HF::Message::GET_ATTR_PACK_REQ request, when the payload is Type::DYNAMIC. More...

#include <attributes.h>

+ Collaboration diagram for HF::Protocol::GetAttributePack::Request:

Public Member Functions

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

HF::Attributes::UIDS attributes
 Vector containing the attributes UID's to get. More...
 
uint8_t count
 Unpack attribute count. More...
 

Detailed Description

This class represents the payload of a HF::Message::GET_ATTR_PACK_REQ request, when the payload is Type::DYNAMIC.

Definition at line 892 of file attributes.h.

Member Function Documentation

◆ pack()

uint16_t HF::Protocol::GetAttributePack::Request::pack ( Common::ByteArray array,
uint16_t  offset = 0 
) const
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.,

Serializable obj;
ByteArray payload(obj.size());
obj.pack(payload);
Parameters
[in,out]arrayByteArray reference to write the object to.
[in]offsetoffset to start writing to.
Returns
the number of bytes written.

Definition at line 917 of file attributes.h.

References attributes.

918  {
919  return attributes.pack(array, offset);
920  }
HF::Attributes::UIDS attributes
Vector containing the attributes UID&#39;s to get.
Definition: attributes.h:894

◆ size()

uint16_t HF::Protocol::GetAttributePack::Request::size ( ) const
inline

Number bytes needed to serialize the message.

Returns
number of bytes the message requires to be serialized.

Definition at line 911 of file attributes.h.

References attributes.

912  {
913  return attributes.size();
914  }
HF::Attributes::UIDS attributes
Vector containing the attributes UID&#39;s to get.
Definition: attributes.h:894

◆ unpack()

uint16_t HF::Protocol::GetAttributePack::Request::unpack ( const Common::ByteArray array,
uint16_t  offset = 0 
)
inline

Read a message from a ByteArray.

Parameters
[in]arrayByteArray reference to read the message from.
[in]offsetoffset to start reading from.
Returns
the number of bytes read.

Definition at line 923 of file attributes.h.

References attributes, and count.

924  {
925  return attributes.unpack(array, offset, count);
926  }
uint8_t count
Unpack attribute count.
Definition: attributes.h:902
HF::Attributes::UIDS attributes
Vector containing the attributes UID&#39;s to get.
Definition: attributes.h:894

Field Documentation

◆ attributes

HF::Attributes::UIDS HF::Protocol::GetAttributePack::Request::attributes

Vector containing the attributes UID's to get.

Definition at line 894 of file attributes.h.

Referenced by pack(), size(), and unpack().

◆ count

uint8_t HF::Protocol::GetAttributePack::Request::count

Unpack attribute count.

Warning
This value will not be used as the number of attributes, when packing the request.

Definition at line 902 of file attributes.h.

Referenced by unpack().


The documentation for this struct was generated from the following file: