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

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

#include <CubicCalibrationStore.hpp>

Collaboration diagram for fsw::calibration::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

std::string fsw::calibration::CubicChannel::active_model = "cubic"

Definition at line 88 of file CubicCalibrationStore.hpp.

◆ board_id

uint8_t fsw::calibration::CubicChannel::board_id = 0

◆ connector

uint8_t fsw::calibration::CubicChannel::connector = 0

Definition at line 80 of file CubicCalibrationStore.hpp.

◆ fit

CubicFit fsw::calibration::CubicChannel::fit

Definition at line 116 of file CubicCalibrationStore.hpp.

◆ fit_cubic

CubicFit fsw::calibration::CubicChannel::fit_cubic

Definition at line 120 of file CubicCalibrationStore.hpp.

◆ fit_curve

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

Definition at line 124 of file CubicCalibrationStore.hpp.

◆ fit_linear

CubicFit fsw::calibration::CubicChannel::fit_linear

Definition at line 121 of file CubicCalibrationStore.hpp.

◆ kind

SensorKind fsw::calibration::CubicChannel::kind = SensorKind::PT

Definition at line 91 of file CubicCalibrationStore.hpp.

Referenced by backend.routers.layerx.Job::view().

◆ last_capture

CaptureQuality fsw::calibration::CubicChannel::last_capture

Definition at line 125 of file CubicCalibrationStore.hpp.

◆ last_error

std::string fsw::calibration::CubicChannel::last_error

Definition at line 127 of file CubicCalibrationStore.hpp.

◆ live

bool fsw::calibration::CubicChannel::live = false

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.

Referenced by backend.routers.layerx.Job::feed(), main(), and backend.routers.layerx.Job::view().

◆ logical_ch

uint8_t fsw::calibration::CubicChannel::logical_ch
Initial value:
=
0

Definition at line 81 of file CubicCalibrationStore.hpp.

Referenced by main().

◆ points

◆ raw_unit

std::string fsw::calibration::CubicChannel::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.

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

std::string fsw::calibration::CubicChannel::role

Definition at line 83 of file CubicCalibrationStore.hpp.

Referenced by main().

◆ status

◆ uid

uint16_t fsw::calibration::CubicChannel::uid = 0

Definition at line 78 of file CubicCalibrationStore.hpp.

◆ updated_at

double fsw::calibration::CubicChannel::updated_at = 0.0

Definition at line 128 of file CubicCalibrationStore.hpp.


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