PLCnext API Documentation  22.9.0.33
AlarmState.hpp
1 #pragma once
2 
3 #include "Arp/System/Core/Arp.h"
4 #include "Arp/System/NmPayload/Alarms/AlarmUserParameter.hpp"
5 #include <vector>
6 
7 namespace Arp { namespace System { namespace NmPayload { namespace Alarms
8 {
9 
12 {
13 public:
14  AlarmState(const AlarmState&) = default;
15  AlarmState() :
16  AlarmState("", "", 500)
17  {};
18  AlarmState(String alarmId, String alarmType, int16 severity) :
19  AlarmId(alarmId), AlarmType(alarmType), Message(""),
23  Comment(""), Language(""), User(""),
25  Severity(severity),
26  //LastSeverity(0),
27  Retain(false), RetainChanged(),
29  AlarmChanged()
30  {};
31  AlarmState(const String& alarmId, const String& alarmType, const String& message, const bool acitiveState,
32  const bool ackedState, const bool confirmedState, const String& comment, const String& language, const String& user, const bool suppressedState, const int16 severity, const bool isRetain) :
33  AlarmId(alarmId), AlarmType(alarmType), Message(message),
34  ActiveState(acitiveState), ActiveStateChanged(),
35  AckedState(ackedState), AckedStateChanged(),
36  ConfirmedState(confirmedState), ConfirmedStateChanged(),
37  Comment(comment), Language(language), User(user),
38  SuppressedState(suppressedState), SuppressedStateChanged(),
39  Severity(severity),
40  //LastSeverity(0),
41  Retain(isRetain), RetainChanged(),
43  AlarmChanged()
44  {};
58  bool AckedState;
78  bool Retain;
84  std::vector<AlarmUserParameter> UserParameters;
85 };
86 
87 }}}}
The class contains date and time informations.
Definition: DateTime.hpp:45
State with sub states of an alarm.
Definition: AlarmState.hpp:12
String AlarmType
Type of the alarm. Use as key to lookup a localized text for the alarm message.
Definition: AlarmState.hpp:48
String User
User that most recently changed the comment.
Definition: AlarmState.hpp:70
bool ConfirmedState
Confirmed state of the alarm (the user has resolved the problem).
Definition: AlarmState.hpp:62
bool Retain
True to indicate that the alarm should be displayed to the client.
Definition: AlarmState.hpp:78
String Message
Optional message.
Definition: AlarmState.hpp:52
DateTime SuppressedStateChanged
Timestamp for the last change of SuppressedState.
Definition: AlarmState.hpp:74
bool AckedState
Acknowledged state of the alarm (the user has seen the alarm).
Definition: AlarmState.hpp:58
DateTime RetainChanged
Timestamp for the last change of Retain.
Definition: AlarmState.hpp:80
bool ActiveState
Indication if the alarm condition is true.
Definition: AlarmState.hpp:54
DateTime AlarmChanged
Timestamp for the last change of Alarm.
Definition: AlarmState.hpp:82
DateTime ActiveStateChanged
Timestamp for the last change of ActiveState.
Definition: AlarmState.hpp:56
DateTime ConfirmedStateChanged
Timestamp for the last change of ConfirmedState.
Definition: AlarmState.hpp:64
String Comment
User comment to the Alarm from Acknowlege, Confirm or AddComment method.
Definition: AlarmState.hpp:66
DateTime AckedStateChanged
Timestamp for the last change of AckedState.
Definition: AlarmState.hpp:60
String AlarmId
Unique Id of the alarm instance within the PLC.
Definition: AlarmState.hpp:44
String Language
Language of the user comment.
Definition: AlarmState.hpp:68
bool SuppressedState
The server wants to hide the alarm.
Definition: AlarmState.hpp:72
int16 Severity
Severity between 1 and 1000 (1 = information; 1000 = fatal error).
Definition: AlarmState.hpp:76
std::vector< AlarmUserParameter > UserParameters
Up to 10 user parameters.
Definition: AlarmState.hpp:84
std::int16_t int16
The Arp integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:33
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API