STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
sequencer::DynamicState Struct Reference

One dynamic state, resolved and proven usable. More...

#include <ScriptStates.hpp>

Collaboration diagram for sequencer::DynamicState:
[legend]

Public Attributes

State state = State::UNKNOWN
std::string name
fsw::script::ScriptProgram program
uint32_t timeout_ms = 0
State return_target = State::UNKNOWN
 Where the state lands when the script runs off its end.
State timeout_target = State::UNKNOWN
 Where it lands when timeout_ms expires.
std::vector< std::string > pressure_roles
 Canonical PT role names this script reads, deduplicated.
std::vector< std::string > slug_names
 Parallel to program.slugs — what each slug reference resolves to, decided at load.
std::vector< State > slug_states

Detailed Description

One dynamic state, resolved and proven usable.

Definition at line 23 of file ScriptStates.hpp.

Member Data Documentation

◆ name

◆ pressure_roles

std::vector<std::string> sequencer::DynamicState::pressure_roles

Canonical PT role names this script reads, deduplicated.

The pressure subscriber's subscribe list is the union of these across every dynamic state — Elodin has no wildcard, and deriving the list from the AST is what makes it impossible to subscribe to the wrong table for a role.

Definition at line 36 of file ScriptStates.hpp.

Referenced by sequencer::load_dynamic_states().

◆ program

fsw::script::ScriptProgram sequencer::DynamicState::program

◆ return_target

State sequencer::DynamicState::return_target = State::UNKNOWN

Where the state lands when the script runs off its end.

Definition at line 29 of file ScriptStates.hpp.

Referenced by sequencer::load_dynamic_states(), and sequencer::ScriptRunner::run().

◆ slug_names

std::vector<std::string> sequencer::DynamicState::slug_names

Parallel to program.slugs — what each slug reference resolves to, decided at load.

Resolution cannot fail at runtime this way. A lookup performed mid-script would have to have a failure path, and the only honest thing that path could do is abort a script that is holding valves; doing it here means an unresolvable name is a state that never becomes enterable instead.

names holds the canonical config name for actuator and sensor slugs (empty for states); states holds the resolved State for transition targets (UNKNOWN otherwise).

Definition at line 49 of file ScriptStates.hpp.

Referenced by sequencer::load_dynamic_states().

◆ slug_states

std::vector<State> sequencer::DynamicState::slug_states

Definition at line 50 of file ScriptStates.hpp.

Referenced by sequencer::load_dynamic_states().

◆ state

◆ timeout_ms

uint32_t sequencer::DynamicState::timeout_ms = 0

◆ timeout_target

State sequencer::DynamicState::timeout_target = State::UNKNOWN

Where it lands when timeout_ms expires.

May differ from return_target.

Definition at line 31 of file ScriptStates.hpp.

Referenced by sequencer::load_dynamic_states(), and sequencer::ScriptRunner::run().


The documentation for this struct was generated from the following file: