STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fsw::config::StateDef Struct Reference

#include <Config.hpp>

Collaboration diagram for fsw::config::StateDef:
[legend]

Public Attributes

int id = -1
std::string name
bool is_abort = false
bool is_boot = false
bool is_flow = false
 Marks the state the characterization hold drives.
std::string script_file
 Script filename inside the profile's scripts/ directory, e.g.
uint32_t script_timeout_ms = 0
 Wall-clock ceiling for the whole script, in milliseconds.
std::string script_return_target
 Where the state lands when the script runs off its end without calling transition_to.
std::string script_timeout_target
 Where the state lands when script_timeout_ms expires.

Detailed Description

Definition at line 155 of file Config.hpp.

Member Data Documentation

◆ id

◆ is_abort

bool fsw::config::StateDef::is_abort = false

◆ is_boot

bool fsw::config::StateDef::is_boot = false

◆ is_flow

bool fsw::config::StateDef::is_flow = false

Marks the state the characterization hold drives.

A flag rather than a name in [flow], so renaming the state cannot break it. First one wins, as with is_boot.

Definition at line 162 of file Config.hpp.

Referenced by fsw::config::anonymous_namespace{Config.cpp}::from_table().

◆ name

std::string fsw::config::StateDef::name

◆ script_file

std::string fsw::config::StateDef::script_file

Script filename inside the profile's scripts/ directory, e.g.

"copv_press.script".

A bare filename, never a path — it arrives from operator-editable config and the backend writes files at this name, so it must match ^[A-Za-z0-9_-]+.script$ with no separators and no "..". Empty means this state is not dynamic.

The script lives beside config.toml rather than inside it because writeConfig() is a full TOML re-stringify that destroys every comment and all layout on each save. Out of the TOML, a script survives a config save byte-for-byte and diffs cleanly.

Definition at line 182 of file Config.hpp.

Referenced by fsw::config::anonymous_namespace{Config.cpp}::from_table().

◆ script_return_target

std::string fsw::config::StateDef::script_return_target

Where the state lands when the script runs off its end without calling transition_to.

Mandatory. Unreachable when every path ends in an explicit transition_to, and required anyway — it is the backstop for the path the author did not think about.

Definition at line 192 of file Config.hpp.

Referenced by fsw::config::anonymous_namespace{Config.cpp}::from_table().

◆ script_timeout_ms

uint32_t fsw::config::StateDef::script_timeout_ms = 0

Wall-clock ceiling for the whole script, in milliseconds.

Mandatory for a dynamic state: an unbounded script has no safe degraded mode, so config that omits it leaves the state not enterable rather than enterable-and-unbounded.

Definition at line 187 of file Config.hpp.

Referenced by fsw::config::anonymous_namespace{Config.cpp}::from_table().

◆ script_timeout_target

std::string fsw::config::StateDef::script_timeout_target

Where the state lands when script_timeout_ms expires.

Mandatory, and deliberately NOT defaulted to script_return_target: a runaway may want somewhere more conservative than a clean finish, and a safety landing that appears by default is the kind that is wrong silently.

Definition at line 198 of file Config.hpp.

Referenced by fsw::config::anonymous_namespace{Config.cpp}::from_table().


The documentation for this struct was generated from the following file:
  • daq-server/diablo_server/lib/include/config/Config.hpp