author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Sun, 02 Mar 2008 01:53:26 +0100 | |
changeset 2528 | a527ec47b756 |
parent 2524 | db72c0e7743e |
child 2563 | cd5b1cd332fe |
permissions | -rw-r--r-- |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
1 |
#include "wifi-mac.h" |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
2 |
#include "ns3/uinteger.h" |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
3 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
4 |
namespace ns3 { |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
5 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
6 |
NS_OBJECT_ENSURE_REGISTERED (WifiMac); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
7 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
8 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
9 |
WifiMac::GetDefaultMaxPropagationDelay (void) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
10 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
11 |
// 1000m |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
12 |
return Seconds (1000.0 / 300000000.0); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
13 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
14 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
15 |
WifiMac::GetDefaultSlot (void) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
16 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
17 |
// 802.11-a specific |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
18 |
return MicroSeconds (9); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
19 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
20 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
21 |
WifiMac::GetDefaultSifs (void) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
22 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
23 |
// 802.11-a specific |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
return MicroSeconds (16); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
25 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
26 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
27 |
WifiMac::GetDefaultEifsNoDifs (void) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
28 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
29 |
return GetDefaultSifs () + GetDefaultCtsAckDelay (); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
30 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
31 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
32 |
WifiMac::GetDefaultCtsAckDelay (void) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
33 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
34 |
// 802.11-a specific: 6mb/s |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
35 |
return MicroSeconds (44); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
36 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
37 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
38 |
WifiMac::GetDefaultCtsAckTimeout (void) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
39 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
40 |
/* Cts_Timeout and Ack_Timeout are specified in the Annex C |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
41 |
(Formal description of MAC operation, see details on the |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
42 |
Trsp timer setting at page 346) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
43 |
*/ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
44 |
Time ctsTimeout = GetDefaultSifs (); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
45 |
ctsTimeout += GetDefaultCtsAckDelay (); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
46 |
ctsTimeout += GetDefaultMaxPropagationDelay () * Scalar (2); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
47 |
ctsTimeout += GetDefaultSlot (); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
48 |
return ctsTimeout; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
49 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
50 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
51 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
52 |
TypeId |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
53 |
WifiMac::GetTypeId (void) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
54 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
55 |
static TypeId tid = TypeId ("WifiMac") |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
56 |
.SetParent<Object> () |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
57 |
.AddAttribute ("CtsTimeout", "XXX", |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
58 |
GetDefaultCtsAckTimeout (), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
59 |
MakeTimeAccessor (&WifiMac::m_ctsTimeout), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
60 |
MakeTimeChecker ()) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
61 |
.AddAttribute ("AckTimeout", "XXX", |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
62 |
GetDefaultCtsAckTimeout (), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
63 |
MakeTimeAccessor (&WifiMac::m_ackTimeout), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
64 |
MakeTimeChecker ()) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
65 |
.AddAttribute ("Sifs", "XXX", |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
66 |
GetDefaultSifs (), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
67 |
MakeTimeAccessor (&WifiMac::SetSifs, |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
68 |
&WifiMac::GetSifs), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
69 |
MakeTimeChecker ()) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
70 |
.AddAttribute ("EifsNoDifs", "XXX", |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
71 |
GetDefaultEifsNoDifs (), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
72 |
MakeTimeAccessor (&WifiMac::SetEifsNoDifs, |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
73 |
&WifiMac::GetEifsNoDifs), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
74 |
MakeTimeChecker ()) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
75 |
.AddAttribute ("Slot", "XXX", |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
76 |
GetDefaultSlot (), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
77 |
MakeTimeAccessor (&WifiMac::SetSlot, |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
78 |
&WifiMac::GetSlot), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
79 |
MakeTimeChecker ()) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
80 |
.AddAttribute ("Pifs", "XXX", |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
81 |
GetDefaultSifs () + GetDefaultSlot (), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
82 |
MakeTimeAccessor (&WifiMac::m_pifs), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
83 |
MakeTimeChecker ()) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
84 |
.AddAttribute ("MaxPropagationDelay", "XXX", |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
85 |
GetDefaultMaxPropagationDelay (), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
86 |
MakeTimeAccessor (&WifiMac::m_maxPropagationDelay), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
87 |
MakeTimeChecker ()) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
88 |
.AddAttribute ("MaxMsduSize", "XXX", |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
89 |
Uinteger (2304), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
90 |
MakeUintegerAccessor (&WifiMac::GetMaxMsduSize), |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
91 |
MakeUintegerChecker (1,2304)) |
2528
a527ec47b756
avoid crashing AP wifi sample
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2524
diff
changeset
|
92 |
.AddAttribute ("Ssid", "XXX", |
a527ec47b756
avoid crashing AP wifi sample
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2524
diff
changeset
|
93 |
Ssid ("default"), |
a527ec47b756
avoid crashing AP wifi sample
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2524
diff
changeset
|
94 |
MakeSsidAccessor (&WifiMac::GetSsid, |
a527ec47b756
avoid crashing AP wifi sample
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2524
diff
changeset
|
95 |
&WifiMac::SetSsid), |
a527ec47b756
avoid crashing AP wifi sample
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2524
diff
changeset
|
96 |
MakeSsidChecker ()) |
2524
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
97 |
; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
98 |
return tid; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
99 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
100 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
101 |
void |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
102 |
WifiMac::SetSlot (Time slotTime) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
103 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
104 |
m_slot = slotTime; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
105 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
106 |
void |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
107 |
WifiMac::SetEifsNoDifs (Time eifsNoDifs) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
108 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
109 |
m_eifsNoDifs = eifsNoDifs; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
110 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
111 |
void |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
112 |
WifiMac::SetSifs (Time sifs) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
113 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
114 |
m_sifs = sifs; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
115 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
116 |
void |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
117 |
WifiMac::SetPifs (Time pifs) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
118 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
119 |
m_pifs = pifs; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
120 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
121 |
void |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
122 |
WifiMac::SetCtsTimeout (Time ctsTimeout) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
123 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
124 |
m_ctsTimeout = ctsTimeout; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
125 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
126 |
void |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
127 |
WifiMac::SetAckTimeout (Time ackTimeout) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
128 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
129 |
m_ackTimeout = ackTimeout; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
130 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
131 |
void |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
132 |
WifiMac::SetMaxPropagationDelay (Time delay) |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
133 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
134 |
m_maxPropagationDelay = delay; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
135 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
136 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
137 |
WifiMac::GetPifs (void) const |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
138 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
139 |
return m_pifs; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
140 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
141 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
142 |
WifiMac::GetSifs (void) const |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
143 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
144 |
return m_sifs; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
145 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
146 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
147 |
WifiMac::GetSlot (void) const |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
148 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
149 |
return m_slot; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
150 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
151 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
152 |
WifiMac::GetEifsNoDifs (void) const |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
153 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
154 |
return m_eifsNoDifs; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
155 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
156 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
157 |
WifiMac::GetCtsTimeout (void) const |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
158 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
159 |
return m_ctsTimeout; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
160 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
161 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
162 |
WifiMac::GetAckTimeout (void) const |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
163 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
164 |
return m_ackTimeout; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
165 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
166 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
167 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
168 |
WifiMac::GetMsduLifetime (void) const |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
169 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
170 |
return Seconds (10); |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
171 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
172 |
Time |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
173 |
WifiMac::GetMaxPropagationDelay (void) const |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
174 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
175 |
return m_maxPropagationDelay; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
176 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
177 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
178 |
uint32_t |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
179 |
WifiMac::GetMaxMsduSize (void) const |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
180 |
{ |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
181 |
return m_maxMsduSize; |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
182 |
} |
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
183 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
184 |
|
db72c0e7743e
port wifi model to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
185 |
} // namespace ns3 |