← Documentation
ADS-IDAC Engine 5.0.0
CommandControlUnit.h
Go to the documentation of this file.
1#include <iostream>
2#include <typeinfo>
3// CommandControlUnit.h: interface for the CommandControlUnit class.
4//
6
7#pragma once
8
9#include "../Branch/BranchGoal.h"
10#include "../Branch/BranchStrategy.h"
11#include "../Branch/BranchSubGoal.h"
12#include "../Branch/BranchDiagnosis.h"
13#include "../Branch/BranchActionObjective.h"
14#include "../Branch/BranchActionPack.h"
15#include "../Branch/BranchAction.h"
16#include "../Branch/BranchExpectedAlarmState.h"
17#include "../Branch/BranchExpectedComponentState.h"
18#include "../Branch/BranchExpectedParameterTrend.h"
19#include "../Branch/BranchExpectedParameterValue.h"
20#include "../Branch/BranchExpectedParameterDifference.h"
21#include "../Branch/BranchProcedureStep.h"
22#include "../Branch/BranchSystemAction.h"
23#include "../Branch/BranchSystemAlarmState.h"
24#include "../Branch/BranchInfoGatherMode.h"
25#include "../Branch/BranchExpectedMentalBelief.h"
26#include "../Branch/BranchScannedParameter.h"
27#include "../CalculationAid/Timer.h"
28#include "../ControlPanel/StateOfActivation.h"
29#include "../Branch/BranchExpectedSupportSystemState.h"
30#include "../Branch/BranchSupportSystemAction.h"
31
32#include <boost/serialization/serialization.hpp>
33#include <boost/serialization/base_object.hpp>
34#include <boost/serialization/unique_ptr.hpp>
35#include <boost/serialization/shared_ptr.hpp>
36#include <boost/serialization/export.hpp>
37#include <boost/archive/text_oarchive.hpp>
38#include <boost/archive/text_iarchive.hpp>
39#include <fstream>
40#include <memory>
41
43 public:
45 virtual ~CommandControlUnit();
48 void releaseAllMembers();
49 void setAssociatedBranchID(int);
51 void saveCommandControlUnitToFile(std::ofstream &);
52 void retrieveCommandControlUnitFromFile(std::ifstream &);
53 std::shared_ptr<BranchGoal> goal;
54 std::shared_ptr<BranchStrategy> strategy;
55 std::shared_ptr<BranchSubGoal> subgoal;
56 std::shared_ptr<BranchDiagnosis> diagnosis;
57 std::shared_ptr<BranchActionObjective> action_objective;
58 std::shared_ptr<BranchActionPack> action_pack;
59 std::shared_ptr<BranchAction> action;
60 std::shared_ptr<BranchExpectedAlarmState> alarm_state;
61 std::shared_ptr<BranchExpectedComponentState> component_state;
62 std::shared_ptr<BranchExpectedSupportSystemState> support_system_state;
63 std::shared_ptr<BranchExpectedParameterTrend> parameter_trend;
64 std::shared_ptr<BranchExpectedParameterValue> parameter_value;
65 std::shared_ptr<BranchExpectedParameterDifference> parameter_difference;
66 std::shared_ptr<BranchProcedureStep> procedure_step;
67 std::shared_ptr<BranchProcedureStep> instinctive_response_procedure;
68 std::shared_ptr<BranchInfoGatherMode> info_gather_mode;
69 std::shared_ptr<BranchSystemAction> HW_reliability;
70 std::shared_ptr<BranchSupportSystemAction> SS_reliability;
71 std::shared_ptr<BranchSystemAlarmState> new_alarm;
72 std::shared_ptr<BranchExpectedMentalBelief> mental_belief;
73 std::shared_ptr<BranchScannedParameter> scanned_parameter;
74 private:
77 template<class Archive>
78 void serialize(Archive & ar, const unsigned int version)
79 {
80// std::cout << "Serializing class: " << typeid(*this).name() << std::endl;
81 ar & boost::serialization::base_object<Timer>(*this);
82 ar & boost::serialization::base_object<StateOfActivation>(*this);
84 ar & goal;
85 ar & strategy;
86 ar & subgoal;
87 ar & diagnosis;
89 ar & action_pack;
90 ar & action;
91 ar & alarm_state;
92 ar & component_state;
94 ar & parameter_trend;
95 ar & parameter_value;
97 ar & procedure_step;
100 ar & HW_reliability;
101 ar & SS_reliability;
102 ar & new_alarm;
103 ar & mental_belief;
105 }
106};
std::shared_ptr< BranchStrategy > strategy
std::shared_ptr< BranchProcedureStep > procedure_step
std::shared_ptr< BranchExpectedComponentState > component_state
std::shared_ptr< BranchProcedureStep > instinctive_response_procedure
std::shared_ptr< BranchGoal > goal
void saveCommandControlUnitToFile(std::ofstream &)
void copyCommandControlUnit(CommandControlUnit &)
std::shared_ptr< BranchScannedParameter > scanned_parameter
std::shared_ptr< BranchSubGoal > subgoal
std::shared_ptr< BranchExpectedSupportSystemState > support_system_state
std::shared_ptr< BranchExpectedParameterValue > parameter_value
std::shared_ptr< BranchExpectedAlarmState > alarm_state
void retrieveCommandControlUnitFromFile(std::ifstream &)
std::shared_ptr< BranchActionObjective > action_objective
std::shared_ptr< BranchAction > action
std::shared_ptr< BranchSystemAction > HW_reliability
void serialize(Archive &ar, const unsigned int version)
std::shared_ptr< BranchExpectedParameterDifference > parameter_difference
std::shared_ptr< BranchInfoGatherMode > info_gather_mode
std::shared_ptr< BranchExpectedMentalBelief > mental_belief
friend class boost::serialization::access
std::shared_ptr< BranchDiagnosis > diagnosis
std::shared_ptr< BranchSupportSystemAction > SS_reliability
std::shared_ptr< BranchSystemAlarmState > new_alarm
std::shared_ptr< BranchExpectedParameterTrend > parameter_trend
std::shared_ptr< BranchActionPack > action_pack
Definition: Timer.h:17