STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
anonymous_namespace{main.cpp} Namespace Reference

state_script_check — validate a dynamic-state script against a config, and exit 0 or 1. More...

Classes

class  CoutToStderr
 Sends anything written to std::cout to stderr for as long as it is alive. More...

Functions

SPIFlash flash (MX25_PIN_CS)
void printDivider ()
bool fillTestPattern (uint8_t *buf, size_t len)
bool verifyPattern (const uint8_t *buf, size_t len)
int usage ()
bool readFile (const std::string &path, std::string &out)

Detailed Description

state_script_check — validate a dynamic-state script against a config, and exit 0 or 1.

Hermetic. Opens no sockets, touches no boards, starts no services, reads exactly the two files it is given. It is in the same family as cppcheck, not in the family of things daq-server/CLAUDE.md forbids running.

This exists so the config editor can say "line 4: unknown actuator" at the operator's desk, between sessions, when no sequencer is running. The web backend spawns it on save. It is early warning only — the sequencer parses the script itself at startup and is the authority on whether a state becomes enterable, so a stale checker binary degrades the editing experience and never the stand.

state_script_check –config <config.toml> –state <"State Name"> [–transitions <csv>] <script>

Output is one diagnostic per line: <line>:<col>: <CODE> <message>, which is what the backend parses back into the editor's gutter.

Function Documentation

◆ fillTestPattern()

bool anonymous_namespace{main.cpp}::fillTestPattern ( uint8_t * buf,
size_t len )

Definition at line 17 of file main.cpp.

Referenced by setup().

◆ flash()

SPIFlash anonymous_namespace{main.cpp}::flash ( MX25_PIN_CS )

References MX25_PIN_CS.

Referenced by setup().

◆ printDivider()

void anonymous_namespace{main.cpp}::printDivider ( )

Definition at line 10 of file main.cpp.

References Serial.

Referenced by setup().

◆ readFile()

bool anonymous_namespace{main.cpp}::readFile ( const std::string & path,
std::string & out )

Definition at line 60 of file main.cpp.

Referenced by main().

◆ usage()

int anonymous_namespace{main.cpp}::usage ( )

Definition at line 34 of file main.cpp.

Referenced by main().

◆ verifyPattern()

bool anonymous_namespace{main.cpp}::verifyPattern ( const uint8_t * buf,
size_t len )

Definition at line 23 of file main.cpp.

Referenced by setup().