LEFT | RIGHT |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2009 CTTC | 3 * Copyright (c) 2009 CTTC |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 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 | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 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 | 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 | 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 17 * |
18 * Author: Nicola Baldo <nbaldo@cttc.es> | 18 * Author: Nicola Baldo <nbaldo@cttc.es> |
19 */ | 19 */ |
20 | 20 |
21 #ifndef SM_SPECTRUM_CHANNEL_H | 21 #ifndef SINGLE_MODEL_SPECTRUM_CHANNEL_H |
22 #define SM_SPECTRUM_CHANNEL_H | 22 #define SINGLE_MODEL_SPECTRUM_CHANNEL_H |
23 | 23 |
24 | 24 |
25 #include <ns3/spectrum-channel.h> | 25 #include <ns3/spectrum-channel.h> |
26 #include <ns3/spectrum-propagation-loss-model.h> | 26 #include <ns3/spectrum-propagation-loss-model.h> |
27 #include <ns3/propagation-delay-model.h> | 27 #include <ns3/propagation-delay-model.h> |
28 | 28 |
29 namespace ns3 { | 29 namespace ns3 { |
30 | 30 |
31 | 31 |
32 | 32 |
33 /** | 33 /** |
34 * @brief SpectrumChannel implementation which handles a single spectrum model | 34 * @brief SpectrumChannel implementation which handles a single spectrum model |
35 * | 35 * |
36 * All SpectrumPhy layers attached to this SpectrumChannel | 36 * All SpectrumPhy layers attached to this SpectrumChannel |
37 */ | 37 */ |
38 class SingleModelSpectrumChannel : public SpectrumChannel | 38 class SingleModelSpectrumChannel : public SpectrumChannel |
39 { | 39 { |
40 | 40 |
41 public: | 41 public: |
42 SingleModelSpectrumChannel (); | 42 SingleModelSpectrumChannel (); |
43 | 43 |
44 static TypeId GetTypeId (void); | 44 static TypeId GetTypeId (void); |
45 | 45 |
46 | 46 |
47 // inherited from SpectrumChannel | 47 // inherited from SpectrumChannel |
48 virtual void AddSpectrumPropagationLossModel (Ptr<SpectrumPropagationLossModel
> loss); | 48 virtual void AddSpectrumPropagationLossModel (Ptr<SpectrumPropagationLossModel
> loss); |
49 virtual void SetPropagationDelayModel (Ptr<PropagationDelayModel> delay); | 49 virtual void SetPropagationDelayModel (Ptr<PropagationDelayModel> delay); |
50 virtual void Add (Ptr<SpectrumPhy> phy); | 50 virtual void AddRx (Ptr<SpectrumPhy> phy); |
51 virtual void StartTx (Ptr<const Packet> p, Ptr <SpectrumValue> txPsd, Spectrum
Type st, Time duration, Ptr<SpectrumPhy> sender); | 51 virtual void StartTx (Ptr<const Packet> p, Ptr <SpectrumValue> txPsd, Spectrum
Type st, Time duration, Ptr<SpectrumPhy> sender); |
52 | 52 |
53 | 53 |
54 // inherited from Channel | 54 // inherited from Channel |
55 virtual uint32_t GetNDevices (void) const; | 55 virtual uint32_t GetNDevices (void) const; |
56 virtual Ptr<NetDevice> GetDevice (uint32_t i) const; | 56 virtual Ptr<NetDevice> GetDevice (uint32_t i) const; |
57 | 57 |
58 | 58 |
59 typedef std::vector<Ptr<SpectrumPhy> > PhyList; | 59 typedef std::vector<Ptr<SpectrumPhy> > PhyList; |
60 | 60 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 Ptr<SpectrumPropagationLossModel> m_PropagationLoss; | 99 Ptr<SpectrumPropagationLossModel> m_PropagationLoss; |
100 | 100 |
101 }; | 101 }; |
102 | 102 |
103 | 103 |
104 | 104 |
105 } | 105 } |
106 | 106 |
107 | 107 |
108 | 108 |
109 #endif /* SM_SPECTRUM_CHANNEL_H */ | 109 #endif /* SINGLE_MODEL_SPECTRUM_CHANNEL_H */ |
LEFT | RIGHT |