← Documentation
ADS-IDAC Engine 5.0.0
CommandControlCenter.h
Go to the documentation of this file.
1
8
9#include <iostream>
10#include <typeinfo>
11#pragma once
12
13#include <list>
14#include <boost/serialization/export.hpp>
15
16#include "../Branch/BranchGoal.h"
17#include "../Branch/BranchStrategy.h"
18#include "../Branch/BranchSubGoal.h"
19#include "../Branch/BranchDiagnosis.h"
20#include "../Branch/BranchActionObjective.h"
21#include "../Branch/BranchActionPack.h"
22#include "../Branch/BranchAction.h"
23#include "../Branch/BranchExpectedAlarmState.h"
24#include "../Branch/BranchExpectedComponentState.h"
25#include "../Branch/BranchExpectedParameterTrend.h"
26#include "../Branch/BranchExpectedParameterValue.h"
27#include "../Branch/BranchProcedureStep.h"
28#include "../Branch/BranchSystemAction.h"
29#include "../Branch/BranchSystemAlarmState.h"
30#include "../Branch/BranchInfoGatherMode.h"
31#include "../CalculationAid/Timer.h"
32#include "../Branch/BranchExpectedMentalBelief.h"
33#include "../Branch/BranchScannedParameter.h"
34#include "../Branch/BranchExpectedSupportSystemState.h"
35#include <list>
36#include <fstream>
37#include <string>
38#include <boost/serialization/list.hpp>
39#include <boost/serialization/unique_ptr.hpp>
40#include <boost/serialization/serialization.hpp>
41#include <boost/archive/text_oarchive.hpp>
42#include <boost/archive/text_iarchive.hpp>
43#include "CommandControlUnit.h"
44#include <memory>
45
46//
48 public:
50 virtual ~CommandControlCenter();
51 void addGoal(const std::shared_ptr<BranchGoal> &, int);
52 void addStrategy(const std::shared_ptr<BranchStrategy> &, int);
53 void addSubGoal(const std::shared_ptr<BranchSubGoal> &, int);
54 void addDiagnosis(const std::shared_ptr<BranchDiagnosis> &, int);
55 void addActionObjective(const std::shared_ptr<BranchActionObjective> &, int);
56 void addActionPack(const std::shared_ptr<BranchActionPack> &, int);
57 void addAction(const std::shared_ptr<BranchAction> &, int);
58 void addExpectedAlarmState(const std::shared_ptr<BranchExpectedAlarmState> &, int);
59 void addExpectedComponentState(const std::shared_ptr<BranchExpectedComponentState> &, int);
60 void addExpectedSupportSystemState(const std::shared_ptr<BranchExpectedSupportSystemState> &, int);
61 void addExpectedParameterTrend(const std::shared_ptr<BranchExpectedParameterTrend> &, int);
62 void addExpectedParameterValue(const std::shared_ptr<BranchExpectedParameterValue> &, int);
63 void addExpectedParameterDifference(const std::shared_ptr<BranchExpectedParameterDifference> &, int);
64 void addProcedureStep(const std::shared_ptr<BranchProcedureStep> &, int);
65 void addInstinctiveResponseProcedure(const std::shared_ptr<BranchProcedureStep> &, int);
66 void addInfoGatherMode(const std::shared_ptr<BranchInfoGatherMode> &, int);
67 void addHWReliability(const std::shared_ptr<BranchSystemAction> &, int);
68 void addSSReliability(const std::shared_ptr<BranchSupportSystemAction> &, int);
69 void addNewAlarm(const std::shared_ptr<BranchSystemAlarmState> &, int);
70 void addMentalBelief(const std::shared_ptr<BranchExpectedMentalBelief> &, int);
71 void addScannedParameter(const std::shared_ptr<BranchScannedParameter> &, int);
72 void reduceRemainingTime(double);
81 void saveCommandControlCenterToFile(std::ofstream &);
82 void retrieveCommandControlCenterFromFile(std::ifstream &);
83 void displayInformation(std::string strInformation);
84private:
85 std::list<std::unique_ptr<CommandControlUnit>> commands;
86 std::list<std::unique_ptr<CommandControlUnit>> commands_residual;
87
89 template<class Archive>
90 void serialize(Archive & ar, const unsigned int version) {
91// std::cout << "Serializing class: " << typeid(*this).name() << std::endl;
92 ar & commands;
94 }
95};
void addNewAlarm(const std::shared_ptr< BranchSystemAlarmState > &, int)
void addSubGoal(const std::shared_ptr< BranchSubGoal > &, int)
void addExpectedParameterTrend(const std::shared_ptr< BranchExpectedParameterTrend > &, int)
void addDiagnosis(const std::shared_ptr< BranchDiagnosis > &, int)
void addActionObjective(const std::shared_ptr< BranchActionObjective > &, int)
void addExpectedParameterValue(const std::shared_ptr< BranchExpectedParameterValue > &, int)
void addActionPack(const std::shared_ptr< BranchActionPack > &, int)
void addExpectedComponentState(const std::shared_ptr< BranchExpectedComponentState > &, int)
void copyCommandControlCenterToRestartInfo(CommandControlCenter &)
void addExpectedSupportSystemState(const std::shared_ptr< BranchExpectedSupportSystemState > &, int)
void serialize(Archive &ar, const unsigned int version)
std::list< std::unique_ptr< CommandControlUnit > > commands_residual
void addSSReliability(const std::shared_ptr< BranchSupportSystemAction > &, int)
void addHWReliability(const std::shared_ptr< BranchSystemAction > &, int)
void addAction(const std::shared_ptr< BranchAction > &, int)
void displayInformation(std::string strInformation)
std::list< std::unique_ptr< CommandControlUnit > > commands
void saveCommandControlCenterToFile(std::ofstream &)
void addExpectedAlarmState(const std::shared_ptr< BranchExpectedAlarmState > &, int)
friend class boost::serialization::access
void copyCommandControlCenterFromRestartInfo(CommandControlCenter &)
void retrieveCommandControlCenterFromFile(std::ifstream &)
void addMentalBelief(const std::shared_ptr< BranchExpectedMentalBelief > &, int)
void addExpectedParameterDifference(const std::shared_ptr< BranchExpectedParameterDifference > &, int)
void addStrategy(const std::shared_ptr< BranchStrategy > &, int)
void addInstinctiveResponseProcedure(const std::shared_ptr< BranchProcedureStep > &, int)
void addScannedParameter(const std::shared_ptr< BranchScannedParameter > &, int)
void addInfoGatherMode(const std::shared_ptr< BranchInfoGatherMode > &, int)
void addProcedureStep(const std::shared_ptr< BranchProcedureStep > &, int)
void addGoal(const std::shared_ptr< BranchGoal > &, int)