PayloadParser.h
Go to the documentation of this file.
76 int parse(MqttPayloadParserState& state, mqtt_message_t* message, const char* buffer, int length);
Definition: PayloadParser.h:31
virtual ReadWriteStream * getStorageStream(size_t storageSize)=0
Creates new stream to store the firmware update.
virtual bool switchRom(const UpdateState &updateState)=0
This method is responsible for switching the rom. This method is NOT restarting the system....
PayloadParser(size_t currentPatchVersion, size_t allowedVersionBytes=24)
Definition: PayloadParser.h:44
virtual ~PayloadParser()
Definition: PayloadParser.h:49
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 responsobl...
constexpr int8_t ERROR_INVALID_PATCH_VERSION
Definition: PayloadParser.h:27
constexpr int8_t ERROR_UNKNOWN_REASON
Definition: PayloadParser.h:28
constexpr int8_t ERROR_INVALID_MQTT_MESSAGE
Definition: PayloadParser.h:26
Definition: BasicStream.h:24
Definition: MqttPayloadParser.h:29
Definition: PayloadParser.h:33
std::unique_ptr< ReadWriteStream > stream
Definition: PayloadParser.h:34