-
-
Notifications
You must be signed in to change notification settings - Fork 5
Advanced Serialization
Andrew Gresyk edited this page Mar 29, 2022
·
3 revisions
-
FSM instance can be stored to
char
buffer and restored from it. -
Serialization can be used for saving FSM to file or network replication.
-
Enable serialization support
#define FFSM2_ENABLE_SERIALIZATION
-
Store FSM instance:
void save(SerialBuffer& buffer) const;
-
Restore FSM instance:
void load(const SerialBuffer& buffer);
-
Data
type:using Data = uint8_t[N];
-
Clear buffer:
void clear();
-
Data
access:Data& data(); const Data& data() const;