A Discrete-Event Network Simulator
API
DcaTxopTest Class Reference

Dca Txop Test. More...

+ Inheritance diagram for DcaTxopTest:
+ Collaboration diagram for DcaTxopTest:

Public Member Functions

 DcaTxopTest (DcfManagerTest *test, uint32_t i)
 Constructor. More...
 
- Public Member Functions inherited from ns3::DcaTxop
 DcaTxop ()
 
virtual ~DcaTxop ()
 
int64_t AssignStreams (int64_t stream)
 Assign a fixed random variable stream number to the random variables used by this model. More...
 
virtual void Cancel (void)
 Cancel the transmission. More...
 
virtual void EndTxNoAck (void)
 Event handler when a transmission that does not require an ACK has completed. More...
 
uint32_t GetAifsn (void) const
 Return the number of slots that make up an AIFS. More...
 
Ptr< MacLowGetLow (void) const
 Return the MacLow associated with this DcaTxop. More...
 
uint32_t GetMaxCw (void) const
 Return the maximum contention window size. More...
 
uint32_t GetMinCw (void) const
 Return the minimum contention window size. More...
 
Ptr< WifiMacQueueGetQueue () const
 Return the packet queue associated with this DcaTxop. More...
 
Time GetTxopLimit (void) const
 Return the TXOP limit. More...
 
virtual void GotAck (void)
 Event handler when an ACK is received. More...
 
virtual void GotBlockAck (const CtrlBAckResponseHeader *blockAck, Mac48Address recipient, double rxSnr, WifiMode txMode, double dataSnr)
 Event handler when a Block ACK is received. More...
 
virtual bool HasTxop (void) const
 Check if the station has TXOP granted for the next MPDU. More...
 
virtual bool IsEdca ()
 Check for EDCA. More...
 
virtual void MissedAck (void)
 Event handler when an ACK is missed. More...
 
virtual void MissedBlockAck (uint8_t nMpdus)
 Event handler when a Block ACK timeout has occurred. More...
 
virtual void MissedCts (void)
 Event handler when a CTS timeout has occurred. More...
 
virtual void Queue (Ptr< const Packet > packet, const WifiMacHeader &hdr)
 
void SetAifsn (uint32_t aifsn)
 Set the number of slots that make up an AIFS. More...
 
void SetLow (const Ptr< MacLow > low)
 Set MacLow associated with this DcaTxop. More...
 
void SetManager (const Ptr< DcfManager > manager)
 Set DcfManager this DcaTxop is associated to. More...
 
void SetMaxCw (uint32_t maxCw)
 Set the maximum contention window size. More...
 
void SetMinCw (uint32_t minCw)
 Set the minimum contention window size. More...
 
void SetTxDroppedCallback (TxDropped callback)
 
void SetTxFailedCallback (TxFailed callback)
 
void SetTxMiddle (const Ptr< MacTxMiddle > txMiddle)
 Set MacTxMiddle this DcaTxop is associated to. More...
 
void SetTxOkCallback (TxOk callback)
 
void SetTxopLimit (Time txopLimit)
 Set the TXOP limit. More...
 
virtual void SetWifiRemoteStationManager (const Ptr< WifiRemoteStationManager > remoteManager)
 Set WifiRemoteStationsManager this DcaTxop is associated to. More...
 
virtual void StartNextFragment (void)
 Start transmission for the next fragment. More...
 
virtual void StartNextPacket (void)
 Start transmission for the next packet if allowed by the TxopLimit. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) 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)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) 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 erros. 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...
 

Private Member Functions

void DoDispose (void)
 Destructor implementation. More...
 
void NotifyAccessGranted (void)
 Notify the DCF that access has been granted. More...
 
void NotifyChannelSwitching (void)
 When a channel switching occurs, enqueued packets are removed. More...
 
void NotifyCollision (void)
 Notify the DCF that collision has occurred. More...
 
void NotifyInternalCollision (void)
 Notify the DCF that internal collision has occurred. More...
 
void NotifySleep (void)
 When sleep operation occurs, if there is a pending packet transmission, it will be reinserted to the front of the queue. More...
 
void NotifyWakeUp (void)
 When wake up operation occurs, channel access will be restarted. More...
 

Private Attributes

uint32_t m_i
 the DCF state More...
 
DcfManagerTestm_test
 the test DCF manager More...
 

Additional Inherited Members

- Public Types inherited from ns3::DcaTxop
typedef Callback< void, Ptr< const Packet > > TxDropped
 typedef for a callback to invoke when a packet is dropped. More...
 
typedef Callback< void, const WifiMacHeader & > TxFailed
 typedef for a callback to invoke when a packet transmission was failed. More...
 
typedef Callback< void, const WifiMacHeader & > TxOk
 typedef for a callback to invoke when a packet transmission was completed successfully. More...
 
- Static Public Member Functions inherited from ns3::DcaTxop
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Protected Member Functions inherited from ns3::DcaTxop
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual uint32_t GetFragmentOffset (void) const
 Calculate the offset for the current fragment. More...
 
virtual Ptr< PacketGetFragmentPacket (WifiMacHeader *hdr)
 Get the next fragment from the packet with appropriate Wifi header for the fragment. More...
 
virtual uint32_t GetFragmentSize (void) const
 Calculate the size of the current fragment. More...
 
virtual uint32_t GetNextFragmentSize (void) const
 Calculate the size of the next fragment. More...
 
virtual bool IsLastFragment (void) const
 Check if the current fragment is the last fragment. More...
 
bool NeedDataRetransmission (Ptr< const Packet > packet, const WifiMacHeader &hdr)
 Check if DATA should be re-transmitted if ACK was missed. More...
 
virtual bool NeedFragmentation (void) const
 Check if the current packet should be fragmented. More...
 
bool NeedRtsRetransmission (Ptr< const Packet > packet, const WifiMacHeader &hdr)
 Check if RTS should be re-transmitted if CTS was missed. More...
 
virtual bool NeedsAccess (void) const
 Check if the DCF requires access. More...
 
void NextFragment (void)
 Continue to the next fragment. More...
 
virtual void RestartAccessIfNeeded (void)
 Restart access request if needed. More...
 
virtual void StartAccessIfNeeded (void)
 Request access from DCF manager if needed. More...
 
void TxDroppedPacket (Ptr< const WifiMacQueueItem > item)
 Pass the packet included in the wifi MAC queue item to the packet dropped callback. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void NotifyNewAggregate (void)
 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 (void)
 Notifier called once the ObjectBase is fully constructed. More...
 
- Protected Attributes inherited from ns3::DcaTxop
WifiMacHeader m_currentHdr
 the current header More...
 
Ptr< const Packetm_currentPacket
 the current packet More...
 
MacLowTransmissionParameters m_currentParams
 current transmission parameters More...
 
Ptr< DcfStatem_dcf
 the DCF state More...
 
uint8_t m_fragmentNumber
 the fragment number More...
 
Ptr< MacLowm_low
 the MacLow More...
 
Ptr< DcfManagerm_manager
 the DCF manager More...
 
Ptr< WifiMacQueuem_queue
 the wifi MAC queue More...
 
Ptr< UniformRandomVariablem_rng
 the random stream More...
 
Ptr< WifiRemoteStationManagerm_stationManager
 the wifi remote station manager More...
 
TxDropped m_txDroppedCallback
 the packet dropped callback More...
 
TxFailed m_txFailedCallback
 the transmit failed callback More...
 
Ptr< MacTxMiddlem_txMiddle
 the MacTxMiddle More...
 
TxOk m_txOkCallback
 the transmit OK callback More...
 

Detailed Description

Dca Txop Test.

Definition at line 80 of file dcf-manager-test.cc.

Constructor & Destructor Documentation

DcaTxopTest::DcaTxopTest ( DcfManagerTest test,
uint32_t  i 
)

Constructor.

Parameters
testthe test DCF manager
ithe DCF state

Definition at line 285 of file dcf-manager-test.cc.

Member Function Documentation

void DcaTxopTest::DoDispose ( void  )
privatevirtual

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 overriden 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::DcaTxop.

Definition at line 292 of file dcf-manager-test.cc.

References m_test.

void DcaTxopTest::NotifyAccessGranted ( void  )
privatevirtual

Notify the DCF that access has been granted.

Reimplemented from ns3::DcaTxop.

Definition at line 299 of file dcf-manager-test.cc.

References m_i, m_test, and DcfManagerTest::NotifyAccessGranted().

+ Here is the call graph for this function:

void DcaTxopTest::NotifyChannelSwitching ( void  )
privatevirtual

When a channel switching occurs, enqueued packets are removed.

Reimplemented from ns3::DcaTxop.

Definition at line 317 of file dcf-manager-test.cc.

References m_i, m_test, and DcfManagerTest::NotifyChannelSwitching().

+ Here is the call graph for this function:

void DcaTxopTest::NotifyCollision ( void  )
privatevirtual

Notify the DCF that collision has occurred.

Reimplemented from ns3::DcaTxop.

Definition at line 311 of file dcf-manager-test.cc.

References m_i, m_test, and DcfManagerTest::NotifyCollision().

+ Here is the call graph for this function:

void DcaTxopTest::NotifyInternalCollision ( void  )
privatevirtual

Notify the DCF that internal collision has occurred.

Reimplemented from ns3::DcaTxop.

Definition at line 305 of file dcf-manager-test.cc.

References m_i, m_test, and DcfManagerTest::NotifyInternalCollision().

+ Here is the call graph for this function:

void DcaTxopTest::NotifySleep ( void  )
privatevirtual

When sleep operation occurs, if there is a pending packet transmission, it will be reinserted to the front of the queue.

Reimplemented from ns3::DcaTxop.

Definition at line 323 of file dcf-manager-test.cc.

void DcaTxopTest::NotifyWakeUp ( void  )
privatevirtual

When wake up operation occurs, channel access will be restarted.

Reimplemented from ns3::DcaTxop.

Definition at line 328 of file dcf-manager-test.cc.

Member Data Documentation

uint32_t DcaTxopTest::m_i
private
DcfManagerTest* DcaTxopTest::m_test
private

the test DCF manager

Definition at line 101 of file dcf-manager-test.cc.

Referenced by DoDispose(), NotifyAccessGranted(), NotifyChannelSwitching(), NotifyCollision(), and NotifyInternalCollision().


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