#include <PayloadParser.h>
|
| PayloadParser (size_t currentPatchVersion, size_t allowedVersionBytes=24) |
|
virtual | ~PayloadParser () |
|
virtual bool | switchRom (const UpdateState &updateState)=0 |
| This method is responsible for switching the rom. This method is NOT restarting the system. It will happen lated in the parse method. More...
|
|
virtual ReadWriteStream * | getStorageStream (size_t storageSize)=0 |
| Creates new stream to store the firmware update. More...
|
|
int | parse (MqttPayloadParserState &state, mqtt_message_t *message, const char *buffer, int length) |
| This method takes care to read the incoming MQTT message and pass it to the stream that is responsoble for storing the data. More...
|
|
◆ PayloadParser()
OtaUpgrade::Mqtt::PayloadParser::PayloadParser |
( |
size_t |
currentPatchVersion, |
|
|
size_t |
allowedVersionBytes = 24 |
|
) |
| |
|
inline |
- Parameters
-
currentPatchVersion | |
allowedVersionBytes | - maximum allowed bytes to be used for describing a patch version |
◆ ~PayloadParser()
virtual OtaUpgrade::Mqtt::PayloadParser::~PayloadParser |
( |
| ) |
|
|
inlinevirtual |
◆ getStorageStream()
virtual ReadWriteStream* OtaUpgrade::Mqtt::PayloadParser::getStorageStream |
( |
size_t |
storageSize | ) |
|
|
pure virtual |
◆ parse()
int OtaUpgrade::Mqtt::PayloadParser::parse |
( |
MqttPayloadParserState & |
state, |
|
|
mqtt_message_t * |
message, |
|
|
const char * |
buffer, |
|
|
int |
length |
|
) |
| |
This method takes care to read the incoming MQTT message and pass it to the stream that is responsoble for storing the data.
- Return values
-
int | 0 when everything is ok <0 when an error has occurred |
◆ switchRom()
virtual bool OtaUpgrade::Mqtt::PayloadParser::switchRom |
( |
const UpdateState & |
updateState | ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: