OptrisOptrisDocumentation

Documentation/OTC SDK/OTC SDK — C++ API referencev12.0

optris::sdk::pif::IoSnapshot

Atomic snapshot of all I/O channels at a single point in time.

Public attributes

digital_inputs

std::vector< DigitalState > digital_inputs

digital_outputs

std::vector< DigitalState > digital_outputs

analog_inputs

std::vector< float > analog_inputs

Analog inputs in the channel's own unit -- emissivity, degrees, bar -- decoded through its gain, offset and bounds. Degrees are the SDK's temperature unit (Celsius unless SetTemperatureUnit() chose Fahrenheit).

An input with no channel configured over it has no unit of its own, so it reads in volts, the same unit as raw_analog_inputs. It used to read in raw counts here, which made the unit of an entry depend on the channel's state with nothing saying so.

raw_analog_inputs

std::vector< float > raw_analog_inputs

The same inputs as they are on the wire, in volts, before any channel decode.

This is what a multimeter on the pin would show, and what commissioning asks for: an operator wiring a sensor wants "what is actually on pin 2", not "0.94 emissivity". Both are here because a readout wants one and a wiring check wants the other, and before this the decoded value was the only one a configured channel could give.

Transaction-consistent with analog_inputs: the same reading, reported twice, at no extra cost in device traffic.

NaN while inputs_known is false, as analog_inputs is.

analog_inputs_clamped

std::vector< bool > analog_inputs_clamped

Whether the decoded value of each analog input was held at one of its configured bounds.

The actionable half of the raw reading, and the answer to "is my sensor saturated or is my slope wrong?". With input_min and input_max set, a sensor driven past its bound reads as the bound and nothing else says the wire has gone further. False for a channel with no bounds configured, for an unconfigured channel, and while inputs_known is false.

Notes only the channel's clamp. The wire clamp -- the fixed 0-10 V the hardware can carry -- is visible instead by comparing raw_analog_inputs against that range.

analog_outputs

std::vector< float > analog_outputs

Analog outputs as they are on the wire, in the unit ReadAnalogOutput() answers in: the unit of each channel's output_range (volts in 0-10 V, milliamperes in the current ranges), and volts on an output with no channel configured.

The same numbers in Celsius and in Fahrenheit. A wire value is never a temperature, so on a temperature channel this is not the temperature that was written: 50 C (122 F) at 0.1 V per degree and 0.5 V at zero reads 5.5 here in either unit.

timestamp_us

uint64_t timestamp_us = 0

Camera clock, microseconds.

inputs_known

bool inputs_known = true

Whether the input readings above mean anything.

False on a PIF that reports its inputs only with a frame, before the first frame has arrived -- the outputs are still valid, since they are what the SDK drove. The inputs then read as DigitalState::Unknown and NaN, so a caller that ignores this flag still cannot mistake them for measurements.

fail_safe_level

DigitalState fail_safe_level = DigitalState::Unknown

The level on the dedicated fail-safe terminals, or Unknown when nothing has driven them -- no fail-safe configured, one configured onto a digital or analog output instead, or one armed whose first heartbeat has not arrived.

The dedicated line is not a digital output and has no index, so it appears in neither digital_outputs nor ReadDigitalOutput(). This field is the only readback it has.

Like the outputs either side of it, this is what the SDK drove, not a measurement: no PIF reports that terminal back. It says the level was commanded, not that it arrived on the wire.