Channels¶
Every entry in TaskSpec.channels is a typed, frozen channel spec. See the
Channels guide for the field tables and construction
patterns, and Safety for the output-channel gate model.
dtollib.channels ¶
Channel-spec dataclasses — the typed input shape for TaskSpec.channels.
Provides the analog-input subset (voltage + thermocouple) needed
for the DT9805 happy path, the DT9806 output surface
(:class:AnalogOutputVoltage, :class:DigitalInputPort,
:class:DigitalOutputPort with :class:DigitalLine views), and the
multi-sensor
kinds (:class:RtdInput, :class:ThermistorInput,
:class:ResistanceInput, :class:CurrentInput, :class:IepeInput,
:class:StrainInput, :class:BridgeInput) — all share
:class:AnalogInputBase and reuse its knobs.
The kind discriminator on each concrete spec drives serialisation:
:func:channel_from_dict reverses :meth:ChannelSpec.to_dict via the
:data:_CHANNEL_KINDS registry below.
Design reference: docs/design.md §8.2–§8.6, §18.3.
AnalogInputBase
dataclass
¶
AnalogInputBase(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
channel_type=ChannelType.SINGLE_ENDED,
gain=1.0,
filter=None,
encoding=None,
coupling=None,
)
Bases: ChannelSpec
Common AI knobs shared by every analog-input subclass.
Maps to olDaSetChannelType / olDaSetGainListEntry /
olDaSetChannelFilter / olDaSetEncoding /
olDaSetCouplingType. The backend issues these after the channel
is added to the channel list.
Attributes:
| Name | Type | Description |
|---|---|---|
channel_type |
ChannelType
|
Wiring (single-ended / differential). |
gain |
float
|
Programmable-gain-amplifier setting. |
filter |
FilterType | None
|
Optional analog filter selection. |
encoding |
Encoding | None
|
Optional sample-code encoding override. |
coupling |
CouplingType | None
|
Optional AC/DC coupling. |
AnalogInputVoltage
dataclass
¶
AnalogInputVoltage(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
channel_type=ChannelType.SINGLE_ENDED,
gain=1.0,
filter=None,
encoding=None,
coupling=None,
min_val=-10.0,
max_val=10.0,
)
Bases: AnalogInputBase
Voltage-mode analog input.
Attributes:
| Name | Type | Description |
|---|---|---|
min_val |
float
|
Lower input voltage range ( |
max_val |
float
|
Upper input voltage range. |
__post_init__ ¶
Reject min_val >= max_val before the SDK does.
Source code in src/dtollib/channels/analog_input.py
AnalogOutputVoltage
dataclass
¶
AnalogOutputVoltage(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
min_val=-10.0,
max_val=10.0,
safe_min=None,
safe_max=None,
requires_confirm=True,
gain=1.0,
)
Bases: ChannelSpec
Voltage-mode analog output (olDaPutSingleValue / waveform D/A).
Two range layers:
[min_val, max_val]— the device electrical range. A write outside this is electrically impossible and always raises :class:~dtollib.errors.DtolValidationError;confirmdoes not override it.[safe_min, safe_max]— an optional operator safe band, a subset of the device range. A write outside the safe band (or any write to a channel withrequires_confirm=True) needsconfirm=True, else :meth:DtolSession.writeraises :class:~dtollib.errors.DtolConfirmationRequiredError(docs/design.md §18.1).
Attributes:
| Name | Type | Description |
|---|---|---|
min_val |
float
|
Lower output range, volts. |
max_val |
float
|
Upper output range, volts. |
safe_min |
float | None
|
Lower safe-band bound, volts. |
safe_max |
float | None
|
Upper safe-band bound, volts. |
requires_confirm |
bool
|
When true, every write to this channel needs
|
gain |
float
|
Output-gain-list entry passed to the SDK write call. |
__post_init__ ¶
Reject inconsistent ranges before the SDK ever sees them.
Source code in src/dtollib/channels/analog_output.py
in_device_range ¶
in_safe_band ¶
True if value lies within the configured safe band.
An unset bound (None) does not constrain that side. With both
bounds unset, any in-range value is considered "in band".
Source code in src/dtollib/channels/analog_output.py
kind_to_multi_sensor_type ¶
BridgeConfiguration ¶
Bases: StrEnum
Generic bridge-sensor wiring (olDaSetBridgeConfiguration).
Mirrors BRIDGE_CONFIGURATION in OLDADEFS.H — the three-way
full/half/quarter subset used for non-strain bridge transducers
(load cells, pressure sensors).
BridgeInput
dataclass
¶
BridgeInput(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
channel_type=ChannelType.SINGLE_ENDED,
gain=1.0,
filter=None,
encoding=None,
coupling=None,
configuration=BridgeConfiguration.FULL,
nominal_resistance_ohms=350.0,
sensitivity_mv_per_v=2.0,
excitation_source=StrainExcitationSource.INTERNAL,
excitation_voltage=0.0,
lead_resistance_ohms=0.0,
shunt_enabled=False,
)
Bases: AnalogInputBase
Generic bridge-transducer input (load cell, pressure sensor).
Maps to olDaSetBridgeConfiguration + the strain excitation
setters, with the volts→engineering transform applied via
olDaVoltsToBridgeBasedSensor.
Attributes:
| Name | Type | Description |
|---|---|---|
configuration |
BridgeConfiguration
|
Bridge wiring (full / half / quarter). |
nominal_resistance_ohms |
float
|
Nominal bridge resistance. |
sensitivity_mv_per_v |
float
|
Rated sensitivity (mV/V at full scale). |
excitation_source |
StrainExcitationSource
|
Excitation-voltage source. |
excitation_voltage |
float
|
Bridge excitation voltage in volts. |
lead_resistance_ohms |
float
|
Lead-wire resistance for quarter-bridge correction. |
shunt_enabled |
bool
|
Engage the internal shunt-calibration resistor. |
__post_init__ ¶
Reject non-physical resistance.
Source code in src/dtollib/channels/analog_input.py
ChannelSpec
dataclass
¶
Base class for every channel specification.
Attributes:
| Name | Type | Description |
|---|---|---|
physical_channel |
int
|
Zero-based channel index on the subsystem.
The DataAcq SDK uses bare integers (not |
name |
str | None
|
Display name for logs and sink columns. Falls back to
|
unit |
str | None
|
Display unit (informational; e.g. |
metadata |
Mapping[str, str | int | float | bool]
|
Free-form per-channel metadata. Propagated to
:class: |
__post_init__ ¶
Wrap mutable metadata mappings to enforce immutability.
kind_to_multi_sensor_type ¶
Return the :class:IOType discriminator for a MULTI_SENSOR channel.
Called by the :class:~dtollib.tasks.TaskBuilder immediately
before any per-type setter on a MULTI_SENSOR channel
(docs/design.md §8.5a). Subclasses override; the base raises.
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
This subclass does not know how to re-type a multi-sensor channel. |
Source code in src/dtollib/channels/base.py
to_dict ¶
JSON-friendly mapping with kind discriminator embedded.
Built field-by-field (not via :func:dataclasses.asdict, which
deep-copies and cannot pickle the MappingProxyType metadata).
:func:~dtollib.channels.channel_from_dict reverses this.
Source code in src/dtollib/channels/base.py
ChannelType ¶
Bases: StrEnum
Channel-wiring discriminator (olDaSetChannelType).
CjcSource ¶
Bases: StrEnum
Cold-junction-compensation source (olDaSetCjcSource).
CounterEdgeCount
dataclass
¶
CounterEdgeCount(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
clock_source=ClockSource.INTERNAL,
gate_type=GateType.SOFTWARE,
count_edge=Edge.RISING,
cascade=False,
)
Bases: CounterInputBase
Event counter — counts edges on the counter input (OL_CTMODE_COUNT).
Read back via :meth:~dtollib.tasks.DtolSession.read_events.
Attributes:
| Name | Type | Description |
|---|---|---|
count_edge |
Edge
|
Edge that increments the counter. |
cascade |
bool
|
Cascade with the adjacent counter for a 32-bit count. |
CounterEdgeToEdge
dataclass
¶
CounterEdgeToEdge(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
clock_source=ClockSource.INTERNAL,
gate_type=GateType.SOFTWARE,
start_edge=Edge.RISING,
stop_edge=Edge.FALLING,
)
Bases: CounterInputBase
Edge-to-edge interval / pulse-width measurement (OL_CTMODE_MEASURE).
Read back via :meth:~dtollib.tasks.DtolSession.read_events (clock ticks
between the start and stop edges).
Attributes:
| Name | Type | Description |
|---|---|---|
start_edge |
Edge
|
Edge that starts the interval timer. |
stop_edge |
Edge
|
Edge that stops it. |
CounterFrequency
dataclass
¶
CounterFrequency(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
clock_source=ClockSource.INTERNAL,
gate_type=GateType.SOFTWARE,
gate_period_s=None,
)
Bases: CounterInputBase
Frequency measurement over a gated window (OL_CTMODE_MEASURE).
Read back via :meth:~dtollib.tasks.DtolSession.measure_frequency.
Attributes:
| Name | Type | Description |
|---|---|---|
gate_period_s |
float | None
|
Measurement window in seconds. |
__post_init__ ¶
Reject a non-positive measurement window.
Source code in src/dtollib/channels/counter_input.py
CouplingType ¶
Bases: StrEnum
AC vs DC coupling (olDaSetCouplingType).
CurrentInput
dataclass
¶
CurrentInput(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
channel_type=ChannelType.SINGLE_ENDED,
gain=1.0,
filter=None,
encoding=None,
coupling=None,
min_val=0.0,
max_val=0.02,
)
Bases: AnalogInputBase
Process-current input (e.g. 4–20 mA) — engineering units are amps.
Attributes:
| Name | Type | Description |
|---|---|---|
min_val |
float
|
Lower current range in amps ( |
max_val |
float
|
Upper current range in amps. |
__post_init__ ¶
Reject min_val >= max_val before the SDK does.
Source code in src/dtollib/channels/analog_input.py
DigitalInputPort
dataclass
¶
DigitalInputPort(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
width=None,
lines=tuple(),
)
Bases: _DigitalPort
A digital-input port on the DIN subsystem.
Read-only: :meth:DtolSession.poll surfaces the raw port byte under the
port name plus one bool per declared :class:DigitalLine.
DigitalLine
dataclass
¶
A single-bit view into a digital port — sugar, not an SDK channel.
A line is addressed in :meth:DtolSession.write / :class:DaqReading
by its key: name when set, else f"{port.display_name}.line{bit}".
Attributes:
| Name | Type | Description |
|---|---|---|
bit |
int
|
Zero-based bit index within the owning port. |
name |
str | None
|
Display key for writes/reads. |
safe_value |
bool | None
|
The level this line should hold when not explicitly driven (informational; surfaced to operators and sinks). |
requires_confirm |
bool | None
|
Per-line override of the port's confirm gate.
|
DigitalOutputPort
dataclass
¶
DigitalOutputPort(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
width=None,
lines=tuple(),
safe_value=None,
requires_confirm=True,
)
Bases: _DigitalPort
A digital-output port on the DOUT subsystem.
physical_channel is the port index (0 on the DT9805/06). A write
targets the whole port byte; partial per-line writes are merged into a
per-port shadow register so untouched lines are preserved
(docs/design.md §18.1).
Attributes:
| Name | Type | Description |
|---|---|---|
safe_value |
int | None
|
Full-port byte to hold when not explicitly driven; it
also seeds the shadow register at configure time. |
requires_confirm |
bool
|
Port-level confirm gate. A per-line
:attr: |
Encoding ¶
Bases: StrEnum
Sample-code encoding (olDaSetEncoding).
ExcitationSource ¶
Bases: StrEnum
Excitation-current source (olDaSetExcitationCurrentSource).
Mirrors EXCITATION_CURRENT_SRC in OLDADEFS.H. Used by IEPE,
resistance, RTD, and thermistor channels that need a driven
measurement current.
FilterType ¶
Bases: StrEnum
Per-channel filter selection (olDaSetChannelFilter).
IepeInput
dataclass
¶
IepeInput(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
channel_type=ChannelType.SINGLE_ENDED,
gain=1.0,
filter=None,
encoding=None,
coupling=CouplingType.AC,
excitation_source=ExcitationSource.INTERNAL,
excitation_current_a=0.004,
sensitivity_v_per_unit=None,
)
Bases: AnalogInputBase
IEPE / ICP accelerometer input (constant-current-driven, AC-coupled).
Maps to olDaSetCouplingType + olDaSetExcitationCurrentSource +
olDaSetExcitationCurrentValue (the SDK has no single
olDaSetIEPE on this build).
Attributes:
| Name | Type | Description |
|---|---|---|
coupling |
CouplingType | None
|
Forced to :attr: |
excitation_source |
ExcitationSource
|
Constant-current source. :attr: |
excitation_current_a |
float
|
Drive current in amps (typically 0.002–0.004 A). |
sensitivity_v_per_unit |
float | None
|
Optional sensor sensitivity (V per engineering unit) carried as metadata for downstream scaling. |
__post_init__ ¶
Reject DC coupling and disabled excitation — invalid for IEPE.
Source code in src/dtollib/channels/analog_input.py
OneShotOutput
dataclass
¶
OneShotOutput(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
clock_source=ClockSource.INTERNAL,
pulse_type=PulseType.HIGH_TO_LOW,
gate_type=GateType.SOFTWARE,
pulse_width_s,
)
Bases: CounterOutputBase
Single output pulse on trigger (OL_CTMODE_ONESHOT).
Attributes:
| Name | Type | Description |
|---|---|---|
pulse_width_s |
float
|
Width of the generated pulse in seconds (> 0). |
__post_init__ ¶
Reject a non-positive pulse width.
Source code in src/dtollib/channels/counter_output.py
PulseTrainOutput
dataclass
¶
PulseTrainOutput(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
clock_source=ClockSource.INTERNAL,
pulse_type=PulseType.HIGH_TO_LOW,
gate_type=GateType.SOFTWARE,
frequency_hz,
duty_cycle=0.5,
)
Bases: CounterOutputBase
Continuous pulse-train (rate) generation (OL_CTMODE_RATE).
Attributes:
| Name | Type | Description |
|---|---|---|
frequency_hz |
float
|
Output pulse frequency in hertz (> 0). |
duty_cycle |
float
|
Fraction of each period the output is in its active
level, in |
__post_init__ ¶
Reject a non-positive frequency or an out-of-range duty cycle.
Source code in src/dtollib/channels/counter_output.py
QuadratureDecoder
dataclass
¶
QuadratureDecoder(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
decode_mode=QuadratureDecodeMode.X4,
index_reset=False,
)
Bases: ChannelSpec
Quadrature encoder decoder (OLSS_QUAD).
Read back via :meth:~dtollib.tasks.DtolSession.read_events (accumulated
position count).
Attributes:
| Name | Type | Description |
|---|---|---|
decode_mode |
QuadratureDecodeMode
|
Counts per encoder line (X1 / X2 / X4). |
index_reset |
bool
|
Reset the position count on the encoder's index/Z pulse. |
RepetitiveOneShotOutput
dataclass
¶
ResistanceInput
dataclass
¶
ResistanceInput(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
channel_type=ChannelType.SINGLE_ENDED,
gain=1.0,
filter=None,
encoding=None,
coupling=None,
excitation_source=ExcitationSource.INTERNAL,
excitation_current_a=None,
)
Bases: AnalogInputBase
Direct resistance measurement — engineering units are ohms.
Configured via the excitation-current setters; the SDK reports the measured resistance directly.
Attributes:
| Name | Type | Description |
|---|---|---|
excitation_source |
ExcitationSource
|
Measurement-current source. |
excitation_current_a |
float | None
|
Driven current in amps, or |
RtdInput
dataclass
¶
RtdInput(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
channel_type=ChannelType.SINGLE_ENDED,
gain=1.0,
filter=None,
encoding=None,
coupling=None,
rtd_type=RtdType.PT3850,
r0=100.0,
a=None,
b=None,
c=None,
excitation_source=ExcitationSource.INTERNAL,
excitation_current_a=None,
)
Bases: AnalogInputBase
Resistance-temperature-detector input — engineering units are °C.
Maps to olDaSetRtdType plus, for :attr:RtdType.CUSTOM, the
Callendar–Van Dusen setters olDaSetRtdR0 / olDaSetRtdA /
olDaSetRtdB / olDaSetRtdC.
Attributes:
| Name | Type | Description |
|---|---|---|
rtd_type |
RtdType
|
Standard RTD curve, or :attr: |
r0 |
float
|
Resistance at 0 °C in ohms (PT100 → |
a, |
b
|
Callendar–Van Dusen coefficients. Required when
|
c |
float | None
|
Sub-zero Callendar–Van Dusen coefficient (optional even for custom curves; only affects T < 0 °C). |
excitation_source |
ExcitationSource
|
Measurement-current source. |
excitation_current_a |
float | None
|
Driven current in amps, or |
__post_init__ ¶
Enforce the custom-vs-standard coefficient contract.
Source code in src/dtollib/channels/analog_input.py
RtdType ¶
Bases: StrEnum
RTD curve selection (olDaSetRtdType).
Mirrors the OL_RTD_TYPE_* family in OLDADEFS.H. The numeric
suffix is the platinum temperature coefficient (α × 10⁴): PT3850
is the DIN/IEC 60751 standard. :attr:CUSTOM defers the curve to
explicit Callendar–Van Dusen coefficients (r0 / a / b /
c on :class:RtdInput).
StrainExcitationSource ¶
Bases: StrEnum
Strain-gage excitation-voltage source (olDaSetStrainExcitationVoltageSource).
Mirrors STRAIN_EXCITATION_VOLTAGE_SRC in OLDADEFS.H. Unlike
:class:ExcitationSource there is no DISABLED member — a strain
bridge always needs an excitation voltage.
StrainGageConfiguration ¶
Bases: StrEnum
Strain-gage bridge wiring (olDaSetStrainBridgeConfiguration).
Mirrors STRAIN_GAGE_CONFIGURATION in OLDADEFS.H — the full
seven-way wiring set the SDK distinguishes for a strain gage.
StrainInput
dataclass
¶
StrainInput(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
channel_type=ChannelType.SINGLE_ENDED,
gain=1.0,
filter=None,
encoding=None,
coupling=None,
configuration=StrainGageConfiguration.QUARTER_BRIDGE,
gage_factor=2.0,
gage_resistance_ohms=350.0,
poisson_ratio=0.3,
lead_resistance_ohms=0.0,
excitation_source=StrainExcitationSource.INTERNAL,
excitation_voltage=0.0,
shunt_enabled=False,
)
Bases: AnalogInputBase
Strain-gage input — engineering units are strain (ε, dimensionless).
Maps to olDaSetStrainBridgeConfiguration +
olDaSetStrainExcitationVoltageSource +
olDaSetStrainExcitationVoltage + olDaSetStrainShuntResistor,
with the volts→strain transform applied via
:func:dtollib.utils / olDaVoltsToStrain.
Attributes:
| Name | Type | Description |
|---|---|---|
configuration |
StrainGageConfiguration
|
Bridge wiring (quarter / half / full). |
gage_factor |
float
|
Gage factor (sensitivity); must be positive. |
gage_resistance_ohms |
float
|
Nominal gage resistance (e.g. 120 / 350 Ω). |
poisson_ratio |
float
|
Poisson's ratio of the specimen (Poisson bridges). |
lead_resistance_ohms |
float
|
Lead-wire resistance for quarter-bridge correction. |
excitation_source |
StrainExcitationSource
|
Excitation-voltage source. |
excitation_voltage |
float
|
Bridge excitation voltage in volts. |
shunt_enabled |
bool
|
Engage the internal shunt-calibration resistor. |
__post_init__ ¶
Reject non-physical gage factor / resistance.
Source code in src/dtollib/channels/analog_input.py
Tachometer
dataclass
¶
Tachometer(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
measure_edge=Edge.RISING,
stop_edge=Edge.FALLING,
)
Bases: ChannelSpec
Tachometer input (OLSS_TACH) — first-class, distinct from C/T.
Read back via :meth:~dtollib.tasks.DtolSession.measure_frequency.
Attributes:
| Name | Type | Description |
|---|---|---|
measure_edge |
Edge
|
Edge used to time successive periods. |
stop_edge |
Edge
|
Edge that ends a measurement window. |
TemperatureUnit ¶
Bases: StrEnum
Temperature unit emitted by the subsystem.
Maps to olDaSetTemperatureFilter / unit-selection setters on
SDK builds that support per-channel temperature units.
ThermistorInput
dataclass
¶
ThermistorInput(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
channel_type=ChannelType.SINGLE_ENDED,
gain=1.0,
filter=None,
encoding=None,
coupling=None,
a,
b,
c,
excitation_source=ExcitationSource.INTERNAL,
excitation_current_a=None,
)
Bases: AnalogInputBase
Thermistor input — engineering units are °C.
Maps to olDaSetThermistorA / olDaSetThermistorB /
olDaSetThermistorC (the Steinhart–Hart coefficients).
Attributes:
| Name | Type | Description |
|---|---|---|
a, |
(b, c)
|
Steinhart–Hart coefficients. All three are required — a thermistor has no standard curve the SDK can assume. |
excitation_source |
ExcitationSource
|
Measurement-current source. |
excitation_current_a |
float | None
|
Driven current in amps, or |
ThermocoupleInput
dataclass
¶
ThermocoupleInput(
*,
physical_channel,
name=None,
unit=None,
metadata=_empty_metadata(),
channel_type=ChannelType.DIFFERENTIAL,
gain=100.0,
filter=None,
encoding=None,
coupling=None,
thermocouple_type,
min_val_degc,
max_val_degc,
cjc_source=CjcSource.INTERNAL,
cjc_channel=0,
units=TemperatureUnit.DEG_C,
)
Bases: AnalogInputBase
Thermocouple analog input — engineering units are degrees C/F/K.
Two read paths, selected by the subsystem's capabilities:
- Firmware-linearised (
OLSSC_RETURNS_FLOATStrue): the device emits temperature directly viaolDaGetSingleFloat. - Application-linearised (DT9805/DT9806 A/D —
returns_floatsfalse,supports_thermocouplestrue): the device returns raw codes. The wrapper reads the differential thermo-emf plus the CJC sensor on :attr:cjc_channel, then applies NIST ITS-90 polynomials (:func:dtollib.utils.convert_volts_to_temperature). This requires differential wiring and a high gain to resolve the µV-level emf — hence the defaults below differ from :class:AnalogInputBase.
Defaults are tuned for the DT9805/DT9806: differential wiring,
gain=100 (≈3 µV/LSB on the ±10 V/16-bit A/D), CJC on channel 0.
Attributes:
| Name | Type | Description |
|---|---|---|
thermocouple_type |
ThermocoupleType
|
NIST letter designation (J/K/T/E/R/S/B/N). |
min_val_degc |
float
|
Lower temperature limit. Validated against the
type's NIST operating range in |
max_val_degc |
float
|
Upper temperature limit. |
cjc_source |
CjcSource
|
Cold-junction-compensation source. |
cjc_channel |
int
|
Channel carrying the cold-junction sensor on the application-linearised path (channel 0 at 10 mV/°C on the DT9805/DT9806). Ignored on firmware-linearised subsystems. |
units |
TemperatureUnit
|
Reporting unit (deg C today; multi-sensor builds wire up conversion). |
channel_type |
ChannelType
|
Overrides the base default to |
gain |
float
|
Overrides the base default to |
__post_init__ ¶
Reject ranges outside NIST operating envelope, before SDK does.
Source code in src/dtollib/channels/analog_input.py
ThermocoupleType ¶
Bases: StrEnum
Thermocouple letter designation (olDaSetThermocoupleType).
Lock string values to single uppercase letters so they round-trip
cleanly with NIST coefficient lookups in :mod:dtollib.utils.
channel_from_dict ¶
Reconstruct a :class:ChannelSpec from its :meth:to_dict mapping.
Dispatches on the kind discriminator. The input is not mutated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict[str, Any]
|
Mapping produced by :meth: |
required |
Returns:
| Type | Description |
|---|---|
ChannelSpec
|
The reconstructed concrete channel spec. |
Raises:
| Type | Description |
|---|---|
DtolValidationError
|
|