|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Variables | |
| HERE = Path(__file__).resolve().parent | |
| STAR = HERE.parents[2] | |
| str | STAND = STAR / "feed-twin" / "backend" / "diagrams" / "ethalox_stand.json" |
| str | TABLES = STAR / "feed-twin" / "backend" / "statemachines" |
| str | LE4 = HERE / "fixtures" / "le4_rocket_and_gse.json" |
| needs_stand | |
| needs_tables = pytest.mark.skipif(not TABLES.is_dir(), reason="no state tables") | |
| ABORTS = frozenset({"Engine Abort", "GSE Abort", "Emergency Abort"}) | |
The DAQ box in the hookup, and the stand's own state table. A hookup with ``channels`` is *wired*: each connector is one cable from one board to one symbol, under the name the DAQ gives it, and the state table opens names. So a row drives the valve on the connector of its name and nothing else -- never a valve the twin's name matching would have picked behind the person's back. A hookup without channels is the old kind and must read, write and bind exactly as it did. The state table can be edited (``StateMachine.to_dict`` / ``machine_from_dict``) and has to come back as the CSV machine it was: the same states, rows, moves, panel and aborts, Idle still held shut. Each check is against what the old behaviour would have done instead, so it fails if the new behaviour were not there.
|
protected |
|
protected |
Definition at line 60 of file test_daq_hookup.py.
Referenced by test_a_connector_joins_its_row_as_a_person_reads_the_name(), test_a_connector_whose_symbol_left_the_drawing_is_matched_by_name_and_said(), test_a_hookup_without_a_box_is_written_and_bound_as_before(), test_a_row_is_built_in_only_where_the_stand_acts_on_it(), test_a_session_on_a_wired_hookup_opens_only_the_wired_valve(), test_a_state_flagged_abort_is_reachable_and_the_name_no_longer_decides(), test_a_table_is_warned_for_only_what_it_lacks(), test_a_table_that_contradicts_itself_is_refused(), test_a_wired_hookup_binds_exactly_its_connectors(), test_a_wired_hookup_with_its_own_table_round_trips(), test_an_abort_flag_written_as_no_is_no(), test_an_edited_table_reads_back_as_the_csv_machine(), test_on_the_vehicle_a_cut_row_is_matched_whatever_case_its_connector_has(), test_on_the_vehicle_an_unwired_row_still_drives_the_tank_top_stand_in(), test_on_the_vehicle_the_box_keeps_the_rocket_and_frees_the_cut_rows(), and test_two_rows_one_name_apart_from_case_are_refused().
|
protected |
``table`` with state ``old`` called ``new`` everywhere it appears.
Definition at line 562 of file test_daq_hookup.py.
Referenced by test_a_table_is_warned_for_only_what_it_lacks().
|
protected |
Definition at line 54 of file test_daq_hookup.py.
Referenced by test_a_connector_joins_its_row_as_a_person_reads_the_name(), test_a_connector_whose_symbol_left_the_drawing_is_matched_by_name_and_said(), test_a_hookup_without_a_box_is_written_and_bound_as_before(), test_a_session_on_a_wired_hookup_opens_only_the_wired_valve(), test_a_wired_hookup_binds_exactly_its_connectors(), and test_a_wired_hookup_with_its_own_table_round_trips().
|
protected |
What :func:`binding` matches names against on a one-page drawing.
Definition at line 64 of file test_daq_hookup.py.
Referenced by test_a_hookup_without_a_box_is_written_and_bound_as_before(), and test_a_wired_hookup_binds_exactly_its_connectors().
| None test_daq_hookup.test_a_box_that_cannot_be_is_refused | ( | list[tuple[str, int, str, str]] | channels, |
| str | said ) |
Definition at line 231 of file test_daq_hookup.py.
| None test_daq_hookup.test_a_connector_joins_its_row_as_a_person_reads_the_name | ( | ) |
"Lox Main" on the box is the table's "LOX Main": typed the way a person types it, the main valve must still open in Fire. Read exactly, it bound nothing and the main was never commanded.
Definition at line 417 of file test_daq_hookup.py.
References _machine(), and _stand().
| ( None ) test_daq_hookup.test_a_connector_whose_symbol_left_the_drawing_is_matched_by_name_and_said | ( | ) |
The drawing redrawn and the main valve given a new id: the box's LOX Main still names the old one. Pinned to nothing, the main would never open in Fire; matched by name, as a pin to a lost valve always was, it does -- and the connector is listed so the stand can say so.
Definition at line 503 of file test_daq_hookup.py.
References _machine(), and _stand().
| None test_daq_hookup.test_a_hookup_without_a_box_is_written_and_bound_as_before | ( | ) |
Definition at line 141 of file test_daq_hookup.py.
References _machine(), _stand(), and _valve_labels().
| None test_daq_hookup.test_a_row_is_built_in_only_where_the_stand_acts_on_it | ( | bool | cut | ) |
LE4 (6) draws the cart charging the COPV, so the built-in charge stands aside and an unwired GSE High Press Control charges nothing: it is not built-in there. The rocket alone has no cart, and the built-in charge is what fills the COPV again. The transfer tank's press is the whole drawing's alone. Held to the stand itself: in GN2 High Press the COPV fills by the built-in, and in Fuel Fill the transfer tank is pressed, exactly when the row is listed.
Definition at line 529 of file test_daq_hookup.py.
References _le4(), and _machine().
| None test_daq_hookup.test_a_session_on_a_wired_hookup_opens_only_the_wired_valve | ( | ) |
Fire opens both mains and both press valves by name; wired with only "LOX Main" on a connector it opens the LOX main and nothing else.
Definition at line 110 of file test_daq_hookup.py.
References _machine(), and _stand().
| None test_daq_hookup.test_a_state_flagged_abort_is_reachable_and_the_name_no_longer_decides | ( | ) |
Definition at line 305 of file test_daq_hookup.py.
References _machine().
| None test_daq_hookup.test_a_table_is_warned_for_only_what_it_lacks | ( | ) |
A state the twin keys on, gone, is warned with its own reason and no other's; a table in which no state loads one side's tank is warned for that side. The DAQ's table, read back, is warned for neither.
Definition at line 577 of file test_daq_hookup.py.
References _machine(), and _renamed().
| None test_daq_hookup.test_a_table_that_contradicts_itself_is_refused | ( | Any | spoil, |
| str | said ) |
Definition at line 296 of file test_daq_hookup.py.
References _machine().
| None test_daq_hookup.test_a_wired_hookup_binds_exactly_its_connectors | ( | ) |
One valve connector, one row cabled to a transducer, one plain PT. Matched by name the stand binds eight rows; wired it binds the one.
Definition at line 80 of file test_daq_hookup.py.
References _machine(), _stand(), and _valve_labels().
| None test_daq_hookup.test_a_wired_hookup_with_its_own_table_round_trips | ( | ) |
Definition at line 180 of file test_daq_hookup.py.
References _machine(), and _stand().
| None test_daq_hookup.test_an_abort_flag_written_as_no_is_no | ( | Any | written | ) |
An abort is reachable from anywhere, so a flag read loosely is an unguarded path: "0" read as a yes made Fire an abort, and Idle -> Fire legal.
Definition at line 428 of file test_daq_hookup.py.
References _machine().
| None test_daq_hookup.test_an_edited_table_reads_back_as_the_csv_machine | ( | ) |
Definition at line 262 of file test_daq_hookup.py.
References _machine().
| None test_daq_hookup.test_on_the_vehicle_a_cut_row_is_matched_whatever_case_its_connector_has | ( | ) |
The connector on the cart's FV-SOL typed "fuel vent": the whole stand joins it to Fuel Vent ignoring case, and so must the rocket alone, whose vent line is still plugged in, or the fuel tank is never vented.
Definition at line 451 of file test_daq_hookup.py.
References _le4(), and _machine().
| None test_daq_hookup.test_on_the_vehicle_an_unwired_row_still_drives_the_tank_top_stand_in | ( | ) |
A cart drawn with no fuel vent solenoid: the whole drawing binds no Fuel Vent, so the box has no connector for it, and on the whole drawing the tank-top disconnect is mated, not a valve the box could take. The rocket alone reads that disconnect as the GSE vent and the old matching vented through it; a saved box must too, or neither Vent nor the burnout vent can empty the fuel tank.
Definition at line 466 of file test_daq_hookup.py.
References _machine().
| None test_daq_hookup.test_on_the_vehicle_the_box_keeps_the_rocket_and_frees_the_cut_rows | ( | ) |
The box cables Fuel Vent to the cart's FV-SOL and GSE High Press Control to HPC_SOL. The rocket alone keeps the cart's vent line (it is plugged in until launch), so Fuel Vent keeps its connector; HPC_SOL is cut, and its row goes back to being matched. LOX Main keeps its connector; LOX Vent, which the name match would bind to the LOX tank's unpaired disconnect, has no connector and stays unbound.
Definition at line 371 of file test_daq_hookup.py.
References _le4(), and _machine().
| None test_daq_hookup.test_the_same_box_without_the_fault_is_accepted | ( | ) |
The refusals above are of the fault, not of the box.
Definition at line 244 of file test_daq_hookup.py.
| None test_daq_hookup.test_the_shipped_panel_places_the_states_and_flags_the_aborts | ( | ) |
Definition at line 347 of file test_daq_hookup.py.
| None test_daq_hookup.test_two_rows_one_name_apart_from_case_are_refused | ( | ) |
Definition at line 442 of file test_daq_hookup.py.
References _machine().
| None test_daq_hookup.test_without_flags_an_abort_is_whatever_says_abort | ( | Path | tmp_path | ) |
No ``<name>_states.csv``: the twin's old rule, by name.
Definition at line 327 of file test_daq_hookup.py.
| test_daq_hookup.ABORTS = frozenset({"Engine Abort", "GSE Abort", "Emergency Abort"}) |
Definition at line 51 of file test_daq_hookup.py.
| test_daq_hookup.HERE = Path(__file__).resolve().parent |
Definition at line 40 of file test_daq_hookup.py.
| str test_daq_hookup.LE4 = HERE / "fixtures" / "le4_rocket_and_gse.json" |
Definition at line 44 of file test_daq_hookup.py.
| test_daq_hookup.needs_stand |
Definition at line 46 of file test_daq_hookup.py.
| test_daq_hookup.needs_tables = pytest.mark.skipif(not TABLES.is_dir(), reason="no state tables") |
Definition at line 49 of file test_daq_hookup.py.
| str test_daq_hookup.STAND = STAR / "feed-twin" / "backend" / "diagrams" / "ethalox_stand.json" |
Definition at line 42 of file test_daq_hookup.py.
| test_daq_hookup.STAR = HERE.parents[2] |
Definition at line 41 of file test_daq_hookup.py.
| str test_daq_hookup.TABLES = STAR / "feed-twin" / "backend" / "statemachines" |
Definition at line 43 of file test_daq_hookup.py.