-s4u::Link* NetZone::create_link(const std::string& name, const std::vector<std::string>& bandwidths,
- s4u::Link::SharingPolicy policy)
+s4u::Link* NetZone::create_link(const std::string& name, const std::vector<double>& bandwidths)
+{
+ return kernel::actor::simcall_answered([this, &name, &bandwidths] { return pimpl_->create_link(name, bandwidths); });
+}
+
+s4u::Link* NetZone::create_link(const std::string& name, const std::string& bandwidth)
+{
+ return create_link(name, std::vector<std::string>{bandwidth});
+}
+
+s4u::SplitDuplexLink* NetZone::create_split_duplex_link(const std::string& name, const std::string& bandwidth)
+{
+ double speed;
+ try {
+ speed = xbt_parse_get_bandwidth("", 0, bandwidth, "");
+ } catch (const simgrid::ParseError&) {
+ throw std::invalid_argument("Impossible to create split-duplex link: " + name +
+ ". Invalid bandwidth: " + bandwidth);
+ }
+ return create_split_duplex_link(name, speed);
+}
+
+s4u::SplitDuplexLink* NetZone::create_split_duplex_link(const std::string& name, double bandwidth)
+{
+ return kernel::actor::simcall_answered(
+ [this, &name, &bandwidth] { return pimpl_->create_split_duplex_link(name, std::vector<double>{bandwidth}); });
+}
+
+s4u::Link* NetZone::create_link(const std::string& name, const std::vector<std::string>& bandwidths)