1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
|
2 /* |
|
3 * Copyright (c) 2004,2005 INRIA |
|
4 * |
|
5 * This program is free software; you can redistribute it and/or modify |
|
6 * it under the terms of the GNU General Public License version 2 as |
|
7 * published by the Free Software Foundation; |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU General Public License |
|
15 * along with this program; if not, write to the Free Software |
|
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 * |
|
18 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
|
19 */ |
|
20 |
|
21 #include "mac-stations.h" |
|
22 #include "cr-mac-stations.h" |
|
23 |
|
24 #include "ns3/assert.h" |
|
25 |
|
26 namespace ns3 { |
|
27 |
|
28 CrMacStation::CrMacStation (CrMacStations *stations) |
|
29 : m_stations (stations) |
|
30 {} |
|
31 CrMacStation::~CrMacStation () |
|
32 {} |
|
33 |
|
34 void |
|
35 CrMacStation::ReportRxOk (double rxSnr, WifiMode txMode) |
|
36 {} |
|
37 void |
|
38 CrMacStation::ReportRtsFailed (void) |
|
39 {} |
|
40 void |
|
41 CrMacStation::ReportDataFailed (void) |
|
42 {} |
|
43 void |
|
44 CrMacStation::ReportRtsOk (double ctsSnr, WifiMode ctsMode, double rtsSnr) |
|
45 {} |
|
46 void |
|
47 CrMacStation::ReportDataOk (double ackSnr, WifiMode ackMode, double dataSnr) |
|
48 {} |
|
49 void |
|
50 CrMacStation::ReportFinalRtsFailed (void) |
|
51 {} |
|
52 void |
|
53 CrMacStation::ReportFinalDataFailed (void) |
|
54 {} |
|
55 |
|
56 WifiMode |
|
57 CrMacStation::DoGetDataMode (uint32_t size) |
|
58 { |
|
59 return m_stations->GetDataMode (); |
|
60 } |
|
61 WifiMode |
|
62 CrMacStation::DoGetRtsMode (void) |
|
63 { |
|
64 return m_stations->GetCtlMode (); |
|
65 } |
|
66 CrMacStations * |
|
67 CrMacStation::GetStations (void) const |
|
68 { |
|
69 return m_stations; |
|
70 } |
|
71 |
|
72 |
|
73 |
|
74 CrMacStations::CrMacStations (WifiMode dataMode, WifiMode ctlMode) |
|
75 : MacStations (ctlMode), |
|
76 m_dataMode (dataMode), |
|
77 m_ctlMode (ctlMode) |
|
78 {} |
|
79 CrMacStations::~CrMacStations () |
|
80 {} |
|
81 |
|
82 WifiMode |
|
83 CrMacStations::GetDataMode (void) const |
|
84 { |
|
85 return m_dataMode; |
|
86 } |
|
87 WifiMode |
|
88 CrMacStations::GetCtlMode (void) const |
|
89 { |
|
90 return m_ctlMode; |
|
91 } |
|
92 |
|
93 |
|
94 MacStation * |
|
95 CrMacStations::CreateStation (void) |
|
96 { |
|
97 return new CrMacStation (this); |
|
98 } |
|
99 |
|
100 } // namespace ns3 |
|