A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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
26namespace ns3
27{
28
29class PacketBurst;
30class SpectrumChannel;
31class MobilityModel;
32class AntennaModel;
33class PhasedArrayModel;
34class SpectrumValue;
35class SpectrumModel;
36class NetDevice;
37struct SpectrumSignalParameters;
38
45class SpectrumPhy : public Object
46{
47 public:
49 ~SpectrumPhy() override;
50
51 // Delete copy constructor and assignment operator to avoid misuse
52 SpectrumPhy(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
121 virtual void StartRx(Ptr<SpectrumSignalParameters> params) = 0;
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:78
Abstract base class for Spectrum-aware PHY layers.
Definition: spectrum-phy.h:46
virtual Ptr< MobilityModel > GetMobility() const =0
Get the associated MobilityModel instance.
virtual void SetMobility(Ptr< MobilityModel > m)=0
Set the mobility model associated with this device.
virtual Ptr< Object > GetAntenna() const =0
Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
SpectrumPhy & operator=(const SpectrumPhy &)=delete
virtual Ptr< NetDevice > GetDevice() const =0
Get the associated NetDevice instance.
virtual void StartRx(Ptr< SpectrumSignalParameters > params)=0
Notify the SpectrumPhy instance of an incoming signal.
~SpectrumPhy() override
Definition: spectrum-phy.cc:47
SpectrumPhy(const SpectrumPhy &)=delete
virtual Ptr< const SpectrumModel > GetRxSpectrumModel() const =0
static TypeId GetTypeId()
Get the type ID.
Definition: spectrum-phy.cc:36
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.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.