|
|
| 112 |
scheduler); |
112 |
scheduler); |
| 113 |
bsDevs = wimax.Install (bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION, WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler); |
113 |
bsDevs = wimax.Install (bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION, WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler); |
| 114 |
|
114 |
|
| 115 |
Ptr<SubscriberStationNetDevice> ss[nbSS]; |
115 |
Ptr<SubscriberStationNetDevice>* ss = new Ptr<SubscriberStationNetDevice>[nbSS]; |
| 116 |
|
116 |
|
| 117 |
for (int i = 0; i < nbSS; i++) |
117 |
for (int i = 0; i < nbSS; i++) |
| 118 |
{ |
118 |
{ |
|
|
| 141 |
wimax.EnableLogComponents (); // Turn on all wimax logging |
141 |
wimax.EnableLogComponents (); // Turn on all wimax logging |
| 142 |
} |
142 |
} |
| 143 |
/*------------------------------*/ |
143 |
/*------------------------------*/ |
| 144 |
UdpServerHelper udpServer[nbSS / 2]; |
144 |
UdpServerHelper* udpServer = new UdpServerHelper[nbSS / 2]; |
| 145 |
ApplicationContainer serverApps[nbSS / 2]; |
145 |
ApplicationContainer* serverApps = new ApplicationContainer[nbSS / 2]; |
| 146 |
UdpClientHelper udpClient[nbSS / 2]; |
146 |
UdpClientHelper* udpClient = new UdpClientHelper[nbSS / 2]; |
| 147 |
ApplicationContainer clientApps[nbSS / 2]; |
147 |
ApplicationContainer* clientApps = new ApplicationContainer[nbSS / 2]; |
| 148 |
|
148 |
|
| 149 |
for (int i = 0; i < nbSS / 2; i++) |
149 |
for (int i = 0; i < nbSS / 2; i++) |
| 150 |
{ |
150 |
{ |
|
|
| 204 |
NS_LOG_INFO ("Starting simulation....."); |
204 |
NS_LOG_INFO ("Starting simulation....."); |
| 205 |
Simulator::Run (); |
205 |
Simulator::Run (); |
| 206 |
|
206 |
|
|
|
207 |
delete[] clientApps; |
| 208 |
delete[] udpClient; |
| 209 |
delete[] serverApps; |
| 210 |
delete[] udpServer; |
| 207 |
for (int i = 0; i < nbSS; i++) |
211 |
for (int i = 0; i < nbSS; i++) |
| 208 |
{ |
212 |
{ |
| 209 |
ss[i] = 0; |
213 |
ss[i] = 0; |
| 210 |
} |
214 |
} |
|
|
215 |
delete[] ss; |
| 216 |
|
| 211 |
bs = 0; |
217 |
bs = 0; |
| 212 |
|
218 |
|
| 213 |
Simulator::Destroy (); |
219 |
Simulator::Destroy (); |