OptrisOptrisDocumentation

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

optris_sdk_pif_channel_config

One PIF channel, as data.

A channel whose own unit is a temperature follows the SDK's temperature unit (Celsius unless optris_sdk_set_temperature_unit() chose Fahrenheit): an ambient temperature input, an internal temperature output, and a measurement field encoding a temperature statistic (or a standard deviation, which is a difference). On those gain and offset are re-expressed for the unit so the same value still maps to the same wire level (gain_C = 1.8 gain_F, offset_C = offset_F + 32 gain_F, without the 32 for a difference), and input_min, input_max and threshold are in that unit too. Every other channel, and the output levels below, are not converted.

What is on the wire is never converted. The value optris_sdk_pif_write_analog_output() takes and the value optris_sdk_pif_read_analog_input() decodes follow the unit on such a channel; the level on the pin does not, because a wire value is never a temperature. optris_sdk_pif_read_analog_output(), optris_sdk_io_snapshot_get_analog_outputs(), optris_sdk_pif_read_raw_analog_input(), optris_sdk_io_snapshot_get_raw_analog_inputs() and the OPTRIS_SDK_FIELD_ANALOG_OUT signal answer in volts or milliamperes, the same numbers in Celsius and in Fahrenheit.

Public attributes

struct_size

uint32_t struct_size

Set to sizeof(optris_sdk_pif_channel_config).

index

uint8_t index

Flat channel index. The SDK does the (device, pin) arithmetic for stacked PIFs; nothing here addresses a device.

active_low

uint8_t active_low

Non-zero to invert a digital output's electrical sense, so "asserted" drives the line low.

threshold_low_active

uint8_t threshold_low_active

Non-zero when the channel is asserted below threshold rather than above it.

autonomous

uint8_t autonomous

Non-zero when the camera firmware drives this channel without the host. Per channel, not per device.

direction

optris_sdk_pif_direction direction

Which way the channel carries its signal.

signal

optris_sdk_pif_signal signal

Its electrical nature.

kind

optris_sdk_pif_channel_kind kind

What it means.

gain

float gain

Conversion between the wire value and the channel's own unit. Inputs decode as (raw - offset) / gain; outputs encode as gain * value + offset.

offset

float offset

See gain.

input_min

float input_min

Clamp applied to a decoded analog input, in the channel's own unit. Leave both at 0 for no clamp, in either temperature unit.

input_max

float input_max

See input_min.

threshold

float threshold

Level at which an analog input counts as asserted, in the channel's own unit, for the kinds that act on a crossing -- OPTRIS_SDK_PIF_KIND_FLAG_CONTROL and OPTRIS_SDK_PIF_KIND_RESET_PEAK_VALLEY_HOLD.

active_value

float active_value

Level this pin drives when asserted.

On an analog output, in output_range's own unit -- volts in 0-10 V, milliamperes in 0-20 mA and 4-20 mA, never amperes. That is the one unit every analog value above the wire is in; the converter is the only place it changes. The defaults, 1 and 0, are therefore 1 mA and 0 mA on a current range, and in 4-20 mA both clamp to 4 mA -- one converter code and no edge. Set them from the range.

On a digital output this is a logic level: non-zero asserts, and active_low inverts the electrical sense.

inactive_value

float inactive_value

Level it drives when not asserted. These belong to the pin rather than to whatever asserts it, because several alarm rules can share one pin and must agree on its levels. Same unit as active_value.

intermediate_value

float intermediate_value

A third level, for kinds whose state is not binary: the shutter is open, closed, or moving between the two. Same unit as active_value -- output_range's own.

output_range

optris_sdk_analog_range output_range

Range an analog output drives into.

target

int32_t target

Kind-specific target: the region id that optris_sdk_imager_add_region returned, for OPTRIS_SDK_PIF_KIND_MEASUREMENT_FIELD; the flag channel for OPTRIS_SDK_PIF_KIND_FLAG_CONTROL. -1 when the kind has no target.

The id, not the signal slot from optris_sdk_imager_get_region_signal_slot: a slot is a runtime handle that changes when a region is removed and re-added, and this field is persisted. Note that a region id is a uint64_t and this is signed 32-bit; ids are allocated from 1 upward so a camera's own ids fit, and a target that does not fit will not resolve.

statistic

optris_sdk_signal_field statistic

Which statistic of target a measurement-field channel encodes.

decimals

uint8_t decimals

Display precision for a named value.

reserved0

uint8_t reserved0[3]

Reserved; always zero.

name

char name[OPTRIS_SDK_MAX_NAME]

Name of an uncommitted value; diagnostics for other kinds. UTF-8, NUL-terminated.

unit

char unit[OPTRIS_SDK_MAX_UNIT]

Unit of an uncommitted value. UTF-8, NUL-terminated.