Thermal Camera SDK 11.3.0
SDK for Optris Thermal Cameras
Loading...
Searching...
No Matches
CompositeAlarmStatus.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 <ostream>
14#include <vector>
15
16#include "otcsdk/Api.h"
18
19
20namespace optris
21{
22
25{
26public:
29
30
41 bool isActive() const noexcept;
42
51 const std::vector<AlarmChannelStatus>& getActiveChannelStatuses() const noexcept;
52
61 int getActiveChannelCount() const noexcept;
62
64 void reset() noexcept;
65
71 void addChannelStatus(const AlarmChannelStatus& channel) noexcept;
72
73
74private:
76 std::vector<AlarmChannelStatus> _activeChannels;
77};
78
79
80// Utility functions
89OTC_SDK_API std::ostream& operator<<(std::ostream& out, const CompositeAlarmStatus& status);
90
91
92// Inline implementations
93inline bool CompositeAlarmStatus::isActive() const noexcept
94{
95 return !_activeChannels.empty();
96}
97
98inline const std::vector<AlarmChannelStatus>& CompositeAlarmStatus::getActiveChannelStatuses() const noexcept
99{
100 return _activeChannels;
101}
102
104{
105 return static_cast<int>(_activeChannels.size());
106}
107
108inline void CompositeAlarmStatus::reset() noexcept
109{
110 _activeChannels.clear();
111}
112
114{
115 _activeChannels.push_back(channel);
116}
117
118} // namespace optris
Contains a class holding the status of an alarm channel.
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
Encapsulates the status of the composite alarm.
Definition CompositeAlarmStatus.h:25
const std::vector< AlarmChannelStatus > & getActiveChannelStatuses() const noexcept
Returns the statuses of the active alarm channels contributing to the composite alarm.
Definition CompositeAlarmStatus.h:98
CompositeAlarmStatus()=default
Constructor.
int getActiveChannelCount() const noexcept
Returns the count of active alarm channels contributing to the composite alarm.
Definition CompositeAlarmStatus.h:103
void addChannelStatus(const AlarmChannelStatus &channel) noexcept
Adds the status of an active alarm channel contributing to the composite alarm.
Definition CompositeAlarmStatus.h:113
void reset() noexcept
Resets the composite alarm status.
Definition CompositeAlarmStatus.h:108
bool isActive() const noexcept
Returns whether the composite alarm is active.
Definition CompositeAlarmStatus.h:93
Main SDK namespace.
Definition AlarmChannel.h:21