author | Mitch Watrous <watrous@u.washington.edu> |
Wed, 18 May 2011 17:24:04 -0700 | |
changeset 7241 | 0a7a16b599e8 |
parent 7142 | 89a701fec3a1 |
child 7385 | 10beb0e53130 |
permissions | -rw-r--r-- |
6349 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2009 CTTC |
|
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: Nicola Baldo <nbaldo@cttc.es> |
|
19 |
*/ |
|
20 |
||
21 |
#ifndef SPECTRUM_PHY_H |
|
22 |
#define SPECTRUM_PHY_H |
|
23 |
||
24 |
||
25 |
#include <ns3/object.h> |
|
26 |
#include <ns3/nstime.h> |
|
27 |
#include <ns3/spectrum-type.h> |
|
28 |
||
29 |
namespace ns3 { |
|
30 |
||
31 |
class PacketBurst; |
|
32 |
class SpectrumChannel; |
|
33 |
class MobilityModel; |
|
34 |
class SpectrumValue; |
|
35 |
class SpectrumModel; |
|
36 |
class NetDevice; |
|
37 |
||
38 |
/** |
|
7241
0a7a16b599e8
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
7142
diff
changeset
|
39 |
* \ingroup spectrum |
0a7a16b599e8
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
7142
diff
changeset
|
40 |
* |
6349 | 41 |
* Abstract base class for Spectrum-aware PHY layers |
42 |
* |
|
43 |
*/ |
|
44 |
class SpectrumPhy : public Object |
|
45 |
{ |
|
46 |
||
47 |
public: |
|
7142
89a701fec3a1
run check-style.py on src/spectrum
Nicola Baldo <nicola@baldo.biz>
parents:
6801
diff
changeset
|
48 |
virtual ~SpectrumPhy (); |
6349 | 49 |
|
7142
89a701fec3a1
run check-style.py on src/spectrum
Nicola Baldo <nicola@baldo.biz>
parents:
6801
diff
changeset
|
50 |
static TypeId GetTypeId (void); |
6349 | 51 |
|
52 |
/** |
|
53 |
* set the associated NetDevice instance |
|
54 |
* |
|
55 |
* @param d the NetDevice instance |
|
56 |
*/ |
|
57 |
virtual void SetDevice (Ptr<Object> d) = 0; |
|
58 |
||
59 |
/** |
|
60 |
* get the associated NetDevice instance |
|
61 |
* |
|
62 |
* @return a Ptr to the associated NetDevice instance |
|
63 |
*/ |
|
64 |
virtual Ptr<Object> GetDevice () = 0; |
|
65 |
||
66 |
/** |
|
67 |
* Set the mobility model associated with this device. |
|
68 |
* |
|
69 |
* @param m the mobility model |
|
70 |
*/ |
|
71 |
virtual void SetMobility (Ptr<Object> m) = 0; |
|
72 |
||
73 |
/** |
|
74 |
* get the associated MobilityModel instance |
|
75 |
* |
|
76 |
* @return a Ptr to the associated NetDevice instance |
|
77 |
*/ |
|
78 |
virtual Ptr<Object> GetMobility () = 0; |
|
79 |
||
80 |
||
81 |
/** |
|
82 |
* Set the channel attached to this device. |
|
83 |
* |
|
84 |
* @param c the channel |
|
85 |
*/ |
|
86 |
virtual void SetChannel (Ptr<SpectrumChannel> c) = 0; |
|
87 |
||
7142
89a701fec3a1
run check-style.py on src/spectrum
Nicola Baldo <nicola@baldo.biz>
parents:
6801
diff
changeset
|
88 |
/** |
89a701fec3a1
run check-style.py on src/spectrum
Nicola Baldo <nicola@baldo.biz>
parents:
6801
diff
changeset
|
89 |
* |
6349 | 90 |
* @return returns the SpectrumModel that this SpectrumPhy expects to be used |
91 |
* for all SpectrumValues that are passed to StartRx. If 0 is |
|
92 |
* returned, it means that any model will be accepted. |
|
93 |
*/ |
|
94 |
virtual Ptr<const SpectrumModel> GetRxSpectrumModel () const = 0; |
|
95 |
||
96 |
/** |
|
97 |
* Notify the SpectrumPhy instance of an incoming waveform |
|
98 |
* |
|
99 |
* @param p the PacketBurst associated with the incoming waveform |
|
100 |
* @param rxPsd the Power Spectral Density of the incoming |
|
101 |
* waveform. The units of the PSD are the same specified for SpectrumChannel::StartTx(). |
|
6445 | 102 |
* @param st spectrum type |
6349 | 103 |
* @param duration the duration of the incoming waveform |
104 |
*/ |
|
105 |
virtual void StartRx (Ptr<PacketBurst> p, Ptr <const SpectrumValue> rxPsd, SpectrumType st, Time duration) = 0; |
|
7142
89a701fec3a1
run check-style.py on src/spectrum
Nicola Baldo <nicola@baldo.biz>
parents:
6801
diff
changeset
|
106 |
|
6349 | 107 |
|
108 |
}; |
|
109 |
||
110 |
||
111 |
||
112 |
||
113 |
||
114 |
||
115 |
||
116 |
||
117 |
||
7142
89a701fec3a1
run check-style.py on src/spectrum
Nicola Baldo <nicola@baldo.biz>
parents:
6801
diff
changeset
|
118 |
} // namespace ns3 |
6349 | 119 |
|
120 |
||
121 |
||
122 |
||
123 |
||
124 |
#endif /* SPECTRUM_PHY_H */ |