STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_hold_rules.cpp File Reference
#include <atomic>
#include <chrono>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <string>
#include <thread>
#include "BoardListener.hpp"
#include "control/HoldParse.hpp"
#include "control/SequencerService.hpp"
#include "control/StateMachine.hpp"
Include dependency graph for test_hold_rules.cpp:

Go to the source code of this file.

Classes

struct  FlowCfg
 Write a config whose flow hold can be varied per case. More...

Enumerations

enum class  State
 System state IDs — must match the TypeScript SystemState enum in web-gui/shared/types.ts. More...

Functions

static void check (bool ok, const std::string &what)
static std::string writeConfig (const FlowCfg &f)
static long long waitForState (SequencerService &svc, State want, int timeout_ms)
 Wait for the service to land in want; returns ms elapsed, or -1 on timeout.
int main ()

Variables

static int g_failures = 0
static fs::path g_dir

Enumeration Type Documentation

◆ State

enum class sequencer::State : uint8_t
strong

System state IDs — must match the TypeScript SystemState enum in web-gui/shared/types.ts.

Definition at line 14 of file StateMachine.hpp.

Function Documentation

◆ check()

void check ( bool ok,
const std::string & what )
static

Definition at line 35 of file test_hold_rules.cpp.

References g_failures, and ok.

Referenced by main().

◆ main()

◆ waitForState()

long long waitForState ( SequencerService & svc,
State want,
int timeout_ms )
static

Wait for the service to land in want; returns ms elapsed, or -1 on timeout.

Definition at line 118 of file test_hold_rules.cpp.

References sequencer::SequencerService::currentState().

Referenced by main().

◆ writeConfig()

Variable Documentation

◆ g_dir

fs::path g_dir
static

Definition at line 41 of file test_hold_rules.cpp.

Referenced by captureStdout(), main(), writeConfig(), writeConfig(), and writeConfig().

◆ g_failures

int g_failures = 0
static

Definition at line 33 of file test_hold_rules.cpp.