STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
CubicChannel Struct Reference

Per-sensor calibration record: identity, captured points, and the current fit. More...

#include <CubicCalibrationStore.hpp>

Collaboration diagram for CubicChannel:
[legend]

Public Attributes

uint16_t uid = 0
uint8_t board_id = 0
uint8_t connector = 0
uint8_t logical_ch
std::string role
std::string active_model = "cubic"
SensorKind kind = SensorKind::PT
bool live = false
 True when the RUNNING config declares a board/connector that owns this uid, i.e.
std::string raw_unit = "adc"
 What a point's adc means: kRawUnitAdc for an ESP32 board's ADC code, kRawUnitMicrovolts for a LabJack T7 channel's reading in µV.
std::vector< CubicPoint > points
CubicFit fit
CubicFit fit_cubic
CubicFit fit_linear
std::vector< std::pair< double, double > > fit_curve
CaptureQuality last_capture
std::string status = "PENDING"
std::string last_error
double updated_at = 0.0

Detailed Description

Per-sensor calibration record: identity, captured points, and the current fit.

Definition at line 77 of file CubicCalibrationStore.hpp.

Member Data Documentation

◆ active_model

Definition at line 88 of file CubicCalibrationStore.hpp.

◆ board_id

◆ connector

◆ fit

◆ fit_cubic

◆ fit_curve

std::vector<std::pair<double, double> > fsw::calibration::CubicChannel::fit_curve

Definition at line 124 of file CubicCalibrationStore.hpp.

◆ fit_linear

◆ kind

Definition at line 91 of file CubicCalibrationStore.hpp.

◆ last_capture

◆ last_error

◆ live

True when the RUNNING config declares a board/connector that owns this uid, i.e.

register_channel() was called for it. False for an ORPHAN: an entry load() resumed from disk whose board is disabled, removed, or whose connector is not in active_connectors.

An orphan's points stay here — durable, and they re-attach by role when the board comes back — but its logical_ch is NOT its own. logical_ch is (slot - 1) * 10 + connector with slot = board_id % 10, and nothing stops two boards of different kinds sharing a slot, so a disabled LC board 41's connectors 1/6/7 name the same logical channels as live PT board 21's. Anything that pushes a fit into (or clears it from) a live logical-channel map must therefore ask live first — see cal_target() below.

Definition at line 104 of file CubicCalibrationStore.hpp.

◆ logical_ch

Initial value:
=
0

Definition at line 81 of file CubicCalibrationStore.hpp.

◆ points

◆ raw_unit

What a point's adc means: kRawUnitAdc for an ESP32 board's ADC code, kRawUnitMicrovolts for a LabJack T7 channel's reading in µV.

Calibration is filed by role, so a role that moves from an ESP32 board to a T7 (or back) would otherwise carry a curve fitted in one unit onto a channel that reads in the other — a confident, wrong pressure. load() refuses that re-attach.

Definition at line 111 of file CubicCalibrationStore.hpp.

◆ role

Definition at line 83 of file CubicCalibrationStore.hpp.

◆ status

std::string fsw::calibration::CubicChannel::status = "PENDING"

Definition at line 126 of file CubicCalibrationStore.hpp.

◆ uid

Definition at line 78 of file CubicCalibrationStore.hpp.

◆ updated_at


The documentation for this struct was generated from the following file: