← Documentation
ADS-IDAC Engine 5.0.0
AlarmElement.cpp
Go to the documentation of this file.
1// AlarmElement.cpp: implementation of the AlarmElement class.
2//
4
5#include "AlarmElement.h"
6#include "../Global/fmodule.h"
7#include <boost/serialization/export.hpp>
8#include <boost/archive/binary_oarchive.hpp>
9#include <boost/archive/binary_iarchive.hpp>
10BOOST_CLASS_EXPORT_IMPLEMENT(AlarmElement)
11using namespace std;
12
14// Construction/Destruction
16
18{
19 alarm_name = "NOT_SPECIFIED";
26}
27
28
30{
31
32}
33
34void AlarmElement::setAlarmName(string str){alarm_name = str;}
36
39}
47 string r_state;
49 r_state = "ON";
50 }
51 else{
52 r_state = "OFF";
53 }
54 return r_state;
55}
70}
72 fout << alarm_name << ' ' << corresponding_indicator_name << ' ' << displayed_alarm_state << ' '
75}
79}
81 bool matched = true;
83 matched = false;
84 }
85 return matched;
86}
void setTimeAtWhichThisAlarmIsActivated(double)
int displayed_operator_control_state
Definition: AlarmElement.h:63
std::string getCorrespondingIndicatorName()
void readInfoFromFile(std::ifstream &)
void setCorrespondingIndicatorName(std::string)
virtual ~AlarmElement()
double time_required_to_check_this_alarm
Definition: AlarmElement.h:64
void retrieveAlarmElementFromFile(std::ifstream &)
void setDisplayedAlarmState(int)
void copyAlarmElement(AlarmElement &)
double getTimeRequiredToCheckThisAlarm()
double getTimeAtWhichThisAlarmIsActivated()
std::string corresponding_indicator_name
Definition: AlarmElement.h:60
double getImportanceOfTheAlarm()
void setImportanceOfTheAlarm(double)
std::string getAlarmName()
std::string alarm_name
Definition: AlarmElement.h:59
void setAlarmName(std::string)
void saveAlarmElementToFile(std::ofstream &)
int getDisplayedOperatorControlState()
int displayed_alarm_state
Definition: AlarmElement.h:61
int getDisplayedAlarmState()
void setDisplayedOperatorControlState(int)
void setTimeRequiredToCheckThisAlarm(double)
std::string getDisplayedAlarmStateString()
double time_at_which_this_alarm_is_activated
Definition: AlarmElement.h:65
double importance_of_the_alarm
Definition: AlarmElement.h:62
bool checkIfIsIdenticalAlarmElement(AlarmElement &)
constexpr int On
Definition: SimConstants.h:105
constexpr int Off
Definition: SimConstants.h:106
constexpr int Reset
Definition: SimConstants.h:113