static int number_of_networks = 1;
/* wifi globals */
-
-/* This vector store the tuple for the different wifi zones:
- * zone name, ptr to AP node, channel, network, link, nb station nodes
-*/
-static std::vector <std::tuple <std::string, ns3::Ptr<ns3::Node>, ns3::Ptr <ns3::YansWifiChannel>, int, int, int> > wifi_zones;
static ns3::WifiHelper wifi;
static ns3::YansWifiPhyHelper wifiPhy = ns3::YansWifiPhyHelper::Default ();
static ns3::YansWifiChannelHelper wifiChannel = ns3::YansWifiChannelHelper::Default ();
if (wifi_link)
new WifiZone(wifi_link, host, host->get_netpoint()->extension<NetPointNs3>()->ns3_node_,
- wifiChannel.Create (), wifi_mcs ? atoi(wifi_mcs) : 3, wifi_nss ? atoi(wifi_nss) : 1, 0, 0);
+ wifiChannel.Create(), wifi_mcs ? atoi(wifi_mcs) : 3, wifi_nss ? atoi(wifi_nss) : 1, 0, 0);
}
}
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>();
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
"ControlMode", ns3::StringValue ("HtMcs0"),
wifiPhy.Set("Antennas", ns3::UintegerValue(zone->get_nss()));
wifiPhy.Set("MaxSupportedTxSpatialStreams", ns3::UintegerValue(zone->get_nss()));
wifiPhy.Set("MaxSupportedRxSpatialStreams", ns3::UintegerValue(zone->get_nss()));
-
- wifiMac.SetType("ns3::ApWifiMac");
+ wifiMac.SetType("ns3::ApWifiMac",
+ "Ssid", ns3::SsidValue(name));
netA.Add(wifi.Install (wifiPhy, wifiMac, zone->get_ap_node()));
zone->set_network(number_of_networks);
zone->set_link(number_of_links);
+ NetPointNs3* netpoint_ns3 = zone->get_host()->get_netpoint()->extension<NetPointNs3>();
int nodeNum = netpoint_ns3->node_num;
if (IPV4addr.size() <= (unsigned)nodeNum)
IPV4addr.resize(nodeNum + 1);
wifiPhy.Set("MaxSupportedTxSpatialStreams", ns3::UintegerValue(zone->get_nss()));
wifiPhy.Set("MaxSupportedRxSpatialStreams", ns3::UintegerValue(zone->get_nss()));
- wifiMac.SetType ("ns3::StaWifiMac");
+ wifiMac.SetType ("ns3::StaWifiMac",
+ "Ssid", ns3::SsidValue(link_name),
+ "ActiveProbing", ns3::BooleanValue(false));
netA.Add(wifi.Install (wifiPhy, wifiMac, staNode));