stack.Install(ns3_node_);
}
-WifiZone::WifiZone(std::string name_, simgrid::s4u::Host* host_, ns3::Ptr<ns3::Node> ap_node_,
+WifiZone::WifiZone(const std::string& name_, simgrid::s4u::Host* host_, ns3::Ptr<ns3::Node> ap_node_,
ns3::Ptr<ns3::YansWifiChannel> channel_, int mcs_, int nss_, int network_, int link_)
: name(name_)
, host(host_)
return false;
}
-WifiZone* WifiZone::by_name(std::string name)
+WifiZone* WifiZone::by_name(const std::string& name)
{
WifiZone* zone;
try {
ns3::NetDeviceContainer netA;
WifiZone* zone = WifiZone::by_name(name);
- xbt_assert(zone != 0, "Link name '%s' does not match the 'wifi_link' property of a host.", name.c_str());
- NetPointNs3* netpoint_ns3 = zone->get_host()->get_netpoint()->extension<NetPointNs3>();
+ xbt_assert(zone != nullptr, "Link name '%s' does not match the 'wifi_link' property of a host.", name.c_str());
+ auto* netpoint_ns3 = zone->get_host()->get_netpoint()->extension<NetPointNs3>();
wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager", "ControlMode", ns3::StringValue("HtMcs0"), "DataMode",
ns3::StringValue("HtMcs" + std::to_string(zone->get_mcs())));