10 #ifndef WRENCH_HOSTSTATECHANGEDETECTOR_H
11 #define WRENCH_HOSTSTATECHANGEDETECTOR_H
13 #include "wrench/services/Service.h"
14 #include "wrench/simgrid_S4U_util/S4U_Daemon.h"
15 #include "HostStateChangeDetectorProperty.h"
29 WRENCH_PROPERTY_COLLECTION_TYPE default_property_values = {
36 std::vector<std::string> hosts_to_monitor,
37 bool notify_when_turned_on,
38 bool notify_when_turned_off,
39 bool notify_when_speed_change,
40 std::shared_ptr<S4U_Daemon> creator,
41 simgrid::s4u::Mailbox *mailbox_to_notify,
50 void cleanup(
bool has_terminated_cleanly,
int return_value)
override;
51 void hostStateChangeCallback(std::string
const &
hostname);
52 void hostSpeedChangeCallback(std::string
const &
hostname);
54 std::vector<std::string> hosts_to_monitor;
55 bool notify_when_turned_on;
56 bool notify_when_turned_off;
57 bool notify_when_speed_change;
58 simgrid::s4u::Mailbox *mailbox_to_notify;
61 std::vector<std::pair<std::string, bool>> hosts_that_have_recently_changed_state;
62 std::vector<std::pair<std::string, double>> hosts_that_have_recently_changed_speed;
64 std::shared_ptr<S4U_Daemon> creator;
66 std::vector<std::string> hosts_that_have_recently_turned_on;
67 std::vector<std::string> hosts_that_have_recently_turned_off;
69 unsigned int on_state_change_call_back_id;
70 unsigned int on_speed_change_call_back_id;
82 #endif //WRENCH_HOSTSTATECHANGEDETECTOR_H