STATESAVE – Save multiple block states and parameters

Block SymbolLicensing group: ADVANCED
Qt SVG Document Exported by REXYGEN Studio SAVE uChain OutState DONE iE STATESAVE

Function Description
The STATESAVE block stores the values of states and parameters in a file. The file is specified by the filename parameter and is in JSON format, which can usually be reloaded by the STATELOAD block. It is also possible to store data in the OutState output, which is a JSON string in the same format as the file output. The OutState output is used if the filename parameter is empty.

All values configured by the parameters blocks, depth, and mask are stored. The blocks parameter contains relative paths (starting with a dot) to the stored blocks separated by semicolons. If blocks is empty, all blocks of the current subsystem are saved. If the stored block is a subsystem, the depth parameter specifies how many levels are also stored:

  • 0: current level only,
  • n: current level and blocks in subsystems of other n levels.

Furthermore, you can use mask to specify which objects will be stored. Each bit of a number means:

  • 1: inputs,
  • 2: outputs,
  • 4: parameters,
  • 8: internal states,
  • 16: array parameters,
  • 32: array states,
  • 64: cyclic (trend) buffers,
  • 256: metadata (STATESAVE only).

This block does not propagate the signal quality. More information can be found in the 1.4 section.

Input

SAVE

Trigger to save the state

Bool

uChain

Useful for placing the block in the correct execution order

Long (I32)

Parameter

filename

Filename where to store

String

blocks

List of blocks to store

String

depth

Specifies how many levels are stored   0  65535

Long (I32)

mask

Select which objects are saved   0  65535 65535

Long (I32)

SaveOnExit

The file is stored when the configuration is terminated  on

Bool

Output

OutState

JSON string where values are stored if the filename parameter is empty

String

DONE

State has been saved

Bool

iE

Error code

Error

2024 © REX Controls s.r.o., www.rexygen.com