Skip to content

TEDS

Readers for IEEE-1451.4 strain-gage and bridge-sensor Transducer Electronic Data Sheets (hardware and virtual). See the TEDS guide.

dtollib.teds

TEDS (Transducer Electronic Data Sheet) read helpers โ€” ยง8.B5.

IEEE-1451.4 smart transducers store calibration metadata on the sensor (hardware TEDS) or in a sidecar file (virtual TEDS). The DataAcq SDK exposes four readers โ€” :func:read_strain_gage_teds, :func:read_strain_gage_virtual_teds, :func:read_bridge_sensor_teds, :func:read_bridge_sensor_virtual_teds โ€” backed by olDaRead*Teds.

Hardware reads are capability-gated: the owned DT9805/DT9806 report supports_multisensor=False and the SDK returns ECODE 36, so the hardware variants raise :class:~dtollib.errors.DtolCapabilityError before touching the SDK (mirroring the :class:~dtollib.tasks.TaskBuilder gate). Virtual reads parse a file and need no hardware, so they are not gated.

Real-sensor verification is deferred until a multi-sensor DT module (DT9828/9829/9837) is on the bench; until then the read path is exercised against :class:~dtollib.backend.fake.FakeDtolBackend scripted payloads.

BridgeSensorTeds dataclass

BridgeSensorTeds(
    *,
    manufacturer_id,
    model_number,
    version_letter,
    version_number,
    serial_number,
    sensor_impedance_ohms,
    excitation_nominal_v,
    min_physical_value,
    max_physical_value,
    min_electrical_value,
    max_electrical_value,
    raw,
)

Decoded bridge-sensor TEDS (BRIDGE_SENSOR_TEDS, TedsApi.h).

from_raw classmethod

from_raw(raw)

Build from the backend's flattened BRIDGE_SENSOR_TEDS dict.

Source code in src/dtollib/teds.py
@classmethod
def from_raw(cls, raw: dict[str, object]) -> BridgeSensorTeds:
    """Build from the backend's flattened ``BRIDGE_SENSOR_TEDS`` dict."""
    return cls(
        manufacturer_id=_i(raw, "manufacturerId"),
        model_number=_i(raw, "modelNumber"),
        version_letter=_s(raw, "versionLetter"),
        version_number=_i(raw, "versionNumber"),
        serial_number=_i(raw, "serialNumber"),
        sensor_impedance_ohms=_f(raw, "sensorImped"),
        excitation_nominal_v=_f(raw, "exciteAmplNom"),
        min_physical_value=_f(raw, "minPhysicalValue"),
        max_physical_value=_f(raw, "maxPhysicalValue"),
        min_electrical_value=_f(raw, "minElecVal"),
        max_electrical_value=_f(raw, "maxElecVal"),
        raw=dict(raw),
    )

StrainGageTeds dataclass

StrainGageTeds(
    *,
    manufacturer_id,
    model_number,
    version_letter,
    version_number,
    serial_number,
    gage_factor,
    gage_resistance_ohms,
    poisson_coefficient,
    min_physical_value,
    max_physical_value,
    raw,
)

Decoded strain-gage TEDS (STRAIN_GAGE_TEDS, TedsApi.h).

Carries the basic-TEDS identity block plus the strain-gage-specific calibration fields. raw retains every field the SDK populated so callers can reach less-common members without a wrapper attribute.

from_raw classmethod

from_raw(raw)

Build from the backend's flattened STRAIN_GAGE_TEDS dict.

Source code in src/dtollib/teds.py
@classmethod
def from_raw(cls, raw: dict[str, object]) -> StrainGageTeds:
    """Build from the backend's flattened ``STRAIN_GAGE_TEDS`` dict."""
    return cls(
        manufacturer_id=_i(raw, "manufacturerId"),
        model_number=_i(raw, "modelNumber"),
        version_letter=_s(raw, "versionLetter"),
        version_number=_i(raw, "versionNumber"),
        serial_number=_i(raw, "serialNumber"),
        gage_factor=_f(raw, "gageFactor"),
        gage_resistance_ohms=_f(raw, "sensorImped"),
        poisson_coefficient=_f(raw, "poissonCoef"),
        min_physical_value=_f(raw, "minPhysicalValue"),
        max_physical_value=_f(raw, "maxPhysicalValue"),
        raw=dict(raw),
    )

read_bridge_sensor_teds

read_bridge_sensor_teds(backend, hdass, channel)

Read on-sensor bridge TEDS for channel (capability-gated).

Source code in src/dtollib/teds.py
def read_bridge_sensor_teds(backend: DtolBackend, hdass: int, channel: int) -> BridgeSensorTeds:
    """Read on-sensor bridge TEDS for ``channel`` (capability-gated)."""
    _require_teds_capability(backend, hdass, "read_bridge_sensor_teds")
    return BridgeSensorTeds.from_raw(backend.read_bridge_sensor_hardware_teds(hdass, channel))

read_bridge_sensor_virtual_teds

read_bridge_sensor_virtual_teds(backend, path)

Read a bridge virtual-TEDS file (no hardware, no capability gate).

Source code in src/dtollib/teds.py
def read_bridge_sensor_virtual_teds(backend: DtolBackend, path: str) -> BridgeSensorTeds:
    """Read a bridge virtual-TEDS file (no hardware, no capability gate)."""
    return BridgeSensorTeds.from_raw(backend.read_bridge_sensor_virtual_teds(path))

read_strain_gage_teds

read_strain_gage_teds(backend, hdass, channel)

Read on-sensor strain-gage TEDS for channel (capability-gated).

Source code in src/dtollib/teds.py
def read_strain_gage_teds(backend: DtolBackend, hdass: int, channel: int) -> StrainGageTeds:
    """Read on-sensor strain-gage TEDS for ``channel`` (capability-gated)."""
    _require_teds_capability(backend, hdass, "read_strain_gage_teds")
    return StrainGageTeds.from_raw(backend.read_strain_gage_hardware_teds(hdass, channel))

read_strain_gage_virtual_teds

read_strain_gage_virtual_teds(backend, path)

Read a strain-gage virtual-TEDS file (no hardware, no capability gate).

Source code in src/dtollib/teds.py
def read_strain_gage_virtual_teds(backend: DtolBackend, path: str) -> StrainGageTeds:
    """Read a strain-gage virtual-TEDS file (no hardware, no capability gate)."""
    return StrainGageTeds.from_raw(backend.read_strain_gage_virtual_teds(path))