61 wifiPhy.SetChannel (wifiChannel.Create ()); |
61 wifiPhy.SetChannel (wifiChannel.Create ()); |
62 // Setting Wifi: |
62 // Setting Wifi: |
63 //wifi.SetPhy ("ns3::WifiPhy"); |
63 //wifi.SetPhy ("ns3::WifiPhy"); |
64 wifi.SetRemoteStationManager ("ns3::AarfWifiManager"); |
64 wifi.SetRemoteStationManager ("ns3::AarfWifiManager"); |
65 Ssid ssid = Ssid ("MyMeSH"); |
65 Ssid ssid = Ssid ("MyMeSH"); |
66 wifi.SetMac ("ns3::MeshWifiMac", |
66 wifi.SetMac ("ns3::MeshWifiInterfaceMac", |
67 "Ssid", SsidValue (ssid), |
67 "Ssid", SsidValue (ssid), |
68 "RandomStart", TimeValue (Seconds (randomStart)) |
68 "RandomStart", TimeValue (Seconds (randomStart)) |
69 ); |
69 ); |
70 wifi.SetPeerLinkManager ("ns3::WifiPeerManager"); |
|
71 wifi.SetL2RoutingProtocol ("ns3::Hwmp"); |
|
72 wifi.SetL2RoutingNetDevice ("ns3::MeshPointDevice"); |
70 wifi.SetL2RoutingNetDevice ("ns3::MeshPointDevice"); |
73 meshDevices = wifi.Install (wifiPhy,nodes,1); |
71 meshDevices = wifi.Install (wifiPhy,nodes); |
74 // Installing Mobility. |
72 // Installing Mobility. |
75 mobility.SetPositionAllocator ("ns3::GridPositionAllocator", |
73 mobility.SetPositionAllocator ("ns3::GridPositionAllocator", |
76 "MinX", DoubleValue (0.0), |
74 "MinX", DoubleValue (0.0), |
77 "MinY", DoubleValue (0.0), |
75 "MinY", DoubleValue (0.0), |
78 "DeltaX", DoubleValue (step), |
76 "DeltaX", DoubleValue (step), |
79 "DeltaY", DoubleValue (step), |
77 "DeltaY", DoubleValue (step), |
80 "GridWidth", UintegerValue (xSize), |
78 "GridWidth", UintegerValue (xSize), |
81 "LayoutType", StringValue ("RowFirst")); |
79 "LayoutType", StringValue ("RowFirst")); |
82 mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); |
80 mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); |
83 mobility.Install (nodes); |
81 mobility.Install (nodes); |
|
82 #if 0 |
84 // Setting Internet Stack: |
83 // Setting Internet Stack: |
85 InternetStackHelper stack; |
84 InternetStackHelper stack; |
86 stack.Install (nodes); |
85 stack.Install (nodes); |
87 Ipv4AddressHelper address; |
86 Ipv4AddressHelper address; |
88 address.SetBase ("10.1.1.0", "255.255.255.0"); |
87 address.SetBase ("10.1.1.0", "255.255.255.0"); |