WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
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  simgrid::s4u::Mailbox *network_proximity_service_mailbox,
34  double message_size,double measurement_period,
35  double noise, int noise_seed, WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list);
36 
37  private:
38 
39  friend class Simulation;
40 
41  std::default_random_engine rng;
42 
44  simgrid::s4u::Mailbox *network_proximity_service_mailbox,
45  double message_size,double measurement_period,
46  double noise, int noise_seed, WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list, std::string suffix);
47 
48 
49  double message_size;
50  double measurement_period;
51  double max_noise;
52 
53  std::string suffix;
54  simgrid::s4u::Mailbox *next_mailbox_to_send;
55  std::shared_ptr<NetworkProximityDaemon> next_daemon_to_send;
56  std::string next_host_to_send;
57  simgrid::s4u::Mailbox *network_proximity_service_mailbox;
58 
59  int main() override;
60  void cleanup(bool has_returned_from_main, int return_value) override;
61 
62 
63  double getTimeUntilNextMeasurement();
64 
65  bool processNextMessage(double timeout);
66  };
67 
68  /***********************/
70  /***********************/
71 }
72 
73 
74 #endif //WRENCH_NETWORKDAEMONS_H
wrench::Service::messagepayload_list
WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list
The service's messagepayload list.
Definition: Service.h:113
wrench::NetworkProximityDaemon::NetworkProximityDaemon
NetworkProximityDaemon(Simulation *simulation, std::string hostname, simgrid::s4u::Mailbox *network_proximity_service_mailbox, double message_size, double measurement_period, double noise, int noise_seed, WRENCH_MESSAGE_PAYLOADCOLLECTION_TYPE messagepayload_list)
Constructor.
Definition: NetworkProximityDaemon.cpp:37
wrench
Definition: Action.cpp:28
wrench::S4U_Daemon::hostname
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:60
wrench::Simulation
A class that provides basic simulation methods. Once the simulation object has been explicitly or imp...
Definition: Simulation.h:48
wrench::NetworkProximityDaemon
A daemon used by a NetworkProximityService to run network measurements (proximity is computed between...
Definition: NetworkProximityDaemon.h:29
wrench::Service
A service that can be added to the simulation and that can be used by a WMS when executing a workflow...
Definition: Service.h:31
wrench::S4U_Daemon::simulation
Simulation * simulation
a pointer to the simulation object
Definition: S4U_Daemon.h:125