STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_state_script.cpp File Reference
#include <iostream>
#include <string>
#include <vector>
#include "script/StateScript.hpp"
Include dependency graph for test_state_script.cpp:

Go to the source code of this file.

Classes

struct  Accept
struct  Reject

Functions

static void check (bool ok, const std::string &what)
static SlugTables tables ()
 The tables every case validates against.
static std::vector< Diagnostic > run (const std::string &src, const SlugTables &t)
 Parse then validate, returning every diagnostic in one list the way a caller would see them.
int main ()

Variables

static int g_failures = 0
static const std::vector< Accept > kAccept
static const std::vector< Reject > kReject

Function Documentation

◆ check()

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

Definition at line 25 of file test_state_script.cpp.

References g_failures, and ok.

Referenced by main().

◆ main()

◆ run()

std::vector< Diagnostic > run ( const std::string & src,
const SlugTables & t )
static

Parse then validate, returning every diagnostic in one list the way a caller would see them.

Definition at line 215 of file test_state_script.cpp.

References fsw::script::parse(), r, and fsw::script::validate().

◆ tables()

SlugTables tables ( )
static

The tables every case validates against.

Deliberately includes the cross-namespace collisions that exist on the shipped profiles: FUEL_VENT is both a valve and a state on server, and FUEL_UPSTREAM is both a valve and a sensor on digital-twin.

Definition at line 34 of file test_state_script.cpp.

Referenced by fsw::control::ControllerService::connectSubscriber(), sequencer::load_dynamic_states(), main(), main(), fsw::elodin::DatabaseConfig::register_t7_calibrated_tables(), sequencer::PressureFeed::runLoop(), and fsw::script::validate().

Variable Documentation

◆ g_failures

int g_failures = 0
static

Definition at line 23 of file test_state_script.cpp.

◆ kAccept

const std::vector<Accept> kAccept
static

Definition at line 72 of file test_state_script.cpp.

Referenced by main().

◆ kReject

const std::vector<Reject> kReject
static

Definition at line 166 of file test_state_script.cpp.

Referenced by main().