author | Vedran Miletić <rivanvx@gmail.com> |
Tue, 02 Aug 2011 17:42:33 -0400 | |
changeset 7385 | 10beb0e53130 |
parent 7350 | 99762b541ef9 |
child 7554 | e536a09d83ee |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents:
7350
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
6349 | 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 SINGLE_MODEL_SPECTRUM_CHANNEL_H |
|
22 |
#define SINGLE_MODEL_SPECTRUM_CHANNEL_H |
|
23 |
||
24 |
||
25 |
#include <ns3/spectrum-channel.h> |
|
7350
99762b541ef9
Bug 1120 - NS_LOG environment variable not working with test.py
Mitch Watrous <watrous@u.washington.edu>
parents:
7343
diff
changeset
|
26 |
#include <ns3/spectrum-model.h> |
6349 | 27 |
|
28 |
namespace ns3 { |
|
29 |
||
30 |
||
31 |
||
32 |
/** |
|
7241
0a7a16b599e8
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
7142
diff
changeset
|
33 |
* \ingroup spectrum |
0a7a16b599e8
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
7142
diff
changeset
|
34 |
* |
6349 | 35 |
* @brief SpectrumChannel implementation which handles a single spectrum model |
36 |
* |
|
37 |
* All SpectrumPhy layers attached to this SpectrumChannel |
|
38 |
*/ |
|
39 |
class SingleModelSpectrumChannel : public SpectrumChannel |
|
40 |
{ |
|
41 |
||
42 |
public: |
|
43 |
SingleModelSpectrumChannel (); |
|
44 |
||
45 |
static TypeId GetTypeId (void); |
|
46 |
||
47 |
||
48 |
// inherited from SpectrumChannel |
|
7343
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
49 |
virtual void AddPropagationLossModel (Ptr<PropagationLossModel> loss); |
6349 | 50 |
virtual void AddSpectrumPropagationLossModel (Ptr<SpectrumPropagationLossModel> loss); |
51 |
virtual void SetPropagationDelayModel (Ptr<PropagationDelayModel> delay); |
|
52 |
virtual void AddRx (Ptr<SpectrumPhy> phy); |
|
7142
89a701fec3a1
run check-style.py on src/spectrum
Nicola Baldo <nicola@baldo.biz>
parents:
6801
diff
changeset
|
53 |
virtual void StartTx (Ptr<PacketBurst> p, |
89a701fec3a1
run check-style.py on src/spectrum
Nicola Baldo <nicola@baldo.biz>
parents:
6801
diff
changeset
|
54 |
Ptr <SpectrumValue> txPsd, |
89a701fec3a1
run check-style.py on src/spectrum
Nicola Baldo <nicola@baldo.biz>
parents:
6801
diff
changeset
|
55 |
SpectrumType st, |
89a701fec3a1
run check-style.py on src/spectrum
Nicola Baldo <nicola@baldo.biz>
parents:
6801
diff
changeset
|
56 |
Time duration, |
6349 | 57 |
Ptr<SpectrumPhy> sender); |
58 |
||
59 |
||
60 |
// inherited from Channel |
|
61 |
virtual uint32_t GetNDevices (void) const; |
|
62 |
virtual Ptr<NetDevice> GetDevice (uint32_t i) const; |
|
63 |
||
64 |
||
65 |
typedef std::vector<Ptr<SpectrumPhy> > PhyList; |
|
66 |
||
6704
de8a506b7437
LTE module form GSoC project
Giuseppe Piro <g.piro@poliba.it>
parents:
6349
diff
changeset
|
67 |
virtual Ptr<SpectrumPropagationLossModel> GetSpectrumPropagationLossModel (void); |
6349 | 68 |
|
69 |
private: |
|
70 |
virtual void DoDispose (); |
|
71 |
||
72 |
/** |
|
73 |
* used internally to reschedule transmission after the propagation delay |
|
74 |
* |
|
75 |
* @param p |
|
76 |
* @param rxPowerSpectrum |
|
77 |
* @param st |
|
78 |
* @param duration |
|
79 |
* @param receiver |
|
80 |
*/ |
|
81 |
virtual void StartRx (Ptr<PacketBurst> p, Ptr <SpectrumValue> rxPowerSpectrum, SpectrumType st, Time duration, Ptr<SpectrumPhy> receiver); |
|
82 |
||
83 |
/** |
|
84 |
* list of SpectrumPhy instances attached to |
|
85 |
* the channel |
|
86 |
*/ |
|
87 |
PhyList m_phyList; |
|
88 |
||
89 |
/** |
|
90 |
* SpectrumModel that this channel instance |
|
91 |
* is supporting |
|
92 |
*/ |
|
93 |
Ptr<const SpectrumModel> m_spectrumModel; |
|
94 |
||
95 |
||
96 |
/** |
|
97 |
* propagation delay model to be used with this channel |
|
98 |
* |
|
99 |
*/ |
|
7343
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
100 |
Ptr<PropagationDelayModel> m_propagationDelay; |
6349 | 101 |
|
102 |
||
103 |
/** |
|
7343
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
104 |
* single-frequency propagation loss model to be used with this channel |
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
105 |
* |
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
106 |
*/ |
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
107 |
Ptr<PropagationLossModel> m_propagationLoss; |
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
108 |
|
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
109 |
/** |
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
110 |
* frequency-dependent propagation loss model to be used with this channel |
6349 | 111 |
* |
112 |
*/ |
|
7343
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
113 |
Ptr<SpectrumPropagationLossModel> m_spectrumPropagationLoss; |
6349 | 114 |
|
7343
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
115 |
|
b3e668a5949c
added support for single-freq PropagationLossModel to SpectrumChannel
Nicola Baldo <nbaldo@cttc.es>
parents:
7241
diff
changeset
|
116 |
double m_maxLossDb; |
6349 | 117 |
}; |
118 |
||
119 |
||
120 |
||
121 |
} |
|
122 |
||
123 |
||
124 |
||
125 |
#endif /* SINGLE_MODEL_SPECTRUM_CHANNEL_H */ |