From 5b7d9f3be01ce39f56e8fdfb2486e2481d1003a4 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 8 Feb 2019 11:49:45 +0100 Subject: [PATCH] new functions: Link::is_{on,off}() --- include/simgrid/s4u/Link.hpp | 2 ++ src/s4u/s4u_Link.cpp | 9 +++++++++ 2 files changed, 11 insertions(+) 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(); -- 2.20.1