STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
DatabaseConfig.hpp File Reference
#include <cstdint>
#include <string>
#include <utility>
#include <vector>
#include "ElodinClient.hpp"
Include dependency graph for DatabaseConfig.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fsw::elodin::BoardChannels
 Per-board channel info for board-namespaced entity registration. More...
class  fsw::elodin::DatabaseConfig
 Register sensor table schemas with Elodin database. More...
struct  fsw::elodin::DatabaseConfig::T7Table
 Register one LabJack T7's CALIBRATED VTables (calibration_service). More...

Namespaces

namespace  fsw
 Motorized ball valve position: raw ADC counts -> % open.
namespace  fsw::elodin

Functions

std::vector< std::pair< uint8_t, uint8_t > > fsw::elodin::raw_sensor_tables (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)
 Elodin table ids (hi, lo) for the RAW sensor VTables the given boards publish.
std::vector< std::pair< uint8_t, uint8_t > > fsw::elodin::calibrated_sensor_tables (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)
 Elodin table ids for the CALIBRATED VTables, matching register_calibrated_tables() (same encoding as above with a +0x10 channel offset, and ACT at 0x31 rather than 0x30).
std::vector< std::pair< uint8_t, uint8_t > > fsw::elodin::ball_valve_raw_tables (const std::vector< BoardChannels > &bv_boards)
std::vector< std::pair< uint8_t, uint8_t > > fsw::elodin::ball_valve_calibrated_tables (const std::vector< BoardChannels > &bv_boards)
std::vector< std::pair< uint8_t, uint8_t > > fsw::elodin::ball_valve_cmd_tables (const std::vector< BoardChannels > &bv_boards)

Variables

constexpr uint8_t fsw::elodin::kBallValveRawHi = 0x33
 Ball valve boards (BALL_VALVE) have their own type_hi bytes, so a valve never shares a key with an ACTUATOR board on the same board_id % 10 slot (board 71 and actuator board 11 are both slot 1): 0x33 raw position counts BV<n>.CH<m> raw_adc_counts 0x34 calibrated position BV<n>_Cal.CH<m> position_pct, raw_adc, cal_status 0x35 commanded state BV_CMD.B<n>.CH<m> actuator_state (0 closed, 1 open) Low bytes follow the other boards: raw/cmd (n-1)*0x20 + m, calibrated (n-1)*0x20 + 0x10 + m.
constexpr uint8_t fsw::elodin::kBallValveCalHi = 0x34
constexpr uint8_t fsw::elodin::kBallValveCmdHi = 0x35
constexpr std::pair< uint8_t, uint8_t > fsw::elodin::kTableSequencerState {0x50, 0x00}
 Non-sensor tables, named rather than spelled as literals at each use site.
constexpr std::pair< uint8_t, uint8_t > fsw::elodin::kTableControllerState {0x43, 0x00}
constexpr std::pair< uint8_t, uint8_t > fsw::elodin::kTableCalibrationCommand {0x46, 0x00}