A Discrete-Event Network Simulator
API
wimax-net-device.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2007,2008,2009 INRIA, UDcast
4  *
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
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
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
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20  * <amine.ismail@UDcast.com>
21  */
22 
23 #include "ns3/llc-snap-header.h"
24 #include "ns3/simulator.h"
25 #include "ns3/callback.h"
26 #include "ns3/node.h"
27 #include "ns3/packet.h"
28 #include "wimax-net-device.h"
29 #include "wimax-channel.h"
30 #include "ns3/packet-burst.h"
31 #include "burst-profile-manager.h"
32 #include <list>
33 #include "send-params.h"
34 #include "ns3/uinteger.h"
35 #include "ns3/trace-source-accessor.h"
36 #include "ns3/pointer.h"
37 #include "ns3/enum.h"
38 #include "service-flow-manager.h"
39 #include "connection-manager.h"
40 #include "bandwidth-manager.h"
41 
42 namespace ns3 {
43 
44 NS_LOG_COMPONENT_DEFINE ("WimaxNetDevice");
45 
46 NS_OBJECT_ENSURE_REGISTERED (WimaxNetDevice);
47 
48 uint32_t WimaxNetDevice::m_nrFrames = 0;
49 uint8_t WimaxNetDevice::m_direction = ~0;
51 
53 {
54  static TypeId
55  tid =
56  TypeId ("ns3::WimaxNetDevice")
57 
58  .SetParent<NetDevice> ()
59  .SetGroupName ("Wimax")
60 
61  // No AddConstructor because this is an abstract class.
62 
63  .AddAttribute ("Mtu", "The MAC-level Maximum Transmission Unit",
67  MakeUintegerChecker<uint16_t> (0,MAX_MSDU_SIZE))
68 
69  .AddAttribute ("Phy",
70  "The PHY layer attached to this device.",
71  PointerValue (),
73  MakePointerChecker<WimaxPhy> ())
74 
75  .AddAttribute ("Channel",
76  "The channel attached to this device.",
77  PointerValue (),
79  MakePointerChecker<WimaxChannel> ())
80 
81  .AddAttribute ("RTG",
82  "receive/transmit transition gap.",
83  UintegerValue (0),
85  MakeUintegerChecker<uint16_t> (0, 120))
86 
87  .AddAttribute ("TTG",
88  "transmit/receive transition gap.",
89  UintegerValue (0),
91  MakeUintegerChecker<uint16_t> (0, 120))
92 
93  .AddAttribute ("ConnectionManager",
94  "The connection manager attached to this device.",
95  PointerValue (),
98  MakePointerChecker<ConnectionManager> ())
99 
100  .AddAttribute ("BurstProfileManager",
101  "The burst profile manager attached to this device.",
102  PointerValue (),
105  MakePointerChecker<BurstProfileManager> ())
106 
107  .AddAttribute ("BandwidthManager",
108  "The bandwidth manager attached to this device.",
109  PointerValue (),
112  MakePointerChecker<BandwidthManager> ())
113 
114  .AddAttribute ("InitialRangingConnection",
115  "Initial ranging connection",
116  PointerValue (),
118  MakePointerChecker<WimaxConnection> ())
119 
120  .AddAttribute ("BroadcastConnection",
121  "Broadcast connection",
122  PointerValue (),
124  MakePointerChecker<WimaxConnection> ())
125 
126  .AddTraceSource ("Rx",
127  "Receive trace",
129  "ns3::WimaxNetDevice::TxRxTracedCallback")
130 
131  .AddTraceSource ("Tx",
132  "Transmit trace",
134  "ns3::WimaxNetDevice::TxRxTracedCallback");
135  return tid;
136 }
137 
139  : m_state (0),
140  m_symbolIndex (0),
141  m_ttg (0),
142  m_rtg (0)
143 {
145  m_connectionManager = CreateObject<ConnectionManager> ();
146  m_burstProfileManager = CreateObject<BurstProfileManager> (this);
147  m_bandwidthManager = CreateObject<BandwidthManager> (this);
148  m_nrFrames = 0;
149  m_direction = ~0;
151 }
152 
154 {
155 }
156 
157 void
159 {
160 
161  m_phy->Dispose ();
162  m_phy = 0;
163  m_node = 0;
168  m_bandwidthManager = 0;
170  m_bandwidthManager = 0;
171 
173 }
174 
175 
176 void
178 {
179  m_ttg = ttg;
180 }
181 
182 uint16_t
184 {
185  return m_ttg;
186 }
187 
188 void
190 {
191  m_rtg = rtg;
192 }
193 
194 uint16_t
196 {
197  return m_rtg;
198 }
199 
200 void
201 WimaxNetDevice::SetName (const std::string name)
202 {
203  m_name = name;
204 }
205 
206 std::string
208 {
209  return m_name;
210 }
211 
212 void
213 WimaxNetDevice::SetIfIndex (const uint32_t index)
214 {
215  m_ifIndex = index;
216 }
217 
218 uint32_t
220 {
221  return m_ifIndex;
222 }
223 
226 {
227  return DoGetChannel ();
228 }
229 
232 {
233  return DoGetChannel ();
234 }
235 
236 bool
237 WimaxNetDevice::SetMtu (const uint16_t mtu)
238 {
239  if (mtu > MAX_MSDU_SIZE)
240  {
241  return false;
242  }
243  m_mtu = mtu;
244  return true;
245 }
246 
247 uint16_t
249 {
250  return m_mtu;
251 }
252 
253 bool
255 {
256 
257  return m_phy != 0 && m_linkUp;
258 
259 }
260 
261 void
263 {
264  m_linkChange = callback;
265 }
266 
267 bool
269 {
270  return true;
271 }
272 
273 Address
275 {
276  return Mac48Address::GetBroadcast ();
277 }
278 
279 bool
281 {
282  return false;
283 }
284 
285 Address
287 {
288  return Mac48Address ("01:00:5e:00:00:00");
289 }
290 
291 Address
293 {
294  return GetMulticast ();
295 }
296 
297 bool
299 {
300  return false;
301 }
302 
303 bool
304 WimaxNetDevice::Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber)
305 {
306 
308  LlcSnapHeader llcHdr;
309  llcHdr.SetType (protocolNumber);
310  packet->AddHeader (llcHdr);
311 
312  m_traceTx (packet, to);
313 
314  return DoSend (packet, Mac48Address::ConvertFrom (GetAddress ()), to, protocolNumber);
315 }
316 
317 void
319 {
320  m_node = node;
321 }
322 
323 Ptr<Node>
325 {
326  return m_node;
327 }
328 
329 bool
331 {
332  return false;
333  /*
334  * Modified by Mohamed Amine ISMAIL.
335  * see "Transmission of IPv4 packets over IEEE 802.16's IP Convergence
336  * Sublayer draft-ietf-16ng-ipv4-over-802-dot-16-ipcs-04.txt" section
337  * 5.2
338  */
339 }
340 
341 void
343 {
344  m_forwardUp = cb;
345 }
346 
347 void
349 {
350  m_traceRx (packet, source);
351  LlcSnapHeader llc;
352  packet->RemoveHeader (llc);
353  m_forwardUp (this, packet, llc.GetType (), source);
354 }
355 
356 void
358 {
359  m_phy->Attach (channel);
360 }
361 
362 void
364 {
365  m_phy = phy;
366 }
367 
370 {
371  return m_phy;
372 }
373 
374 void
376 {
377  if (m_phy != 0)
378  {
379  m_phy->Attach (channel);
380  }
381 
382 }
383 
384 uint64_t
385 WimaxNetDevice::GetChannel (uint8_t index) const
386 {
387  return m_dlChannels.at (index);
388 }
389 
390 void
391 WimaxNetDevice::SetNrFrames (uint32_t nrFrames)
392 {
393  m_nrFrames = nrFrames;
394 }
395 
396 uint32_t WimaxNetDevice::GetNrFrames (void) const
397 {
398 
399  return m_nrFrames;
400 }
401 
402 void
404 {
406 }
407 
408 void
410 {
411  m_address = address;
412 }
413 
414 Address
416 {
417  return m_address;
418 }
419 
422 {
423  return m_address;
424 }
425 
426 void
428 {
429  m_state = state;
430 }
431 
432 uint8_t
434 {
435  return m_state;
436 }
437 
440 {
442 }
443 
446 {
447  return m_broadcastConnection;
448 }
449 
450 void
452 {
453  m_currentDcd = dcd;
454 }
455 
456 Dcd
458 {
459  return m_currentDcd;
460 }
461 
462 void
464 {
465  m_currentUcd = ucd;
466 }
467 
468 Ucd
470 {
471  return m_currentUcd;
472 }
473 
476 {
477  return m_connectionManager;
478 }
479 
480 void
482 {
483  m_connectionManager = cm;
484 }
485 
488 {
489  return m_burstProfileManager;
490 }
491 
492 void
494 {
495  m_burstProfileManager = bpm;
496 }
497 
500 {
501  return m_bandwidthManager;
502 }
503 
504 void
506 {
507  m_bandwidthManager = bwm;
508 }
509 
510 void
512 {
513  m_initialRangingConnection = CreateObject<WimaxConnection> (Cid::InitialRanging (), Cid::INITIAL_RANGING);
514  m_broadcastConnection = CreateObject<WimaxConnection> (Cid::Broadcast (), Cid::BROADCAST);
515 }
516 
517 void
519 {
520 
521  NS_LOG_DEBUG ("WimaxNetDevice::Receive, station = " << GetMacAddress ());
522 
523  Ptr<PacketBurst> b = burst->Copy ();
524  for (std::list<Ptr<Packet> >::const_iterator iter = b->Begin (); iter != b->End (); ++iter)
525  {
526  Ptr<Packet> packet = *iter;
527  DoReceive (packet);
528  }
529 }
530 
533 {
534  return m_phy->GetChannel ();
535 }
536 
537 void
539 {
540  m_phy->SetReceiveCallback (MakeCallback (&WimaxNetDevice::Receive, this));
541 }
542 
543 bool
544 WimaxNetDevice::SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber)
545 {
546 
547  Mac48Address from = Mac48Address::ConvertFrom (source);
549 
550  LlcSnapHeader llcHdr;
551  llcHdr.SetType (protocolNumber);
552  packet->AddHeader (llcHdr);
553 
554  m_traceTx (packet, to);
555  return DoSend (packet, from, to, protocolNumber);
556 }
557 
558 void
560 {
561  m_promiscRx = cb;
562 }
563 
564 bool
566 {
567  return !(m_promiscRx.IsNull ());
568 }
569 
570 void
572 {
573  // m_promiscRx(p);
574 }
575 
576 bool
578 {
579  return false;
580 }
581 
582 void
584 {
585  SendParams * params = new OfdmSendParams (burst, modulationType, m_direction);
586  m_phy->Send (params);
587  delete params;
588 }
589 
590 void
592 {
593 
594  // initializing vector of channels (or frequencies)
595  // Values according to WirelessMAN-OFDM RF profile for 10 MHz channelization
596  // Section 12.3.3.1 from IEEE 802.16-2004 standard
597  // profR10_3 :
598  // channels: 5000 + n â‹… 5 MHz, ∀n ∈ { 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167 }
599  // from a range 5GHz to 6GHz, according to Section 8.5.1.
600  uint64_t frequency = 5000;
601 
602  for (uint8_t i = 0; i < 200; i++)
603  {
604  m_dlChannels.push_back (frequency);
605  frequency += 5;
606  }
607 }
608 
609 bool
611 {
613  return false;
614 }
615 
616 Address
618 {
619  NS_LOG_FUNCTION (multicastGroup);
620 
621  Mac48Address ad = Mac48Address::GetMulticast (multicastGroup);
622 
623  //
624  // Implicit conversion (operator Address ()) is defined for Mac48Address, so
625  // use it by just returning the EUI-48 address which is automagically converted
626  // to an Address.
627  //
628  NS_LOG_LOGIC ("multicast address is " << ad);
629 
630  return ad;
631 }
632 
633 Address
635 {
637 
638  NS_LOG_LOGIC ("MAC IPv6 multicast address is " << ad);
639  return ad;
640 }
641 
642 void
644 {
645  /* \todo Add a callback invoked whenever the link
646  * status changes to UP. This callback is typically used
647  * by the IP/ARP layer to flush the ARP cache and by IPv6 stack
648  * to flush NDISC cache whenever the link goes up.
649  */
650  NS_FATAL_ERROR ("Not implemented-- please implement and contribute a patch");
651 }
652 } // namespace ns3
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::Cid::Broadcast
static Cid Broadcast(void)
Definition: cid.cc:72
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
ns3::WimaxNetDevice::m_direction
static uint8_t m_direction
downlink or uplink
Definition: wimax-net-device.h:277
ns3::WimaxNetDevice::SetBurstProfileManager
void SetBurstProfileManager(Ptr< BurstProfileManager > burstProfileManager)
Set the burst profile manager.
Definition: wimax-net-device.cc:493
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
ns3::WimaxNetDevice::m_phy
Ptr< WimaxPhy > m_phy
the phy
Definition: wimax-net-device.h:521
ns3::WimaxNetDevice::ForwardUp
void ForwardUp(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest)
Forward a packet to the next layer above the device.
Definition: wimax-net-device.cc:348
ns3::Mac48Address::GetMulticast
static Mac48Address GetMulticast(Ipv4Address address)
Definition: mac48-address.cc:191
ns3::WimaxNetDevice::GetTtg
uint16_t GetTtg(void) const
Get transmission/receive transition gap.
Definition: wimax-net-device.cc:183
ns3::WimaxNetDevice::GetConnectionManager
Ptr< ConnectionManager > GetConnectionManager(void) const
Get the connection manager of the device.
Definition: wimax-net-device.cc:475
bandwidth-manager.h
ns3::WimaxNetDevice::ForwardDown
void ForwardDown(Ptr< PacketBurst > burst, WimaxPhy::ModulationType modulationType)
Forward a packet down the stack.
Definition: wimax-net-device.cc:583
ns3::Packet::AddHeader
void AddHeader(const Header &header)
Add header to this packet.
Definition: packet.cc:256
ns3::Callback< void >
ns3::WimaxNetDevice::GetRtg
uint16_t GetRtg(void) const
Get receive/transmit transition gap.
Definition: wimax-net-device.cc:195
ns3::WimaxNetDevice::AddLinkChangeCallback
virtual void AddLinkChangeCallback(Callback< void > callback)
Add link change callback function.
Definition: wimax-net-device.cc:643
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WimaxNetDevice::m_linkChange
Callback< void > m_linkChange
link change callback
Definition: wimax-net-device.h:528
ns3::WimaxNetDevice::SetLinkChangeCallback
virtual void SetLinkChangeCallback(Callback< void > callback)
Set link change callback function.
Definition: wimax-net-device.cc:262
ns3::WimaxNetDevice::SetMtu
virtual bool SetMtu(const uint16_t mtu)
Set MTU value for the device.
Definition: wimax-net-device.cc:237
ns3::WimaxNetDevice::SetState
void SetState(uint8_t state)
Set the device state.
Definition: wimax-net-device.cc:427
ns3::WimaxNetDevice::MakeMulticastAddress
virtual Address MakeMulticastAddress(Ipv4Address multicastGroup) const
Make multicast address.
Definition: wimax-net-device.cc:292
ns3::Callback::IsNull
bool IsNull(void) const
Check for null implementation.
Definition: callback.h:1386
ns3::WimaxNetDevice::GetBurstProfileManager
Ptr< BurstProfileManager > GetBurstProfileManager(void) const
Get the burst profile manager.
Definition: wimax-net-device.cc:487
ns3::WimaxNetDevice::SupportsSendFrom
virtual bool SupportsSendFrom(void) const
Check if device supports the SendFrom method.
Definition: wimax-net-device.cc:577
ns3::WimaxNetDevice::SetPromiscReceiveCallback
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
Set promiscious receive callback function.
Definition: wimax-net-device.cc:559
ns3::WimaxNetDevice::DEFAULT_MSDU_SIZE
static const uint16_t DEFAULT_MSDU_SIZE
recommended by wimax forum.
Definition: wimax-net-device.h:488
third.channel
channel
Definition: third.py:92
ns3::WimaxNetDevice::m_mtu
uint16_t m_mtu
MTU.
Definition: wimax-net-device.h:529
ns3::WimaxNetDevice::GetChannel
virtual Ptr< Channel > GetChannel(void) const
Get the channel.
Definition: wimax-net-device.cc:225
ns3::WimaxNetDevice::GetMulticast
virtual Address GetMulticast(void) const
Get multicast address.
Definition: wimax-net-device.cc:286
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:41
ns3::Ipv6Address
Describes an IPv6 address.
Definition: ipv6-address.h:50
ns3::PointerValue
Hold objects of type Ptr<T>.
Definition: pointer.h:37
ns3::Mac48Address
an EUI-48 address
Definition: mac48-address.h:44
ns3::WimaxNetDevice::m_promiscRx
NetDevice::PromiscReceiveCallback m_promiscRx
promiscious receive fcallback function
Definition: wimax-net-device.h:523
ns3::OfdmSendParams
OfdmSendParams class.
Definition: send-params.h:68
ns3::WimaxNetDevice::~WimaxNetDevice
virtual ~WimaxNetDevice(void)
Definition: wimax-net-device.cc:153
ns3::WimaxNetDevice::m_name
std::string m_name
service name
Definition: wimax-net-device.h:526
ns3::LlcSnapHeader::SetType
void SetType(uint16_t type)
Set the Ethertype.
Definition: llc-snap-header.cc:38
ns3::WimaxNetDevice::IsMulticast
virtual bool IsMulticast(void) const
Check if multicast enabled.
Definition: wimax-net-device.cc:280
ns3::WimaxNetDevice::CreateDefaultConnections
void CreateDefaultConnections(void)
Creates the initial ranging and broadcast connections.
Definition: wimax-net-device.cc:511
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:923
ns3::WimaxNetDevice::DoReceive
virtual void DoReceive(Ptr< Packet > packet)=0
Receive a packet.
ns3::WimaxNetDevice::SetName
virtual void SetName(const std::string name)
Set device name.
Definition: wimax-net-device.cc:201
ns3::WimaxNetDevice::m_traceRx
TracedCallback< Ptr< const Packet >, const Mac48Address & > m_traceRx
Definition: wimax-net-device.h:450
ns3::WimaxNetDevice::GetInitialRangingConnection
Ptr< WimaxConnection > GetInitialRangingConnection(void) const
Get the initial ranging connection.
Definition: wimax-net-device.cc:439
ns3::WimaxNetDevice::Receive
void Receive(Ptr< const PacketBurst > burst)
Receive a packet burst.
Definition: wimax-net-device.cc:518
ns3::MakeTraceSourceAccessor
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Definition: trace-source-accessor.h:202
ns3::WimaxNetDevice::m_bandwidthManager
Ptr< BandwidthManager > m_bandwidthManager
badnwidth manager
Definition: wimax-net-device.h:554
ns3::WimaxNetDevice::IsBroadcast
virtual bool IsBroadcast(void) const
Check if broadcast enabled.
Definition: wimax-net-device.cc:268
ns3::WimaxNetDevice::InitializeChannels
void InitializeChannels(void)
Initialize channels function.
Definition: wimax-net-device.cc:591
ns3::WimaxNetDevice::IsLinkUp
virtual bool IsLinkUp(void) const
Check if link is up.
Definition: wimax-net-device.cc:254
ns3::WimaxNetDevice::m_ifIndex
uint32_t m_ifIndex
IF index.
Definition: wimax-net-device.h:525
ns3::WimaxNetDevice::IsBridge
virtual bool IsBridge(void) const
Return true if the net device is acting as a bridge.
Definition: wimax-net-device.cc:610
ns3::WimaxNetDevice::m_nrFrames
static uint32_t m_nrFrames
temp, shall be in BS. defined here to allow SS to access. SS shall actually determine it from DLFP,...
Definition: wimax-net-device.h:532
ns3::Ptr< Channel >
ns3::WimaxNetDevice::m_initialRangingConnection
Ptr< WimaxConnection > m_initialRangingConnection
initial rnaging connection
Definition: wimax-net-device.h:549
NS_FATAL_ERROR
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
Definition: fatal-error.h:165
ns3::Mac48Address::GetBroadcast
static Mac48Address GetBroadcast(void)
Definition: mac48-address.cc:170
ns3::WimaxNetDevice::GetIfIndex
virtual uint32_t GetIfIndex(void) const
Get interface index.
Definition: wimax-net-device.cc:219
ns3::Cid::BROADCAST
@ BROADCAST
Definition: cid.h:43
ns3::WimaxNetDevice::SetIfIndex
virtual void SetIfIndex(const uint32_t index)
Set interface index.
Definition: wimax-net-device.cc:213
ns3::WimaxNetDevice::m_dlChannels
std::vector< uint64_t > m_dlChannels
not sure if it shall be included here
Definition: wimax-net-device.h:535
ns3::WimaxPhy::ModulationType
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:50
ns3::Cid::INITIAL_RANGING
@ INITIAL_RANGING
Definition: cid.h:44
ns3::Address
a polymophic address class
Definition: address.h:91
ns3::WimaxNetDevice::Attach
void Attach(Ptr< WimaxChannel > channel)
Attach device to channel.
Definition: wimax-net-device.cc:357
ns3::WimaxNetDevice::GetNode
virtual Ptr< Node > GetNode(void) const
Get node pointer.
Definition: wimax-net-device.cc:324
ns3::Mac48Address::ConvertFrom
static Mac48Address ConvertFrom(const Address &address)
Definition: mac48-address.cc:126
ns3::WimaxNetDevice::SetTtg
void SetTtg(uint16_t ttg)
Set transmission/receive transition gap.
Definition: wimax-net-device.cc:177
ns3::Cid::InitialRanging
static Cid InitialRanging(void)
Definition: cid.cc:82
ns3::WimaxNetDevice::GetCurrentUcd
Ucd GetCurrentUcd(void) const
Get the current UCD.
Definition: wimax-net-device.cc:469
ns3::WimaxNetDevice::GetState
uint8_t GetState(void) const
Get the device state.
Definition: wimax-net-device.cc:433
ns3::Packet::RemoveHeader
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Definition: packet.cc:280
ns3::WimaxNetDevice::DoSend
virtual bool DoSend(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest, uint16_t protocolNumber)=0
Send a packet.
connection-manager.h
wimax-channel.h
ns3::WimaxNetDevice::SetPhy
void SetPhy(Ptr< WimaxPhy > phy)
Set the physical layer object.
Definition: wimax-net-device.cc:363
ns3::WimaxNetDevice::GetAddress
virtual Address GetAddress(void) const
Get address of the device.
Definition: wimax-net-device.cc:415
ns3::WimaxNetDevice::m_address
Mac48Address m_address
MAC address.
Definition: wimax-net-device.h:537
ns3::WimaxNetDevice::m_connectionManager
Ptr< ConnectionManager > m_connectionManager
connection manager
Definition: wimax-net-device.h:552
ns3::WimaxNetDevice::IsPromisc
bool IsPromisc(void)
Check if device is promiscious.
Definition: wimax-net-device.cc:565
first.address
address
Definition: first.py:44
ns3::WimaxNetDevice::m_node
Ptr< Node > m_node
the node
Definition: wimax-net-device.h:520
ns3::WimaxNetDevice::GetMacAddress
Mac48Address GetMacAddress(void) const
Get the MAC address.
Definition: wimax-net-device.cc:421
ns3::WimaxNetDevice::SetBandwidthManager
void SetBandwidthManager(Ptr< BandwidthManager > bandwidthManager)
Set the bandwidth manager on the device.
Definition: wimax-net-device.cc:505
ns3::WimaxNetDevice::MAX_MSDU_SIZE
static const uint16_t MAX_MSDU_SIZE
Maximum MSDU size.
Definition: wimax-net-device.h:486
ns3::WimaxNetDevice::GetNrFrames
uint32_t GetNrFrames(void) const
Get the number of frames.
Definition: wimax-net-device.cc:396
list
#define list
Definition: openflow-interface.h:47
send-params.h
ns3::WimaxNetDevice::GetCurrentDcd
Dcd GetCurrentDcd(void) const
Get the current DCD.
Definition: wimax-net-device.cc:457
wimax-net-device.h
ns3::WimaxNetDevice::GetPhyChannel
virtual Ptr< Channel > GetPhyChannel(void) const
Get the channel (this method is redundant with GetChannel())
Definition: wimax-net-device.cc:231
ns3::WimaxNetDevice::Send
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
Send function.
Definition: wimax-net-device.cc:304
ns3::MakeCallback
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:1642
NS_LOG_LOGIC
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
Definition: log.h:289
ns3::MakePointerAccessor
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: pointer.h:227
ns3::WimaxNetDevice::m_forwardUp
NetDevice::ReceiveCallback m_forwardUp
forward up callback function
Definition: wimax-net-device.h:522
ns3::WimaxNetDevice::GetBroadcastConnection
Ptr< WimaxConnection > GetBroadcastConnection(void) const
Get the broadcast connection.
Definition: wimax-net-device.cc:445
ns3::WimaxNetDevice::SetRtg
void SetRtg(uint16_t rtg)
Set receive/transmit transition gap.
Definition: wimax-net-device.cc:189
NS_LOG_FUNCTION_NOARGS
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Definition: log-macros-enabled.h:209
ns3::WimaxNetDevice::SetCurrentUcd
void SetCurrentUcd(Ucd ucd)
Set the current UCD.
Definition: wimax-net-device.cc:463
ns3::WimaxNetDevice::m_broadcastConnection
Ptr< WimaxConnection > m_broadcastConnection
broadcast connection
Definition: wimax-net-device.h:550
ns3::WimaxNetDevice::GetBroadcast
virtual Address GetBroadcast(void) const
Get broadcast address.
Definition: wimax-net-device.cc:274
ns3::WimaxNetDevice::GetName
virtual std::string GetName(void) const
Get device name.
Definition: wimax-net-device.cc:207
ns3::WimaxNetDevice::m_currentUcd
Ucd m_currentUcd
UCD.
Definition: wimax-net-device.h:547
NS_LOG_DEBUG
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Definition: log.h:273
ns3::WimaxNetDevice::SetNode
virtual void SetNode(Ptr< Node > node)
Set node pointer.
Definition: wimax-net-device.cc:318
ns3::WimaxNetDevice::GetBandwidthManager
Ptr< BandwidthManager > GetBandwidthManager(void) const
Get the bandwidth manager on the device.
Definition: wimax-net-device.cc:499
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1289
ns3::WimaxNetDevice::NeedsArp
virtual bool NeedsArp(void) const
Check if device needs ARP.
Definition: wimax-net-device.cc:330
ns3::WimaxNetDevice::m_linkUp
bool m_linkUp
link up?
Definition: wimax-net-device.h:527
ns3::WimaxNetDevice::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: wimax-net-device.cc:158
ns3::WimaxNetDevice::SetReceiveCallback
void SetReceiveCallback(void)
Set receive callback function.
Definition: wimax-net-device.cc:538
ns3::WimaxNetDevice::NotifyPromiscTrace
void NotifyPromiscTrace(Ptr< Packet > p)
Notify promiscious trace of a packet arrival.
Definition: wimax-net-device.cc:571
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Definition: log-macros-enabled.h:244
ns3::WimaxNetDevice::SetMacAddress
void SetMacAddress(Mac48Address address)
Set the MAC address.
Definition: wimax-net-device.cc:409
ns3::WimaxNetDevice::m_frameStartTime
static Time m_frameStartTime
temp, to determine the frame start time at SS side, shall actually be determined by frame start pream...
Definition: wimax-net-device.h:279
ns3::UintegerValue
Hold an unsigned integer type.
Definition: uinteger.h:44
ns3::SendParams
The SendParams class defines the parameters with which Send() function of a particular PHY is called.
Definition: send-params.h:44
ns3::WimaxNetDevice::SetChannel
void SetChannel(Ptr< WimaxChannel > wimaxChannel)
Set the channel object.
Definition: wimax-net-device.cc:375
ns3::TracedValueCallback::Time
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition: nstime.h:813
ns3::LlcSnapHeader
Header for the LLC/SNAP encapsulation.
Definition: llc-snap-header.h:43
ns3::WimaxNetDevice::m_currentDcd
Dcd m_currentDcd
DCD.
Definition: wimax-net-device.h:546
ns3::WimaxNetDevice::GetMtu
virtual uint16_t GetMtu(void) const
Get MTU of the device.
Definition: wimax-net-device.cc:248
ns3::WimaxNetDevice::m_ttg
uint16_t m_ttg
length of TTG in units of PSs
Definition: wimax-net-device.h:542
ns3::WimaxNetDevice::SetNrFrames
void SetNrFrames(uint32_t nrFrames)
Set the number of frames.
Definition: wimax-net-device.cc:391
ns3::WimaxNetDevice::SetAddress
virtual void SetAddress(Address address)
Set address of the device.
Definition: wimax-net-device.cc:403
ns3::MakeUintegerAccessor
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition: uinteger.h:45
ns3::WimaxNetDevice::IsPointToPoint
virtual bool IsPointToPoint(void) const
Check if device is a point-to-point device.
Definition: wimax-net-device.cc:298
ns3::WimaxNetDevice::m_burstProfileManager
Ptr< BurstProfileManager > m_burstProfileManager
burst profile manager
Definition: wimax-net-device.h:553
ns3::Ucd
This class implements the UCD message as described by "IEEE Standard for Local and metropolitan area ...
Definition: ul-mac-messages.h:318
ns3::WimaxNetDevice::m_traceTx
TracedCallback< Ptr< const Packet >, const Mac48Address & > m_traceTx
Definition: wimax-net-device.h:458
ns3::LlcSnapHeader::GetType
uint16_t GetType(void)
Return the Ethertype.
Definition: llc-snap-header.cc:44
service-flow-manager.h
ns3::WimaxNetDevice::m_rtg
uint16_t m_rtg
length of RTG in units of PSs
Definition: wimax-net-device.h:544
ns3::WimaxNetDevice::SendFrom
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
Send a packet.
Definition: wimax-net-device.cc:544
ns3::Object::DoDispose
virtual void DoDispose(void)
Destructor implementation.
Definition: object.cc:346
ns3::Dcd
This class implements Downlink channel descriptor as described by "IEEE Standard for Local and metrop...
Definition: dl-mac-messages.h:356
ns3::WimaxNetDevice::WimaxNetDevice
WimaxNetDevice(void)
Definition: wimax-net-device.cc:138
ns3::WimaxNetDevice::GetPhy
Ptr< WimaxPhy > GetPhy(void) const
Get the physical layer object.
Definition: wimax-net-device.cc:369
third.phy
phy
Definition: third.py:93
ns3::NetDevice
Network layer to device interface.
Definition: net-device.h:96
ns3::WimaxNetDevice::SetCurrentDcd
void SetCurrentDcd(Dcd dcd)
Set the current DCD.
Definition: wimax-net-device.cc:451
ns3::WimaxNetDevice::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: wimax-net-device.cc:52
ns3::WimaxNetDevice::DoGetChannel
virtual Ptr< WimaxChannel > DoGetChannel(void) const
Get the channel.
Definition: wimax-net-device.cc:532
ns3::WimaxNetDevice::SetConnectionManager
virtual void SetConnectionManager(Ptr< ConnectionManager > connectionManager)
Set the connection manager of the device.
Definition: wimax-net-device.cc:481
ns3::WimaxNetDevice::m_state
uint8_t m_state
state
Definition: wimax-net-device.h:538
burst-profile-manager.h