A Discrete-Event Network Simulator
API
spectrum-phy.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_PHY_H
21 #define SPECTRUM_PHY_H
22 
23 #include <ns3/nstime.h>
24 #include <ns3/object.h>
25 
26 namespace ns3
27 {
28 
29 class PacketBurst;
30 class SpectrumChannel;
31 class MobilityModel;
32 class AntennaModel;
33 class PhasedArrayModel;
34 class SpectrumValue;
35 class SpectrumModel;
36 class NetDevice;
37 struct SpectrumSignalParameters;
38 
45 class SpectrumPhy : public Object
46 {
47  public:
48  SpectrumPhy();
49  ~SpectrumPhy() override;
50 
51  // Delete copy constructor and assignment operator to avoid misuse
52  SpectrumPhy(const SpectrumPhy&) = delete;
53  SpectrumPhy& operator=(const SpectrumPhy&) = delete;
54 
59  static TypeId GetTypeId();
60 
66  virtual void SetDevice(Ptr<NetDevice> d) = 0;
67 
73  virtual Ptr<NetDevice> GetDevice() const = 0;
74 
80  virtual void SetMobility(Ptr<MobilityModel> m) = 0;
81 
87  virtual Ptr<MobilityModel> GetMobility() const = 0;
88 
94  virtual void SetChannel(Ptr<SpectrumChannel> c) = 0;
95 
103 
114  virtual Ptr<Object> GetAntenna() const = 0;
115 
122 };
123 } // namespace ns3
124 
125 #endif /* SPECTRUM_PHY_H */
A base class which provides memory management and object aggregation.
Definition: object.h:89
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Abstract base class for Spectrum-aware PHY layers.
Definition: spectrum-phy.h:46
virtual void SetMobility(Ptr< MobilityModel > m)=0
Set the mobility model associated with this device.
virtual void StartRx(Ptr< SpectrumSignalParameters > params)=0
Notify the SpectrumPhy instance of an incoming signal.
~SpectrumPhy() override
Definition: spectrum-phy.cc:48
SpectrumPhy(const SpectrumPhy &)=delete
virtual Ptr< const SpectrumModel > GetRxSpectrumModel() const =0
SpectrumPhy & operator=(const SpectrumPhy &)=delete
virtual Ptr< Object > GetAntenna() const =0
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
static TypeId GetTypeId()
Get the type ID.
Definition: spectrum-phy.cc:37
virtual Ptr< MobilityModel > GetMobility() const =0
Get the associated MobilityModel instance.
virtual void SetChannel(Ptr< SpectrumChannel > c)=0
Set the channel attached to this device.
virtual void SetDevice(Ptr< NetDevice > d)=0
Set the associated NetDevice instance.
virtual Ptr< NetDevice > GetDevice() const =0
Get the associated NetDevice instance.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
params
Fit Fluctuating Two Ray model to the 3GPP TR 38.901 using the Anderson-Darling goodness-of-fit ##.