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) 2009 University of Washington | 3 * Copyright (c) 2009 University of Washington |
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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with this program; if not, write to the Free Software | 15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Author: Leonard Tracy <lentracy@gmail.com> | 18 * Author: Leonard Tracy <lentracy@gmail.com> |
19 */ | 19 */ |
20 | 20 |
21 #include "ns3/trace-source-accessor.h" | 21 #include "ns3/trace-source-accessor.h" |
22 #include "ns3/traced-callback.h" | 22 #include "ns3/traced-callback.h" |
23 #include "ns3/pointer.h" | 23 #include "ns3/pointer.h" |
24 #include "ns3/node.h" | 24 #include "ns3/node.h" |
25 #include "ns3/assert.h" | 25 #include "ns3/assert.h" |
| 26 #include "ns3/class-of-service-tag.h" |
26 #include "uan-net-device.h" | 27 #include "uan-net-device.h" |
27 #include "uan-phy.h" | 28 #include "uan-phy.h" |
28 #include "uan-mac.h" | 29 #include "uan-mac.h" |
29 #include "uan-channel.h" | 30 #include "uan-channel.h" |
30 #include "uan-transducer.h" | 31 #include "uan-transducer.h" |
31 #include "ns3/log.h" | 32 #include "ns3/log.h" |
32 | 33 |
33 namespace ns3 { | 34 namespace ns3 { |
34 | 35 |
35 NS_LOG_COMPONENT_DEFINE ("UanNetDevice"); | 36 NS_LOG_COMPONENT_DEFINE ("UanNetDevice"); |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 285 } |
285 bool | 286 bool |
286 UanNetDevice::IsPointToPoint () const | 287 UanNetDevice::IsPointToPoint () const |
287 { | 288 { |
288 return false; | 289 return false; |
289 } | 290 } |
290 | 291 |
291 bool | 292 bool |
292 UanNetDevice::Send (Ptr<Packet> packet, const Address &dest, uint16_t protocolNu
mber) | 293 UanNetDevice::Send (Ptr<Packet> packet, const Address &dest, uint16_t protocolNu
mber) |
293 { | 294 { |
| 295 // Class of Service is ignored by this NetDevice |
| 296 ClassOfServiceTag cosTag; |
| 297 packet->RemovePacketTag (cosTag); |
| 298 |
294 return m_mac->Enqueue (packet, dest, protocolNumber); | 299 return m_mac->Enqueue (packet, dest, protocolNumber); |
295 } | 300 } |
296 | 301 |
297 bool | 302 bool |
298 UanNetDevice::SendFrom (Ptr<Packet> packet, const Address& source, const Address
& dest, uint16_t protocolNumber) | 303 UanNetDevice::SendFrom (Ptr<Packet> packet, const Address& source, const Address
& dest, uint16_t protocolNumber) |
299 { | 304 { |
300 // Not yet implemented | 305 // Not yet implemented |
301 NS_ASSERT_MSG (0, "Not yet implemented"); | 306 NS_ASSERT_MSG (0, "Not yet implemented"); |
302 return false; | 307 return false; |
303 } | 308 } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 } | 396 } |
392 | 397 |
393 void | 398 void |
394 UanNetDevice::SetSleepMode (bool sleep) | 399 UanNetDevice::SetSleepMode (bool sleep) |
395 { | 400 { |
396 m_phy->SetSleepMode (sleep); | 401 m_phy->SetSleepMode (sleep); |
397 } | 402 } |
398 | 403 |
399 } // namespace ns3 | 404 } // namespace ns3 |
400 | 405 |
OLD | NEW |