1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2020] [HCL Technologies Ltd.] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* This file contains Alarm class defining Netconf Yang based alarm fields */
26 #include "AlarmMessages.h"
27 #include "Message.hpp"
32 class Alarm : public Message
36 string mObjectClassObjectInstance;
38 string mAlarmRaiseTime;
39 string mAlarmChangeTime;
40 string mAlarmClearTime;
41 string mProbableCause;
42 SeverityLevel mPerceivedSeverity;
43 string mRootCauseIndicator;
44 string mAdditionalText;
45 string mAdditionalInfo;
46 string mSpecificProblem;
51 /* Getter functions */
52 inline const EventType& getEventType()const
56 inline const string& getObjectClassObjectInstance()const
58 return mObjectClassObjectInstance;
60 inline const uint16_t& getAlarmId()const
64 inline const string& getAlarmRaiseTime()const
66 return mAlarmRaiseTime;
68 inline const string& getAlarmChangeTime()const
70 return mAlarmChangeTime;
72 inline const string& getAlarmClearTime()const
74 return mAlarmClearTime;
76 inline const string& getProbableCause()const
78 return mProbableCause;
80 inline const SeverityLevel getPerceivedSeverity()const
82 return mPerceivedSeverity;
84 inline const string getRootCauseIndicator()const
86 return mRootCauseIndicator;
88 inline const string getAdditionalText()const
90 return mAdditionalText;
92 inline const string getAdditionalInfo()const
94 return mAdditionalInfo;
96 inline const string getSpecificProblem()const
98 return mSpecificProblem;
101 /* Setter functions */
102 inline void setEventType(const EventType& eventType)
104 mEventType = eventType;
106 inline void setObjectClassObjectInstance(const string& objectClassObjectInstance )
108 mObjectClassObjectInstance = objectClassObjectInstance;
110 inline void setObjectClassObjectInstance(const char* objectClassObjectInstance )
112 mObjectClassObjectInstance = objectClassObjectInstance;
114 inline void setAlarmId(const uint16_t& alarmId)
118 inline void setAlarmRaiseTime(const string& alarmRaiseTime)
120 mAlarmRaiseTime = alarmRaiseTime;
122 inline void setAlarmRaiseTime(const char* alarmRaiseTime)
124 mAlarmRaiseTime = alarmRaiseTime;
126 inline void setAlarmChangeTime(const string& alarmChangeTime)
128 mAlarmChangeTime = alarmChangeTime;
130 inline void setAlarmChangeTime(const char* alarmChangeTime)
132 mAlarmChangeTime = alarmChangeTime;
134 inline void setAlarmClearTime(const string& alarmClearTime)
136 mAlarmClearTime = alarmClearTime;
138 inline void setAlarmClearTime(const char* alarmClearTime)
140 mAlarmClearTime = alarmClearTime;
142 inline void setProbableCause(const string& probableCause)
144 mProbableCause = probableCause;
146 inline void setProbableCause(const char* probableCause)
148 mProbableCause = probableCause;
150 inline void setPerceivedSeverity(const SeverityLevel& perceivedSeverity)
152 mPerceivedSeverity = perceivedSeverity;
154 inline void setRootCauseIndicator(const string& rootCauseIndicator)
156 mRootCauseIndicator = rootCauseIndicator;
158 inline void setRootCauseIndicator(const char* rootCauseIndicator)
160 mRootCauseIndicator = rootCauseIndicator;
162 inline void setAdditionalText(const string& additionalText)
164 mAdditionalText = additionalText;
166 inline void setAdditionalText(const char* additionalText)
168 mAdditionalText = additionalText;
170 inline void setAdditionalInfo(const string& additionalInfo)
172 mAdditionalInfo = additionalInfo;
174 inline void setAdditionalInfo(const char* additionalInfo)
176 mAdditionalInfo = additionalInfo;
178 inline void setSpecificProblem(const string& specificProblem)
180 mSpecificProblem = specificProblem;
182 inline void setSpecificProblem(const char* specificProblem)
184 mSpecificProblem = specificProblem;
192 /**********************************************************************
194 **********************************************************************/