← Documentation
ADS-IDAC Engine 5.0.0
Communication.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <typeinfo>
5// Communication.h: interface for the Communication class.
6//
8
9#include <fstream>
10#include <boost/serialization/export.hpp>
11#include <boost/archive/text_oarchive.hpp>
12#include <boost/archive/text_iarchive.hpp>
13
14#include "../Global/fmodule.h"
15#include "../Global/TermConversions.h"
16
17#include <boost/serialization/serialization.hpp>
18
20{
21public:
23 Communication(int, int);
24 virtual ~Communication();
25 void setSender(int);
26 void setTypeOfCommunication(int);
27 void setTypeOfPauseActivity(int);
28 void setIntendedReceiver(int);
29 void setTimeOfCommunication(double);
30 void setSenderAndReceiver(int, int);
32 int getSender();
39 void saveCommunicationToFile(std::ofstream &);
40 void retrieveCommunicationFromFile(std::ifstream &);
42 template<class Archive>
43 void serialize(Archive & ar, const unsigned int version) {
44// std::cout << "Serializing class: " << typeid(*this).name() << std::endl;
45 ar & sender;
51 }
52
53private:
56 int type_of_communication;//parameter state, component state, control state, diagnosis,...
59 // type_of_pause_activity:
60 // Instinctive Response: sim::Strategy::InstinctiveResponse
61 // Paper Procedure: sim::Strategy::FollowProcedure
62 // Action Taker Follow Instructions Arising from Decision Maker Instinctive Response: sim::Strategy::FollowInstruction
63};
64
65
66BOOST_CLASS_EXPORT_KEY(Communication)
void setSenderAndReceiver(int, int)
int getTypeOfCommunication()
void setSender(int)
int type_of_communication
Definition: Communication.h:56
void setTypeOfCommunication(int)
int getTypeOfPauseActivity()
void setCommunicationPriority(int)
virtual ~Communication()
double getTimeOfCommunication()
void saveCommunicationToFile(std::ofstream &)
double time_of_communication
Definition: Communication.h:55
int type_of_pause_activity
Definition: Communication.h:58
void setIntendedReceiver(int)
int getIntendedReceiver()
void serialize(Archive &ar, const unsigned int version)
Definition: Communication.h:43
void setTimeOfCommunication(double)
void retrieveCommunicationFromFile(std::ifstream &)
friend class boost::serialization::access
Definition: Communication.h:41
void setTypeOfPauseActivity(int)
int communication_priority
Definition: Communication.h:57
void copyCommunication(Communication &)
int getCommunicationPriority()