Hold together all WiMAX-related objects in a NetDevice. More...
#include "wimax-net-device.h"
Public Member Functions | |
WimaxNetDevice () | |
~WimaxNetDevice () override | |
void | AddLinkChangeCallback (Callback< void > callback) override |
Add link change callback function. More... | |
void | Attach (Ptr< WimaxChannel > channel) |
Attach device to channel. More... | |
void | CreateDefaultConnections () |
Creates the initial ranging and broadcast connections. More... | |
void | DoDispose () override |
Destructor implementation. More... | |
virtual bool | Enqueue (Ptr< Packet > packet, const MacHeaderType &hdrType, Ptr< WimaxConnection > connection)=0 |
Enqueue a packet. More... | |
void | ForwardDown (Ptr< PacketBurst > burst, WimaxPhy::ModulationType modulationType) |
Forward a packet down the stack. More... | |
void | ForwardUp (Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest) |
Forward a packet to the next layer above the device. More... | |
Address | GetAddress () const override |
Get address of the device. More... | |
Ptr< BandwidthManager > | GetBandwidthManager () const |
Get the bandwidth manager on the device. More... | |
Address | GetBroadcast () const override |
Get broadcast address. More... | |
Ptr< WimaxConnection > | GetBroadcastConnection () const |
Get the broadcast connection. More... | |
Ptr< BurstProfileManager > | GetBurstProfileManager () const |
Get the burst profile manager. More... | |
Ptr< Channel > | GetChannel () const override |
Get the channel. More... | |
uint64_t | GetChannel (uint8_t index) const |
Get the channel object by index. More... | |
Ptr< ConnectionManager > | GetConnectionManager () const |
Get the connection manager of the device. More... | |
Dcd | GetCurrentDcd () const |
Get the current DCD. More... | |
Ucd | GetCurrentUcd () const |
Get the current UCD. More... | |
uint32_t | GetIfIndex () const override |
Get interface index. More... | |
Ptr< WimaxConnection > | GetInitialRangingConnection () const |
Get the initial ranging connection. More... | |
Mac48Address | GetMacAddress () const |
Get the MAC address. More... | |
uint16_t | GetMtu () const override |
Get MTU of the device. More... | |
virtual Address | GetMulticast () const |
Get multicast address. More... | |
Address | GetMulticast (Ipv4Address multicastGroup) const override |
Make and return a MAC multicast address using the provided multicast group. More... | |
Address | GetMulticast (Ipv6Address addr) const override |
Get the MAC multicast address corresponding to the IPv6 address provided. More... | |
virtual std::string | GetName () const |
Get device name. More... | |
Ptr< Node > | GetNode () const override |
Get node pointer. More... | |
uint32_t | GetNrFrames () const |
Get the number of frames. More... | |
Ptr< WimaxPhy > | GetPhy () const |
Get the physical layer object. More... | |
virtual Ptr< Channel > | GetPhyChannel () const |
Get the channel (this method is redundant with GetChannel()) More... | |
NetDevice::PromiscReceiveCallback | GetPromiscReceiveCallback () |
Get promiscuous receive callback function. More... | |
uint16_t | GetRtg () const |
Get receive/transmit transition gap. More... | |
uint8_t | GetState () const |
Get the device state. More... | |
uint16_t | GetTtg () const |
Get transmission/receive transition gap. More... | |
bool | IsBridge () const override |
Return true if the net device is acting as a bridge. More... | |
bool | IsBroadcast () const override |
Check if broadcast enabled. More... | |
bool | IsLinkUp () const override |
Check if link is up. More... | |
bool | IsMulticast () const override |
Check if multicast enabled. More... | |
bool | IsPointToPoint () const override |
Check if device is a point-to-point device. More... | |
bool | IsPromisc () |
Check if device is promiscuous. More... | |
virtual Address | MakeMulticastAddress (Ipv4Address multicastGroup) const |
Make multicast address. More... | |
bool | NeedsArp () const override |
Check if device needs ARP. More... | |
void | NotifyPromiscTrace (Ptr< Packet > p) |
Notify promiscuous trace of a packet arrival. More... | |
bool | Send (Ptr< Packet > packet, const Address &dest, uint16_t protocolNumber) override |
Send function. More... | |
bool | SendFrom (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) override |
Send a packet. More... | |
void | SetAddress (Address address) override |
Set address of the device. More... | |
void | SetBandwidthManager (Ptr< BandwidthManager > bandwidthManager) |
Set the bandwidth manager on the device. More... | |
void | SetBurstProfileManager (Ptr< BurstProfileManager > burstProfileManager) |
Set the burst profile manager. More... | |
void | SetChannel (Ptr< WimaxChannel > wimaxChannel) |
Set the channel object. More... | |
virtual void | SetConnectionManager (Ptr< ConnectionManager > connectionManager) |
Set the connection manager of the device. More... | |
void | SetCurrentDcd (Dcd dcd) |
Set the current DCD. More... | |
void | SetCurrentUcd (Ucd ucd) |
Set the current UCD. More... | |
void | SetIfIndex (const uint32_t index) override |
Set interface index. More... | |
virtual void | SetLinkChangeCallback (Callback< void > callback) |
Set link change callback function. More... | |
void | SetMacAddress (Mac48Address address) |
Set the MAC address. More... | |
bool | SetMtu (const uint16_t mtu) override |
Set MTU value for the device. More... | |
virtual void | SetName (const std::string name) |
Set device name. More... | |
void | SetNode (Ptr< Node > node) override |
Set node pointer. More... | |
void | SetNrFrames (uint32_t nrFrames) |
Set the number of frames. More... | |
void | SetPhy (Ptr< WimaxPhy > phy) |
Set the physical layer object. More... | |
void | SetPromiscReceiveCallback (PromiscReceiveCallback cb) override |
Set promiscuous receive callback function. More... | |
void | SetReceiveCallback () |
Set receive callback function. More... | |
void | SetReceiveCallback (NetDevice::ReceiveCallback cb) override |
Set receive callback function. More... | |
void | SetRtg (uint16_t rtg) |
Set receive/transmit transition gap. More... | |
void | SetState (uint8_t state) |
Set the device state. More... | |
void | SetTtg (uint16_t ttg) |
Set transmission/receive transition gap. More... | |
virtual void | Start ()=0 |
Start function. More... | |
virtual void | Stop ()=0 |
Stop function. More... | |
bool | SupportsSendFrom () const override |
Check if device supports the SendFrom method. More... | |
Public Member Functions inherited from ns3::NetDevice | |
~NetDevice () override | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
~Object () override | |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose () |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. More... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized () const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o[[maybe_unused]]) |
Assignment operator. More... | |
void | Ref () const |
Increment the reference count. More... | |
void | Unref () const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::NetDevice | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId () |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Public Attributes | |
TracedCallback< Ptr< const Packet >, const Mac48Address & > | m_traceRx |
TracedCallback< Ptr< const Packet >, const Mac48Address & > | m_traceTx |
Static Public Attributes | |
static uint8_t | m_direction = ~0 |
downlink or uplink More... | |
static Time | m_frameStartTime = Seconds(0) |
temp, to determine the frame start time at SS side, shall actually be determined by frame start preamble More... | |
Private Member Functions | |
WimaxNetDevice (const WimaxNetDevice &) | |
copy constructor (disabled) More... | |
virtual Ptr< WimaxChannel > | DoGetChannel () const |
Get the channel. More... | |
virtual void | DoReceive (Ptr< Packet > packet)=0 |
Receive a packet. More... | |
virtual bool | DoSend (Ptr< Packet > packet, const Mac48Address &source, const Mac48Address &dest, uint16_t protocolNumber)=0 |
Send a packet. More... | |
void | InitializeChannels () |
Initialize channels function. More... | |
WimaxNetDevice & | operator= (const WimaxNetDevice &) |
assignment operator (disabled) More... | |
void | Receive (Ptr< const PacketBurst > burst) |
Receive a packet burst. More... | |
Static Private Attributes | |
static const uint16_t | DEFAULT_MSDU_SIZE = 1400 |
recommended by wimax forum. More... | |
static uint32_t | m_nrFrames = 0 |
temp, shall be in BS. More... | |
static const uint16_t | MAX_MSDU_SIZE = 1500 |
Maximum MSDU size. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize () |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Hold together all WiMAX-related objects in a NetDevice.
This class holds together ns3::WimaxPhy, ns3::WimaxConnection, ns3::ConnectionManager, ns3::BurstProfileManager, and ns3::BandwidthManager.
Definition at line 70 of file wimax-net-device.h.
typedef void(* ns3::WimaxNetDevice::TxRxTracedCallback) (Ptr< const Packet > packet, const Mac48Address &mac) |
TracedCallback signature for packet and Mac48Address.
[in] | packet | The packet. |
[in] | mac | The Mac48Address. |
const Mac48Address &
argument is deprecated and will be changed to Mac48Address
in a future release. The TracedCallback signature will then match Packet::Mac48Address
and this typedef can be removed. Definition at line 449 of file wimax-net-device.h.
Direction enumeration.
Enumerator | |
---|---|
DIRECTION_DOWNLINK | |
DIRECTION_UPLINK |
Definition at line 74 of file wimax-net-device.h.
RangingStatus enumeration.
Enumerator | |
---|---|
RANGING_STATUS_EXPIRED | |
RANGING_STATUS_CONTINUE | |
RANGING_STATUS_ABORT | |
RANGING_STATUS_SUCCESS |
Definition at line 81 of file wimax-net-device.h.
ns3::WimaxNetDevice::WimaxNetDevice | ( | ) |
Definition at line 142 of file wimax-net-device.cc.
References InitializeChannels(), m_bandwidthManager, m_burstProfileManager, m_connectionManager, m_direction, m_frameStartTime, m_nrFrames, and ns3::Seconds().
|
override |
Definition at line 157 of file wimax-net-device.cc.
|
private |
copy constructor (disabled)
|
overridevirtual |
Add link change callback function.
callback | the link change callback function |
Implements ns3::NetDevice.
Definition at line 640 of file wimax-net-device.cc.
References NS_FATAL_ERROR.
void ns3::WimaxNetDevice::Attach | ( | Ptr< WimaxChannel > | channel | ) |
Attach device to channel.
channel | channel to attach |
Definition at line 354 of file wimax-net-device.cc.
References third::channel, and m_phy.
void ns3::WimaxNetDevice::CreateDefaultConnections | ( | ) |
Creates the initial ranging and broadcast connections.
Definition at line 507 of file wimax-net-device.cc.
References ns3::Cid::BROADCAST, ns3::Cid::Broadcast(), ns3::Cid::INITIAL_RANGING, ns3::Cid::InitialRanging(), m_broadcastConnection, and m_initialRangingConnection.
Referenced by ns3::BaseStationNetDevice::Start(), and ns3::SubscriberStationNetDevice::Start().
|
overridevirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 162 of file wimax-net-device.cc.
References ns3::Object::DoDispose(), m_bandwidthManager, m_broadcastConnection, m_burstProfileManager, m_connectionManager, m_initialRangingConnection, m_node, and m_phy.
Referenced by ns3::BaseStationNetDevice::DoDispose(), and ns3::SubscriberStationNetDevice::DoDispose().
|
privatevirtual |
Get the channel.
Definition at line 528 of file wimax-net-device.cc.
References m_phy.
Referenced by GetChannel(), and GetPhyChannel().
Receive a packet.
packet | the packet received |
Implemented in ns3::SubscriberStationNetDevice, and ns3::BaseStationNetDevice.
Referenced by Receive().
|
privatepure virtual |
Send a packet.
packet | the packet |
source | the source MAC address |
dest | the destination MAC address |
protocolNumber | the protocol number |
Implemented in ns3::SubscriberStationNetDevice, and ns3::BaseStationNetDevice.
Referenced by Send(), and SendFrom().
|
pure virtual |
Enqueue a packet.
packet | the packet |
hdrType | the header type |
connection | the wimax connection |
Implemented in ns3::SubscriberStationNetDevice, and ns3::BaseStationNetDevice.
void ns3::WimaxNetDevice::ForwardDown | ( | Ptr< PacketBurst > | burst, |
WimaxPhy::ModulationType | modulationType | ||
) |
Forward a packet down the stack.
burst | the packet burst |
modulationType | the modulation type |
Definition at line 581 of file wimax-net-device.cc.
References m_direction, m_phy, and two-ray-to-three-gpp-ch-calibration::params.
Referenced by ns3::SubscriberStationNetDevice::SendBurst(), and ns3::BaseStationNetDevice::SendBursts().
void ns3::WimaxNetDevice::ForwardUp | ( | Ptr< Packet > | packet, |
const Mac48Address & | source, | ||
const Mac48Address & | dest | ||
) |
Forward a packet to the next layer above the device.
packet | the packet |
source | the source MAC address |
dest | the destination MAC address |
Definition at line 345 of file wimax-net-device.cc.
References ns3::LlcSnapHeader::GetType(), m_forwardUp, m_traceRx, and ns3::Packet::RemoveHeader().
Referenced by ns3::BaseStationNetDevice::DoReceive(), and ns3::SubscriberStationNetDevice::DoReceive().
|
overridevirtual |
Get address of the device.
Implements ns3::NetDevice.
Definition at line 411 of file wimax-net-device.cc.
References m_address.
Referenced by Send().
Ptr< BandwidthManager > ns3::WimaxNetDevice::GetBandwidthManager | ( | ) | const |
Get the bandwidth manager on the device.
Definition at line 495 of file wimax-net-device.cc.
References m_bandwidthManager.
Referenced by ns3::BaseStationNetDevice::DoReceive(), GetTypeId(), ns3::SubscriberStationNetDevice::ProcessUlMap(), and ns3::BaseStationNetDevice::Start().
|
overridevirtual |
Get broadcast address.
Implements ns3::NetDevice.
Definition at line 272 of file wimax-net-device.cc.
References ns3::Mac48Address::GetBroadcast().
Ptr< WimaxConnection > ns3::WimaxNetDevice::GetBroadcastConnection | ( | ) | const |
Get the broadcast connection.
Definition at line 441 of file wimax-net-device.cc.
References m_broadcastConnection.
Referenced by ns3::BaseStationNetDevice::CreateDescriptorMessages(), ns3::BaseStationNetDevice::CreateMapMessages(), ns3::SubscriberStationNetDevice::DoReceive(), ns3::BaseStationNetDevice::GetConnection(), ns3::SubscriberStationNetDevice::ProcessUlMap(), and ns3::BaseStationNetDevice::SendBursts().
Ptr< BurstProfileManager > ns3::WimaxNetDevice::GetBurstProfileManager | ( | ) | const |
Get the burst profile manager.
Definition at line 483 of file wimax-net-device.cc.
References m_burstProfileManager.
Referenced by GetTypeId(), ns3::SubscriberStationNetDevice::SendBurst(), ns3::BaseStationNetDevice::SendBursts(), ns3::BaseStationNetDevice::SetDlBurstProfiles(), and ns3::BaseStationNetDevice::SetUlBurstProfiles().
Get the channel.
Implements ns3::NetDevice.
Definition at line 225 of file wimax-net-device.cc.
References DoGetChannel().
uint64_t ns3::WimaxNetDevice::GetChannel | ( | uint8_t | index | ) | const |
Get the channel object by index.
index | the channel index |
Definition at line 381 of file wimax-net-device.cc.
References m_dlChannels.
Ptr< ConnectionManager > ns3::WimaxNetDevice::GetConnectionManager | ( | ) | const |
Get the connection manager of the device.
Definition at line 471 of file wimax-net-device.cc.
References m_connectionManager.
Referenced by ns3::BaseStationNetDevice::DoReceive(), ns3::SubscriberStationNetDevice::DoReceive(), ns3::BaseStationNetDevice::GetConnection(), GetTypeId(), and ns3::BaseStationNetDevice::Start().
Dcd ns3::WimaxNetDevice::GetCurrentDcd | ( | ) | const |
Get the current DCD.
Definition at line 453 of file wimax-net-device.cc.
References m_currentDcd.
Referenced by ns3::SubscriberStationNetDevice::ProcessDcd().
Ucd ns3::WimaxNetDevice::GetCurrentUcd | ( | ) | const |
Get the current UCD.
Definition at line 465 of file wimax-net-device.cc.
References m_currentUcd.
Referenced by ns3::SubscriberStationNetDevice::ProcessUcd(), and ns3::SubscriberStationNetDevice::ProcessUlMap().
|
overridevirtual |
Get interface index.
Implements ns3::NetDevice.
Definition at line 219 of file wimax-net-device.cc.
References m_ifIndex.
Referenced by ns3::SubscriberStationNetDevice::SetBasicConnection(), and ns3::SubscriberStationNetDevice::SetPrimaryConnection().
Ptr< WimaxConnection > ns3::WimaxNetDevice::GetInitialRangingConnection | ( | ) | const |
Get the initial ranging connection.
Definition at line 435 of file wimax-net-device.cc.
References m_initialRangingConnection.
Referenced by ns3::SubscriberStationNetDevice::DoReceive(), ns3::BaseStationNetDevice::GetConnection(), and ns3::BaseStationNetDevice::SendBursts().
Mac48Address ns3::WimaxNetDevice::GetMacAddress | ( | ) | const |
Get the MAC address.
Definition at line 417 of file wimax-net-device.cc.
References m_address.
Referenced by ns3::BaseStationNetDevice::CreateDcd(), ns3::BaseStationNetDevice::CreateDlMap(), ns3::SubscriberStationNetDevice::DoReceive(), ns3::SubscriberStationNetDevice::DoSend(), Receive(), and ns3::SubscriberStationNetDevice::SendBurst().
|
overridevirtual |
Get MTU of the device.
Implements ns3::NetDevice.
Definition at line 248 of file wimax-net-device.cc.
References m_mtu.
Referenced by GetTypeId().
|
virtual |
Get multicast address.
Definition at line 284 of file wimax-net-device.cc.
Referenced by MakeMulticastAddress().
|
overridevirtual |
Make and return a MAC multicast address using the provided multicast group.
RFC 1112 says that an Ipv4 host group address is mapped to an Ethernet multicast address by placing the low-order 23-bits of the IP address into the low-order 23 bits of the Ethernet multicast address 01-00-5E-00-00-00 (hex). Similar RFCs exist for Ipv6 and Eui64 mappings. This method performs the multicast address creation function appropriate to the underlying MAC address of the device. This MAC address is encapsulated in an abstract Address to avoid dependencies on the exact MAC address format.
In the case of net devices that do not support multicast, clients are expected to test NetDevice::IsMulticast and avoid attempting to map multicast packets. Subclasses of NetDevice that do support multicasting are expected to override this method and provide an implementation appropriate to the particular device.
multicastGroup | The IP address for the multicast group destination of the packet. |
Implements ns3::NetDevice.
Definition at line 614 of file wimax-net-device.cc.
References ns3::Mac48Address::GetMulticast(), NS_LOG_FUNCTION, and NS_LOG_LOGIC.
|
overridevirtual |
Get the MAC multicast address corresponding to the IPv6 address provided.
addr | IPv6 address |
Implements ns3::NetDevice.
Definition at line 631 of file wimax-net-device.cc.
References ns3::Mac48Address::GetMulticast(), and NS_LOG_LOGIC.
|
virtual |
Get device name.
Definition at line 207 of file wimax-net-device.cc.
References m_name.
Get node pointer.
Implements ns3::NetDevice.
Definition at line 321 of file wimax-net-device.cc.
References m_node.
Referenced by ns3::SubscriberStationNetDevice::SetBasicConnection(), and ns3::SubscriberStationNetDevice::SetPrimaryConnection().
uint32_t ns3::WimaxNetDevice::GetNrFrames | ( | ) | const |
Get the number of frames.
Definition at line 393 of file wimax-net-device.cc.
References m_nrFrames.
Referenced by ns3::BaseStationNetDevice::CreateDcd(), ns3::BaseStationNetDevice::StartDlSubFrame(), and ns3::BaseStationNetDevice::StartFrame().
Get the physical layer object.
Definition at line 366 of file wimax-net-device.cc.
References m_phy.
Referenced by ns3::BaseStationNetDevice::CreateDcd(), ns3::BaseStationNetDevice::CreateUcd(), ns3::SubscriberStationNetDevice::GetTimeToAllocation(), GetTypeId(), ns3::SubscriberStationNetDevice::ProcessDcd(), ns3::SubscriberStationNetDevice::ProcessUlMap(), ns3::BaseStationNetDevice::SendBursts(), ns3::BaseStationNetDevice::Start(), ns3::SubscriberStationNetDevice::Start(), and ns3::BaseStationNetDevice::StartFrame().
Get the channel (this method is redundant with GetChannel())
Definition at line 231 of file wimax-net-device.cc.
References DoGetChannel().
Referenced by GetTypeId().
NetDevice::PromiscReceiveCallback ns3::WimaxNetDevice::GetPromiscReceiveCallback | ( | ) |
Get promiscuous receive callback function.
uint16_t ns3::WimaxNetDevice::GetRtg | ( | ) | const |
Get receive/transmit transition gap.
Definition at line 195 of file wimax-net-device.cc.
References m_rtg.
Referenced by ns3::BaseStationNetDevice::CreateDcd(), ns3::BaseStationNetDevice::EndUlSubFrame(), GetTypeId(), ns3::BaseStationNetDevice::Start(), and ns3::BaseStationNetDevice::StartFrame().
uint8_t ns3::WimaxNetDevice::GetState | ( | ) | const |
Get the device state.
Definition at line 429 of file wimax-net-device.cc.
References m_state.
Referenced by ns3::SubscriberStationNetDevice::DoReceive(), ns3::SubscriberStationNetDevice::IsRegistered(), ns3::SubscriberStationNetDevice::ProcessUlMap(), and ns3::SubscriberStationNetDevice::SetTimer().
uint16_t ns3::WimaxNetDevice::GetTtg | ( | ) | const |
Get transmission/receive transition gap.
Definition at line 183 of file wimax-net-device.cc.
References m_ttg.
Referenced by ns3::BaseStationNetDevice::CreateDcd(), ns3::BaseStationNetDevice::EndDlSubFrame(), GetTypeId(), ns3::BaseStationNetDevice::Start(), and ns3::BaseStationNetDevice::StartFrame().
|
static |
Get the type ID.
Definition at line 56 of file wimax-net-device.cc.
References DEFAULT_MSDU_SIZE, GetBandwidthManager(), GetBurstProfileManager(), GetConnectionManager(), GetMtu(), GetPhy(), GetPhyChannel(), GetRtg(), GetTtg(), m_broadcastConnection, m_initialRangingConnection, m_traceRx, m_traceTx, ns3::MakePointerAccessor(), ns3::MakeTraceSourceAccessor(), ns3::MakeUintegerAccessor(), MAX_MSDU_SIZE, SetBandwidthManager(), SetBurstProfileManager(), SetChannel(), SetConnectionManager(), SetMtu(), ns3::TypeId::SetParent(), SetPhy(), SetRtg(), and SetTtg().
|
private |
Initialize channels function.
Definition at line 589 of file wimax-net-device.cc.
References m_dlChannels.
Referenced by WimaxNetDevice().
|
overridevirtual |
Return true if the net device is acting as a bridge.
Implements ns3::NetDevice.
Definition at line 607 of file wimax-net-device.cc.
References NS_LOG_FUNCTION_NOARGS.
|
overridevirtual |
Check if broadcast enabled.
Implements ns3::NetDevice.
Definition at line 266 of file wimax-net-device.cc.
|
overridevirtual |
Check if link is up.
Implements ns3::NetDevice.
Definition at line 254 of file wimax-net-device.cc.
|
overridevirtual |
Check if multicast enabled.
Implements ns3::NetDevice.
Definition at line 278 of file wimax-net-device.cc.
|
overridevirtual |
Check if device is a point-to-point device.
Implements ns3::NetDevice.
Definition at line 296 of file wimax-net-device.cc.
bool ns3::WimaxNetDevice::IsPromisc | ( | ) |
Check if device is promiscuous.
Definition at line 563 of file wimax-net-device.cc.
References ns3::Callback< R, UArgs >::IsNull(), and m_promiscRx.
Referenced by ns3::SubscriberStationNetDevice::DoReceive().
|
virtual |
Make multicast address.
multicastGroup | the IPv4 address |
Definition at line 290 of file wimax-net-device.cc.
References GetMulticast().
|
overridevirtual |
Check if device needs ARP.
Implements ns3::NetDevice.
Definition at line 327 of file wimax-net-device.cc.
Notify promiscuous trace of a packet arrival.
p | the packet |
Definition at line 569 of file wimax-net-device.cc.
Referenced by ns3::SubscriberStationNetDevice::DoReceive().
|
private |
assignment operator (disabled)
|
private |
Receive a packet burst.
burst | the packet burst |
Definition at line 515 of file wimax-net-device.cc.
References DoReceive(), GetMacAddress(), and NS_LOG_DEBUG.
Referenced by SetReceiveCallback().
|
overridevirtual |
Send function.
packet | the packet |
dest | the destination address |
protocolNumber | the protocol number |
Implements ns3::NetDevice.
Definition at line 302 of file wimax-net-device.cc.
References ns3::Packet::AddHeader(), ns3::Mac48Address::ConvertFrom(), DoSend(), GetAddress(), m_traceTx, and ns3::LlcSnapHeader::SetType().
|
overridevirtual |
Send a packet.
packet | the packet |
source | the source address |
dest | the destination address |
protocolNumber | the protocol number |
Implements ns3::NetDevice.
Definition at line 540 of file wimax-net-device.cc.
References ns3::Packet::AddHeader(), ns3::Mac48Address::ConvertFrom(), DoSend(), m_traceTx, and ns3::LlcSnapHeader::SetType().
|
overridevirtual |
Set address of the device.
address | the address |
Implements ns3::NetDevice.
Definition at line 399 of file wimax-net-device.cc.
References first::address, ns3::Mac48Address::ConvertFrom(), and m_address.
void ns3::WimaxNetDevice::SetBandwidthManager | ( | Ptr< BandwidthManager > | bandwidthManager | ) |
Set the bandwidth manager on the device.
bandwidthManager | the bandwidth manager to be installed on the device |
Definition at line 501 of file wimax-net-device.cc.
References m_bandwidthManager.
Referenced by GetTypeId().
void ns3::WimaxNetDevice::SetBurstProfileManager | ( | Ptr< BurstProfileManager > | burstProfileManager | ) |
Set the burst profile manager.
burstProfileManager | the burst profile manager to be installed on the device |
Definition at line 489 of file wimax-net-device.cc.
References m_burstProfileManager.
Referenced by GetTypeId().
void ns3::WimaxNetDevice::SetChannel | ( | Ptr< WimaxChannel > | wimaxChannel | ) |
Set the channel object.
wimaxChannel | the channel to be used |
Definition at line 372 of file wimax-net-device.cc.
References third::channel, and m_phy.
Referenced by GetTypeId().
|
virtual |
Set the connection manager of the device.
connectionManager | the connection manager to be installed in the device |
Definition at line 477 of file wimax-net-device.cc.
References m_connectionManager.
Referenced by GetTypeId().
void ns3::WimaxNetDevice::SetCurrentDcd | ( | Dcd | dcd | ) |
Set the current DCD.
dcd | the DCD |
Definition at line 447 of file wimax-net-device.cc.
References m_currentDcd.
Referenced by ns3::BaseStationNetDevice::CreateDcd(), and ns3::SubscriberStationNetDevice::ProcessDcd().
void ns3::WimaxNetDevice::SetCurrentUcd | ( | Ucd | ucd | ) |
Set the current UCD.
ucd | the UCD |
Definition at line 459 of file wimax-net-device.cc.
References m_currentUcd.
Referenced by ns3::BaseStationNetDevice::CreateUcd(), and ns3::SubscriberStationNetDevice::ProcessUcd().
|
overridevirtual |
Set interface index.
index | the index |
Implements ns3::NetDevice.
Definition at line 213 of file wimax-net-device.cc.
References m_ifIndex.
|
virtual |
Set link change callback function.
callback | the callback function |
Definition at line 260 of file wimax-net-device.cc.
References m_linkChange.
void ns3::WimaxNetDevice::SetMacAddress | ( | Mac48Address | address | ) |
Set the MAC address.
address | the mac address of the net device |
Definition at line 405 of file wimax-net-device.cc.
References first::address, and m_address.
|
overridevirtual |
Set MTU value for the device.
mtu | the MTU |
Implements ns3::NetDevice.
Definition at line 237 of file wimax-net-device.cc.
References m_mtu, and MAX_MSDU_SIZE.
Referenced by GetTypeId().
|
virtual |
Set device name.
name | the device name |
Definition at line 201 of file wimax-net-device.cc.
References m_name.
Set node pointer.
node | the node pointer |
Implements ns3::NetDevice.
Definition at line 315 of file wimax-net-device.cc.
References m_node.
Referenced by ns3::BaseStationNetDevice::BaseStationNetDevice(), and ns3::SubscriberStationNetDevice::SubscriberStationNetDevice().
void ns3::WimaxNetDevice::SetNrFrames | ( | uint32_t | nrFrames | ) |
Set the number of frames.
nrFrames | the number of frames |
Definition at line 387 of file wimax-net-device.cc.
References m_nrFrames.
Referenced by ns3::BaseStationNetDevice::StartDlSubFrame().
Set the physical layer object.
phy | the phy layer object to use |
Definition at line 360 of file wimax-net-device.cc.
References m_phy, and third::phy.
Referenced by ns3::BaseStationNetDevice::BaseStationNetDevice(), ns3::SubscriberStationNetDevice::SubscriberStationNetDevice(), and GetTypeId().
|
overridevirtual |
Set promiscuous receive callback function.
cb | the promiscuous mode callback |
Implements ns3::NetDevice.
Definition at line 557 of file wimax-net-device.cc.
References m_promiscRx.
void ns3::WimaxNetDevice::SetReceiveCallback | ( | ) |
Set receive callback function.
Definition at line 534 of file wimax-net-device.cc.
References m_phy, ns3::MakeCallback(), and Receive().
Referenced by ns3::BaseStationNetDevice::Start(), and ns3::SubscriberStationNetDevice::Start().
|
overridevirtual |
Set receive callback function.
cb | the receive callback function |
Implements ns3::NetDevice.
Definition at line 339 of file wimax-net-device.cc.
References m_forwardUp.
void ns3::WimaxNetDevice::SetRtg | ( | uint16_t | rtg | ) |
Set receive/transmit transition gap.
rtg | receive/transmit transition gap |
Definition at line 189 of file wimax-net-device.cc.
References m_rtg.
Referenced by GetTypeId(), and ns3::BaseStationNetDevice::Start().
void ns3::WimaxNetDevice::SetState | ( | uint8_t | state | ) |
Set the device state.
state | the state |
Definition at line 423 of file wimax-net-device.cc.
References m_state.
Referenced by ns3::SubscriberStationNetDevice::DoReceive(), ns3::BaseStationNetDevice::EndDlSubFrame(), ns3::BaseStationNetDevice::EndUlSubFrame(), ns3::BaseStationNetDevice::StartDlSubFrame(), ns3::BaseStationNetDevice::StartUlSubFrame(), and ns3::SubscriberStationNetDevice::Stop().
void ns3::WimaxNetDevice::SetTtg | ( | uint16_t | ttg | ) |
Set transmission/receive transition gap.
ttg | transmit/receive transition gap |
Definition at line 177 of file wimax-net-device.cc.
References m_ttg.
Referenced by GetTypeId(), and ns3::BaseStationNetDevice::Start().
|
pure virtual |
Start function.
Implemented in ns3::SubscriberStationNetDevice, and ns3::BaseStationNetDevice.
|
pure virtual |
Stop function.
Implemented in ns3::SubscriberStationNetDevice, and ns3::BaseStationNetDevice.
|
overridevirtual |
Check if device supports the SendFrom method.
Implements ns3::NetDevice.
Definition at line 575 of file wimax-net-device.cc.
|
staticprivate |
recommended by wimax forum.
Definition at line 495 of file wimax-net-device.h.
Referenced by GetTypeId().
|
private |
MAC address.
Definition at line 545 of file wimax-net-device.h.
Referenced by GetAddress(), GetMacAddress(), SetAddress(), and SetMacAddress().
|
private |
badnwidth manager
Definition at line 562 of file wimax-net-device.h.
Referenced by WimaxNetDevice(), DoDispose(), GetBandwidthManager(), and SetBandwidthManager().
|
private |
broadcast connection
Definition at line 558 of file wimax-net-device.h.
Referenced by CreateDefaultConnections(), DoDispose(), GetBroadcastConnection(), and GetTypeId().
|
private |
burst profile manager
Definition at line 561 of file wimax-net-device.h.
Referenced by WimaxNetDevice(), DoDispose(), GetBurstProfileManager(), and SetBurstProfileManager().
|
private |
connection manager
Definition at line 560 of file wimax-net-device.h.
Referenced by WimaxNetDevice(), DoDispose(), GetConnectionManager(), and SetConnectionManager().
|
private |
DCD.
Definition at line 554 of file wimax-net-device.h.
Referenced by GetCurrentDcd(), and SetCurrentDcd().
|
private |
UCD.
Definition at line 555 of file wimax-net-device.h.
Referenced by GetCurrentUcd(), and SetCurrentUcd().
|
static |
downlink or uplink
Definition at line 281 of file wimax-net-device.h.
Referenced by WimaxNetDevice(), ForwardDown(), ns3::BaseStationNetDevice::StartDlSubFrame(), and ns3::BaseStationNetDevice::StartUlSubFrame().
|
private |
not sure if it shall be included here
Definition at line 543 of file wimax-net-device.h.
Referenced by GetChannel(), and InitializeChannels().
|
private |
forward up callback function
Definition at line 529 of file wimax-net-device.h.
Referenced by ForwardUp(), and SetReceiveCallback().
temp, to determine the frame start time at SS side, shall actually be determined by frame start preamble
Definition at line 283 of file wimax-net-device.h.
Referenced by WimaxNetDevice(), ns3::SubscriberStationNetDevice::GetTimeToAllocation(), ns3::BaseStationNetDevice::StartDlSubFrame(), and ns3::BaseStationNetDevice::StartFrame().
|
private |
IF index.
Definition at line 532 of file wimax-net-device.h.
Referenced by GetIfIndex(), and SetIfIndex().
|
private |
initial rnaging connection
Definition at line 557 of file wimax-net-device.h.
Referenced by CreateDefaultConnections(), DoDispose(), GetInitialRangingConnection(), and GetTypeId().
|
private |
link change callback
Definition at line 535 of file wimax-net-device.h.
Referenced by SetLinkChangeCallback().
|
private |
|
mutableprivate |
|
private |
service name
Definition at line 533 of file wimax-net-device.h.
the node
Definition at line 527 of file wimax-net-device.h.
Referenced by DoDispose(), GetNode(), and SetNode().
|
staticprivate |
temp, shall be in BS.
defined here to allow SS to access. SS shall actually determine it from DLFP, shall be moved to BS after DLFP is implemented
Definition at line 540 of file wimax-net-device.h.
Referenced by WimaxNetDevice(), GetNrFrames(), and SetNrFrames().
the phy
Definition at line 528 of file wimax-net-device.h.
Referenced by Attach(), DoDispose(), DoGetChannel(), ForwardDown(), GetPhy(), IsLinkUp(), SetChannel(), SetPhy(), and SetReceiveCallback().
|
private |
promiscuous receive callback function
Definition at line 530 of file wimax-net-device.h.
Referenced by IsPromisc(), and SetPromiscReceiveCallback().
|
private |
length of RTG in units of PSs
Definition at line 552 of file wimax-net-device.h.
|
private |
|
private |
symbol index
Definition at line 547 of file wimax-net-device.h.
TracedCallback<Ptr<const Packet>, const Mac48Address&> ns3::WimaxNetDevice::m_traceRx |
const Mac48Address &
argument is deprecated and will be changed to Mac48Address
in a future release.The TracedCallback signature will then match Packet::Mac48Address
and this typedef can be removed.
Definition at line 457 of file wimax-net-device.h.
Referenced by ForwardUp(), and GetTypeId().
TracedCallback<Ptr<const Packet>, const Mac48Address&> ns3::WimaxNetDevice::m_traceTx |
const Mac48Address &
argument is deprecated and will be changed to Mac48Address
in a future release.The TracedCallback signature will then match Packet::Mac48Address
and this typedef can be removed.
Definition at line 465 of file wimax-net-device.h.
Referenced by GetTypeId(), Send(), and SendFrom().
|
private |
length of TTG in units of PSs
Definition at line 550 of file wimax-net-device.h.
|
staticprivate |
Maximum MSDU size.
Definition at line 493 of file wimax-net-device.h.
Referenced by GetTypeId(), and SetMtu().