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

Every PT / LC / TC input on every enabled T7, from config. More...

#include <T7Calibration.hpp>

Collaboration diagram for fsw::t7::T7CalibrationMap:
[legend]

Public Member Functions

 T7CalibrationMap ()=default
 T7CalibrationMap (const config::Config &cfg)
const T7CalChannel * by_uid (uint16_t uid) const
const T7CalChannel * by_table (uint8_t slot, uint8_t ain) const
 The input behind raw table {0x26, (slot-1)*0x20 + ain}, or nullptr.
const std::vector< T7CalChannel > & all () const
std::vector< uint8_t > tc_slots () const
 Slots with at least one TC (they publish a cold-junction table).
std::vector< std::pair< uint8_t, uint8_t > > raw_tables () const
 Raw tables calibration_service subscribes to: every input above, plus each TC slot's CJC.
bool empty () const

Private Attributes

std::vector< T7CalChannel > channels_
std::map< uint16_t, size_t > by_uid_
std::map< std::pair< uint8_t, uint8_t >, size_t > by_table_

Detailed Description

Every PT / LC / TC input on every enabled T7, from config.

VOLTAGE inputs are left out (they have nothing to calibrate). Built only from a config t7_bridge would accept: when Config::t7_errors is non-empty the map is empty, because the bridge is not streaming either.

Definition at line 68 of file T7Calibration.hpp.

Constructor & Destructor Documentation

◆ T7CalibrationMap() [1/2]

fsw::t7::T7CalibrationMap::T7CalibrationMap ( )
default

◆ T7CalibrationMap() [2/2]

fsw::t7::T7CalibrationMap::T7CalibrationMap ( const config::Config & cfg)
explicit

Member Function Documentation

◆ all()

const std::vector< T7CalChannel > & fsw::t7::T7CalibrationMap::all ( ) const
inline

Definition at line 76 of file T7Calibration.hpp.

References channels_.

Referenced by main(), and main().

◆ by_table()

const T7CalChannel * fsw::t7::T7CalibrationMap::by_table ( uint8_t slot,
uint8_t ain ) const

The input behind raw table {0x26, (slot-1)*0x20 + ain}, or nullptr.

Definition at line 67 of file T7Calibration.cpp.

References by_table_, channels_, and nullptr.

Referenced by main(), and main().

◆ by_uid()

const T7CalChannel * fsw::t7::T7CalibrationMap::by_uid ( uint16_t uid) const

Definition at line 62 of file T7Calibration.cpp.

References by_uid_, channels_, and nullptr.

Referenced by main(), and main().

◆ empty()

bool fsw::t7::T7CalibrationMap::empty ( ) const
inline

Definition at line 83 of file T7Calibration.hpp.

References channels_.

◆ raw_tables()

std::vector< std::pair< uint8_t, uint8_t > > fsw::t7::T7CalibrationMap::raw_tables ( ) const

Raw tables calibration_service subscribes to: every input above, plus each TC slot's CJC.

Definition at line 80 of file T7Calibration.cpp.

References channels_, fsw::t7::cjc_table_id(), fsw::t7::table_id(), and tc_slots().

Referenced by main(), and main().

◆ tc_slots()

std::vector< uint8_t > fsw::t7::T7CalibrationMap::tc_slots ( ) const

Slots with at least one TC (they publish a cold-junction table).

Definition at line 72 of file T7Calibration.cpp.

References channels_.

Referenced by raw_tables().

Member Data Documentation

◆ by_table_

std::map<std::pair<uint8_t, uint8_t>, size_t> fsw::t7::T7CalibrationMap::by_table_
private

Definition at line 90 of file T7Calibration.hpp.

Referenced by by_table(), and T7CalibrationMap().

◆ by_uid_

std::map<uint16_t, size_t> fsw::t7::T7CalibrationMap::by_uid_
private

Definition at line 89 of file T7Calibration.hpp.

Referenced by by_uid(), and T7CalibrationMap().

◆ channels_

std::vector<T7CalChannel> fsw::t7::T7CalibrationMap::channels_
private

Definition at line 88 of file T7Calibration.hpp.

Referenced by all(), by_table(), by_uid(), empty(), raw_tables(), T7CalibrationMap(), and tc_slots().


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