OtaUpgrade::Mqtt::StandardPayloadParser Class Reference

This parser allows the processing of firmware data that is directly stored to the flash memory using RbootOutputStream. More...

#include <StandardPayloadParser.h>

Inheritance diagram for OtaUpgrade::Mqtt::StandardPayloadParser:
[legend]
Collaboration diagram for OtaUpgrade::Mqtt::StandardPayloadParser:
[legend]

Public Member Functions

 StandardPayloadParser (Storage::Partition part, size_t currentVersion, size_t allowedVersionBytes=24)
 
bool switchRom (const UpdateState &updateState) override
 This method is responsible for switching the rom. This method is NOT restarting the system. It will happen lated in the parse method. More...
 
ReadWriteStreamgetStorageStream (size_t storageSize) override
 Creates new stream to store the firmware update. More...
 
- Public Member Functions inherited from OtaUpgrade::Mqtt::PayloadParser
 PayloadParser (size_t currentPatchVersion, size_t allowedVersionBytes=24)
 
virtual ~PayloadParser ()
 
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...
 

Detailed Description

This parser allows the processing of firmware data that is directly stored to the flash memory using RbootOutputStream.

Constructor & Destructor Documentation

◆ StandardPayloadParser()

OtaUpgrade::Mqtt::StandardPayloadParser::StandardPayloadParser ( Storage::Partition  part,
size_t  currentVersion,
size_t  allowedVersionBytes = 24 
)
inline

Member Function Documentation

◆ getStorageStream()

ReadWriteStream* OtaUpgrade::Mqtt::StandardPayloadParser::getStorageStream ( size_t  storageSize)
overridevirtual

Creates new stream to store the firmware update.

Parameters
size_tstorageSize the requested storage size
Return values
ReadWriteStream*

Implements OtaUpgrade::Mqtt::PayloadParser.

◆ switchRom()

bool OtaUpgrade::Mqtt::StandardPayloadParser::switchRom ( const UpdateState updateState)
overridevirtual

This method is responsible for switching the rom. This method is NOT restarting the system. It will happen lated in the parse method.

Return values
trueif the switch was successful

Implements OtaUpgrade::Mqtt::PayloadParser.


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