WRENCH  1.11
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 
26  protected:
28 
29  };
30 
31 
36  public:
37  NetworkProximityLookupRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::pair<std::string, std::string> hosts,
38  double payload);
39 
41  simgrid::s4u::Mailbox *answer_mailbox;
43  std::pair<std::string, std::string> hosts;
44  };
45 
46 
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;
60  double timestamp;
61  };
62 
63 
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;
76  };
77 
82  public:
84 
85  };
86 
91  public:
92  NextContactDaemonRequestMessage(std::shared_ptr<NetworkProximityDaemon> daemon, double payload);
93 
95  std::shared_ptr<NetworkProximityDaemon> daemon;
96  };
97 
102  public:
104  std::shared_ptr<NetworkProximityDaemon> next_daemon_to_send,
105  simgrid::s4u::Mailbox *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  simgrid::s4u::Mailbox *next_mailbox_to_send;
115  };
116 
121  public:
122  CoordinateLookupRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::string requested_host, double payload);
123 
125  simgrid::s4u::Mailbox *answer_mailbox;
126 
128  std::string requested_host;
129  };
130 
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::NetworkProximityLookupAnswerMessage::hosts
std::pair< std::string, std::string > hosts
The hosts whose proximity values were calculated.
Definition: NetworkProximityMessage.h:56
wrench::NetworkProximityLookupAnswerMessage::timestamp
double timestamp
The timestamp of the oldest measurement data used to calculate the proximity value.
Definition: NetworkProximityMessage.h:60
wrench::CoordinateLookupRequestMessage
A message sent to a NetworkProximityService to request a coordinate lookup.
Definition: NetworkProximityMessage.h:120
wrench::NetworkProximityLookupAnswerMessage
A message sent by a NetworkProximityService in answer to a network proximity lookup request.
Definition: NetworkProximityMessage.h:50
wrench::CoordinateLookupRequestMessage::requested_host
std::string requested_host
The name of the host whose coordinates are being requested.
Definition: NetworkProximityMessage.h:128
wrench::CoordinateLookupAnswerMessage::timestamp
double timestamp
The timestamp of the oldest measurement data used to calculate the proximity value.
Definition: NetworkProximityMessage.h:148
wrench::NextContactDaemonRequestMessage
A message sent to a NetworkProximityService by a NetworkProximityDaemon to ask which other NetworkPro...
Definition: NetworkProximityMessage.h:90
wrench::CoordinateLookupAnswerMessage::success
bool success
Whether the lookup was successful or not.
Definition: NetworkProximityMessage.h:143
wrench::NetworkProximityLookupRequestMessage::answer_mailbox
simgrid::s4u::Mailbox * answer_mailbox
The mailbox to which the answer message should be sent.
Definition: NetworkProximityMessage.h:41
wrench::CoordinateLookupRequestMessage::answer_mailbox
simgrid::s4u::Mailbox * answer_mailbox
The mailbox to which the answer should be sent back.
Definition: NetworkProximityMessage.h:125
wrench::NextContactDaemonAnswerMessage::NextContactDaemonAnswerMessage
NextContactDaemonAnswerMessage(std::string next_host_to_send, std::shared_ptr< NetworkProximityDaemon > next_daemon_to_send, simgrid::s4u::Mailbox *next_mailbox_to_send, double payload)
Constructor.
Definition: NetworkProximityMessage.cpp:101
wrench::ServiceMessage
Top-level class for messages received/sent by a Service.
Definition: ServiceMessage.h:27
wrench::NetworkProximityComputeAnswerMessage::NetworkProximityComputeAnswerMessage
NetworkProximityComputeAnswerMessage(std::pair< std::string, std::string > hosts, double proximity_value, double payload)
Constructor.
Definition: NetworkProximityMessage.cpp:67
wrench::NetworkProximityLookupRequestMessage::NetworkProximityLookupRequestMessage
NetworkProximityLookupRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::pair< std::string, std::string > hosts, double payload)
Constructor.
Definition: NetworkProximityMessage.cpp:29
wrench::CoordinateLookupAnswerMessage::requested_host
std::string requested_host
The name of the host whose coordinates were requested
Definition: NetworkProximityMessage.h:140
wrench::NextContactDaemonAnswerMessage
A message sent by a NetworkProximityService to a NetworkProximityDaemon to tell it which other Networ...
Definition: NetworkProximityMessage.h:101
wrench
Definition: Action.cpp:28
wrench::NetworkProximityLookupAnswerMessage::proximity_value
double proximity_value
The calculated proximity value.
Definition: NetworkProximityMessage.h:58
wrench::NetworkProximityTransferMessage::NetworkProximityTransferMessage
NetworkProximityTransferMessage(double payload)
Constructor.
Definition: NetworkProximityMessage.cpp:115
wrench::NetworkProximityComputeAnswerMessage::hosts
std::pair< std::string, std::string > hosts
The hosts whose proximity values were calculated.
Definition: NetworkProximityMessage.h:73
wrench::NextContactDaemonRequestMessage::NextContactDaemonRequestMessage
NextContactDaemonRequestMessage(std::shared_ptr< NetworkProximityDaemon > daemon, double payload)
Constructor.
Definition: NetworkProximityMessage.cpp:84
wrench::NetworkProximityComputeAnswerMessage::proximity_value
double proximity_value
The computed proximity value.
Definition: NetworkProximityMessage.h:75
wrench::NextContactDaemonRequestMessage::daemon
std::shared_ptr< NetworkProximityDaemon > daemon
The NetworkProximityDaemon daemon to return the answer to.
Definition: NetworkProximityMessage.h:95
wrench::SimulationMessage::payload
double payload
The message name.
Definition: SimulationMessage.h:40
wrench::NetworkProximityMessage::NetworkProximityMessage
NetworkProximityMessage(double payload)
Constructor.
Definition: NetworkProximityMessage.cpp:18
wrench::NetworkProximityLookupRequestMessage::hosts
std::pair< std::string, std::string > hosts
The hosts between which to calculate a proximity value.
Definition: NetworkProximityMessage.h:43
wrench::CoordinateLookupAnswerMessage
A message sent by a NetworkProximityService in answer to a coordinate lookup request.
Definition: NetworkProximityMessage.h:134
wrench::CoordinateLookupAnswerMessage::xy_coordinate
std::pair< double, double > xy_coordinate
The current (x,y) coordinates of the requested host.
Definition: NetworkProximityMessage.h:146
wrench::NextContactDaemonAnswerMessage::next_mailbox_to_send
simgrid::s4u::Mailbox * next_mailbox_to_send
The next mailbox for the network daemon to contact.
Definition: NetworkProximityMessage.h:114
wrench::CoordinateLookupRequestMessage::CoordinateLookupRequestMessage
CoordinateLookupRequestMessage(simgrid::s4u::Mailbox *answer_mailbox, std::string requested_host, double payload)
Constructor.
Definition: NetworkProximityMessage.cpp:125
wrench::NextContactDaemonAnswerMessage::next_host_to_send
std::string next_host_to_send
The next host for the NetworkProximityDaemon to contact.
Definition: NetworkProximityMessage.h:108
wrench::NetworkProximityComputeAnswerMessage
A message received by a NetworkProximityService that updates its database of proximity values.
Definition: NetworkProximityMessage.h:67
wrench::NextContactDaemonAnswerMessage::next_daemon_to_send
std::shared_ptr< NetworkProximityDaemon > next_daemon_to_send
The next NetworkProximityDaemon for the NetworkProximityDaemon to contact.
Definition: NetworkProximityMessage.h:111
wrench::NetworkProximityLookupRequestMessage
A message sent to a NetworkProximityService to request a network proximity lookup.
Definition: NetworkProximityMessage.h:35
wrench::NetworkProximityMessage
Top-level class for messages received/sent by a NetworkProximityService.
Definition: NetworkProximityMessage.h:25
wrench::NetworkProximityLookupAnswerMessage::NetworkProximityLookupAnswerMessage
NetworkProximityLookupAnswerMessage(std::pair< std::string, std::string > hosts, double proximity_value, double timestamp, double payload)
Constructor.
Definition: NetworkProximityMessage.cpp:48
wrench::CoordinateLookupAnswerMessage::CoordinateLookupAnswerMessage
CoordinateLookupAnswerMessage(std::string requested_host, bool success, std::pair< double, double > xy_coordinate, double timestamp, double payload)
Constructor.
Definition: NetworkProximityMessage.cpp:142
wrench::NetworkProximityTransferMessage
A message sent between NetworkProximityDaemon processes to perform network measurements.
Definition: NetworkProximityMessage.h:81