33 static TypeId tid =
TypeId (
"ns3::ConstantWifiAckPolicySelector")
35 .AddConstructor<ConstantWifiAckPolicySelector> ()
37 .AddAttribute (
"UseExplicitBar",
38 "Specify whether to send Block Ack Requests (if true) or use" 39 " Implicit Block Ack Request ack policy (if false).",
43 .AddAttribute (
"BaThreshold",
44 "Immediate acknowledgment is requested upon transmission of a frame " 45 "whose sequence number is distant at least BaThreshold multiplied " 46 "by the transmit window size from the starting sequence number of " 47 "the transmit window. Set to zero to request a response for every " 51 MakeDoubleChecker<double> (0.0, 1.0))
71 std::set<uint8_t> tids = psdu->GetTids ();
86 uint8_t tid = *tids.begin ();
120 if (!isResponseNeeded)
122 NS_LOG_DEBUG (
"A response is not needed: no ack for now, use Block Ack policy");
127 if (maxDistToStartingSeq == 0)
129 NS_LOG_DEBUG (
"Sending a single MPDU, no previous frame to ack: use Normal Ack policy");
142 NS_LOG_DEBUG (
"Scheduling an Extended Compressed block ack request");
147 NS_LOG_DEBUG (
"Scheduling a Compressed block ack request");
155 NS_LOG_DEBUG (
"Implicitly requesting an Extended Compressed block ack");
160 NS_LOG_DEBUG (
"Implicitly requesting a Compressed block ack");
Ptr< const WifiMacQueueItem > PeekNextFrame(uint8_t tid=8, Mac48Address recipient=Mac48Address::GetBroadcast())
Peek the next frame to transmit to the given receiver and of the given TID from the block ack manager...
Time GetTxopRemaining(void) const
Return the remaining duration in the current TXOP.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
AttributeValue implementation for Boolean.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
Ptr< QosTxop > m_qosTxop
the QoS Txop this selector is associated with
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
static TypeId GetTypeId(void)
Get the type ID.
bool IsStrictlyPositive(void) const
uint16_t GetBaStartingSequence(Mac48Address address, uint8_t tid) const
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
bool MustSendRts(void) const
control how a packet is transmitted.
ConstantWifiAckPolicySelector()
bool m_useExplicitBar
true for sending BARs, false for using Implicit BAR ack policy
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void EnableAck(void)
Wait ACKTimeout for an Ack.
bool MustSendBlockAckRequest(void) const
double m_baThreshold
Threshold to determine when a BlockAck must be requested.
virtual void UpdateTxParams(Ptr< WifiPsdu > psdu, MacLowTransmissionParameters ¶ms)
Update the transmission parameters related to the acknowledgment policy for the given PSDU...
virtual ~ConstantWifiAckPolicySelector()
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
bool GetBaAgreementEstablished(Mac48Address address, uint8_t tid) const
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Ptr< const AttributeChecker > MakeBooleanChecker(void)
uint16_t GetBaBufferSize(Mac48Address address, uint8_t tid) const
void EnableBlockAck(BlockAckType type)
Wait the timeout corresponding to the given BlockAck response type.
void EnableBlockAckRequest(BlockAckType type)
Schedule the transmission of a BlockAckRequest of the given type.
WifiAckPolicySelector is in charge of selecting the acknowledgment policy for PSDUs containing QoS Da...
This class can be used to hold variables of floating point type such as 'double' or 'float'...
void DisableAck(void)
Do not wait for Ack after data transmission.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Time GetTxopLimit(void) const
Return the TXOP limit.