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) 2015 Universita' degli Studi di Napoli Federico II | 3 * Copyright (c) 2015 Universita' degli Studi di Napoli Federico II |
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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 // A TrafficControlLayer object is aggregated by the InternetStackHelper, but
check | 360 // A TrafficControlLayer object is aggregated by the InternetStackHelper, but
check |
361 // anyway because a queue disc has no effect without a TrafficControlLayer obj
ect | 361 // anyway because a queue disc has no effect without a TrafficControlLayer obj
ect |
362 Ptr<TrafficControlLayer> tc = d->GetNode ()->GetObject<TrafficControlLayer> ()
; | 362 Ptr<TrafficControlLayer> tc = d->GetNode ()->GetObject<TrafficControlLayer> ()
; |
363 NS_ASSERT (tc != 0); | 363 NS_ASSERT (tc != 0); |
364 | 364 |
365 // Start from an empty vector of queue discs | 365 // Start from an empty vector of queue discs |
366 m_queueDiscs.clear (); | 366 m_queueDiscs.clear (); |
367 m_queueDiscs.resize (m_queueDiscFactory.size ()); | 367 m_queueDiscs.resize (m_queueDiscFactory.size ()); |
368 | 368 |
369 // Create queue discs (from leaves to root) | 369 // Create queue discs (from leaves to root) |
370 for (int i = m_queueDiscFactory.size () - 1; i >= 0; i--) | 370 for (int i = static_cast<int>(m_queueDiscFactory.size ()) - 1; i >= 0; i--) |
371 { | 371 { |
372 Ptr<QueueDisc> q = m_queueDiscFactory[i].CreateQueueDisc (m_queueDiscs); | 372 Ptr<QueueDisc> q = m_queueDiscFactory[i].CreateQueueDisc (m_queueDiscs); |
373 q->SetNetDevice (d); | 373 q->SetNetDevice (d); |
374 m_queueDiscs[i] = q; | 374 m_queueDiscs[i] = q; |
375 container.Add (q); | 375 container.Add (q); |
376 } | 376 } |
377 | 377 |
378 // Set the root queue disc (if any has been created) on the device | 378 // Set the root queue disc (if any has been created) on the device |
379 if (!m_queueDiscs.empty () && m_queueDiscs[0]) | 379 if (!m_queueDiscs.empty () && m_queueDiscs[0]) |
380 { | 380 { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 TrafficControlHelper::Uninstall (NetDeviceContainer c) | 436 TrafficControlHelper::Uninstall (NetDeviceContainer c) |
437 { | 437 { |
438 for (NetDeviceContainer::Iterator i = c.Begin (); i != c.End (); ++i) | 438 for (NetDeviceContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
439 { | 439 { |
440 Uninstall (*i); | 440 Uninstall (*i); |
441 } | 441 } |
442 } | 442 } |
443 | 443 |
444 | 444 |
445 } // namespace ns3 | 445 } // namespace ns3 |
LEFT | RIGHT |