PLCnext API Documentation 26.0.1.58
AlarmState.hpp
1#pragma once
2
4#include "Arp/System/NmPayload/Alarms/AlarmUserParameter.hpp"
5#include <vector>
6
7namespace Arp { namespace System { namespace NmPayload { namespace Alarms
8{
9
11class ARP_CXX_SYMBOL_EXPORT AlarmState
12{
13public:
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(""),
20 ActiveState(false),
21 AckedState(true),
22 ConfirmedState(true),
23 Comment(""), Language(""), User(""),
24 SuppressedState(false),
25 Severity(severity),
26 //LastSeverity(0),
27 Retain(false),
28 UserParameters()
29 {};
30 AlarmState(const String& alarmId, const String& alarmType, const String& message, const bool acitiveState,
31 const bool ackedState, const bool confirmedState, const String& comment, const String& language, const String& user, const bool suppressedState, const int16 severity, const bool isRetain) :
32 AlarmId(alarmId), AlarmType(alarmType), Message(message),
33 ActiveState(acitiveState),
34 AckedState(ackedState),
35 ConfirmedState(confirmedState),
36 Comment(comment), Language(language), User(user),
37 SuppressedState(suppressedState),
38 Severity(severity),
39 //LastSeverity(0),
40 Retain(isRetain),
41 UserParameters()
42 {};
54 DateTime ActiveStateChanged = DateTime(0, DateTimeKind::Utc);
58 DateTime AckedStateChanged = DateTime(0, DateTimeKind::Utc);
62 DateTime ConfirmedStateChanged = DateTime(0, DateTimeKind::Utc);
72 DateTime SuppressedStateChanged = DateTime(0, DateTimeKind::Utc);
76 bool Retain;
78 DateTime RetainChanged = DateTime(0, DateTimeKind::Utc);
80 DateTime AlarmChanged = DateTime(0, DateTimeKind::Utc);
82 std::vector<AlarmUserParameter> UserParameters;
83};
84
85}}}}
This class contains date and time informations.
Definition: DateTime.hpp:27
This class represents the Arp String. The implementation is based on std::string.
Definition: String.hpp:39
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:46
String User
User that most recently changed the comment.
Definition: AlarmState.hpp:68
bool ConfirmedState
Confirmed state of the alarm (the user has resolved the problem).
Definition: AlarmState.hpp:60
bool Retain
True to indicate that the alarm should be displayed to the client.
Definition: AlarmState.hpp:76
String Message
Optional message.
Definition: AlarmState.hpp:50
bool AckedState
Acknowledged state of the alarm (the user has seen the alarm).
Definition: AlarmState.hpp:56
bool ActiveState
Indication if the alarm condition is true.
Definition: AlarmState.hpp:52
String Comment
User comment to the Alarm from Acknowlege, Confirm or AddComment method.
Definition: AlarmState.hpp:64
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:66
bool SuppressedState
The server wants to hide the alarm.
Definition: AlarmState.hpp:70
int16 Severity
Severity between 1 and 1000 (1 = information; 1000 = fatal error).
Definition: AlarmState.hpp:74
std::vector< AlarmUserParameter > UserParameters
Up to 10 user parameters.
Definition: AlarmState.hpp:82
std::int16_t int16
The Arp integer type of 2 byte size.
Definition: PrimitiveTypes.hpp:31
@ Retain
The node shall be retained.
enum ARP_CXX_SYMBOL_EXPORT Severity
Enumeration of Severities for notifications
Definition: Severity.hpp:14
Root namespace for the PLCnext API