NetworkProximityDaemon.h
1 
10 #ifndef WRENCH_NETWORKDAEMONS_H
11 #define WRENCH_NETWORKDAEMONS_H
12 
13 #include <random>
14 #include "wrench/services/Service.h"
15 #include "wrench/services/network_proximity/NetworkProximityServiceProperty.h"
16 #include "wrench/services/network_proximity/NetworkProximityServiceMessagePayload.h"
17 
18 namespace wrench {
19 
20  /***********************/
22  /***********************/
23 
24  class Simulation;
25 
30  public:
31 
33  std::string network_proximity_service_mailbox,
34  double message_size,double measurement_period,
35  double noise, std::map<std::string, std::string> messagepayload_list);
36 
37  private:
38 
39  friend class Simulation;
40 
41  NetworkProximityDaemon(Simulation *simulation, std::string hostname,
42  std::string network_proximity_service_mailbox,
43  double message_size,double measurement_period,
44  double noise, std::map<std::string, std::string> messagepayload_list, std::string suffix);
45 
46 
47  double message_size;
48  double measurement_period;
49  double max_noise;
50 
51  std::string suffix;
52  std::string next_mailbox_to_send;
53  std::string next_host_to_send;
54  std::string network_proximity_service_mailbox;
55 
56  int main();
57 
58  double getTimeUntilNextMeasurement();
59 
60  bool processNextMessage(double timeout);
61  };
62 
63  /***********************/
65  /***********************/
66 }
67 
68 
69 #endif //WRENCH_NETWORKDAEMONS_H
A service that can be added to the simulation and that can be used by a WMS when executing a workflow...
Definition: Service.h:26
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:47
A daemon used by a NetworkProximityService to run network measurements (proximity is computed between...
Definition: NetworkProximityDaemon.h:29
A class that provides basic simulation methods.
Definition: Simulation.h:34
NetworkProximityDaemon(Simulation *simulation, std::string hostname, std::string network_proximity_service_mailbox, double message_size, double measurement_period, double noise, std::map< std::string, std::string > messagepayload_list)
Constructor.
Definition: NetworkProximityDaemon.cpp:33
std::map< std::string, std::string > messagepayload_list
The service&#39;s messagepayload list.
Definition: Service.h:107
Simulation * simulation
a pointer to the simulation object
Definition: S4U_Daemon.h:84
Definition: TerminalOutput.cpp:15