22 #include "ns3/uinteger.h"
23 #include "ns3/trace-source-accessor.h"
33 return Seconds (1000.0 / 300000000.0);
39 return MicroSeconds (9);
45 return MicroSeconds (16);
51 return MicroSeconds (2);
62 return MicroSeconds (44);
82 return MicroSeconds (250);
89 return MicroSeconds (76);
98 return blockAckTimeout;
107 return blockAckTimeout;
120 return MicroSeconds (0);
133 return MicroSeconds (0);
141 .AddAttribute (
"CtsTimeout",
"When this timeout expires, the RTS/CTS handshake has failed.",
146 .AddAttribute (
"AckTimeout",
"When this timeout expires, the DATA/ACK handshake has failed.",
151 .AddAttribute (
"BasicBlockAckTimeout",
"When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.",
156 .AddAttribute (
"CompressedBlockAckTimeout",
"When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.",
161 .AddAttribute (
"Sifs",
"The value of the SIFS constant.",
166 .AddAttribute (
"EifsNoDifs",
"The value of EIFS-DIFS",
171 .AddAttribute (
"Slot",
"The duration of a Slot.",
176 .AddAttribute (
"Pifs",
"The value of the PIFS constant.",
181 .AddAttribute (
"Rifs",
"The value of the RIFS constant.",
187 .AddAttribute (
"MaxPropagationDelay",
"The maximum propagation delay. Unused for now.",
191 .AddAttribute (
"Ssid",
"The ssid we want to belong to.",
196 .AddTraceSource (
"MacTx",
197 "A packet has been received from higher layers and is being processed in preparation for "
198 "queueing for transmission.",
200 .AddTraceSource (
"MacTxDrop",
201 "A packet has been dropped in the MAC layer before being queued for transmission.",
203 .AddTraceSource (
"MacPromiscRx",
204 "A packet has been received by this device, has been passed up from the physical layer "
205 "and is being forwarded up the local protocol stack. This is a promiscuous trace,",
207 .AddTraceSource (
"MacRx",
208 "A packet has been received by this device, has been passed up from the physical layer "
209 "and is being forwarded up the local protocol stack. This is a non-promiscuous trace,",
211 .AddTraceSource (
"MacRxDrop",
212 "A packet has been dropped in the MAC layer after it has been passed up from the physical "
217 .AddTraceSource (
"Sniffer",
218 "Trace source simulating a non-promiscuous packet sniffer attached to the device",
321 SetPifs (MicroSeconds (16 + 9));
332 SetPifs (MicroSeconds (10 + 20));
344 SetPifs (MicroSeconds (10 + 20));
355 SetPifs (MicroSeconds (32 + 13));
366 SetPifs (MicroSeconds (64 + 21));
406 dcf->SetMinCw ((cwmin + 1) / 4 - 1);
407 dcf->SetMaxCw ((cwmin + 1) / 2 - 1);
411 dcf->SetMinCw ((cwmin + 1) / 2 - 1);
412 dcf->SetMaxCw (cwmin);
416 dcf->SetMinCw (cwmin);
417 dcf->SetMaxCw (cwmax);
421 dcf->SetMinCw (cwmin);
422 dcf->SetMaxCw (cwmax);
426 dcf->SetMinCw (cwmin);
427 dcf->SetMaxCw (cwmax);
443 dcf->SetMinCw ((cwmin + 1) / 4 - 1);
444 dcf->SetMaxCw ((cwmin + 1) / 2 - 1);
448 dcf->SetMinCw ((cwmin + 1) / 4 - 1);
449 dcf->SetMaxCw ((cwmin + 1) / 2 - 1);
453 dcf->SetMinCw ((cwmin + 1) / 2 - 1);
454 dcf->SetMaxCw (cwmin);
458 dcf->SetMinCw (cwmin);
459 dcf->SetMaxCw (cwmax);
463 dcf->SetMinCw (cwmin);
464 dcf->SetMaxCw (cwmax);