ns3::MacLowTransmissionParameters Class Reference

control how a packet is transmitted. More...

#include <mac-low.h>

Collaboration diagram for ns3::MacLowTransmissionParameters:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MacLowTransmissionParameters ()
void EnableAck (void)
void EnableFastAck (void)
void EnableSuperFastAck (void)
void EnableRts (void)
void EnableNextData (uint32_t size)
void EnableOverrideDurationId (Time durationId)
void DisableAck (void)
void DisableRts (void)
void DisableNextData (void)
void DisableOverrideDurationId (void)
bool MustWaitAck (void) const
bool MustWaitNormalAck (void) const
bool MustWaitFastAck (void) const
bool MustWaitSuperFastAck (void) const
bool MustSendRts (void) const
bool HasDurationId (void) const
Time GetDurationId (void) const
bool HasNextPacket (void) const
uint32_t GetNextPacketSize (void) const

Private Types

enum  { ACK_NONE, ACK_NORMAL, ACK_FAST, ACK_SUPER_FAST }

Private Attributes

uint32_t m_nextSize
enum
ns3::MacLowTransmissionParameters:: { ... }  
m_waitAck
bool m_sendRts
Time m_overrideDurationId

Friends

std::ostream & operator<< (std::ostream &os, const MacLowTransmissionParameters &params)

Detailed Description

control how a packet is transmitted.

The ns3::MacLow::StartTransmission method expects an instance of this class to describe how the packet should be transmitted.

Definition at line 124 of file mac-low.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
ACK_NONE 
ACK_NORMAL 
ACK_FAST 
ACK_SUPER_FAST 

Definition at line 257 of file mac-low.h.


Constructor & Destructor Documentation

ns3::MacLowTransmissionParameters::MacLowTransmissionParameters (  ) 

Definition at line 118 of file mac-low.cc.


Member Function Documentation

void ns3::MacLowTransmissionParameters::DisableAck ( void   ) 

Do not wait for Ack after data transmission. Typically used for Broadcast and multicast frames.

Definition at line 160 of file mac-low.cc.

References ACK_NONE, and m_waitAck.

Referenced by ns3::DcaTxop::NotifyAccessGranted().

void ns3::MacLowTransmissionParameters::DisableNextData ( void   ) 

Do not attempt to send data burst after current transmission

Definition at line 130 of file mac-low.cc.

References m_nextSize.

Referenced by ns3::DcaTxop::NotifyAccessGranted(), and ns3::DcaTxop::StartNext().

void ns3::MacLowTransmissionParameters::DisableOverrideDurationId ( void   ) 

Do not force the duration/id field of the packet: its value is automatically calculated by the MacLow before calling WifiPhy::Send.

Definition at line 140 of file mac-low.cc.

References m_overrideDurationId, and ns3::Seconds().

Referenced by ns3::DcaTxop::NotifyAccessGranted(), and ns3::DcaTxop::StartNext().

void ns3::MacLowTransmissionParameters::DisableRts ( void   ) 

Do not send rts and wait for cts before sending data.

Definition at line 170 of file mac-low.cc.

References m_sendRts.

Referenced by ns3::DcaTxop::NotifyAccessGranted(), and ns3::DcaTxop::StartNext().

void ns3::MacLowTransmissionParameters::EnableAck ( void   ) 

Wait ACKTimeout for an ACK. If we get an ACK on time, call MacLowTransmissionListener::GotAck. Call MacLowTransmissionListener::MissedAck otherwise.

Definition at line 155 of file mac-low.cc.

References ACK_NORMAL, and m_waitAck.

Referenced by ns3::DcaTxop::NotifyAccessGranted(), and ns3::DcaTxop::StartNext().

void ns3::MacLowTransmissionParameters::EnableFastAck ( void   ) 

This is really complicated but it is needed for proper HCCA support.

Definition at line 150 of file mac-low.cc.

References ACK_FAST, and m_waitAck.

void ns3::MacLowTransmissionParameters::EnableNextData ( uint32_t  size  ) 
Parameters:
size size of next data to send after current packet is sent.

Add the transmission duration of the next data to the durationId of the outgoing packet and call MacLowTransmissionListener::StartNext at the end of the current transmission + SIFS.

Definition at line 125 of file mac-low.cc.

References m_nextSize.

Referenced by ns3::DcaTxop::NotifyAccessGranted(), and ns3::DcaTxop::StartNext().

void ns3::MacLowTransmissionParameters::EnableOverrideDurationId ( Time  durationId  ) 
Parameters:
durationId the value to set in the duration/Id field of the outgoing packet.

Ignore all other durationId calculation and simply force the packet's durationId field to this value.

Definition at line 135 of file mac-low.cc.

References m_overrideDurationId.

void ns3::MacLowTransmissionParameters::EnableRts ( void   ) 

Send a RTS, and wait CTSTimeout for a CTS. If we get a CTS on time, call MacLowTransmissionListener::GotCts and send data. Otherwise, call MacLowTransmissionListener::MissedCts and do not send data.

Definition at line 165 of file mac-low.cc.

References m_sendRts.

Referenced by ns3::DcaTxop::NotifyAccessGranted().

void ns3::MacLowTransmissionParameters::EnableSuperFastAck ( void   ) 

Definition at line 145 of file mac-low.cc.

References ACK_SUPER_FAST, and m_waitAck.

Time ns3::MacLowTransmissionParameters::GetDurationId ( void   )  const
Returns:
the duration/id forced by EnableOverrideDurationId

Definition at line 205 of file mac-low.cc.

References m_overrideDurationId, NS_ASSERT, and ns3::Seconds().

Referenced by ns3::MacLow::SendDataPacket(), and ns3::MacLow::SendRtsForPacket().

uint32_t ns3::MacLowTransmissionParameters::GetNextPacketSize ( void   )  const
Returns:
the size specified by EnableNextData.

Definition at line 216 of file mac-low.cc.

References HasNextPacket(), m_nextSize, and NS_ASSERT.

Referenced by ns3::MacLow::CalculateTransmissionTime(), and ns3::MacLow::SendDataPacket().

bool ns3::MacLowTransmissionParameters::HasDurationId ( void   )  const
Returns:
true if a duration/id was forced with EnableOverrideDurationId, false otherwise.

Definition at line 200 of file mac-low.cc.

References m_overrideDurationId, and ns3::Seconds().

Referenced by ns3::MacLow::SendDataPacket(), and ns3::MacLow::SendRtsForPacket().

bool ns3::MacLowTransmissionParameters::HasNextPacket ( void   )  const
Returns:
true if EnableNextData was called, false otherwise.

Definition at line 211 of file mac-low.cc.

References m_nextSize.

Referenced by ns3::MacLow::CalculateTransmissionTime(), GetNextPacketSize(), ns3::MacLow::ReceiveOk(), ns3::MacLow::SendDataPacket(), and ns3::MacLow::StartDataTxTimers().

bool ns3::MacLowTransmissionParameters::MustSendRts ( void   )  const
Returns:
true if RTS should be sent and CTS waited for before sending data, false otherwise.

Definition at line 195 of file mac-low.cc.

References m_sendRts.

Referenced by ns3::MacLow::CalculateOverallTxTime(), and ns3::MacLow::StartTransmission().

bool ns3::MacLowTransmissionParameters::MustWaitAck ( void   )  const
Returns:
true if must wait for ACK after data transmission, false otherwise.

This methods returns true when any of MustWaitNormalAck, MustWaitFastAck, or MustWaitSuperFastAck return true.

Definition at line 175 of file mac-low.cc.

References ACK_NONE, and m_waitAck.

Referenced by ns3::MacLow::CalculateOverallTxTime(), ns3::MacLow::ReceiveOk(), and ns3::MacLow::SendDataPacket().

bool ns3::MacLowTransmissionParameters::MustWaitFastAck ( void   )  const
Returns:
true if fast ack protocol should be used, false otherwise.
See also:
EnableFastAck

Definition at line 185 of file mac-low.cc.

References ACK_FAST, and m_waitAck.

Referenced by ns3::MacLow::ReceiveError(), ns3::MacLow::ReceiveOk(), and ns3::MacLow::StartDataTxTimers().

bool ns3::MacLowTransmissionParameters::MustWaitNormalAck ( void   )  const
Returns:
true if normal ACK protocol should be used, false otherwise.
See also:
EnableAck

Definition at line 180 of file mac-low.cc.

References ACK_NORMAL, and m_waitAck.

Referenced by ns3::MacLow::ReceiveOk(), and ns3::MacLow::StartDataTxTimers().

bool ns3::MacLowTransmissionParameters::MustWaitSuperFastAck ( void   )  const
Returns:
true if super fast ack protocol should be used, false otherwise.
See also:
EnableSuperFastAck

Definition at line 190 of file mac-low.cc.

References ACK_SUPER_FAST, and m_waitAck.

Referenced by ns3::MacLow::StartDataTxTimers().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const MacLowTransmissionParameters params 
) [friend]

Member Data Documentation

Definition at line 256 of file mac-low.h.

Referenced by DisableNextData(), EnableNextData(), GetNextPacketSize(), and HasNextPacket().

Definition at line 263 of file mac-low.h.

Referenced by DisableRts(), EnableRts(), and MustSendRts().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:11:06 2009 for NS-3 by  doxygen 1.6.3