-/* Copyright (c) 2017-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017-2023. 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 "src/kernel/activity/CommImpl.hpp"
#include "src/kernel/resource/StandardLinkImpl.hpp"
#include "src/kernel/resource/WifiLinkImpl.hpp"
+#include "src/simgrid/module.hpp"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
try {
control_duration_ = std::stod(beacons_factor);
} catch (const std::invalid_argument&) {
- throw std::invalid_argument(std::string("Invalid beacons factor value for link ") + this->link_->get_cname());
+ throw std::invalid_argument("Invalid beacons factor value for link " + this->link_->get_name());
}
}
try {
pSleep_ = std::stod(current_power_values.at(3));
} catch (const std::invalid_argument&) {
- throw std::invalid_argument(std::string("Invalid idle power value for link ") + this->link_->get_cname());
+ throw std::invalid_argument("Invalid idle power value for link " + this->link_->get_name());
}
try {
pRx_ = std::stod(current_power_values.at(2));
} catch (const std::invalid_argument&) {
- throw std::invalid_argument(std::string("Invalid idle power value for link ") + this->link_->get_cname());
+ throw std::invalid_argument("Invalid idle power value for link " + this->link_->get_name());
}
try {
pTx_ = std::stod(current_power_values.at(1));
} catch (const std::invalid_argument&) {
- throw std::invalid_argument(std::string("Invalid idle power value for link ") + this->link_->get_cname());
+ throw std::invalid_argument("Invalid idle power value for link " + this->link_->get_name());
}
try {
pIdle_ = std::stod(current_power_values.at(0));
} catch (const std::invalid_argument&) {
- throw std::invalid_argument(std::string("Invalid busy power value for link ") + this->link_->get_cname());
+ throw std::invalid_argument("Invalid busy power value for link " + this->link_->get_name());
}
XBT_DEBUG("Values aa initialized with: pSleep=%f pIdle=%f pTx=%f pRx=%f", pSleep_, pIdle_, pTx_, pRx_);