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

Encapsulates the status of an alarm channel.

Public functions

AlarmChannelStatus

OTC_SDK_API AlarmChannelStatus() noexcept

Constructor.

getId

std::int32_t getId() const noexcept

Returns the ID of the alarm channel.

Returns: alarm channel ID.

getName

const std::string & getName() const noexcept

Returns the name of the alarm channel.

Returns: name of the alarm channel.

getState

AlarmState getState() const noexcept

Returns the state of the alarm channel.

Returns: alarm channel state.

isActive

bool isActive() const noexcept

Returns whether the alarm channel is active. An alarm channel will be considered active, if its state is AlarmState::Active.

Returns: true if the alarm channel is active, false otherwise.

getValue

float getValue() const noexcept

Returns the value of the alarm channel on which the alarm state is based.

Returns: value of the alarm channel on which the alarm state is based.

getAlarmRangeRelation

AlarmRangeRelation getAlarmRangeRelation() const noexcept

Returns the relation of the value to the alarm range.

Returns: relation of the value to the alarm range.

update

OTC_SDK_API void update(std::int32_t channelId, const std::string &name, AlarmState state, AlarmRangeRelation alarmRangeRelation, float value) noexcept

Updates the status of the alarm channel.

Parameters

Name Description
channelId ID of the alarm channel.
name name of the alarm channel.
state state of the alarm channel.
alarmRangeRelation the relation between the value and the alarm ranges.
value value of the alarm channel on which the alarm state is based.