#include "simgrid/s4u/Link.hpp"
#include "simgrid/sg_config.h"
#include "simgrid/simix.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
#include "src/surf/network_interface.hpp"
#include "xbt/log.h"
const char* sg_link_name(sg_link_t link)
{
- return link->name();
+ return link->getCname();
}
sg_link_t sg_link_by_name(const char* name)
{
return nullptr;
return &res->piface_;
}
-const char* Link::name()
+const std::string& Link::getName() const
+{
+ return this->pimpl_->getName();
+}
+const char* Link::getCname() const
{
return this->pimpl_->getCname();
}
+const char* Link::name()
+{
+ return getCname();
+}
bool Link::isUsed()
{
return this->pimpl_->isUsed();
return this->pimpl_->sharingPolicy();
}
+double Link::getUsage()
+{
+ return this->pimpl_->constraint()->get_usage();
+}
+
void Link::turnOn()
{
simgrid::simix::kernelImmediate([this]() {
});
}
+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 *
*************/