STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fsw::elodin::DatabaseConfig Class Reference

Register sensor table schemas with Elodin database. More...

#include <DatabaseConfig.hpp>

Classes

struct  T7Table
 Register one LabJack T7's CALIBRATED VTables (calibration_service). More...

Static Public Member Functions

static bool register_environmental_tables (ElodinClient &client, const std::vector< BoardChannels > &boards)
static bool register_tables (ElodinClient &client, const std::vector< BoardChannels > &pt_boards, const std::vector< BoardChannels > &act_boards, const std::vector< BoardChannels > &tc_boards, const std::vector< BoardChannels > &rtd_boards, const std::vector< BoardChannels > &lc_boards, const std::vector< BoardChannels > &enc_boards)
 Register RAW sensor / actuator VTables.
static bool register_calibrated_tables (ElodinClient &client, const std::vector< BoardChannels > &pt_boards, const std::vector< BoardChannels > &tc_boards, const std::vector< BoardChannels > &rtd_boards, const std::vector< BoardChannels > &lc_boards, const std::vector< BoardChannels > &enc_boards, const std::vector< BoardChannels > &act_boards)
 Register CALIBRATED VTables.
static bool register_heartbeat_tables (ElodinClient &client, const std::vector< uint8_t > &board_ids)
 Register BOARD_HEARTBEAT VTables for specific board IDs.
static bool register_self_test_tables (ElodinClient &client, const std::vector< uint8_t > &board_ids)
 Register SELF_TEST VTables for specific board IDs.
static bool register_t7_raw_tables (ElodinClient &client, uint8_t slot, const std::vector< uint8_t > &ains, bool cjc)
 Register one LabJack T7's RAW VTables (t7_bridge).
static bool register_t7_calibrated_tables (ElodinClient &client, uint8_t slot, const std::vector< T7Table > &tables)
static bool register_ball_valve_tables (ElodinClient &client, const std::vector< BoardChannels > &bv_boards)
 Register ball valve RAW position VTables [0x33] (daq_bridge).
static bool register_ball_valve_calibrated_tables (ElodinClient &client, const std::vector< BoardChannels > &bv_boards)
 Register ball valve CALIBRATED position VTables [0x34] (calibration_service).
static bool register_ball_valve_cmd_tables (ElodinClient &client, const std::vector< BoardChannels > &bv_boards)
 Register ball valve commanded-state VTables [0x35] (sequencer_service).
static bool register_non_sensor_tables (ElodinClient &client, const std::vector< BoardChannels > &act_boards={})
 Register sequencer/controller and ACT_CMD tables.

Detailed Description

Register sensor table schemas with Elodin database.

All VTables use board-namespaced entity names (e.g. PT1.CH1, TC1.CH5, ACT2.CH3). Role names (e.g. "Fuel Upstream") are metadata only — the frontend maps channel → display name from config.toml at render time.

Two separate entry points:

Definition at line 84 of file DatabaseConfig.hpp.

Member Function Documentation

◆ register_ball_valve_calibrated_tables()

bool fsw::elodin::DatabaseConfig::register_ball_valve_calibrated_tables ( ElodinClient & client,
const std::vector< BoardChannels > & bv_boards )
static

Register ball valve CALIBRATED position VTables [0x34] (calibration_service).

Definition at line 636 of file DatabaseConfig.cpp.

References board(), ch(), fsw::elodin::kBallValveCalHi, ok, and fsw::elodin::register_calibrated_vtable().

Referenced by main().

◆ register_ball_valve_cmd_tables()

bool fsw::elodin::DatabaseConfig::register_ball_valve_cmd_tables ( ElodinClient & client,
const std::vector< BoardChannels > & bv_boards )
static

Register ball valve commanded-state VTables [0x35] (sequencer_service).

Definition at line 652 of file DatabaseConfig.cpp.

References board(), ch(), fsw::elodin::kBallValveCmdHi, ok, and fsw::elodin::register_actuator_state_vtable().

Referenced by sequencer::SequencerService::tryConnectElodin().

◆ register_ball_valve_tables()

bool fsw::elodin::DatabaseConfig::register_ball_valve_tables ( ElodinClient & client,
const std::vector< BoardChannels > & bv_boards )
static

Register ball valve RAW position VTables [0x33] (daq_bridge).

Definition at line 620 of file DatabaseConfig.cpp.

References board(), ch(), fsw::elodin::kBallValveRawHi, ok, and fsw::elodin::register_raw_sensor_vtable().

Referenced by main().

◆ register_calibrated_tables()

bool fsw::elodin::DatabaseConfig::register_calibrated_tables ( ElodinClient & client,
const std::vector< BoardChannels > & pt_boards,
const std::vector< BoardChannels > & tc_boards,
const std::vector< BoardChannels > & rtd_boards,
const std::vector< BoardChannels > & lc_boards,
const std::vector< BoardChannels > & enc_boards,
const std::vector< BoardChannels > & act_boards )
static

Register CALIBRATED VTables.

Entity names: PT<board_number>_Cal.CH<n>, TC<board_number>_Cal.CH<n>, etc.

Definition at line 356 of file DatabaseConfig.cpp.

References board(), ch(), and fsw::elodin::register_calibrated_vtable().

Referenced by main().

◆ register_environmental_tables()

bool fsw::elodin::DatabaseConfig::register_environmental_tables ( ElodinClient & client,
const std::vector< BoardChannels > & boards )
static

Definition at line 26 of file DatabaseConfig.cpp.

References board(), ok, and fsw::elodin::send_msg().

Referenced by main().

◆ register_heartbeat_tables()

bool fsw::elodin::DatabaseConfig::register_heartbeat_tables ( ElodinClient & client,
const std::vector< uint8_t > & board_ids )
static

Register BOARD_HEARTBEAT VTables for specific board IDs.

Definition at line 448 of file DatabaseConfig.cpp.

References board_id, and fsw::elodin::send_msg().

Referenced by main().

◆ register_non_sensor_tables()

bool fsw::elodin::DatabaseConfig::register_non_sensor_tables ( ElodinClient & client,
const std::vector< BoardChannels > & act_boards = {} )
static

◆ register_self_test_tables()

bool fsw::elodin::DatabaseConfig::register_self_test_tables ( ElodinClient & client,
const std::vector< uint8_t > & board_ids )
static

Register SELF_TEST VTables for specific board IDs.

Definition at line 519 of file DatabaseConfig.cpp.

References board_id, fsw::elodin::register_self_test_vtable(), and fsw::elodin::SELF_TEST_MAX_SENSOR.

Referenced by main().

◆ register_t7_calibrated_tables()

bool fsw::elodin::DatabaseConfig::register_t7_calibrated_tables ( ElodinClient & client,
uint8_t slot,
const std::vector< T7Table > & tables )
static

Definition at line 243 of file DatabaseConfig.cpp.

References ok, and tables().

Referenced by main().

◆ register_t7_raw_tables()

bool fsw::elodin::DatabaseConfig::register_t7_raw_tables ( ElodinClient & client,
uint8_t slot,
const std::vector< uint8_t > & ains,
bool cjc )
static

Register one LabJack T7's RAW VTables (t7_bridge).

Per AIN: table {0x26, (slot-1)*0x20 + ain}, entity T7<slot>.AIN<ain>, fields timestamp_ns, channel_id, volts (f32), sample_ts_ms, status — T7RawMessage. With cjc, also the cold-junction table {0x26, (slot-1)*0x20 + 0x0F}, entity T7<slot>.CJC, field temperature_c (f32) in the same layout.

Definition at line 226 of file DatabaseConfig.cpp.

References ok.

Referenced by anonymous_namespace{t7_bridge_main.cpp}::run_board().

◆ register_tables()

bool fsw::elodin::DatabaseConfig::register_tables ( ElodinClient & client,
const std::vector< BoardChannels > & pt_boards,
const std::vector< BoardChannels > & act_boards,
const std::vector< BoardChannels > & tc_boards,
const std::vector< BoardChannels > & rtd_boards,
const std::vector< BoardChannels > & lc_boards,
const std::vector< BoardChannels > & enc_boards )
static

Register RAW sensor / actuator VTables.

Each vector lists boards with their local channels. Entity names: PT<board_number>.CH<n>, ACT<board_number>.CH<n>, etc.

Definition at line 256 of file DatabaseConfig.cpp.

References board(), ch(), and fsw::elodin::register_raw_sensor_vtable().

Referenced by main().


The documentation for this class was generated from the following files: