PawnLibs/save
Summary
A helper library for packing and unpacking application state data.
Description
Pawn works with cells which has a size of 4 bytes. Native interfaces handling generic data like application state have size limits for that data. If application does not need to work with a large numbers, several values can be packed into a single cell. This library provides some convenient functions to pack and unpack such values from array of cells which can be saved or loaded on/from flash.
Example
TBD
PawnLibs/save/SaveGetData
Summary
Get packed data to store on flash.
Synopsis
Return value
Packed data to store.
See also
- saveState()
PawnLibs/save/SaveReadSignedValue
Summary
Read specified number of bits of packed signed value.
Synopsis
Inputs
- bits - a number of bits to get
Return value
Unpacked signed value.
PawnLibs/save/SaveReadValue
Summary
Read specified number of bits of packed unsigned value.
Synopsis
Inputs
- bits - a number of bits to get
Return value
Unpacked unsigned value.
PawnLibs/save/SaveReset
Summary
Reset state before storing new data to pack.
Synopsis
PawnLibs/save/SaveSetData
Summary
Populate state with a new data to unpack.
Synopsis
Inputs
- pkt - application state data to unpack
See also
- ON_Init()
- ON_Load()
PawnLibs/save/SaveWriteSignedValue
Summary
Store specified number of bits from some signed value.
Synopsis
Inputs
- value - a value to store data from
- bits - a number of bits to store
PawnLibs/save/SaveWriteValue
Summary
Store specified number of bits from some unsigned value.
Synopsis
Inputs
- value - a value to store data from
- bits - a number of bits to store