WRENCH  1.10
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 
29  class NetworkProximityDaemon: public Service {
30  public:
31 
32  NetworkProximityDaemon(Simulation *simulation, std::string hostname,
33  std::string network_proximity_service_mailbox,
34  double message_size,double measurement_period,
35  double noise, std::map<std::string, double> 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, double> 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::shared_ptr<NetworkProximityDaemon> next_daemon_to_send;
54  std::string next_host_to_send;
55  std::string network_proximity_service_mailbox;
56 
57  int main() override;
58  void cleanup(bool has_returned_from_main, int return_value) override;
59 
60 
61  double getTimeUntilNextMeasurement();
62 
63  bool processNextMessage(double timeout);
64  };
65 
66  /***********************/
68  /***********************/
69 }
70 
71 
72 #endif //WRENCH_NETWORKDAEMONS_H
wrench
Definition: Alarm.cpp:20