|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include <iostream>#include <map>#include <string>#include "config/Config.hpp"#include "control/PWMTargets.hpp"Go to the source code of this file.
Functions | |
| static void | check (bool ok, const std::string &what) |
| static fsw::config::Config | makeConfig (const std::map< std::string, std::string > &assign, bool declare_board_14=true) |
| assign maps an actuator name to its 4th element; a name absent from it is unassigned. | |
| int | main () |
Variables | |
| static int | g_failures = 0 |
| Which actuators the controller PWMs, resolved from config alone. | |
|
static |
Definition at line 29 of file test_controller_pwm_roles.cpp.
References g_failures, and ok.
Referenced by main().
| int main | ( | ) |
Definition at line 60 of file test_controller_pwm_roles.cpp.
References check(), g_failures, fsw::config::load_from_string(), makeConfig(), r, and fsw::control::resolvePWMTargets().
|
static |
assign maps an actuator name to its 4th element; a name absent from it is unassigned.
Definition at line 36 of file test_controller_pwm_roles.cpp.
References board(), ch(), and fsw::config::load_from_string().
Referenced by main().
|
static |
Which actuators the controller PWMs, resolved from config alone.
An [actuator_roles] entry's optional 4th element — "pwm_fuel" or "pwm_ox" — assigns that actuator to controller_service. It is the single statement of what the controller drives, and the same fact makes ActuatorCommander stop commanding the actuator during a burn, so the two cannot disagree about who owns a valve.
Before this was config-driven, controller_main matched the literal names "Fuel Press"/"LOX Press" and every step had a fallback: a missing role became CH3/CH8 on board 12, an undeclared board became "192.168.2.<board_id>", an empty board table became a synthesized 11-14, and two roles on two boards silently shared the first one's IP. Each drove PWM at whatever hardware happened to sit on the guessed channel, behind a warning in a log nobody reads.
So what is pinned here is mostly the absence of fallbacks: every unresolvable input must be reported rather than substituted, because the caller turns a report into a disabled fire gate.
Pure resolution — no sockets, no files, no dependence on the host's interfaces.
Definition at line 27 of file test_controller_pwm_roles.cpp.