WRENCH  1.10
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
NetworkProximityMessage.h
1 
10 #ifndef WRENCH_NETWORKPROXIMITYMESSAGE_H
11 #define WRENCH_NETWORKPROXIMITYMESSAGE_H
12 
13 #include <wrench/services/network_proximity/NetworkProximityDaemon.h>
14 #include <wrench/services/ServiceMessage.h>
15 
16 namespace wrench {
17 
18  /***********************/
20  /***********************/
21 
25  class NetworkProximityMessage : public ServiceMessage {
26  protected:
27  NetworkProximityMessage(std::string name, double payload);
28 
29  };
30 
31 
35  class NetworkProximityLookupRequestMessage : public NetworkProximityMessage {
36  public:
37  NetworkProximityLookupRequestMessage(std::string answer_mailbox, std::pair<std::string, std::string> hosts,
38  double payload);
39 
41  std::string answer_mailbox;
43  std::pair<std::string, std::string> hosts;
44  };
45 
46 
50  class NetworkProximityLookupAnswerMessage : public NetworkProximityMessage {
51  public:
52  NetworkProximityLookupAnswerMessage(std::pair<std::string, std::string> hosts, double proximity_value,
53  double timestamp, double payload);
54 
56  std::pair<std::string, std::string> hosts;
58  double proximity_value;
60  double timestamp;
61  };
62 
63 
67  class NetworkProximityComputeAnswerMessage : public NetworkProximityMessage {
68  public:
69  NetworkProximityComputeAnswerMessage(std::pair<std::string, std::string> hosts, double proximity_value,
70  double payload);
71 
73  std::pair<std::string, std::string> hosts;
75  double proximity_value;
76  };
77 
81  class NetworkProximityTransferMessage : public NetworkProximityMessage {
82  public:
83  NetworkProximityTransferMessage(double payload);
84 
85  };
86 
90  class NextContactDaemonRequestMessage : public NetworkProximityMessage {
91  public:
92  NextContactDaemonRequestMessage(std::shared_ptr<NetworkProximityDaemon> daemon, double payload);
93 
95  std::shared_ptr<NetworkProximityDaemon> daemon;
96  };
97 
101  class NextContactDaemonAnswerMessage : public NetworkProximityMessage {
102  public:
103  NextContactDaemonAnswerMessage(std::string next_host_to_send,
104  std::shared_ptr<NetworkProximityDaemon> next_daemon_to_send,
105  std::string next_mailbox_to_send, double payload);
106 
108  std::string next_host_to_send;
109 
111  std::shared_ptr<NetworkProximityDaemon> next_daemon_to_send;
112 
114  std::string next_mailbox_to_send;
115  };
116 
120  class CoordinateLookupRequestMessage : public NetworkProximityMessage {
121  public:
122  CoordinateLookupRequestMessage(std::string answer_mailbox, std::string requested_host, double payload);
123 
125  std::string answer_mailbox;
126 
128  std::string requested_host;
129  };
130 
134  class CoordinateLookupAnswerMessage : public NetworkProximityMessage {
135  public:
136  CoordinateLookupAnswerMessage(std::string requested_host, bool success, std::pair<double, double> xy_coordinate,
137  double timestamp, double payload);
138 
140  std::string requested_host;
141 
143  bool success;
144 
146  std::pair<double, double> xy_coordinate;
148  double timestamp;
149  };
150 
151  /***********************/
153  /***********************/
154 }
155 
156 
157 #endif //WRENCH_NETWORKPROXIMITYMESSAGE_H
wrench
Definition: Alarm.cpp:20