![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
This class contains the required parameters for a SUOTA::UPGRADE_COMPLETE_CMD
command.
More...
#include <suota.h>
Public Types | |
enum | Code { UPGRADE_SUCCESSFUL = 0x00, UPGRADE_ABORTED = 0x11, GMEP_SESSION_ERROR = 0x12, INVALID_IMAGE = 0x13, MEMORY_ACCESS_ERROR = 0x14, BATTERY_TOO_LOW = 0x15, FAIL_UNKNOWN = Common::FAIL_UNKNOWN } |
Possible status in a. More... | |
Public Member Functions | |
UpgradeStatus (Code _code=FAIL_UNKNOWN, std::string _sw_version="") | |
Software version after update. 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 |
Update status. | |
Static Public Attributes | |
static constexpr uint16_t | min_size = sizeof(uint8_t) |
Minimum pack/unpack required data size. | |
This class contains the required parameters for a SUOTA::UPGRADE_COMPLETE_CMD
command.
Possible status in a.
Definition at line 205 of file suota.h.
|
inline |
Software version after update.
Constructor.
[in] | _code | update status to send in the command. |
[in] | _sw_version | new software version of the update. |
Definition at line 225 of file suota.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 240 of file suota.h.
References HF_SERIALIZABLE_CHECK, HF::Common::SerializableHelper< T, typename >::pack(), size(), sw_version, and HF::Common::ByteArray::write().
|
inline |
Number bytes needed to serialize the message.
Definition at line 232 of file suota.h.
References HF::Common::SerializableHelper< T, typename >::size(), and sw_version.
Referenced by pack().
|
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 258 of file suota.h.
References HF_SERIALIZABLE_CHECK, min_size, HF::Common::ByteArray::read(), sw_version, and HF::Common::SerializableHelper< T, typename >::unpack().