A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
28 namespace ns3 {
29 
30 class PacketBurst;
31 class SpectrumChannel;
32 class MobilityModel;
33 class AntennaModel;
34 class SpectrumValue;
35 class SpectrumModel;
36 class NetDevice;
37 struct SpectrumSignalParameters;
38 
45 class SpectrumPhy : public Object
46 {
47 
48 public:
49  SpectrumPhy ();
50  virtual ~SpectrumPhy ();
51 
52  static TypeId GetTypeId (void);
53 
59  virtual void SetDevice (Ptr<NetDevice> d) = 0;
60 
66  virtual Ptr<NetDevice> GetDevice () = 0;
67 
73  virtual void SetMobility (Ptr<MobilityModel> m) = 0;
74 
80  virtual Ptr<MobilityModel> GetMobility () = 0;
81 
87  virtual void SetChannel (Ptr<SpectrumChannel> c) = 0;
88 
95  virtual Ptr<const SpectrumModel> GetRxSpectrumModel () const = 0;
96 
102  virtual Ptr<AntennaModel> GetRxAntenna () = 0;
103 
109  virtual void StartRx (Ptr<SpectrumSignalParameters> params) = 0;
110 
111 private:
112  SpectrumPhy (SpectrumPhy const &);
114 };
115 
116 
117 
118 
119 
120 
121 
122 
123 
124 } // namespace ns3
125 
126 
127 
128 
129 
130 #endif /* SPECTRUM_PHY_H */
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:60
Abstract base class for Spectrum-aware PHY layers.
Definition: spectrum-phy.h:45
virtual void StartRx(Ptr< SpectrumSignalParameters > params)=0
Notify the SpectrumPhy instance of an incoming signal.
virtual void SetDevice(Ptr< NetDevice > d)=0
set the associated NetDevice instance
virtual Ptr< AntennaModel > GetRxAntenna()=0
get the AntennaModel used by the NetDevice for reception
virtual Ptr< const SpectrumModel > GetRxSpectrumModel() const =0
virtual Ptr< MobilityModel > GetMobility()=0
get the associated MobilityModel instance
SpectrumPhy & operator=(SpectrumPhy const &)
virtual void SetChannel(Ptr< SpectrumChannel > c)=0
Set the channel attached to this device.
static TypeId GetTypeId(void)
Definition: spectrum-phy.cc:37
virtual Ptr< NetDevice > GetDevice()=0
get the associated NetDevice instance
virtual void SetMobility(Ptr< MobilityModel > m)=0
Set the mobility model associated with this device.
a base class which provides memory management and object aggregation
Definition: object.h:64
a unique identifier for an interface.
Definition: type-id.h:49
virtual ~SpectrumPhy()
Definition: spectrum-phy.cc:50