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

Gateway side of RC-MAC. More...

#include "uan-mac-rc-gw.h"

+ Inheritance diagram for ns3::UanMacRcGw:
+ Collaboration diagram for ns3::UanMacRcGw:

Classes

struct  AckData
 Packet ACK data. More...
 
struct  Request
 Reservation request. More...
 

Public Types

typedef void(* CycleCallback) (Time now, Time delay, uint32_t numRts, uint32_t totalBytes, double secs, uint32_t ctlRate, double actualX)
 TracedCallback signature for.
 
- 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

 UanMacRcGw ()
 Constructor.
 
 ~UanMacRcGw () override
 Dummy destructor, see 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.
 
void SetForwardUpCb (Callback< void, Ptr< Packet >, uint16_t, const Mac8Address & > cb) override
 Set the callback to forward packets up to higher layers.
 
- Public Member Functions inherited from ns3::UanMac
 UanMac ()
 Default constructor.
 
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.
 
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, bool permissive=false) 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.
 
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.
 

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 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 , INCYCLE , CTSING }
 Gateway state. More...
 

Private Member Functions

uint32_t CompExpMinIndex (uint32_t n, uint32_t k)
 Index to the k'th expected delay among n nodes.
 
double ComputeAlpha (uint32_t totalFrames, uint32_t totalBytes, uint32_t n, uint32_t a, double deltaK)
 Compute alpha parameter.
 
double ComputeExpBOverA (uint32_t n, uint32_t a, uint32_t ldlh, std::vector< double > deltaK)
 Numeric function.
 
double ComputeExpS (uint32_t a, uint32_t ld)
 Throughput for a reservations with framesize ld .
 
double ComputeExpS (uint32_t a, uint32_t ld, std::vector< double > exppdk)
 Throughput for a reservations with framesize ld , given expected delays exppdk.
 
double ComputePiK (uint32_t a, uint32_t n, uint32_t k)
 Numeric function.
 
void CycleStarted ()
 Set state to INCYCLE.
 
void EndCycle ()
 End cycle by scheduling pending ACKs.
 
uint32_t FindOptA ()
 Compute the optimum maximum number of reservations to accept per cycle.
 
std::vector< doubleGetExpPdk ()
 Get the expected propagation delay to each node.
 
uint64_t NchooseK (uint32_t n, uint32_t k)
 Binomial coefficient.
 
void ReceiveError (Ptr< Packet > pkt, double sinr)
 PHY receive error callback.
 
void ReceivePacket (Ptr< Packet > pkt, double sinr, UanTxMode mode)
 PHY receive ok callback.
 
void SendPacket (Ptr< Packet > pkt, uint32_t rate)
 Send packet on PHY.
 
void StartCycle ()
 Cycle through pending requests.
 

Private Attributes

std::map< Mac8Address, AckDatam_ackData
 AckData for each node.
 
uint32_t m_ackSize
 Size of UanHeaderCommon and UanHeaderRcAck.
 
bool m_cleared
 Flag when we've been cleared.
 
uint32_t m_ctsSizeG
 Size of UanHeaderCommon and UanHeaderRcCtsGlobal.
 
uint32_t m_ctsSizeN
 Size of UanHeaderRcCts.
 
uint32_t m_currentRateNum
 Rate number corresponding to data rate of current cycle.
 
uint16_t m_currentRetryRate
 Retry rate number for current cycle.
 
TracedCallback< Time, Time, uint32_t, uint32_t, double, uint32_t, doublem_cycleLogger
 A packet was destined for and received at this MAC layer.
 
Callback< void, Ptr< Packet >, uint16_t, const Mac8Address & > m_forwardUpCb
 Forwarding up callback.
 
uint32_t m_frameSize
 Size of data frames in bytes.
 
Time m_maxDelta
 Maximum propagation delay between gateway and non-gateway nodes .
 
uint32_t m_maxRes
 Maximum number of reservations to accept per cycle.
 
double m_minRetryRate
 Smallest allowed RTS retry rate.
 
uint32_t m_numNodes
 Number of non-gateway nodes in this gateway's neighborhood.
 
uint32_t m_numRates
 Number of rates per Phy layer.
 
Ptr< UanPhym_phy
 PHY layer attached to this MAC.
 
std::map< Mac8Address, Timem_propDelay
 Propagation delay to each node.
 
uint32_t m_rateStep
 Increments available for rate assignment in bps.
 
std::map< Mac8Address, Requestm_requests
 Request for each node.
 
double m_retryStep
 Retry rate increment.
 
uint32_t m_rtsSize
 Size of UanHeaderCommon and UanHeaderRcRts.
 
TracedCallback< Ptr< const Packet >, UanTxModem_rxLogger
 A packet was destined for and received at this MAC layer.
 
Time m_sifs
 Spacing between frames to account for timing error and processing delay.
 
std::set< std::pair< Time, Mac8Address > > m_sortedRes
 Queued request times.
 
State m_state
 Gateway processing state.
 
uint32_t m_totalRate
 Total available channel rate in bps (for a single channel, without splitting reservation channel).
 

Additional Inherited Members

Detailed Description

Gateway side of RC-MAC.

This MAC protocol assumes a network topology where all traffic is destined for a set of GW nodes which are connected via some out of band (RF?) means. UanMacRcGw is the protocol which runs on the gateway nodes.

This particular implementation assumes that there is only a single gateway.

For more information on class operation email lentr.nosp@m.acy@.nosp@m.u.was.nosp@m.hing.nosp@m.ton.e.nosp@m.du (This work is, as of yet, unpublished)

Definition at line 43 of file uan-mac-rc-gw.h.

Member Typedef Documentation

◆ CycleCallback

typedef void(* ns3::UanMacRcGw::CycleCallback) (Time now, Time delay, uint32_t numRts, uint32_t totalBytes, double secs, uint32_t ctlRate, double actualX)

TracedCallback signature for.

Parameters
[in]now,Thecurrent simulation time.
[in]delayMinimum path delay of first RTS.
[in]numRtsNumber of pending RTS.
[in]totalBytesLength of RTS header.
[in]secsEffective window size for RcCtsGlobal message, or time to next cycle, both in seconds.
[in]ctlRateCTL rate in Bps.
[in]actualXCurrent retry rate.

Definition at line 74 of file uan-mac-rc-gw.h.

Member Enumeration Documentation

◆ State

enum ns3::UanMacRcGw::State
private

Gateway state.

Enumerator
IDLE 

Initial idle state.

INCYCLE 

Cycling through nodes.

CTSING 

Sending CTS.

Definition at line 84 of file uan-mac-rc-gw.h.

Constructor & Destructor Documentation

◆ UanMacRcGw()

ns3::UanMacRcGw::UanMacRcGw ( )

Constructor.

Definition at line 38 of file uan-mac-rc-gw.cc.

References ns3::UanHeaderCommon::GetSerializedSize(), ns3::UanHeaderRcAck::GetSerializedSize(), ns3::UanHeaderRcCts::GetSerializedSize(), ns3::UanHeaderRcCtsGlobal::GetSerializedSize(), ns3::UanHeaderRcRts::GetSerializedSize(), m_ackSize, m_ctsSizeG, m_ctsSizeN, m_rtsSize, and NS_LOG_DEBUG.

+ Here is the call graph for this function:

◆ ~UanMacRcGw()

ns3::UanMacRcGw::~UanMacRcGw ( )
override

Dummy destructor, see DoDispose.

Definition at line 58 of file uan-mac-rc-gw.cc.

Member Function Documentation

◆ AssignStreams()

int64_t ns3::UanMacRcGw::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 735 of file uan-mac-rc-gw.cc.

References NS_LOG_FUNCTION.

◆ AttachPhy()

void ns3::UanMacRcGw::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 183 of file uan-mac-rc-gw.cc.

References m_phy, ns3::MakeCallback(), ReceiveError(), and ReceivePacket().

+ Here is the call graph for this function:

◆ Clear()

void ns3::UanMacRcGw::Clear ( )
overridevirtual

Clears all pointer references.

Implements ns3::UanMac.

Definition at line 63 of file uan-mac-rc-gw.cc.

References m_ackData, m_cleared, m_phy, m_propDelay, m_requests, and m_sortedRes.

Referenced by DoDispose().

+ Here is the caller graph for this function:

◆ CompExpMinIndex()

uint32_t ns3::UanMacRcGw::CompExpMinIndex ( uint32_t n,
uint32_t k )
private

Index to the k'th expected delay among n nodes.

Parameters
nNumber of nodes.
kTarget index.
Returns
The expected index.

Definition at line 651 of file uan-mac-rc-gw.cc.

References NchooseK().

Referenced by GetExpPdk().

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

◆ ComputeAlpha()

double ns3::UanMacRcGw::ComputeAlpha ( uint32_t totalFrames,
uint32_t totalBytes,
uint32_t n,
uint32_t a,
double deltaK )
private

Compute alpha parameter.

Parameters
totalFramesTotal number of frames in m_requests.
totalBytesTotal number of bytes in m_requests.
nNumber of nodes.
am_maxRes, or optimal A value.
deltaKPropagation delay.
Returns
Alpha parameter.

Definition at line 549 of file uan-mac-rc-gw.cc.

References ns3::Time::GetSeconds(), m_ctsSizeG, m_maxDelta, m_rtsSize, m_sifs, m_totalRate, and NS_ASSERT_MSG.

Referenced by ComputeExpBOverA(), ComputeExpS(), and StartCycle().

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

◆ ComputeExpBOverA()

double ns3::UanMacRcGw::ComputeExpBOverA ( uint32_t n,
uint32_t a,
uint32_t ldlh,
std::vector< double > deltaK )
private

Numeric function.

Parameters
nNumber of nodes.
aNumber of reservations.
ldlhSum of common header length and frame size.
deltaKResult of GetExpPdk
Returns
value.

Definition at line 672 of file uan-mac-rc-gw.cc.

References ComputeAlpha(), ComputePiK(), m_ackSize, m_ctsSizeG, m_ctsSizeN, and m_totalRate.

Referenced by ComputeExpS().

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

◆ ComputeExpS() [1/2]

double ns3::UanMacRcGw::ComputeExpS ( uint32_t a,
uint32_t ld )
private

Throughput for a reservations with framesize ld .

Parameters
aNumber of reservations.
ldFrame size.
Returns
Expected throughput.

Definition at line 645 of file uan-mac-rc-gw.cc.

References ComputeExpS(), and GetExpPdk().

+ Here is the call graph for this function:

◆ ComputeExpS() [2/2]

double ns3::UanMacRcGw::ComputeExpS ( uint32_t a,
uint32_t ld,
std::vector< double > exppdk )
private

Throughput for a reservations with framesize ld , given expected delays exppdk.

Parameters
aNumber of reservations.
ldFrame size.
exppdkExpected delays, given by GetExpPdk.
Returns
Expected throughput.

Definition at line 614 of file uan-mac-rc-gw.cc.

References ComputeAlpha(), ComputeExpBOverA(), ComputePiK(), ns3::Time::GetSeconds(), ns3::UanHeaderCommon::GetSerializedSize(), m_ctsSizeG, m_maxDelta, m_numNodes, m_rtsSize, m_sifs, m_totalRate, and NS_LOG_DEBUG.

Referenced by ComputeExpS(), and FindOptA().

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

◆ ComputePiK()

double ns3::UanMacRcGw::ComputePiK ( uint32_t a,
uint32_t n,
uint32_t k )
private

Numeric function.

Parameters
aNumber of reservations.
nnumber of nodes.
kK'th node.
Returns
Value.

Definition at line 664 of file uan-mac-rc-gw.cc.

References NchooseK().

Referenced by ComputeExpBOverA(), and ComputeExpS().

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

◆ CycleStarted()

void ns3::UanMacRcGw::CycleStarted ( )
private

Set state to INCYCLE.

Definition at line 465 of file uan-mac-rc-gw.cc.

References INCYCLE, and m_state.

Referenced by StartCycle().

+ Here is the caller graph for this function:

◆ DoDispose()

void ns3::UanMacRcGw::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 87 of file uan-mac-rc-gw.cc.

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

+ Here is the call graph for this function:

◆ EndCycle()

void ns3::UanMacRcGw::EndCycle ( )
private

End cycle by scheduling pending ACKs.

Definition at line 471 of file uan-mac-rc-gw.cc.

References ns3::UanHeaderRcAck::AddNackedFrame(), ns3::Mac8Address::ConvertFrom(), ns3::Create(), data, ns3::UanMac::GetAddress(), m_ackData, m_ackSize, m_currentRateNum, m_phy, m_sifs, ns3::Now(), NS_LOG_DEBUG, ns3::Time::S, ns3::Simulator::Schedule(), ns3::Seconds(), SendPacket(), ns3::UanHeaderCommon::SetDest(), ns3::UanHeaderRcAck::SetFrameNo(), ns3::UanHeaderCommon::SetSrc(), ns3::UanHeaderCommon::SetType(), StartCycle(), and ns3::UanMacRc::TYPE_ACK.

Referenced by StartCycle().

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

◆ Enqueue()

bool ns3::UanMacRcGw::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 168 of file uan-mac-rc-gw.cc.

References NS_LOG_WARN.

◆ FindOptA()

uint32_t ns3::UanMacRcGw::FindOptA ( )
private

Compute the optimum maximum number of reservations to accept per cycle.

Returns
Optimum number.

Definition at line 712 of file uan-mac-rc-gw.cc.

References ComputeExpS(), m_frameSize, ns3::Now(), NS_LOG_DEBUG, and ns3::Time::S.

Referenced by StartCycle().

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

◆ GetExpPdk()

std::vector< double > ns3::UanMacRcGw::GetExpPdk ( )
private

Get the expected propagation delay to each node.

Returns
Vector of expected propagation delays.

Definition at line 586 of file uan-mac-rc-gw.cc.

References CompExpMinIndex(), ns3::Time::GetSeconds(), m_maxDelta, m_numNodes, and m_propDelay.

Referenced by ComputeExpS().

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

◆ GetTypeId()

TypeId ns3::UanMacRcGw::GetTypeId ( )
static

Register this type.

Returns
The type ID.

Definition at line 94 of file uan-mac-rc-gw.cc.

References m_cycleLogger, m_frameSize, m_maxDelta, m_maxRes, m_minRetryRate, m_numNodes, m_numRates, m_rateStep, m_retryStep, m_rxLogger, m_sifs, m_totalRate, ns3::MakeDoubleAccessor(), ns3::MakeDoubleChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::MakeTraceSourceAccessor(), ns3::MakeUintegerAccessor(), ns3::MakeUintegerChecker(), ns3::Seconds(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ NchooseK()

uint64_t ns3::UanMacRcGw::NchooseK ( uint32_t n,
uint32_t k )
private

Binomial coefficient.

Parameters
nPool size.
kSelection size.
Returns
Binomial coefficient n choose k.

Definition at line 690 of file uan-mac-rc-gw.cc.

Referenced by CompExpMinIndex(), and ComputePiK().

+ Here is the caller graph for this function:

◆ ReceiveError()

void ns3::UanMacRcGw::ReceiveError ( Ptr< Packet > pkt,
double sinr )
private

PHY receive error callback.

Parameters
pktThe failed packet.
sinrThe SINR value on the channel.

Definition at line 191 of file uan-mac-rc-gw.cc.

Referenced by AttachPhy().

+ Here is the caller graph for this function:

◆ ReceivePacket()

void ns3::UanMacRcGw::ReceivePacket ( Ptr< Packet > pkt,
double sinr,
UanTxMode mode )
private

◆ SendPacket()

void ns3::UanMacRcGw::SendPacket ( Ptr< Packet > pkt,
uint32_t rate )
private

Send packet on PHY.

Parameters
pktThe Packet.
rateThe UanTxMode number, m_currentRateNum.

Definition at line 516 of file uan-mac-rc-gw.cc.

References ns3::UanHeaderCommon::GetDest(), ns3::UanHeaderCommon::GetType(), m_phy, ns3::Now(), NS_LOG_DEBUG, ns3::Time::S, ns3::UanMacRc::TYPE_ACK, ns3::UanMacRc::TYPE_CTS, ns3::UanMacRc::TYPE_DATA, ns3::UanMacRc::TYPE_GWPING, and ns3::UanMacRc::TYPE_RTS.

Referenced by EndCycle(), and StartCycle().

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

◆ SetForwardUpCb()

void ns3::UanMacRcGw::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 177 of file uan-mac-rc-gw.cc.

References m_forwardUpCb.

◆ StartCycle()

void ns3::UanMacRcGw::StartCycle ( )
private

Cycle through pending requests.

Definition at line 282 of file uan-mac-rc-gw.cc.

References ns3::Time::As(), ComputeAlpha(), ns3::Mac8Address::ConvertFrom(), ns3::Create(), CTSING, CycleStarted(), EndCycle(), ns3::UanMacRcGw::AckData::expFrames, FindOptA(), ns3::UanMacRcGw::AckData::frameNo, ns3::UanMacRcGw::Request::frameNo, ns3::UanMac::GetAddress(), ns3::Mac8Address::GetBroadcast(), ns3::Time::GetSeconds(), INCYCLE, ns3::UanMacRcGw::Request::length, m_ackData, m_ackSize, m_ctsSizeG, m_ctsSizeN, m_currentRateNum, m_currentRetryRate, m_cycleLogger, m_maxDelta, m_maxRes, m_minRetryRate, m_numNodes, m_numRates, m_phy, m_rateStep, m_requests, m_retryStep, m_rtsSize, m_sifs, m_sortedRes, m_state, m_totalRate, ns3::Now(), ns3::Simulator::Now(), NS_LOG_DEBUG, NS_LOG_WARN, ns3::UanMacRcGw::Request::numFrames, ns3::UanMacRcGw::Request::retryNo, ns3::UanMacRcGw::Request::rxTime, ns3::Time::S, ns3::Simulator::Schedule(), ns3::Seconds(), SendPacket(), ns3::UanHeaderRcCts::SetAddress(), ns3::UanHeaderRcCts::SetDelayToTx(), ns3::UanHeaderCommon::SetDest(), ns3::UanHeaderRcCts::SetFrameNo(), ns3::UanHeaderCommon::SetProtocolNumber(), ns3::UanHeaderRcCtsGlobal::SetRateNum(), ns3::UanHeaderRcCts::SetRetryNo(), ns3::UanHeaderRcCtsGlobal::SetRetryRate(), ns3::UanHeaderRcCts::SetRtsTimeStamp(), ns3::UanHeaderCommon::SetSrc(), ns3::UanHeaderRcCtsGlobal::SetTxTimeStamp(), ns3::UanHeaderCommon::SetType(), ns3::UanHeaderRcCtsGlobal::SetWindowTime(), StartCycle(), and ns3::UanMacRc::TYPE_CTS.

Referenced by EndCycle(), ReceivePacket(), and StartCycle().

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

Member Data Documentation

◆ m_ackData

std::map<Mac8Address, AckData> ns3::UanMacRcGw::m_ackData
private

AckData for each node.

Definition at line 144 of file uan-mac-rc-gw.h.

Referenced by Clear(), EndCycle(), ReceivePacket(), and StartCycle().

◆ m_ackSize

uint32_t ns3::UanMacRcGw::m_ackSize
private

Size of UanHeaderCommon and UanHeaderRcAck.

Definition at line 128 of file uan-mac-rc-gw.h.

Referenced by UanMacRcGw(), ComputeExpBOverA(), EndCycle(), and StartCycle().

◆ m_cleared

bool ns3::UanMacRcGw::m_cleared
private

Flag when we've been cleared.

Definition at line 152 of file uan-mac-rc-gw.h.

Referenced by Clear().

◆ m_ctsSizeG

uint32_t ns3::UanMacRcGw::m_ctsSizeG
private

◆ m_ctsSizeN

uint32_t ns3::UanMacRcGw::m_ctsSizeN
private

Size of UanHeaderRcCts.

Definition at line 126 of file uan-mac-rc-gw.h.

Referenced by UanMacRcGw(), ComputeExpBOverA(), and StartCycle().

◆ m_currentRateNum

uint32_t ns3::UanMacRcGw::m_currentRateNum
private

Rate number corresponding to data rate of current cycle.

Definition at line 130 of file uan-mac-rc-gw.h.

Referenced by EndCycle(), and StartCycle().

◆ m_currentRetryRate

uint16_t ns3::UanMacRcGw::m_currentRetryRate
private

Retry rate number for current cycle.

Definition at line 129 of file uan-mac-rc-gw.h.

Referenced by StartCycle().

◆ m_cycleLogger

TracedCallback<Time, Time, uint32_t, uint32_t, double, uint32_t, double> ns3::UanMacRcGw::m_cycleLogger
private

A packet was destined for and received at this MAC layer.

Start time min propagation delay reservations frames bytes window size CTS rate retry rate

Definition at line 169 of file uan-mac-rc-gw.h.

Referenced by GetTypeId(), and StartCycle().

◆ m_forwardUpCb

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

Forwarding up callback.

Definition at line 118 of file uan-mac-rc-gw.h.

Referenced by ReceivePacket(), and SetForwardUpCb().

◆ m_frameSize

uint32_t ns3::UanMacRcGw::m_frameSize
private

Size of data frames in bytes.

Definition at line 135 of file uan-mac-rc-gw.h.

Referenced by FindOptA(), and GetTypeId().

◆ m_maxDelta

Time ns3::UanMacRcGw::m_maxDelta
private

Maximum propagation delay between gateway and non-gateway nodes .

Definition at line 121 of file uan-mac-rc-gw.h.

Referenced by ComputeAlpha(), ComputeExpS(), GetExpPdk(), GetTypeId(), ReceivePacket(), and StartCycle().

◆ m_maxRes

uint32_t ns3::UanMacRcGw::m_maxRes
private

Maximum number of reservations to accept per cycle.

Definition at line 123 of file uan-mac-rc-gw.h.

Referenced by GetTypeId(), and StartCycle().

◆ m_minRetryRate

double ns3::UanMacRcGw::m_minRetryRate
private

Smallest allowed RTS retry rate.

Definition at line 137 of file uan-mac-rc-gw.h.

Referenced by GetTypeId(), and StartCycle().

◆ m_numNodes

uint32_t ns3::UanMacRcGw::m_numNodes
private

Number of non-gateway nodes in this gateway's neighborhood.

Definition at line 131 of file uan-mac-rc-gw.h.

Referenced by ComputeExpS(), GetExpPdk(), GetTypeId(), and StartCycle().

◆ m_numRates

uint32_t ns3::UanMacRcGw::m_numRates
private

Number of rates per Phy layer.

Definition at line 124 of file uan-mac-rc-gw.h.

Referenced by GetTypeId(), and StartCycle().

◆ m_phy

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

PHY layer attached to this MAC.

Definition at line 120 of file uan-mac-rc-gw.h.

Referenced by AttachPhy(), Clear(), EndCycle(), SendPacket(), and StartCycle().

◆ m_propDelay

std::map<Mac8Address, Time> ns3::UanMacRcGw::m_propDelay
private

Propagation delay to each node.

Definition at line 141 of file uan-mac-rc-gw.h.

Referenced by Clear(), GetExpPdk(), and ReceivePacket().

◆ m_rateStep

uint32_t ns3::UanMacRcGw::m_rateStep
private

Increments available for rate assignment in bps.

Definition at line 134 of file uan-mac-rc-gw.h.

Referenced by GetTypeId(), and StartCycle().

◆ m_requests

std::map<Mac8Address, Request> ns3::UanMacRcGw::m_requests
private

Request for each node.

Definition at line 147 of file uan-mac-rc-gw.h.

Referenced by Clear(), ReceivePacket(), and StartCycle().

◆ m_retryStep

double ns3::UanMacRcGw::m_retryStep
private

Retry rate increment.

Definition at line 138 of file uan-mac-rc-gw.h.

Referenced by GetTypeId(), and StartCycle().

◆ m_rtsSize

uint32_t ns3::UanMacRcGw::m_rtsSize
private

Size of UanHeaderCommon and UanHeaderRcRts.

Definition at line 125 of file uan-mac-rc-gw.h.

Referenced by UanMacRcGw(), ComputeAlpha(), ComputeExpS(), and StartCycle().

◆ m_rxLogger

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

A packet was destined for and received at this MAC layer.

Definition at line 155 of file uan-mac-rc-gw.h.

Referenced by GetTypeId(), and ReceivePacket().

◆ m_sifs

Time ns3::UanMacRcGw::m_sifs
private

Spacing between frames to account for timing error and processing delay.

Definition at line 122 of file uan-mac-rc-gw.h.

Referenced by ComputeAlpha(), ComputeExpS(), EndCycle(), GetTypeId(), and StartCycle().

◆ m_sortedRes

std::set<std::pair<Time, Mac8Address> > ns3::UanMacRcGw::m_sortedRes
private

Queued request times.

Definition at line 149 of file uan-mac-rc-gw.h.

Referenced by Clear(), ReceivePacket(), and StartCycle().

◆ m_state

State ns3::UanMacRcGw::m_state
private

Gateway processing state.

Definition at line 91 of file uan-mac-rc-gw.h.

Referenced by CycleStarted(), ReceivePacket(), and StartCycle().

◆ m_totalRate

uint32_t ns3::UanMacRcGw::m_totalRate
private

Total available channel rate in bps (for a single channel, without splitting reservation channel).

Definition at line 132 of file uan-mac-rc-gw.h.

Referenced by ComputeAlpha(), ComputeExpBOverA(), ComputeExpS(), GetTypeId(), and StartCycle().


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