Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Explain how to maintain the spack package for simgrid
[simgrid.git] / src / s4u / s4u_link.cpp
index 6635142..7a38166 100644 (file)
@@ -90,6 +90,10 @@ const char* Link::getCname() const
 {
   return this->pimpl_->getCname();
 }
+const char* Link::name()
+{
+  return getCname();
+}
 bool Link::isUsed()
 {
   return this->pimpl_->isUsed();
@@ -110,6 +114,11 @@ int Link::sharingPolicy()
   return this->pimpl_->sharingPolicy();
 }
 
+double Link::getUsage()
+{
+  return lmm_constraint_get_usage(this->pimpl_->constraint());
+}
+
 void Link::turnOn()
 {
   simgrid::simix::kernelImmediate([this]() {
@@ -153,6 +162,15 @@ void Link::setLatencyTrace(tmgr_trace_t trace)
   });
 }
 
+const char* Link::getProperty(const char* key)
+{
+  return this->pimpl_->getProperty(key);
+}
+void Link::setProperty(std::string key, std::string value)
+{
+  simgrid::simix::kernelImmediate([this, key, value] { this->pimpl_->setProperty(key, value); });
+}
+
 /*************
  * Callbacks *
  *************/