28class SimpleState :
public StateStorageInterface {
30 explicit SimpleState(Storage *storage, uint32_t offset);
33 void initSectionPreamble(SectionPreamble *preamble)
override;
35 bool writeSectionPreamble()
override;
36 bool initFromStorage()
override;
37 void deleteAll()
override;
38 bool prepareSaveState()
override;
39 bool prepareSizeCheck()
override;
40 bool prepareLoadState()
override;
41 bool readState(
unsigned char *,
int)
override;
42 bool writeState(
const unsigned char *,
int)
override;
43 bool finalizeSaveState()
override;
44 bool finalizeSizeCheck()
override;
45 bool finalizeLoadState()
override;
48 uint32_t sectionOffset = 0;
49 uint32_t elementStateOffset = 0;
50 uint32_t elementStateSize = 0;
51 uint32_t stateSectionNewSize = 0;
52 uint32_t currentStateOffset = 0;
53 uint16_t storedCrc = 0;
55 bool elementStateCrcCValid =
false;