diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2021-05-20 17:47:35 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2021-05-20 17:47:35 +0200 |
| commit | 00dfd87c8570ea97e0b7cf3cd0fd7257f7125ae0 (patch) | |
| tree | 1bfcea79052dd7c14e6b08995071fb699de92c72 | |
| parent | e3c7d5219d30a774118eb203ab2e6a778bed8081 (diff) | |
Cleaning
| -rw-r--r-- | results/energy.png | bin | 232602 -> 249975 bytes | |||
| -rw-r--r-- | results/success.png | bin | 143909 -> 148839 bytes | |||
| -rw-r--r-- | src/simulator.cc | 16 |
3 files changed, 2 insertions, 14 deletions
diff --git a/results/energy.png b/results/energy.png Binary files differindex 34b3407..537f657 100644 --- a/results/energy.png +++ b/results/energy.png diff --git a/results/success.png b/results/success.png Binary files differindex 2c153d9..fcf0d19 100644 --- a/results/success.png +++ b/results/success.png diff --git a/src/simulator.cc b/src/simulator.cc index 79a5d5c..d2f971f 100644 --- a/src/simulator.cc +++ b/src/simulator.cc @@ -56,15 +56,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(simulator, "[DAO] Loosely Coupled DSS"); /// @brief For convenience sake typedef unsigned int u32; -u32 nON; -bool *data_ready; -bool is_data_rcv_ready(){ - for(int i=0;i<nON;i++){ - if(data_ready[i]) - return true; - } - return false; -} + /** * Data that will be exchange between the nodes */ @@ -101,14 +93,11 @@ int main(int argc, char **argv) { XBT_INFO("-------------------------------------------------"); // Init all nodes actors - nON=simgrid::s4u::Engine::get_instance()->get_host_count(); - data_ready=(bool*)malloc(sizeof(bool)*nON); + u32 nON=simgrid::s4u::Engine::get_instance()->get_host_count(); for(u32 i=0;i<nON;i++){ std::vector<std::string> args; std::ostringstream ss; ss<< "on" <<i; - args.push_back(std::to_string(i)); - data_ready[i]=false; simgrid::s4u::Actor::create("ON", simgrid::s4u::Host::by_name(ss.str()), obs_node, args); } @@ -125,7 +114,6 @@ int main(int argc, char **argv) { static void obs_node(std::vector<std::string> args) { // Init various variables std::string selfName = simgrid::s4u::this_actor::get_host()->get_name(); - int id=stoi(args[0]); simgrid::s4u::this_actor::get_host()->turn_on(); Inputs i(selfName); simgrid::s4u::Mailbox *m = simgrid::s4u::Mailbox::by_name("medium"); |
