optris_sdk_pif_channel_trim
One analog channel's trim, as the device applies it.
This is the answer to "what is actually in force on this pin", which optris_sdk_pif_analog_calibration cannot give: that struct is device-wide and carries what the file declares, and the controller applies none of it. The trim here is per channel and is the one the camera uses.
In converter codes, not in volts or milliamperes, the same convention as optris_sdk_pif_analog_calibration rather than a second one. The relation is trimmed = gain * untrimmed + offset with every value a count of the converter's own steps.
The two directions do not share a scale. An input code is one of 1024 (0..1023, 10 mV a step); an output code is one of 1001 (0..1000, 10 mV or 20 uA a step depending on the range). So gain is dimensionless and reads the same either way, while offset only means something once you know which direction you asked for -- the direction argument to optris_sdk_pif_get_channel_trim() is what says which.
Public attributes
struct_size
uint32_t struct_size
Set to sizeof(optris_sdk_pif_channel_trim).
gain
float gain
Dimensionless. 1.0 changes nothing.
offset
float offset
In the queried direction's own converter codes. An offset of 2 is two steps, not two volts.
source
optris_sdk_pif_trim_source source
Where gain and offset came from. On OPTRIS_SDK_PIF_TRIM_SOURCE_UNKNOWN and OPTRIS_SDK_PIF_TRIM_SOURCE_NONE the two values are the identity and describe nothing the device does -- read this field before believing them.