← Documentation
ADS-IDAC Engine 5.0.0
ControlValue.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <typeinfo>
5// ControlValue.h: interface for the ControlValue class.
6//
8
9#include "SystemControl.h"
10#include "../System/SystemModule.h"
11#include <boost/serialization/export.hpp>
12
13// Include Boost Serialization headers
14#include <boost/serialization/serialization.hpp>
15#include <boost/serialization/base_object.hpp>
16#include <boost/serialization/access.hpp>
17#include <boost/archive/text_oarchive.hpp>
18#include <boost/archive/text_iarchive.hpp>
19
21{
22public:
24 virtual ~ControlValue();
25 void setDisplayedControlValue(double);
29 void readInfoFromFile(std::ifstream &);
31 void performControl(SystemModule &, double);
33 void saveControlValueToFile(std::ofstream &);
34 void retrieveControlValueFromFile(std::ifstream &);
35
36private:
38
39 // Grant serialization access
41
42 // Serialization function
43 template<class Archive>
44 void serialize(Archive & ar, const unsigned int version)
45 {
46// std::cout << "Serializing class: " << typeid(*this).name() << std::endl;
47 // Serialize base class information
48 ar & boost::serialization::base_object<SystemControl>(*this);
50 }
51};
52
53
54BOOST_CLASS_EXPORT_KEY(ControlValue)
double displayed_control_value
Definition: ControlValue.h:37
void serialize(Archive &ar, const unsigned int version)
Definition: ControlValue.h:44
double getDisplayedControlValue()
void saveControlValueToFile(std::ofstream &)
void retrieveControlValueFromFile(std::ifstream &)
void setDisplayedControlValue(double)
void readInfoFromFile(std::ifstream &)
void updateDisplayedControlValue(SystemModule &, double)
double displayed_control_value_when_fail
Definition: ControlValue.h:37
virtual ~ControlValue()
friend class boost::serialization::access
Definition: ControlValue.h:40
double getDisplayedControlValueWhenFail()
void copyControlValue(ControlValue &)
void performControl(SystemModule &, double)
void setDisplayedControlValueWhenFail(double)