LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 WriteDlResults (dlOutFile); | 265 WriteDlResults (dlOutFile); |
266 m_pendingOutput = false; | 266 m_pendingOutput = false; |
267 | 267 |
268 } | 268 } |
269 | 269 |
270 void | 270 void |
271 RadioBearerStatsCalculator::WriteUlResults (std::ofstream& outFile) | 271 RadioBearerStatsCalculator::WriteUlResults (std::ofstream& outFile) |
272 { | 272 { |
273 NS_LOG_FUNCTION (this); | 273 NS_LOG_FUNCTION (this); |
274 | 274 |
275 // Get the unique IMSI / LCID list | 275 // Get the unique IMSI/LCID pairs list |
276 | |
277 std::vector < ImsiLcidPair_t > pairVector; | 276 std::vector < ImsiLcidPair_t > pairVector; |
278 for (Uint32Map::iterator it = m_ulTxPackets.begin (); it != m_ulTxPackets.end
(); ++it) | 277 for (Uint32Map::iterator it = m_ulTxPackets.begin (); it != m_ulTxPackets.end
(); ++it) |
| 278 { |
| 279 if (find (pairVector.begin (), pairVector.end (), (*it).first) == pairVect
or.end ()) |
| 280 { |
| 281 pairVector.push_back ((*it).first); |
| 282 } |
| 283 } |
| 284 |
| 285 for (Uint32Map::iterator it = m_ulRxPackets.begin (); it != m_ulRxPackets.end
(); ++it) |
279 { | 286 { |
280 if (find (pairVector.begin (), pairVector.end (), (*it).first) == pairVect
or.end ()) | 287 if (find (pairVector.begin (), pairVector.end (), (*it).first) == pairVect
or.end ()) |
281 { | 288 { |
282 pairVector.push_back ((*it).first); | 289 pairVector.push_back ((*it).first); |
283 } | 290 } |
284 } | 291 } |
285 | 292 |
286 Time endTime = m_startTime + m_epochDuration; | 293 Time endTime = m_startTime + m_epochDuration; |
287 for (std::vector<ImsiLcidPair_t>::iterator it = pairVector.begin (); it != pai
rVector.end (); ++it) | 294 for (std::vector<ImsiLcidPair_t>::iterator it = pairVector.begin (); it != pai
rVector.end (); ++it) |
288 { | 295 { |
(...skipping 22 matching lines...) Expand all Loading... |
311 } | 318 } |
312 | 319 |
313 outFile.close (); | 320 outFile.close (); |
314 } | 321 } |
315 | 322 |
316 void | 323 void |
317 RadioBearerStatsCalculator::WriteDlResults (std::ofstream& outFile) | 324 RadioBearerStatsCalculator::WriteDlResults (std::ofstream& outFile) |
318 { | 325 { |
319 NS_LOG_FUNCTION (this); | 326 NS_LOG_FUNCTION (this); |
320 | 327 |
321 // Get the unique IMSI list | 328 // Get the unique IMSI/LCID pairs list |
322 std::vector < ImsiLcidPair_t > pairVector; | 329 std::vector < ImsiLcidPair_t > pairVector; |
323 for (Uint32Map::iterator it = m_dlTxPackets.begin (); it != m_dlTxPackets.end
(); ++it) | 330 for (Uint32Map::iterator it = m_dlTxPackets.begin (); it != m_dlTxPackets.end
(); ++it) |
| 331 { |
| 332 if (find (pairVector.begin (), pairVector.end (), (*it).first) == pairVect
or.end ()) |
| 333 { |
| 334 pairVector.push_back ((*it).first); |
| 335 } |
| 336 } |
| 337 |
| 338 for (Uint32Map::iterator it = m_dlRxPackets.begin (); it != m_dlRxPackets.end
(); ++it) |
324 { | 339 { |
325 if (find (pairVector.begin (), pairVector.end (), (*it).first) == pairVect
or.end ()) | 340 if (find (pairVector.begin (), pairVector.end (), (*it).first) == pairVect
or.end ()) |
326 { | 341 { |
327 pairVector.push_back ((*it).first); | 342 pairVector.push_back ((*it).first); |
328 } | 343 } |
329 } | 344 } |
330 | 345 |
331 Time endTime = m_startTime + m_epochDuration; | 346 Time endTime = m_startTime + m_epochDuration; |
332 for (std::vector<ImsiLcidPair_t>::iterator pair = pairVector.begin (); pair !=
pairVector.end (); ++pair) | 347 for (std::vector<ImsiLcidPair_t>::iterator pair = pairVector.begin (); pair !=
pairVector.end (); ++pair) |
333 { | 348 { |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 m_dlPdcpOutputFilename = outputFilename; | 656 m_dlPdcpOutputFilename = outputFilename; |
642 } | 657 } |
643 | 658 |
644 std::string | 659 std::string |
645 RadioBearerStatsCalculator::GetDlPdcpOutputFilename (void) | 660 RadioBearerStatsCalculator::GetDlPdcpOutputFilename (void) |
646 { | 661 { |
647 return m_dlPdcpOutputFilename; | 662 return m_dlPdcpOutputFilename; |
648 } | 663 } |
649 | 664 |
650 } // namespace ns3 | 665 } // namespace ns3 |
LEFT | RIGHT |