![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Wrapper for classes that implement the Serializable concept. More...
#include <common.h>
Public Member Functions | |
uint16_t | size () const |
Number bytes needed to serialize the message. More... | |
uint16_t | pack (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 ByteArray &array, uint16_t offset=0) |
Read a message from a ByteArray. More... | |
![]() | |
virtual | ~Serializable () |
Destructor. | |
Data Fields | |
T | data |
Data type instance wrapped. | |
Wrapper for classes that implement the Serializable concept.
T | data type to warp. |
Definition at line 496 of file inc/hanfun/common.h.
|
inlinevirtual |
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. |
Implements HF::Common::Serializable.
Definition at line 514 of file inc/hanfun/common.h.
Referenced by HF::Core::SUOTA::UpgradeStatus::pack(), HF::Attributes::Attribute< bool >::pack(), HF::Attributes::Attribute< T, _Owner, EnableIf(IsParent(HF::Interface, _Owner))>::pack(), and HF::Common::SerializableHelper< std::string >::pack().
|
inlinevirtual |
Number bytes needed to serialize the message.
Implements HF::Common::Serializable.
Definition at line 509 of file inc/hanfun/common.h.
Referenced by HF::Common::SerializableHelper< bool >::pack(), HF::Common::SerializableHelper< T, EnableIf(IsClassPointer(T))>::pack(), HF::Common::SerializableHelper< Common::ByteArray >::pack(), HF::Common::SerializableHelper< std::vector< uint8_t > >::pack(), HF::Core::SUOTA::UpgradeStatus::size(), HF::Attributes::Attribute< bool >::size(), HF::Attributes::Attribute< T, _Owner, EnableIf(IsParent(HF::Interface, _Owner))>::size(), HF::Common::SerializableHelper< std::string >::size(), HF::Common::SerializableHelper< bool >::unpack(), HF::Common::SerializableHelper< T, EnableIf(IsClassPointer(T))>::unpack(), and HF::Common::SerializableHelper< std::vector< uint8_t > >::unpack().
|
inlinevirtual |
Read a message from a ByteArray.
[in] | array | ByteArray reference to read the message from. |
[in] | offset | offset to start reading from. |
Implements HF::Common::Serializable.
Definition at line 520 of file inc/hanfun/common.h.
Referenced by HF::Core::SUOTA::UpgradeStatus::unpack(), HF::Attributes::Attribute< bool >::unpack(), HF::Attributes::Attribute< T, _Owner, EnableIf(IsParent(HF::Interface, _Owner))>::unpack(), and HF::Common::SerializableHelper< std::string >::unpack().