A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
multi-model-spectrum-channel.h
Go to the documentation of this file.
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 
22 #ifndef MULTI_MODEL_SPECTRUM_CHANNEL_H
23 #define MULTI_MODEL_SPECTRUM_CHANNEL_H
24 
25 #include <ns3/spectrum-value.h>
26 #include <ns3/spectrum-converter.h>
27 #include <ns3/spectrum-channel.h>
28 #include <ns3/spectrum-propagation-loss-model.h>
29 #include <ns3/propagation-delay-model.h>
30 #include <map>
31 #include <list>
32 
33 namespace ns3 {
34 
35 
36 typedef std::map<SpectrumModelUid_t, SpectrumConverter> SpectrumConverterMap_t;
37 
38 
44 {
45 public:
47 
50 };
51 
52 typedef std::map<SpectrumModelUid_t, TxSpectrumModelInfo> TxSpectrumModelInfoMap_t;
53 
54 
60 {
61 public:
63 
65  std::list<Ptr<SpectrumPhy> > m_rxPhyList;
66 };
67 
68 typedef std::map<SpectrumModelUid_t, RxSpectrumModelInfo> RxSpectrumModelInfoMap_t;
69 
70 
71 
72 
83 {
84 
85 public:
87 
88  static TypeId GetTypeId (void);
89 
90  // inherited from SpectrumChannel
94  virtual void AddRx (Ptr<SpectrumPhy> phy);
95  virtual void StartTx (Ptr<SpectrumSignalParameters> params);
96 
97 
98  // inherited from Channel
99  virtual uint32_t GetNDevices (void) const;
100  virtual Ptr<NetDevice> GetDevice (uint32_t i) const;
101 
103 
104 
105 protected:
106  void DoDispose ();
107 
108 
109 
110 private:
121  TxSpectrumModelInfoMap_t::const_iterator FindAndEventuallyAddTxSpectrumModel (Ptr<const SpectrumModel> txSpectrumModel);
122 
123 
132 
133 
134 
141  virtual void StartRx (Ptr<SpectrumSignalParameters> params, Ptr<SpectrumPhy> receiver);
142 
143 
144 
150 
156 
162 
163 
171 
172 
179 
185  std::vector<Ptr<SpectrumPhy> > m_phyVector;
186 
187 
188  double m_maxLossDb;
189 
191 };
192 
193 
194 
195 }
196 
197 
198 
199 #endif /* MULTI_MODEL_SPECTRUM_CHANNEL_H */