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

Go to the source code of this file.

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 writeFixture (const fs::path &dir, uint16_t port, double staged_delay_s)
 Channel 1 = Vent Valve, channel 2 = Staged Valve (which the Armed column staggers).
static int countCommands (const std::vector< daqtest::Burst > &bursts, uint8_t ch, uint8_t hw)
 How many distinct bursts commanded ch to hw.
int main ()
long long firstCommand (const std::vector< Burst > &bursts, uint8_t ch, uint8_t hw, long long after_ms=-1)
 When ch was first commanded to hw at or after after_ms.

Variables

static int g_failures = 0

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 40 of file test_script_positions.cpp.

References g_failures, and ok.

Referenced by main().

◆ countCommands()

int countCommands ( const std::vector< daqtest::Burst > & bursts,
uint8_t ch,
uint8_t hw )
static

How many distinct bursts commanded ch to hw.

Definition at line 69 of file test_script_positions.cpp.

References b, and ch().

Referenced by main().

◆ firstCommand()

long long daqtest::firstCommand ( const std::vector< Burst > & bursts,
uint8_t ch,
uint8_t hw,
long long after_ms = -1 )
inline

When ch was first commanded to hw at or after after_ms.

-1 if it never was.

Definition at line 133 of file BoardListener.hpp.

Referenced by main().

◆ main()

◆ writeFixture()

std::string writeFixture ( const fs::path & dir,
uint16_t port,
double staged_delay_s )
static

Channel 1 = Vent Valve, channel 2 = Staged Valve (which the Armed column staggers).

Definition at line 47 of file test_script_positions.cpp.

References port.

Referenced by main().

Variable Documentation

◆ g_failures

int g_failures = 0
static

Definition at line 38 of file test_script_positions.cpp.