![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Helper class that represents the information of a particular version. More...
#include <suota.h>
Public Member Functions | |
Version (const std::string _sw_version="", const std::string _hw_version="", const std::string _url="") | |
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 | |
std::string | sw_version |
Current/Available software version. More... | |
std::string | hw_version |
Current/Minimum required hardware version. More... | |
std::string | url |
Update URL. More... | |
Static Public Attributes | |
static constexpr uint16_t | min_size = 2 * sizeof(uint8_t) |
Minimum pack/unpack required data size. | |
Helper class that represents the information of a particular version.
|
inline |
Constructor.
[in] | _sw_version | software version string. |
[in] | _hw_version | hardware version string. |
[in] | _url | update URL string. |
Definition at line 104 of file suota.h.
uint16_t HF::Core::SUOTA::Version::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. |
Referenced by HF::Core::SUOTA::CheckVersionResponse::pack().
uint16_t HF::Core::SUOTA::Version::size | ( | ) | const |
Number bytes needed to serialize the message.
Referenced by HF::Core::SUOTA::CheckVersionResponse::size().
uint16_t HF::Core::SUOTA::Version::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. |
Referenced by HF::Core::SUOTA::CheckVersionResponse::unpack().
std::string HF::Core::SUOTA::Version::hw_version |
std::string HF::Core::SUOTA::Version::sw_version |