A Discrete-Event Network Simulator
API
spectrum-phy.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#ifndef SPECTRUM_PHY_H
22#define SPECTRUM_PHY_H
23
24
25#include <ns3/object.h>
26#include <ns3/nstime.h>
27
28namespace ns3 {
29
30class PacketBurst;
31class SpectrumChannel;
32class MobilityModel;
33class AntennaModel;
34class PhasedArrayModel;
35class SpectrumValue;
36class SpectrumModel;
37class NetDevice;
38struct SpectrumSignalParameters;
39
46class SpectrumPhy : public Object
47{
48
49public:
50 SpectrumPhy ();
51 virtual ~SpectrumPhy ();
52
53 // Delete copy constructor and assignment operator to avoid misuse
54 SpectrumPhy (SpectrumPhy const &) = delete;
56
61 static TypeId GetTypeId (void);
62
68 virtual void SetDevice (Ptr<NetDevice> d) = 0;
69
75 virtual Ptr<NetDevice> GetDevice () const = 0;
76
82 virtual void SetMobility (Ptr<MobilityModel> m) = 0;
83
89 virtual Ptr<MobilityModel> GetMobility () const = 0;
90
96 virtual void SetChannel (Ptr<SpectrumChannel> c) = 0;
97
105
116 virtual Ptr<Object> GetAntenna () const = 0;
117
123 virtual void StartRx (Ptr<SpectrumSignalParameters> params) = 0;
124};
125} // namespace ns3
126
127#endif /* SPECTRUM_PHY_H */
A base class which provides memory management and object aggregation.
Definition: object.h:88
Abstract base class for Spectrum-aware PHY layers.
Definition: spectrum-phy.h:47
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=(SpectrumPhy const &)=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(SpectrumPhy const &)=delete
virtual Ptr< const SpectrumModel > GetRxSpectrumModel() const =0
static TypeId GetTypeId(void)
Get the type ID.
Definition: spectrum-phy.cc:36
virtual ~SpectrumPhy()
Definition: spectrum-phy.cc:50
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.