Thermal Camera SDK 11.3.0
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
AlarmChannelStatus.h
Go to the documentation of this file.
1// Copyright (c) 2008-2026 Optris GmbH & Co. KG
2
10
11#pragma once
12
13#include <cstdint>
14#include <ostream>
15#include <string>
16
17#include "otcsdk/Api.h"
19
20
21namespace optris
22{
23
26{
27public:
30
31
37 std::int32_t getId() const noexcept;
38
44 const std::string& getName() const noexcept;
45
51 AlarmState getState() const noexcept;
52
60 bool isActive() const noexcept;
61
67 float getValue() const noexcept;
68
75
76
86 OTC_SDK_API void update(std::int32_t channelId,
87 const std::string& name,
88 AlarmState state,
89 AlarmRangeRelation alarmRangeRelation,
90 float value) noexcept;
91
92
93private:
95 std::int32_t _id;
97 std::string _name;
99 AlarmState _state;
101 AlarmRangeRelation _alarmRangeRelation;
103 float _value;
104};
105
106
107// Utility functions
116OTC_SDK_API std::ostream& operator<<(std::ostream& out, const AlarmChannelStatus& status);
117
118
119// Inline implementations
120inline std::int32_t AlarmChannelStatus::getId() const noexcept
121{
122 return _id;
123}
124
125inline const std::string& AlarmChannelStatus::getName() const noexcept
126{
127 return _name;
128}
129
131{
132 return _state;
133}
134
136{
137 return _alarmRangeRelation;
138}
139
140inline float AlarmChannelStatus::getValue() const noexcept
141{
142 return _value;
143}
144
145inline bool AlarmChannelStatus::isActive() const noexcept
146{
147 return _state == AlarmState::Active;
148}
149
150} // namespace optris
Contains enums defining various properties of alarms.
Contains defines controlling the Windows DLL export and import of symbols.
#define OTC_SDK_API
Only needed when working with Windows DLLs.
Definition Api.h:65
Encapsulates the status of an alarm channel.
Definition AlarmChannelStatus.h:26
std::int32_t getId() const noexcept
Returns the ID of the alarm channel.
Definition AlarmChannelStatus.h:120
AlarmState getState() const noexcept
Returns the state of the alarm channel.
Definition AlarmChannelStatus.h:130
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.
bool isActive() const noexcept
Returns whether the alarm channel is active.
Definition AlarmChannelStatus.h:145
float getValue() const noexcept
Returns the value of the alarm channel on which the alarm state is based.
Definition AlarmChannelStatus.h:140
AlarmRangeRelation getAlarmRangeRelation() const noexcept
Returns the relation of the value to the alarm range.
Definition AlarmChannelStatus.h:135
OTC_SDK_API AlarmChannelStatus() noexcept
Constructor.
const std::string & getName() const noexcept
Returns the name of the alarm channel.
Definition AlarmChannelStatus.h:125
Main SDK namespace.
Definition AlarmChannel.h:21
AlarmRangeRelation
Represents the relation of an alarm input value to an alarm range.
Definition AlarmProperties.h:44
AlarmState
Represents the different states an alarm channel can be in.
Definition AlarmProperties.h:33
@ Active
Alarm is active.
Definition AlarmProperties.h:39