10 #ifndef WRENCH_NETWORKDAEMONS_H
11 #define WRENCH_NETWORKDAEMONS_H
14 #include "wrench/services/Service.h"
15 #include "wrench/services/network_proximity/NetworkProximityServiceProperty.h"
16 #include "wrench/services/network_proximity/NetworkProximityServiceMessagePayload.h"
29 class NetworkProximityDaemon:
public Service {
32 NetworkProximityDaemon(Simulation *simulation, std::string hostname,
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);
39 friend class Simulation;
41 std::default_random_engine rng;
43 NetworkProximityDaemon(Simulation *simulation, std::string hostname,
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);
50 double measurement_period;
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;
60 void cleanup(
bool has_returned_from_main,
int return_value)
override;
63 double getTimeUntilNextMeasurement();
65 bool processNextMessage(
double timeout);
74 #endif //WRENCH_NETWORKDAEMONS_H