-/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2018. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <algorithm>
#include "simgrid/s4u/Link.hpp"
-#include "simgrid/sg_config.h"
+#include "simgrid/sg_config.hpp"
#include "simgrid/simix.hpp"
+#include "src/kernel/lmm/maxmin.hpp"
#include "src/surf/network_interface.hpp"
#include "xbt/log.h"
* C API *
*********/
-extern "C" {
-
const char* sg_link_name(sg_link_t link)
{
return link->getCname();
{
simgrid::surf::LinkImpl::linksExit();
}
-}
/***********
* C++ API *
double Link::getUsage()
{
- return lmm_constraint_get_usage(this->pimpl_->constraint());
+ return this->pimpl_->constraint()->get_usage();
}
void Link::turnOn()