Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
new functions: Link::is_{on,off}()
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 8 Feb 2019 10:49:45 +0000 (11:49 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 8 Feb 2019 10:49:45 +0000 (11:49 +0100)
include/simgrid/s4u/Link.hpp
src/s4u/s4u_Link.cpp

index 04100c1..f713c35 100644 (file)
@@ -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);
index 2019f74..20cf1d1 100644 (file)
@@ -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();