OpenDaVINCI  4.16.0
ControlledContainerConferenceFactory.h
Go to the documentation of this file.
1 
20 #ifndef CONTEXT_BASE_CONTROLLEDCONTAINERCONFERENCEFACTORY_H_
21 #define CONTEXT_BASE_CONTROLLEDCONTAINERCONFERENCEFACTORY_H_
22 
23 #include <string>
24 #include <vector>
25 
27 #include <memory>
32 
33 namespace odcore { namespace data { class Container; } }
34 namespace odcore { namespace io { namespace conference { class ContainerConference; } } }
35 
36 namespace odcontext {
37  namespace base {
38 
39 class BlockableContainerReceiver;
40 class ContainerDeliverer;
41 
42  using namespace std;
43 
48  private:
55 
62 
63  public:
65 
67 
75  virtual std::shared_ptr<odcore::io::conference::ContainerConference> getContainerConference(const string &address, const uint32_t &port = odcore::io::conference::ContainerConferenceFactory::MULTICAST_PORT);
76 
77  virtual void sendToSystemsUnderTest(odcore::data::Container &c);
78 
79  virtual void add(odcore::io::conference::ContainerListener *cl);
80 
81  // This method is called by BlockableContainerReceiver to send data FROM a specific System Under Test to all SystemParts.
82  // Furthermore, every container send from a System Under Test is also dispatched to all Systems Under Test using sendToSystemsUnderTest
83  virtual void nextContainer(odcore::data::Container &c);
84 
85  private:
92  void sendToSUD(odcore::data::Container &c);
93 
100  void sendToSCC(odcore::data::Container &c);
101 
102  private:
103  odcore::base::Mutex m_listOfContainerListenersToReceiveContainersFromSystemsUnderTestMutex;
104  vector<odcore::io::conference::ContainerListener*> m_listOfContainerListenersToReceiveContainersFromSystemsUnderTest;
105 
106  // Using ContainerDeliverers, synchronous communication is enforced.
107  odcore::base::Mutex m_listOfContainerDelivererToSystemUnderTestMutex;
108  vector<ContainerDeliverer*> m_listOfContainerDelivererToSystemUnderTest;
109 
110  odcore::base::Mutex m_listOfContainerDelivererFromSystemUnderTestMutex;
111  vector<BlockableContainerReceiver*> m_listOfContainerDelivererFromSystemUnderTest;
112  };
113 
114  }
115 } // odcontext::base
116 
117 #endif /*CONTEXT_BASE_CONTROLLEDCONTAINERCONFERENCEFACTORY_H_*/
Definition: ContainerListener.h:35
Definition: ControlledContainerConference.h:36
Definition: base/Mutex.h:49
Definition: Container.h:40
Definition: ContainerConferenceFactory.h:40
#define OPENDAVINCI_API
Definition: opendavinci.h:67
Definition: ControlledContainerConferenceFactory.h:47