A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
spectrum-channel.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 CTTC
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Nicola Baldo <nbaldo@cttc.es>
18 */
19
20#ifndef SPECTRUM_CHANNEL_H
21#define SPECTRUM_CHANNEL_H
22
23#include <ns3/channel.h>
24#include <ns3/mobility-model.h>
25#include <ns3/nstime.h>
26#include <ns3/object.h>
27#include <ns3/phased-array-spectrum-propagation-loss-model.h>
28#include <ns3/propagation-delay-model.h>
29#include <ns3/propagation-loss-model.h>
30#include <ns3/spectrum-phy.h>
31#include <ns3/spectrum-propagation-loss-model.h>
32#include <ns3/spectrum-signal-parameters.h>
33#include <ns3/spectrum-transmit-filter.h>
34#include <ns3/traced-callback.h>
35
36namespace ns3
37{
38
39class PacketBurst;
40class SpectrumValue;
41
49{
50 public:
60 ~SpectrumChannel() override;
61
62 // inherited from Object
63 void DoDispose() override;
64
69 static TypeId GetTypeId();
70
78
84
92
98
104
111
117
127
134
140 virtual void StartTx(Ptr<SpectrumSignalParameters> params) = 0;
141
155 virtual void RemoveRx(Ptr<SpectrumPhy> phy) = 0;
156
172 virtual void AddRx(Ptr<SpectrumPhy> phy) = 0;
173
183 double lossDb);
195 Ptr<const MobilityModel> rxMobility,
196 double txAntennaGain,
197 double rxAntennaGain,
198 double propagationGain,
199 double pathloss);
206
207 protected:
213
221 double,
222 double,
223 double,
224 double>
226
231
238
243
248
253
258
263};
264
265} // namespace ns3
266
267#endif /* SPECTRUM_CHANNEL_H */
Abstract Channel Base Class.
Definition: channel.h:45
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
Defines the interface for spectrum-aware channel implementations.
void AddPropagationLossModel(Ptr< PropagationLossModel > loss)
Add the single-frequency propagation loss model to be used.
TracedCallback< Ptr< SpectrumSignalParameters > > m_txSigParamsTrace
Traced callback for SpectrumSignalParameters in StartTx requests.
virtual void RemoveRx(Ptr< SpectrumPhy > phy)=0
Remove a SpectrumPhy from a channel.
virtual void StartTx(Ptr< SpectrumSignalParameters > params)=0
Used by attached PHY instances to transmit signals on the channel.
void DoDispose() override
Destructor implementation.
Ptr< SpectrumTransmitFilter > m_filter
Transmit filter to be used with this channel.
void AddSpectrumPropagationLossModel(Ptr< SpectrumPropagationLossModel > loss)
Add the frequency-dependent propagation loss model to be used.
SpectrumChannel()
constructor
void(* LossTracedCallback)(Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb)
TracedCallback signature for path loss calculation events.
Ptr< PropagationDelayModel > m_propagationDelay
Propagation delay model to be used with this channel.
void AddSpectrumTransmitFilter(Ptr< SpectrumTransmitFilter > filter)
Add the transmit filter to be used to filter possible signal receptions at the StartTx() time.
Ptr< PhasedArraySpectrumPropagationLossModel > GetPhasedArraySpectrumPropagationLossModel()
Get the frequency-dependent propagation loss model that is compatible with the phased antenna arrays ...
Ptr< SpectrumPropagationLossModel > m_spectrumPropagationLoss
Frequency-dependent propagation loss model to be used with this channel.
Ptr< PhasedArraySpectrumPropagationLossModel > m_phasedArraySpectrumPropagationLoss
Frequency-dependent propagation loss model to be used with this channel.
Ptr< const SpectrumTransmitFilter > GetSpectrumTransmitFilter() const
Get the transmit filter, or first in a chain of transmit filters if more than one is present.
TracedCallback< Ptr< const SpectrumPhy >, Ptr< const SpectrumPhy >, double > m_pathLossTrace
The PathLoss trace source.
Ptr< SpectrumPropagationLossModel > GetSpectrumPropagationLossModel()
Get the frequency-dependent propagation loss model.
TracedCallback< Ptr< const MobilityModel >, Ptr< const MobilityModel >, double, double, double, double > m_gainTrace
The Gain trace source.
void(* GainTracedCallback)(Ptr< const MobilityModel > txMobility, Ptr< const MobilityModel > rxMobility, double txAntennaGain, double rxAntennaGain, double propagationGain, double pathloss)
TracedCallback signature for path loss calculation events.
Ptr< PropagationLossModel > m_propagationLoss
Single-frequency propagation loss model to be used with this channel.
Ptr< PropagationLossModel > GetPropagationLossModel()
Get the propagation loss model.
static TypeId GetTypeId()
Get the type ID.
virtual void AddRx(Ptr< SpectrumPhy > phy)=0
Add a SpectrumPhy to a channel, so it can receive packets.
void(* SignalParametersTracedCallback)(Ptr< SpectrumSignalParameters > params)
TracedCallback signature for Ptr<const SpectrumSignalParameters>.
void SetPropagationDelayModel(Ptr< PropagationDelayModel > delay)
Set the propagation delay model to be used.
double m_maxLossDb
Maximum loss [dB].
void AddPhasedArraySpectrumPropagationLossModel(Ptr< PhasedArraySpectrumPropagationLossModel > loss)
Add the frequency-dependent propagation loss model that is compapatible with the phased antenna array...
~SpectrumChannel() override
destructor
Forward calls to a chain of Callback.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.