Classes | |
struct | ExpectedCollision |
ExpectedCollision structure. More... | |
Public Member Functions | |
TxopTest (ChannelAccessManagerTest *test, uint32_t i) | |
Constructor. More... | |
void | QueueTx (uint64_t txTime, uint64_t expectedGrantTime) |
Queue transmit function. More... | |
Public Member Functions inherited from ns3::Txop | |
Txop () | |
virtual | ~Txop () |
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... | |
bool | CanStartNextPolling (void) const |
Check if the next PCF transmission can fit in the remaining CFP duration. More... | |
virtual void | EndTxNoAck (void) |
Event handler when a transmission that does not require an ACK has completed. More... | |
uint8_t | GetAifsn (void) const |
Return the number of slots that make up an AIFS. More... | |
Ptr< MacLow > | GetLow (void) const |
Return the MacLow associated with this Txop. 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... | |
Time | GetTxopLimit (void) const |
Return the TXOP limit. More... | |
Ptr< WifiMacQueue > | GetWifiMacQueue () const |
Return the packet queue associated with this Txop. 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... | |
void | GotCfEnd (void) |
Event handler when a CF-END frame is received. More... | |
virtual bool | HasTxop (void) const |
Check if the station has TXOP granted for the next MPDU. More... | |
virtual bool | IsQosTxop () const |
Check for QoS TXOP. 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... | |
void | MissedCfPollResponse (bool expectedCfAck) |
Event handler when a response to a CF-POLL frame is missed. More... | |
virtual void | MissedCts (void) |
Event handler when a CTS timeout has occurred. More... | |
virtual void | NotifyOff (void) |
When off operation occurs, the queue gets cleaned up. More... | |
virtual void | NotifyOn (void) |
When on operation occurs, channel access will be started. More... | |
virtual void | Queue (Ptr< const Packet > packet, const WifiMacHeader &hdr) |
void | SendCfFrame (WifiMacType frameType, Mac48Address addr) |
Sends CF frame to sta with address addr. More... | |
void | SetAifsn (uint8_t aifsn) |
Set the number of slots that make up an AIFS. More... | |
void | SetChannelAccessManager (const Ptr< ChannelAccessManager > manager) |
Set ChannelAccessManager this Txop is associated to. More... | |
void | SetMacLow (const Ptr< MacLow > low) |
Set MacLow associated with this Txop. 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 Txop 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 Txop is associated to. More... | |
void | StartBackoffNow (uint32_t nSlots) |
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... | |
SimpleRefCount & | operator= (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 Types | |
typedef std::list< struct ExpectedCollision > | ExpectedCollisions |
expected collisions typedef More... | |
typedef std::pair< uint64_t, uint64_t > | ExpectedGrant |
the expected grant typedef More... | |
typedef std::list< ExpectedGrant > | ExpectedGrants |
the collection of expected grants typedef More... | |
Private Member Functions | |
void | DoDispose (void) |
Destructor implementation. More... | |
bool | IsAccessRequested (void) const |
void | NotifyAccessGranted (void) |
Notify the DCF that access has been granted. More... | |
void | NotifyAccessRequested (void) |
Notify that access request has been received. 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 | |
bool | m_accessRequested |
true if access requested More... | |
ExpectedCollisions | m_expectedCollision |
expected collision More... | |
ExpectedGrants | m_expectedGrants |
expected grants More... | |
ExpectedCollisions | m_expectedInternalCollision |
expected internal collisions More... | |
uint32_t | m_i |
the DCF state More... | |
ChannelAccessManagerTest * | m_test |
the test DCF manager More... | |
Friends | |
class | ChannelAccessManagerTest |
allow ChannelAccessManagerTest class access More... | |
Additional Inherited Members | |
Public Types inherited from ns3::Txop | |
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::Txop | |
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::Txop | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
uint32_t | GetBackoffSlots (void) const |
Return the current number of backoff slots. More... | |
Time | GetBackoffStart (void) const |
Return the time when the backoff procedure started. More... | |
uint32_t | GetCw (void) const |
virtual uint32_t | GetFragmentOffset (void) const |
Calculate the offset for the current fragment. More... | |
virtual Ptr< Packet > | GetFragmentPacket (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... | |
void | NextFragment (void) |
Continue to the next fragment. More... | |
void | ResetCw (void) |
Update the value of the CW variable to take into account a transmission success or a transmission abort (stop transmission of a packet after the maximum number of retransmissions has been reached). 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... | |
void | UpdateBackoffSlotsNow (uint32_t nSlots, Time backoffUpdateBound) |
Update backoff slots that nSlots has passed. More... | |
void | UpdateFailedCw (void) |
Update the value of the CW variable to take into account a transmission failure. 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::Txop | |
bool | m_accessRequested |
flag whether channel access is already requested More... | |
uint8_t | m_aifsn |
the AIFSN More... | |
uint32_t | m_backoffSlots |
the backoff slots More... | |
Time | m_backoffStart |
the backoffStart variable is used to keep track of the time at which a backoff was started or the time at which the backoff counter was last updated. More... | |
Ptr< ChannelAccessManager > | m_channelAccessManager |
the channel access manager More... | |
WifiMacHeader | m_currentHdr |
the current header More... | |
Ptr< const Packet > | m_currentPacket |
the current packet More... | |
MacLowTransmissionParameters | m_currentParams |
current transmission parameters More... | |
uint32_t | m_cw |
the current CW More... | |
uint32_t | m_cwMax |
the CW maximum More... | |
uint32_t | m_cwMin |
the CW minimum More... | |
uint8_t | m_fragmentNumber |
the fragment number More... | |
Ptr< MacLow > | m_low |
the MacLow More... | |
Ptr< WifiMacQueue > | m_queue |
the wifi MAC queue More... | |
Ptr< UniformRandomVariable > | m_rng |
the random stream More... | |
Ptr< WifiRemoteStationManager > | m_stationManager |
the wifi remote station manager More... | |
TxDropped | m_txDroppedCallback |
the packet dropped callback More... | |
TxFailed | m_txFailedCallback |
the transmit failed callback More... | |
Ptr< MacTxMiddle > | m_txMiddle |
the MacTxMiddle More... | |
TxOk | m_txOkCallback |
the transmit OK callback More... | |
Time | m_txopLimit |
the txop limit time More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
TxopTest Txop Test.
Definition at line 37 of file channel-access-manager-test.cc.
|
private |
expected collisions typedef
Definition at line 67 of file channel-access-manager-test.cc.
|
private |
the expected grant typedef
Definition at line 59 of file channel-access-manager-test.cc.
|
private |
the collection of expected grants typedef
Definition at line 60 of file channel-access-manager-test.cc.
TxopTest::TxopTest | ( | ChannelAccessManagerTest * | test, |
uint32_t | i | ||
) |
Constructor.
test | the test DCF manager |
i | the DCF state |
Definition at line 282 of file channel-access-manager-test.cc.
|
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 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::Txop.
Definition at line 290 of file channel-access-manager-test.cc.
References m_test.
|
privatevirtual |
Reimplemented from ns3::Txop.
Definition at line 297 of file channel-access-manager-test.cc.
References m_accessRequested.
|
privatevirtual |
Notify the DCF that access has been granted.
Reimplemented from ns3::Txop.
Definition at line 309 of file channel-access-manager-test.cc.
References m_accessRequested, m_i, m_test, and ChannelAccessManagerTest::NotifyAccessGranted().
|
privatevirtual |
Notify that access request has been received.
Reimplemented from ns3::Txop.
Definition at line 303 of file channel-access-manager-test.cc.
References m_accessRequested.
|
privatevirtual |
When a channel switching occurs, enqueued packets are removed.
Reimplemented from ns3::Txop.
Definition at line 328 of file channel-access-manager-test.cc.
References m_i, m_test, and ChannelAccessManagerTest::NotifyChannelSwitching().
|
privatevirtual |
Notify the DCF that collision has occurred.
Reimplemented from ns3::Txop.
Definition at line 322 of file channel-access-manager-test.cc.
References m_i, m_test, and ChannelAccessManagerTest::NotifyCollision().
|
privatevirtual |
Notify the DCF that internal collision has occurred.
Reimplemented from ns3::Txop.
Definition at line 316 of file channel-access-manager-test.cc.
References m_i, m_test, and ChannelAccessManagerTest::NotifyInternalCollision().
|
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::Txop.
Definition at line 334 of file channel-access-manager-test.cc.
|
privatevirtual |
When wake up operation occurs, channel access will be restarted.
Reimplemented from ns3::Txop.
Definition at line 339 of file channel-access-manager-test.cc.
void TxopTest::QueueTx | ( | uint64_t | txTime, |
uint64_t | expectedGrantTime | ||
) |
Queue transmit function.
txTime | the transmit time |
expectedGrantTime | the expected grant time |
Definition at line 277 of file channel-access-manager-test.cc.
Referenced by ChannelAccessManagerTest::DoAccessRequest().
|
friend |
allow ChannelAccessManagerTest class access
Definition at line 57 of file channel-access-manager-test.cc.
|
private |
true if access requested
Definition at line 85 of file channel-access-manager-test.cc.
Referenced by IsAccessRequested(), NotifyAccessGranted(), NotifyAccessRequested(), and ChannelAccessManagerTest::NotifyChannelSwitching().
|
private |
expected collision
Definition at line 70 of file channel-access-manager-test.cc.
Referenced by ChannelAccessManagerTest::EndTest(), ChannelAccessManagerTest::ExpectCollision(), and ChannelAccessManagerTest::NotifyCollision().
|
private |
expected grants
Definition at line 71 of file channel-access-manager-test.cc.
Referenced by ChannelAccessManagerTest::EndTest(), ChannelAccessManagerTest::NotifyAccessGranted(), and ChannelAccessManagerTest::NotifyChannelSwitching().
|
private |
expected internal collisions
Definition at line 69 of file channel-access-manager-test.cc.
Referenced by ChannelAccessManagerTest::EndTest(), ChannelAccessManagerTest::ExpectInternalCollision(), and ChannelAccessManagerTest::NotifyInternalCollision().
|
private |
the DCF state
Definition at line 84 of file channel-access-manager-test.cc.
Referenced by NotifyAccessGranted(), NotifyChannelSwitching(), NotifyCollision(), and NotifyInternalCollision().
|
private |
the test DCF manager
Definition at line 83 of file channel-access-manager-test.cc.
Referenced by DoDispose(), NotifyAccessGranted(), NotifyChannelSwitching(), NotifyCollision(), and NotifyInternalCollision().