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::AlarmChannelConfig

Holds the configuration of an alarm channel.

Public attributes

name

std::string name

Name of the alarm channel.

input

AlarmInput input = AlarmInput::InternalTemperature

Specifies the input that is observed by the alarm channel.

fieldIndex

int fieldIndex = 0

Identifies the measurement field by its index that should be used as input.

fieldStat

FieldStat fieldStat = FieldStat::Mean

Identifies the statistic of the measurement field that should be used as input.

uncommittedValuePifIndex

PifIndex uncommittedValuePifIndex = {0, 0}

Identifies the PIF analog input channel that provides the uncommitted value that should be used as input.

enabled

bool enabled = true

Indicates whether the entire alarm channel is enabled or disabled.

preAlarmEnabled

bool preAlarmEnabled = false

Specifies whether the pre-alarm should be checked.

preAlarmRange

RangeF preAlarmRange = {20.F, 40.F}

A pre-alarm will be active, if the input is not in [preAlarmRange.min, preAlarmRange.max]. Depending on the chosen input the unit of the pre-alarm range limits will differ:

  • Internal, chip, and measurement field temperature pre-alarms: degree Celsius.
  • Uncommitted value pre-alarms: unit depends on the specific PIF channel configuration.

alarmRange

RangeF alarmRange = {25.F, 40.F}

The alarm will be active, if the input is not in [alarmRange.min, alarmRange.max]. An active alarm overrides a pre-alarm. Depending on the chosen input the unit of the alarm range limits will differ:

  • Internal, chip, and measurement field temperature alarms: degree Celsius.
  • Uncommitted value alarms: unit depends on the specific PIF channel configuration.

partOfComposite

bool partOfComposite = false

Indicates whether the alarm channel is part of the composite alarm. The composite alarm is triggered when at least one of the alarms in the composite is active.

pifAoIndices

std::vector< PifIndex > pifAoIndices

Identifies the PIF analog output channels to which the alarm status should be sent. This will only have an effect if the specified PIF channel is set to PifAoMode::Alarm.

pifDoIndices

std::vector< PifIndex > pifDoIndices

Identifies the PIF digital output channels to which the alarm status should be sent. This will only have an effect if the specified PIF channel is set to PifDoMode::Alarm.

Public static functions

createInternalTemperature

static OTC_SDK_API AlarmChannelConfig createInternalTemperature(const std::string &name, float minTemperature, float maxTemperature) noexcept

Creates a configuration for an alarm channel monitoring the internal temperature. The alarm will be active if the internal temperature is not in [minTemperature, maxTemperature]. Specify the pre-, composite alarm and PIF output settings manually after creating the configuration.

Parameters

Name Description
name of the alarm channel.
minTemperature minimum temperature in degree Celsius.
maxTemperature maximum temperature in degree Celsius.

Returns: alarm channel configuration.

createChipTemperature

static OTC_SDK_API AlarmChannelConfig createChipTemperature(const std::string &name, float minTemperature, float maxTemperature) noexcept

Creates a configuration for an alarm channel monitoring the sensor chip temperature. The alarm will be active if the sensor chip temperature is not in [minTemperature, maxTemperature]. Specify the pre-, composite alarm and PIF output settings manually after creating the configuration.

Parameters

Name Description
name of the alarm channel.
minTemperature minimum temperature in degree Celsius.
maxTemperature maximum temperature in degree Celsius.

Returns: alarm channel configuration.

createMeasurementField

static OTC_SDK_API AlarmChannelConfig createMeasurementField(const std::string &name, const MeasurementField::ConstShared &field, FieldStat fieldStat, float minTemperature, float maxTemperature) noexcept

Creates a configuration for an alarm channel monitoring a measurement field temperature. The alarm will be active if the measurement field temperature is not in [minTemperature, maxTemperature]. Specify the pre-, composite alarm and PIF output settings manually after creating the configuration.

Parameters

Name Description
name of the alarm channel.
field measurement field to monitor. If nullptr is passed, the field index will be set to 0.
fieldStat field statistic to monitor.
minTemperature minimum temperature in degree Celsius.
maxTemperature maximum temperature in degree Celsius.

Returns: alarm channel configuration.

createUncommittedValue

static OTC_SDK_API AlarmChannelConfig createUncommittedValue(const std::string &name, int pifDeviceIndex, int pifPinIndex, float minValue, float maxValue) noexcept

Creates a configuration for an alarm channel monitoring an uncommitted value provided by a PIF analog input channel. The alarm will be active if the uncommitted value is in [minValue, maxValue]. Specify the pre-, composite alarm and PIF output settings manually after creating the configuration.

Parameters

Name Description
name of the alarm channel.
pifDeviceIndex index of the PIF device identifying the PIF channel.
pifPinIndex index of the PIF pin identifying the PIF channel.
minValue minimum alarm value.
maxValue maximum alarm value.

Returns: alarm channel configuration.

validate

static OTC_SDK_API void validate(AlarmChannelConfig &config)

Validates the configuration of an alarm channel.

Parameters

Name Description
config alarm channel configuration to validate.

Exceptions

Name Description
SDKException if the configuration is invalid.