OLD | NEW |
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) 2017 Universita' degli Studi di Napoli Federico II | 3 * Copyright (c) 2017 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 uint8_t | 186 uint8_t |
187 NetDeviceQueueInterface::GetNTxQueues (void) const | 187 NetDeviceQueueInterface::GetNTxQueues (void) const |
188 { | 188 { |
189 return m_txQueuesVector.size (); | 189 return m_txQueuesVector.size (); |
190 } | 190 } |
191 | 191 |
192 void | 192 void |
193 NetDeviceQueueInterface::DoDispose (void) | 193 NetDeviceQueueInterface::DoDispose (void) |
194 { | 194 { |
195 NS_LOG_FUNCTION (this); | 195 NS_LOG_FUNCTION (this); |
| 196 |
| 197 for (auto t : m_traceMap) |
| 198 { |
| 199 if (!t.first->TraceDisconnectWithoutContext ("Enqueue", t.second[0]) |
| 200 || !t.first->TraceDisconnectWithoutContext ("Dequeue", t.second[1]) |
| 201 || !t.first->TraceDisconnectWithoutContext ("DropAfterDequeue", t.seco
nd[1]) |
| 202 || !t.first->TraceDisconnectWithoutContext ("DropBeforeEnqueue", t.sec
ond[2])) |
| 203 { |
| 204 NS_LOG_WARN ("NetDeviceQueueInterface: Trying to disconnected a callba
ck that" |
| 205 " has not been connected to a traced callback"); |
| 206 } |
| 207 } |
| 208 |
| 209 m_traceMap.clear (); |
196 m_txQueuesVector.clear (); | 210 m_txQueuesVector.clear (); |
197 Object::DoDispose (); | 211 Object::DoDispose (); |
198 } | 212 } |
199 | 213 |
200 void | 214 void |
201 NetDeviceQueueInterface::SetTxQueuesN (uint8_t numTxQueues) | 215 NetDeviceQueueInterface::SetTxQueuesN (uint8_t numTxQueues) |
202 { | 216 { |
203 NS_LOG_FUNCTION (this << numTxQueues); | 217 NS_LOG_FUNCTION (this << numTxQueues); |
204 NS_ASSERT (numTxQueues > 0); | 218 NS_ASSERT (numTxQueues > 0); |
205 | 219 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 m_selectQueueCallback = cb; | 257 m_selectQueueCallback = cb; |
244 } | 258 } |
245 | 259 |
246 NetDeviceQueueInterface::SelectQueueCallback | 260 NetDeviceQueueInterface::SelectQueueCallback |
247 NetDeviceQueueInterface::GetSelectQueueCallback (void) const | 261 NetDeviceQueueInterface::GetSelectQueueCallback (void) const |
248 { | 262 { |
249 return m_selectQueueCallback; | 263 return m_selectQueueCallback; |
250 } | 264 } |
251 | 265 |
252 } // namespace ns3 | 266 } // namespace ns3 |
OLD | NEW |