A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::UanMacCw Class Reference

CW-MAC protocol, similar in idea to the 802.11 DCF with constant backoff window. More...

#include "uan-mac-cw.h"

+ Inheritance diagram for ns3::UanMacCw:
+ Collaboration diagram for ns3::UanMacCw:

Public Types

typedef void(* QueueTracedCallback) (Ptr< const Packet > packet, uint16_t proto)
 TracedCallback signature for enqueue/dequeue of a packet.
 
- Public Types inherited from ns3::UanMac
typedef void(* PacketModeTracedCallback) (Ptr< const Packet > packet, UanTxMode mode)
 TracedCallback signature for packet reception/enqueue/dequeue events.
 

Public Member Functions

 UanMacCw ()
 Default constructor.
 
 ~UanMacCw () override
 Dummy destructor, DoDispose.
 
int64_t AssignStreams (int64_t stream) override
 Assign a fixed random variable stream number to the random variables used by this model.
 
void AttachPhy (Ptr< UanPhy > phy) override
 Attach PHY layer to this MAC.
 
void Clear () override
 Clears all pointer references.
 
bool Enqueue (Ptr< Packet > pkt, uint16_t protocolNumber, const Address &dest) override
 Enqueue packet to be transmitted.
 
virtual uint32_t GetCw ()
 Get the contention window size.
 
virtual Time GetSlotTime ()
 Get the slot time duration.
 
void NotifyCcaEnd () override
 Called when UanPhy stops sensing channel is busy.
 
void NotifyCcaStart () override
 Called when UanPhy begins sensing channel is busy.
 
void NotifyRxEndError () override
 Called when UanPhy finishes receiving packet in error.
 
void NotifyRxEndOk () override
 Called when UanPhy finishes receiving packet without error.
 
void NotifyRxStart () override
 Called when UanPhy begins receiving packet.
 
void NotifyTxEnd () override
 Function called when Phy object finishes transmitting packet.
 
void NotifyTxStart (Time duration) override
 Called when transmission starts from Phy object.
 
virtual void SetCw (uint32_t cw)
 Set the contention window size.
 
void SetForwardUpCb (Callback< void, Ptr< Packet >, uint16_t, const Mac8Address & > cb) override
 Set the callback to forward packets up to higher layers.
 
virtual void SetSlotTime (Time duration)
 Set the slot time duration.
 
- Public Member Functions inherited from ns3::UanMac
 UanMac ()
 Default constructor.
 
virtual int64_t AssignStreams (int64_t stream)=0
 Assign a fixed random variable stream number to the random variables used by this model.
 
virtual void AttachPhy (Ptr< UanPhy > phy)=0
 Attach PHY layer to this MAC.
 
virtual void Clear ()=0
 Clears all pointer references.
 
virtual bool Enqueue (Ptr< Packet > pkt, uint16_t protocolNumber, const Address &dest)=0
 Enqueue packet to be transmitted.
 
virtual Address GetAddress ()
 Get the MAC Address.
 
virtual Address GetBroadcast () const
 Get the broadcast address.
 
uint32_t GetTxModeIndex () const
 Get the Tx mode index (Modulation type).
 
virtual void SetAddress (Mac8Address addr)
 Set the address.
 
virtual void SetForwardUpCb (Callback< void, Ptr< Packet >, uint16_t, const Mac8Address & > cb)=0
 Set the callback to forward packets up to higher layers.
 
void SetTxModeIndex (uint32_t txModeIndex)
 Set the Tx mode index (Modulation type).
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor.
 
 ~Object () override
 Destructor.
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together.
 
void Dispose ()
 Dispose of this Object.
 
AggregateIterator GetAggregateIterator () const
 Get an iterator to the Objects aggregated to this one.
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
template<typename T >
Ptr< T > GetObject () const
 Get a pointer to the requested aggregated Object.
 
template<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object.
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId.
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object.
 
void Initialize ()
 Invoke DoInitialize on all Objects aggregated to this one.
 
bool IsInitialized () const
 Check if the object has been initialized.
 
void UnidirectionalAggregateObject (Ptr< Object > other)
 Aggregate an Object to another Object.
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor.
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor.
 
uint32_t GetReferenceCount () const
 Get the reference count of the object.
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator.
 
void Ref () const
 Increment the reference count.
 
void Unref () const
 Decrement the reference count.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 
- Public Member Functions inherited from ns3::UanPhyListener
virtual ~UanPhyListener ()
 Default destructor.
 
virtual void NotifyCcaEnd ()=0
 Called when UanPhy stops sensing channel is busy.
 
virtual void NotifyCcaStart ()=0
 Called when UanPhy begins sensing channel is busy.
 
virtual void NotifyRxEndError ()=0
 Called when UanPhy finishes receiving packet in error.
 
virtual void NotifyRxEndOk ()=0
 Called when UanPhy finishes receiving packet without error.
 
virtual void NotifyRxStart ()=0
 Called when UanPhy begins receiving packet.
 
virtual void NotifyTxEnd ()=0
 Function called when Phy object finishes transmitting packet.
 
virtual void NotifyTxStart (Time duration)=0
 Called when transmission starts from Phy object.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::UanMac
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId ()
 Register this type.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Member Functions

void DoDispose () override
 Destructor implementation.
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object.
 
virtual void DoDispose ()
 Destructor implementation.
 
virtual void DoInitialize ()
 Initialize() implementation.
 
virtual void NotifyNewAggregate ()
 Notify all Objects aggregated to this one of a new Object being aggregated.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Private Types

enum  State { IDLE , CCABUSY , RUNNING , TX }
 Enum defining possible Phy states. More...
 

Private Member Functions

void EndTx ()
 End TX state.
 
void PhyRxPacketError (Ptr< Packet > packet, double sinr)
 Packet received at lower layer in error.
 
void PhyRxPacketGood (Ptr< Packet > packet, double sinr, UanTxMode mode)
 Receive packet from lower layer (passed to PHY as callback).
 
void SaveTimer ()
 Cancel SendEvent and save remaining delay.
 
void SendPacket ()
 Send packet on PHY.
 
void StartTimer ()
 Schedule SendPacket after delay.
 

Private Attributes

bool m_cleared
 Flag when we've been cleared.
 
uint32_t m_cw
 Contention window size.
 
TracedCallback< Ptr< const Packet >, uint16_t > m_dequeueLogger
 A packet was passed down to the PHY from the MAC.
 
TracedCallback< Ptr< const Packet >, uint16_t > m_enqueueLogger
 A packet arrived at the MAC for transmission.
 
Callback< void, Ptr< Packet >, uint16_t, const Mac8Address & > m_forwardUpCb
 Forwarding up callback.
 
Ptr< UanPhym_phy
 PHY layer attached to this MAC.
 
Ptr< Packetm_pktTx
 Next packet to send.
 
uint16_t m_pktTxProt
 Next packet protocol number (usage varies by MAC).
 
Ptr< UniformRandomVariablem_rv
 Provides uniform random variable for contention window.
 
TracedCallback< Ptr< const Packet >, UanTxModem_rxLogger
 A packet destined for this MAC was received.
 
Time m_savedDelayS
 Remaining delay until next send.
 
EventId m_sendEvent
 Scheduled SendPacket event.
 
Time m_sendTime
 Time to send next packet.
 
Time m_slotTime
 Slot time duration.
 
State m_state
 Current state.
 
bool m_txOngoing
 Tx is ongoing.
 

Additional Inherited Members

Detailed Description

CW-MAC protocol, similar in idea to the 802.11 DCF with constant backoff window.

For more information on this MAC protocol, see: Parrish, N.; Tracy, L.; Roy, S.; Arabshahi, P.; Fox, W., "System Design Considerations for Undersea Networks: Link and Multiple Access Protocols," Selected Areas in Communications, IEEE Journal on , vol.26, no.9, pp.1720-1730, December 2008

Config Paths

ns3::UanMacCw is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Mac/$ns3::UanMacCw"

Attributes

  • CW: The MAC parameter CW.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:4294967295
    • Initial value: 10
    • Flags: constructwriteread
  • SlotTime: Time slot duration for MAC backoff.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +2e+07ns
    • Flags: constructwriteread

TraceSources

Size of this type is 240 bytes (on a 64-bit architecture).

Definition at line 47 of file uan-mac-cw.h.

Member Typedef Documentation

◆ QueueTracedCallback

typedef void(* ns3::UanMacCw::QueueTracedCallback) (Ptr< const Packet > packet, uint16_t proto)

TracedCallback signature for enqueue/dequeue of a packet.

Parameters
[in]packetThe Packet being received.
[in]protoThe protocol number.

Definition at line 107 of file uan-mac-cw.h.

Member Enumeration Documentation

◆ State

enum ns3::UanMacCw::State
private

Enum defining possible Phy states.

Enumerator
IDLE 

Idle state.

CCABUSY 

Channel busy.

RUNNING 

Delay timer running.

TX 

Transmitting.

Definition at line 111 of file uan-mac-cw.h.

Constructor & Destructor Documentation

◆ UanMacCw()

ns3::UanMacCw::UanMacCw ( )

Default constructor.

Definition at line 38 of file uan-mac-cw.cc.

References m_rv.

◆ ~UanMacCw()

ns3::UanMacCw::~UanMacCw ( )
override

Dummy destructor, DoDispose.

Definition at line 50 of file uan-mac-cw.cc.

Member Function Documentation

◆ AssignStreams()

int64_t ns3::UanMacCw::AssignStreams ( int64_t  stream)
overridevirtual

Assign a fixed random variable stream number to the random variables used by this model.

Return the number of streams (possibly zero) that have been assigned.

Parameters
streamFirst stream index to use.
Returns
The number of stream indices assigned by this model.

Implements ns3::UanMac.

Definition at line 281 of file uan-mac-cw.cc.

References m_rv, NS_LOG_FUNCTION, and ns3::RandomVariableStream::SetStream().

+ Here is the call graph for this function:

◆ AttachPhy()

void ns3::UanMacCw::AttachPhy ( Ptr< UanPhy phy)
overridevirtual

Attach PHY layer to this MAC.

Some MACs may be designed to work with multiple PHY layers. Others may only work with one.

Parameters
phyPhy layer to attach to this MAC.

Implements ns3::UanMac.

Definition at line 189 of file uan-mac-cw.cc.

References m_phy, ns3::MakeCallback(), PhyRxPacketError(), and PhyRxPacketGood().

+ Here is the call graph for this function:

◆ Clear()

void ns3::UanMacCw::Clear ( )
overridevirtual

Clears all pointer references.

Implements ns3::UanMac.

Definition at line 55 of file uan-mac-cw.cc.

References ns3::EventId::Cancel(), m_cleared, m_phy, m_pktTx, m_sendEvent, and m_txOngoing.

Referenced by DoDispose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::UanMacCw::DoDispose ( )
overrideprotectedvirtual

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 73 of file uan-mac-cw.cc.

References Clear(), and ns3::Object::DoDispose().

+ Here is the call graph for this function:

◆ EndTx()

void ns3::UanMacCw::EndTx ( )
private

End TX state.

Definition at line 289 of file uan-mac-cw.cc.

References CCABUSY, ns3::UanMac::GetAddress(), IDLE, m_phy, m_state, ns3::Now(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_DEBUG, RUNNING, ns3::Time::S, StartTimer(), and TX.

Referenced by NotifyTxEnd().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Enqueue()

bool ns3::UanMacCw::Enqueue ( Ptr< Packet pkt,
uint16_t  protocolNumber,
const Address dest 
)
overridevirtual

Enqueue packet to be transmitted.

Parameters
pktPacket to be transmitted.
destDestination address.
protocolNumberThe type of the packet.
Returns
True if packet was successfully enqueued.

Implements ns3::UanMac.

Definition at line 114 of file uan-mac-cw.cc.

References ns3::Time::As(), CCABUSY, ns3::Mac8Address::ConvertFrom(), ns3::UanMac::GetAddress(), ns3::UanMac::GetTxModeIndex(), ns3::UniformRandomVariable::GetValue(), IDLE, m_cw, m_enqueueLogger, m_phy, m_pktTx, m_pktTxProt, m_rv, m_savedDelayS, m_sendTime, m_slotTime, m_state, m_txOngoing, ns3::Now(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, RUNNING, ns3::Time::S, ns3::UanHeaderCommon::SetDest(), ns3::UanHeaderCommon::SetProtocolNumber(), ns3::UanHeaderCommon::SetSrc(), ns3::UanHeaderCommon::SetType(), and TX.

+ Here is the call graph for this function:

◆ GetCw()

uint32_t ns3::UanMacCw::GetCw ( )
virtual

Get the contention window size.

Returns
Contention window size.

Definition at line 325 of file uan-mac-cw.cc.

References m_cw.

◆ GetSlotTime()

Time ns3::UanMacCw::GetSlotTime ( )
virtual

Get the slot time duration.

Returns
Slot time duration.

Definition at line 331 of file uan-mac-cw.cc.

References m_slotTime.

◆ GetTypeId()

TypeId ns3::UanMacCw::GetTypeId ( )
static

Register this type.

Returns
The TypeId.

Definition at line 80 of file uan-mac-cw.cc.

References m_cw, m_dequeueLogger, m_enqueueLogger, m_rxLogger, m_slotTime, ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeTraceSourceAccessor(), ns3::MakeUintegerAccessor(), ns3::MilliSeconds(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ NotifyCcaEnd()

void ns3::UanMacCw::NotifyCcaEnd ( )
overridevirtual

Called when UanPhy stops sensing channel is busy.

Implements ns3::UanPhyListener.

Definition at line 246 of file uan-mac-cw.cc.

References CCABUSY, ns3::UanMac::GetAddress(), m_state, ns3::Now(), NS_LOG_DEBUG, RUNNING, ns3::Time::S, and StartTimer().

+ Here is the call graph for this function:

◆ NotifyCcaStart()

void ns3::UanMacCw::NotifyCcaStart ( )
overridevirtual

Called when UanPhy begins sensing channel is busy.

Implements ns3::UanPhyListener.

Definition at line 234 of file uan-mac-cw.cc.

References CCABUSY, ns3::UanMac::GetAddress(), m_state, ns3::Now(), NS_LOG_DEBUG, RUNNING, ns3::Time::S, and SaveTimer().

+ Here is the call graph for this function:

◆ NotifyRxEndError()

void ns3::UanMacCw::NotifyRxEndError ( )
overridevirtual

Called when UanPhy finishes receiving packet in error.

Implements ns3::UanPhyListener.

Definition at line 222 of file uan-mac-cw.cc.

References CCABUSY, ns3::UanMac::GetAddress(), m_phy, m_state, ns3::Now(), NS_LOG_DEBUG, RUNNING, ns3::Time::S, and StartTimer().

+ Here is the call graph for this function:

◆ NotifyRxEndOk()

void ns3::UanMacCw::NotifyRxEndOk ( )
overridevirtual

Called when UanPhy finishes receiving packet without error.

Implements ns3::UanPhyListener.

Definition at line 210 of file uan-mac-cw.cc.

References CCABUSY, ns3::UanMac::GetAddress(), m_phy, m_state, ns3::Now(), NS_LOG_DEBUG, RUNNING, ns3::Time::S, and StartTimer().

+ Here is the call graph for this function:

◆ NotifyRxStart()

void ns3::UanMacCw::NotifyRxStart ( )
overridevirtual

Called when UanPhy begins receiving packet.

Implements ns3::UanPhyListener.

Definition at line 198 of file uan-mac-cw.cc.

References CCABUSY, ns3::UanMac::GetAddress(), m_state, ns3::Now(), NS_LOG_DEBUG, RUNNING, ns3::Time::S, and SaveTimer().

+ Here is the call graph for this function:

◆ NotifyTxEnd()

void ns3::UanMacCw::NotifyTxEnd ( )
overridevirtual

Function called when Phy object finishes transmitting packet.

Implements ns3::UanPhyListener.

Definition at line 273 of file uan-mac-cw.cc.

References EndTx(), and m_txOngoing.

+ Here is the call graph for this function:

◆ NotifyTxStart()

void ns3::UanMacCw::NotifyTxStart ( Time  duration)
overridevirtual

Called when transmission starts from Phy object.

Parameters
durationDuration of transmission.

Implements ns3::UanPhyListener.

Definition at line 258 of file uan-mac-cw.cc.

References CCABUSY, m_state, m_txOngoing, ns3::Now(), NS_ASSERT, NS_LOG_DEBUG, RUNNING, ns3::Time::S, and SaveTimer().

+ Here is the call graph for this function:

◆ PhyRxPacketError()

void ns3::UanMacCw::PhyRxPacketError ( Ptr< Packet packet,
double  sinr 
)
private

Packet received at lower layer in error.

Parameters
packetPacket received in error.
sinrSINR of received packet.

Definition at line 350 of file uan-mac-cw.cc.

Referenced by AttachPhy().

+ Here is the caller graph for this function:

◆ PhyRxPacketGood()

void ns3::UanMacCw::PhyRxPacketGood ( Ptr< Packet packet,
double  sinr,
UanTxMode  mode 
)
private

Receive packet from lower layer (passed to PHY as callback).

Parameters
packetPacket being received.
sinrSINR of received packet.
modeMode of received packet.

Definition at line 337 of file uan-mac-cw.cc.

References ns3::Mac8Address::ConvertFrom(), ns3::UanMac::GetAddress(), ns3::Mac8Address::GetBroadcast(), ns3::UanHeaderCommon::GetDest(), ns3::UanHeaderCommon::GetProtocolNumber(), ns3::UanHeaderCommon::GetSrc(), and m_forwardUpCb.

Referenced by AttachPhy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveTimer()

void ns3::UanMacCw::SaveTimer ( )
private

Cancel SendEvent and save remaining delay.

Definition at line 355 of file uan-mac-cw.cc.

References ns3::Simulator::Cancel(), ns3::UanMac::GetAddress(), m_pktTx, m_savedDelayS, m_sendEvent, m_sendTime, ns3::Now(), ns3::Simulator::Now(), NS_ASSERT, NS_LOG_DEBUG, and ns3::Time::S.

Referenced by NotifyCcaStart(), NotifyRxStart(), and NotifyTxStart().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendPacket()

void ns3::UanMacCw::SendPacket ( )
private

Send packet on PHY.

Definition at line 384 of file uan-mac-cw.cc.

References ns3::UanMac::GetAddress(), m_phy, m_pktTx, m_pktTxProt, m_savedDelayS, m_sendTime, m_state, ns3::Now(), NS_ASSERT, NS_LOG_DEBUG, RUNNING, ns3::Time::S, ns3::Seconds(), and TX.

Referenced by StartTimer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCw()

void ns3::UanMacCw::SetCw ( uint32_t  cw)
virtual

Set the contention window size.

Parameters
cwContention window size.

Definition at line 313 of file uan-mac-cw.cc.

References m_cw.

◆ SetForwardUpCb()

void ns3::UanMacCw::SetForwardUpCb ( Callback< void, Ptr< Packet >, uint16_t, const Mac8Address & >  cb)
overridevirtual

Set the callback to forward packets up to higher layers.

Parameters
cbThe callback. packet The packet. address The source address.

Implements ns3::UanMac.

Definition at line 183 of file uan-mac-cw.cc.

References m_forwardUpCb.

◆ SetSlotTime()

void ns3::UanMacCw::SetSlotTime ( Time  duration)
virtual

Set the slot time duration.

Parameters
durationSlot time duration.

Definition at line 319 of file uan-mac-cw.cc.

References m_slotTime.

◆ StartTimer()

void ns3::UanMacCw::StartTimer ( )
private

Schedule SendPacket after delay.

Definition at line 367 of file uan-mac-cw.cc.

References ns3::Time::As(), ns3::UanMac::GetAddress(), m_savedDelayS, m_sendEvent, m_sendTime, ns3::Now(), ns3::Simulator::Now(), NS_LOG_DEBUG, ns3::Time::S, ns3::Simulator::Schedule(), and SendPacket().

Referenced by EndTx(), NotifyCcaEnd(), NotifyRxEndError(), and NotifyRxEndOk().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_cleared

bool ns3::UanMacCw::m_cleared
private

Flag when we've been cleared.

Definition at line 151 of file uan-mac-cw.h.

Referenced by Clear().

◆ m_cw

uint32_t ns3::UanMacCw::m_cw
private

Contention window size.

Definition at line 131 of file uan-mac-cw.h.

Referenced by Enqueue(), GetCw(), GetTypeId(), and SetCw().

◆ m_dequeueLogger

TracedCallback<Ptr<const Packet>, uint16_t> ns3::UanMacCw::m_dequeueLogger
private

A packet was passed down to the PHY from the MAC.

Definition at line 128 of file uan-mac-cw.h.

Referenced by GetTypeId().

◆ m_enqueueLogger

TracedCallback<Ptr<const Packet>, uint16_t> ns3::UanMacCw::m_enqueueLogger
private

A packet arrived at the MAC for transmission.

Definition at line 126 of file uan-mac-cw.h.

Referenced by Enqueue(), and GetTypeId().

◆ m_forwardUpCb

Callback<void, Ptr<Packet>, uint16_t, const Mac8Address&> ns3::UanMacCw::m_forwardUpCb
private

Forwarding up callback.

Definition at line 120 of file uan-mac-cw.h.

Referenced by PhyRxPacketGood(), and SetForwardUpCb().

◆ m_phy

Ptr<UanPhy> ns3::UanMacCw::m_phy
private

PHY layer attached to this MAC.

Definition at line 122 of file uan-mac-cw.h.

Referenced by AttachPhy(), Clear(), EndTx(), Enqueue(), NotifyRxEndError(), NotifyRxEndOk(), and SendPacket().

◆ m_pktTx

Ptr<Packet> ns3::UanMacCw::m_pktTx
private

Next packet to send.

Definition at line 140 of file uan-mac-cw.h.

Referenced by Clear(), Enqueue(), SaveTimer(), and SendPacket().

◆ m_pktTxProt

uint16_t ns3::UanMacCw::m_pktTxProt
private

Next packet protocol number (usage varies by MAC).

Definition at line 142 of file uan-mac-cw.h.

Referenced by Enqueue(), and SendPacket().

◆ m_rv

Ptr<UniformRandomVariable> ns3::UanMacCw::m_rv
private

Provides uniform random variable for contention window.

Definition at line 154 of file uan-mac-cw.h.

Referenced by UanMacCw(), AssignStreams(), and Enqueue().

◆ m_rxLogger

TracedCallback<Ptr<const Packet>, UanTxMode> ns3::UanMacCw::m_rxLogger
private

A packet destined for this MAC was received.

Definition at line 124 of file uan-mac-cw.h.

Referenced by GetTypeId().

◆ m_savedDelayS

Time ns3::UanMacCw::m_savedDelayS
private

Remaining delay until next send.

Definition at line 138 of file uan-mac-cw.h.

Referenced by Enqueue(), SaveTimer(), SendPacket(), and StartTimer().

◆ m_sendEvent

EventId ns3::UanMacCw::m_sendEvent
private

Scheduled SendPacket event.

Definition at line 144 of file uan-mac-cw.h.

Referenced by Clear(), SaveTimer(), and StartTimer().

◆ m_sendTime

Time ns3::UanMacCw::m_sendTime
private

Time to send next packet.

Definition at line 136 of file uan-mac-cw.h.

Referenced by Enqueue(), SaveTimer(), SendPacket(), and StartTimer().

◆ m_slotTime

Time ns3::UanMacCw::m_slotTime
private

Slot time duration.

Definition at line 132 of file uan-mac-cw.h.

Referenced by Enqueue(), GetSlotTime(), GetTypeId(), and SetSlotTime().

◆ m_state

State ns3::UanMacCw::m_state
private

◆ m_txOngoing

bool ns3::UanMacCw::m_txOngoing
private

Tx is ongoing.

Definition at line 146 of file uan-mac-cw.h.

Referenced by Clear(), Enqueue(), NotifyTxEnd(), and NotifyTxStart().


The documentation for this class was generated from the following files: