22 #ifndef WIMAX_NET_DEVICE_H
23 #define WIMAX_NET_DEVICE_H
25 #include "ns3/net-device.h"
26 #include "ns3/event-id.h"
27 #include "ns3/mac48-address.h"
29 #include "wimax-connection.h"
30 #include "cid-factory.h"
31 #include "mac-messages.h"
32 #include "dl-mac-messages.h"
33 #include "ul-mac-messages.h"
34 #include "ns3/traced-callback.h"
35 #include "ns3/nstime.h"
37 #include "wimax-phy.h"
38 #include "wimax-mac-header.h"
49 class BurstProfileManager;
50 class ConnectionManager;
51 class ServiceFlowManager;
52 class BandwidthManager;
53 class UplinkScheduler;
74 DIRECTION_DOWNLINK, DIRECTION_UPLINK
79 RANGING_STATUS_EXPIRED, RANGING_STATUS_CONTINUE, RANGING_STATUS_ABORT, RANGING_STATUS_SUCCESS
82 static TypeId GetTypeId (
void);
88 void SetTtg (uint16_t ttg);
92 uint16_t
GetTtg (
void)
const;
96 void SetRtg (uint16_t rtg);
100 uint16_t
GetRtg (
void)
const;
118 void SetNrFrames (uint32_t nrFrames);
119 uint32_t GetNrFrames (
void)
const;
128 void SetState (uint8_t state);
129 uint8_t GetState (
void)
const;
139 void SetCurrentDcd (
Dcd dcd);
140 Dcd GetCurrentDcd (
void)
const;
141 void SetCurrentUcd (
Ucd ucd);
142 Ucd GetCurrentUcd (
void)
const;
176 void CreateDefaultConnections (
void);
178 virtual void Start (
void) = 0;
179 virtual void Stop (
void) = 0;
181 void SetReceiveCallback (
void);
186 void ForwardDown (
Ptr<PacketBurst> burst, WimaxPhy::ModulationType modulationType);
189 static uint8_t m_direction;
191 static Time m_frameStartTime;
193 virtual void SetName (
const std::string name);
194 virtual std::string GetName (
void)
const;
195 virtual void SetIfIndex (
const uint32_t index);
201 virtual bool SetMtu (
const uint16_t mtu);
202 virtual uint16_t
GetMtu (
void)
const;
208 virtual Address GetMulticast (
void)
const;
230 bool IsPromisc (
void);
237 static const uint16_t MAX_MSDU_SIZE = 1500;
239 static const uint16_t DEFAULT_MSDU_SIZE = 1400;
244 uint16_t protocolNumber) = 0;
248 void InitializeChannels (
void);
259 mutable uint16_t m_mtu;
262 static uint32_t m_nrFrames;
265 std::vector<uint64_t> m_dlChannels;
269 uint32_t m_symbolIndex;
void SetRtg(uint16_t rtg)
smart pointer class similar to boost::intrusive_ptr
uint16_t GetRtg(void) const
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
Ptr< WimaxConnection > GetBroadcastConnection(void) const
Ptr< ConnectionManager > GetConnectionManager(void) const
a polymophic address class
virtual bool IsMulticast(void) const
virtual Ptr< Channel > GetChannel(void) const
virtual bool SetMtu(const uint16_t mtu)
uint16_t GetTtg(void) const
void SetTtg(uint16_t ttg)
virtual void SetIfIndex(const uint32_t index)
virtual Address GetBroadcast(void) const
Ptr< WimaxConnection > GetInitialRangingConnection(void) const
Ptr< BandwidthManager > GetBandwidthManager(void) const
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
virtual void SetConnectionManager(Ptr< ConnectionManager > connectionManager)
Mac48Address GetMacAddress(void) const
virtual void DoDispose(void)
virtual uint32_t GetIfIndex(void) const
virtual Ptr< Node > GetNode(void) const
void SetBandwidthManager(Ptr< BandwidthManager > bandwidthManager)
virtual Address GetAddress(void) const
Hold together all Wimax-related objects in a NetDevice.This class holds together ns3::WimaxPhy, ns3::WimaxConnection, ns3::ConectionManager, ns3::BurstProfileManager, and ns3::BandwidthManager.
virtual bool IsBroadcast(void) const
void SetBurstProfileManager(Ptr< BurstProfileManager > burstProfileManager)
void SetMacAddress(Mac48Address address)
void SetChannel(Ptr< WimaxChannel > wimaxChannel)
void SetPhy(Ptr< WimaxPhy > phy)
virtual bool IsLinkUp(void) const
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
virtual bool SupportsSendFrom(void) const
Ptr< BurstProfileManager > GetBurstProfileManager(void) const
Describes an IPv6 address.
Ipv4 addresses are stored in host order in this class.
virtual void AddLinkChangeCallback(Callback< void > callback)
virtual bool IsPointToPoint(void) const
Return true if the net device is on a point-to-point link.
Network layer to device interface.
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
virtual uint16_t GetMtu(void) const
Ptr< WimaxPhy > GetPhy(void) const
virtual void SetAddress(Address address)
virtual bool IsBridge(void) const
Return true if the net device is acting as a bridge.
virtual void SetNode(Ptr< Node > node)
virtual bool NeedsArp(void) const
a unique identifier for an interface.