← Documentation
ADS-IDAC Engine 5.0.0
ControlElement.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <typeinfo>
5// ControlElement.h: interface for the ControlElement class.
6//
8
9#include <math.h>
10#include <boost/serialization/export.hpp>
11
12#include "../System/InteractiveVariable.h"
13#include "../System/SystemModule.h"
14#include <boost/archive/text_oarchive.hpp>
15#include <boost/archive/text_iarchive.hpp>
16#include <boost/serialization/access.hpp>
17#include <boost/serialization/string.hpp>
18
20{
21public:
23 virtual ~ControlElement();
24 void setDisplayName(std::string);
27 void setValueForOnOrFullyOpen(double);
28 void setValueForOffOrFullyClose(double);
29 void setValueForNeutralState(double);
30 std::string getDisplayName();
36 void readInfoFromFile(std::ifstream &);
40 void setControlValue(double);
41 double getControlValue();
42 void saveControlElementToFile(std::ofstream &);
43 void retrieveControlElementFromFile(std::ifstream &);
45 void setTimeRatioForAction(double);
46 double getTimeRatioForAction();
49 template<class Archive>
50 void serialize(Archive & ar, const unsigned int version) {
51// std::cout << "Serializing class: " << typeid(*this).name() << std::endl;
52 // Serialize members
53 ar & display_name;
61 ar & control_value;
62 }
63private:
65 double nominal_time_required_to_act_on_this_control;//a constant value read in from the input
66 double time_ratio_for_action;//a value to adjust the actual time required for execute the action
72};
73
74
75BOOST_CLASS_EXPORT_KEY(ControlElement)
std::string corresponding_component_name_of_control
void setValueForOnOrFullyOpen(double)
double value_for_neutral_state
void setTimeRatioForAction(double)
std::string getDisplayName()
double time_ratio_for_action
double time_at_which_this_control_is_activated
void setNominalTimeRequiredToActOnThisControl(double)
void setControlValue(double)
double value_for_off_or_fully_close
void saveControlElementToFile(std::ofstream &)
double getValueForNeutralState()
void serialize(Archive &ar, const unsigned int version)
void setValueForNeutralState(double)
void retrieveControlElementFromFile(std::ifstream &)
std::string getCorrespondingComponentNameOfControl()
double control_value
double getNominalTimeRequiredToActOnThisControl()
double nominal_time_required_to_act_on_this_control
double getControlValue()
double getAdjustedTimeRequiredToPerformTheAction()
std::string display_name
double value_for_on_or_fully_open
double getTimeRatioForAction()
void copyControlElement(ControlElement &)
friend class boost::serialization::access
void setValueForOffOrFullyClose(double)
void setDisplayName(std::string)
bool checkIfIsIdenticalControlElement(ControlElement &)
double getValueForOnOrFullyOpen()
virtual ~ControlElement()
void setCorrespondingComponentNameOfControl(std::string)
void setTimeAtWhichThisControlIsActivated(double)
double getValueForOffOrFullyClose()
double getTimeAtWhichThisControlIsActivated()
void readInfoFromFile(std::ifstream &)