BasicStream.h
Go to the documentation of this file.
114 // Instead of RbootOutputStream, the rboot write API is used directly because in a future extension the OTA file may contain data for multiple FLASH regions.
A write-only stream to parse and apply firmware unencrypted upgrade files generated by otatool....
Definition: BasicStream.h:45
BasicStream()
uint16_t readMemoryBlock(char *data, int bufSize) override
Read a block of memory.
Definition: BasicStream.h:87
void setError(Error ec)
virtual int available() override
Return the total length of the stream.
Definition: BasicStream.h:91
Error errorCode
Error code. Only relevant if hasError() returns true.
Definition: BasicStream.h:67
@ RomActivationFailed
Error while activating updated ROM slot.
@ None
No error occurred thus far (default value of errorCode if hasError() returns false)
@ UnsupportedData
Some content of the upgrade file is not supported by this version of OtaUpgradeStream.
@ RomTooLarge
The contained ROM image does not fit into the application firmware slot.
@ DecryptionFailed
Decryption failed. Probably wrong decryption key.
@ VerificationFailed
Signature/checksum verification failed - updated ROM not activated.
@ InvalidFormat
Invalid/unsupported upgrade file format.
@ NoRomFound
The file did not contain a ROM image suitable for the start address of the slot to upgrade.
@ FlashWriteFailed
Error while writing to Flash memory.
@ DowngradeNotAllowed
Attempt to downgrade to older firmware version.
bool isFinished() override
Check if all data has been read.
Definition: BasicStream.h:95
size_t write(const uint8_t *data, size_t size) override
Process chunk of upgrade file.
bool hasError() const
Returns true if an error happened during the upgrade process.
Definition: BasicStream.h:81
Hash VerificationData
Checksum type.
Definition: ChecksumVerifier.h:25
Definition: BasicStream.h:24
Definition: FileFormat.h:24
Definition: FileFormat.h:34