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"
34 #include "ns3/traced-callback.h"
35 #include "ns3/nstime.h"
49 class BurstProfileManager;
50 class ConnectionManager;
51 class ServiceFlowManager;
52 class BandwidthManager;
53 class UplinkScheduler;
98 void SetTtg (uint16_t ttg);
103 uint16_t
GetTtg (
void)
const;
108 void SetRtg (uint16_t rtg);
113 uint16_t
GetRtg (
void)
const;
285 virtual void SetName (
const std::string name);
290 virtual std::string
GetName (
void)
const;
295 virtual void SetIfIndex (
const uint32_t index);
326 virtual bool SetMtu (
const uint16_t mtu);
331 virtual uint16_t
GetMtu (
void)
const;
501 uint16_t protocolNumber) = 0;
a polymophic address class
This class implements Downlink channel descriptor as described by "IEEE Standard for Local and metrop...
Ipv4 addresses are stored in host order in this class.
Describes an IPv6 address.
Network layer to device interface.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Forward calls to a chain of Callback.
a unique identifier for an interface.
This class implements the UCD message as described by "IEEE Standard for Local and metropolitan area ...
Hold together all WiMAX-related objects in a NetDevice.
virtual bool IsLinkUp(void) const
Check if link is up.
Mac48Address GetMacAddress(void) const
Get the MAC address.
NetDevice::ReceiveCallback m_forwardUp
forward up callback function
void SetRtg(uint16_t rtg)
Set receive/transmit transition gap.
virtual void SetConnectionManager(Ptr< ConnectionManager > connectionManager)
Set the connection manager of the device.
Ptr< BandwidthManager > m_bandwidthManager
badnwidth manager
Ptr< BurstProfileManager > m_burstProfileManager
burst profile manager
static uint8_t m_direction
downlink or uplink
void Receive(Ptr< const PacketBurst > burst)
Receive a packet burst.
std::vector< uint64_t > m_dlChannels
not sure if it shall be included here
Dcd GetCurrentDcd(void) const
Get the current DCD.
NetDevice::PromiscReceiveCallback m_promiscRx
promiscious receive fcallback function
Direction
Direction enumeration.
Mac48Address m_address
MAC address.
static TypeId GetTypeId(void)
Get the type ID.
NetDevice::PromiscReceiveCallback GetPromiscReceiveCallback(void)
Get promiscious receive callback function.
RangingStatus
RangingStatus enumeration.
@ RANGING_STATUS_CONTINUE
Ptr< WimaxConnection > m_initialRangingConnection
initial rnaging connection
uint32_t GetNrFrames(void) const
Get the number of frames.
virtual void Start(void)=0
Start function.
virtual Address MakeMulticastAddress(Ipv4Address multicastGroup) const
Make multicast address.
void CreateDefaultConnections(void)
Creates the initial ranging and broadcast connections.
void SetPhy(Ptr< WimaxPhy > phy)
Set the physical layer object.
virtual bool DoSend(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest, uint16_t protocolNumber)=0
Send a packet.
Ptr< WimaxConnection > GetBroadcastConnection(void) const
Get the broadcast connection.
virtual void SetName(const std::string name)
Set device name.
virtual Ptr< WimaxChannel > DoGetChannel(void) const
Get the channel.
Ptr< BandwidthManager > GetBandwidthManager(void) const
Get the bandwidth manager on the device.
virtual void Stop(void)=0
Stop function.
static const uint16_t DEFAULT_MSDU_SIZE
recommended by wimax forum.
uint16_t GetTtg(void) const
Get transmission/receive transition gap.
virtual void SetIfIndex(const uint32_t index)
Set interface index.
static const uint16_t MAX_MSDU_SIZE
Maximum MSDU size.
virtual bool IsBroadcast(void) const
Check if broadcast enabled.
void SetCurrentUcd(Ucd ucd)
Set the current UCD.
void SetMacAddress(Mac48Address address)
Set the MAC address.
Ptr< ConnectionManager > GetConnectionManager(void) const
Get the connection manager of the device.
Ptr< WimaxConnection > m_broadcastConnection
broadcast connection
void SetReceiveCallback(void)
Set receive callback function.
virtual void DoDispose(void)
Destructor implementation.
static Time m_frameStartTime
temp, to determine the frame start time at SS side, shall actually be determined by frame start pream...
virtual bool Send(Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber)
Send function.
void SetBurstProfileManager(Ptr< BurstProfileManager > burstProfileManager)
Set the burst profile manager.
Ucd GetCurrentUcd(void) const
Get the current UCD.
Ptr< WimaxPhy > GetPhy(void) const
Get the physical layer object.
virtual bool SetMtu(const uint16_t mtu)
Set MTU value for the device.
void SetState(uint8_t state)
Set the device state.
bool IsPromisc(void)
Check if device is promiscious.
Ptr< WimaxPhy > m_phy
the phy
virtual bool Enqueue(Ptr< Packet > packet, const MacHeaderType &hdrType, Ptr< WimaxConnection > connection)=0
Enqueue a packet.
Ptr< Object > m_mobility
modility model
void SetChannel(Ptr< WimaxChannel > wimaxChannel)
Set the channel object.
virtual bool IsBridge(void) const
Return true if the net device is acting as a bridge.
virtual void SetLinkChangeCallback(Callback< void > callback)
Set link change callback function.
Ptr< ConnectionManager > m_connectionManager
connection manager
void SetBandwidthManager(Ptr< BandwidthManager > bandwidthManager)
Set the bandwidth manager on the device.
uint32_t m_ifIndex
IF index.
virtual void SetPromiscReceiveCallback(PromiscReceiveCallback cb)
Set promiscious receive callback function.
virtual bool SendFrom(Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber)
Send a packet.
uint8_t GetState(void) const
Get the device state.
TracedCallback< Ptr< const Packet >, const Mac48Address & > m_traceRx
Ptr< WimaxConnection > GetInitialRangingConnection(void) const
Get the initial ranging connection.
virtual void SetAddress(Address address)
Set address of the device.
TracedCallback< Ptr< const Packet >, const Mac48Address & > m_traceTx
virtual Address GetAddress(void) const
Get address of the device.
Callback< void > m_linkChange
link change callback
virtual Address GetBroadcast(void) const
Get broadcast address.
virtual uint32_t GetIfIndex(void) const
Get interface index.
virtual void AddLinkChangeCallback(Callback< void > callback)
Add link change callback function.
virtual Ptr< Node > GetNode(void) const
Get node pointer.
std::string m_name
service name
virtual bool SupportsSendFrom(void) const
Check if device supports the SendFrom method.
virtual void DoReceive(Ptr< Packet > packet)=0
Receive a packet.
virtual ~WimaxNetDevice(void)
virtual std::string GetName(void) const
Get device name.
static uint32_t m_nrFrames
temp, shall be in BS. defined here to allow SS to access. SS shall actually determine it from DLFP,...
virtual bool NeedsArp(void) const
Check if device needs ARP.
void Attach(Ptr< WimaxChannel > channel)
Attach device to channel.
void SetTtg(uint16_t ttg)
Set transmission/receive transition gap.
virtual Address GetMulticast(void) const
Get multicast address.
void SetNrFrames(uint32_t nrFrames)
Set the number of frames.
uint16_t m_ttg
length of TTG in units of PSs
void SetCurrentDcd(Dcd dcd)
Set the current DCD.
WimaxNetDevice & operator=(const WimaxNetDevice &)
assignment operator (disabled)
Ptr< BurstProfileManager > GetBurstProfileManager(void) const
Get the burst profile manager.
uint16_t GetRtg(void) const
Get receive/transmit transition gap.
virtual bool IsMulticast(void) const
Check if multicast enabled.
virtual uint16_t GetMtu(void) const
Get MTU of the device.
WimaxNetDevice(const WimaxNetDevice &)
copy constructor (disabled)
virtual bool IsPointToPoint(void) const
Check if device is a point-to-point device.
virtual void SetNode(Ptr< Node > node)
Set node pointer.
void InitializeChannels(void)
Initialize channels function.
virtual Ptr< Channel > GetChannel(void) const
Get the channel.
void(* TxRxTracedCallback)(Ptr< const Packet > packet, const Mac48Address &mac)
TracedCallback signature for packet and Mac48Address.
Ptr< Node > m_node
the node
uint32_t m_symbolIndex
symbol index
void NotifyPromiscTrace(Ptr< Packet > p)
Notify promiscious trace of a packet arrival.
virtual Ptr< Channel > GetPhyChannel(void) const
Get the channel (this method is redundant with GetChannel())
void ForwardUp(Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest)
Forward a packet to the next layer above the device.
void ForwardDown(Ptr< PacketBurst > burst, WimaxPhy::ModulationType modulationType)
Forward a packet down the stack.
uint16_t m_rtg
length of RTG in units of PSs
ModulationType
ModulationType enumeration.
Every class exported by the ns3 library is enclosed in the ns3 namespace.