From: Martin Quinson Date: Fri, 8 Feb 2019 10:49:45 +0000 (+0100) Subject: new functions: Link::is_{on,off}() X-Git-Tag: v3_22~376^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5b7d9f3be01ce39f56e8fdfb2486e2481d1003a4 new functions: Link::is_{on,off}() --- diff --git a/include/simgrid/s4u/Link.hpp b/include/simgrid/s4u/Link.hpp index 04100c16d6..f713c352b8 100644 --- a/include/simgrid/s4u/Link.hpp +++ b/include/simgrid/s4u/Link.hpp @@ -60,7 +60,9 @@ public: bool is_used(); void turn_on(); + bool is_on(); void turn_off(); + bool is_off(); void* get_data(); /** Should be used only from the C interface. Prefer extensions in C++ */ void set_data(void* d); diff --git a/src/s4u/s4u_Link.cpp b/src/s4u/s4u_Link.cpp index 2019f745b0..20cf1d1f4c 100644 --- a/src/s4u/s4u_Link.cpp +++ b/src/s4u/s4u_Link.cpp @@ -78,6 +78,15 @@ void Link::turn_off() simgrid::simix::simcall([this]() { this->pimpl_->turn_off(); }); } +bool Link::is_on() +{ + return this->pimpl_->is_on(); +} +bool Link::is_off() +{ + return this->pimpl_->is_off(); +} + void* Link::get_data() { return this->pimpl_->get_data();