OptrisOptrisDocumentation

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

These are the pre-v12 classes, kept so existing code keeps building. New code should use the modern API — see Migration Guide: v11 to v12.

optris::TemperatureConverter

Converts temperatures in °C to and from their internal SDK representation.

Public functions

TemperatureConverter

OTC_SDK_API TemperatureConverter() noexcept

Constructor.

TemperatureConverter

OTC_SDK_API TemperatureConverter(TemperaturePrecision precision) noexcept

Constructor.

Parameters

Name Description
precision of the temperature.

setPrecision

OTC_SDK_API void setPrecision(TemperaturePrecision precision) noexcept

Set the temperature precision.

Parameters

Name Description
precision to set.

getPrecision

TemperaturePrecision getPrecision() const noexcept

Returns the temperature precision.

Returns: temperature precision.

toTemperature

float toTemperature(unsigned short value) const noexcept

Converts an internal value to a temperature in °C.

Parameters

Name Description
value internal value to convert.

Returns: temperature in °C.

toTemperature

float toTemperature(float value) const noexcept

Converts a sub-integer internal value to a temperature in °C. For callers that hold scaling-range state at sub-integer precision (see ImageBuilder's hysteresis filter and the Sigma scaling modes).

Parameters

Name Description
value sub-integer internal value to convert.

Returns: temperature in °C.

toValue

unsigned short toValue(float temperature) const noexcept

Converts a temperature in °C to an internal value.

Parameters

Name Description
temperature in °C to convert.

Returns: internal value.

isTemperatureValid

bool isTemperatureValid(float temperature) noexcept

Checks if the given temperature in °C is valid.

Parameters

Name Description
temperature in °C to check.

Returns: true if the temperature is valid. False otherwise.

isValueValid

bool isValueValid(unsigned short value) noexcept

Checks if an internal value is valid.

Parameters

Name Description
value to check.

Returns: true if the value is valid. False otherwise.

getInvalidTemperature

float getInvalidTemperature() const noexcept

Returns the value signifying an invalid temperature.

Returns: value signifying an invalid temperature.

getInvalidValue

unsigned short getInvalidValue() const noexcept

Returns the value signifying an invalid internal value.

Returns: value signifying an invalid internal value.