SpectrumPhy implementation that creates a customizable TV transmitter which transmits a PSD spectrum specified by user-set attributes. More...
#include "tv-spectrum-transmitter.h"
 Inheritance diagram for ns3::TvSpectrumTransmitter:
 Collaboration diagram for ns3::TvSpectrumTransmitter:Public Types | |
| enum | TvType { TVTYPE_ANALOG, TVTYPE_8VSB, TVTYPE_COFDM } | 
| types of TV transmitters: analog, digital 8-VSB, or digital COFDM  More... | |
Public Member Functions | |
| TvSpectrumTransmitter () | |
| Default constructor.  More... | |
| virtual | ~TvSpectrumTransmitter () | 
| Destructor.  More... | |
| virtual void | CreateTvPsd () | 
| Creates power spectral density (PSD) spectrum of the TV transmitter and sets it for transmission.  More... | |
| Ptr< SpectrumChannel > | GetChannel () const | 
| Get the spectrum channel.  More... | |
| Ptr< NetDevice > | GetDevice () const | 
| get the associated NetDevice instance  More... | |
| Ptr< MobilityModel > | GetMobility () | 
| get the associated MobilityModel instance  More... | |
| Ptr< AntennaModel > | GetRxAntenna () | 
| get the AntennaModel used by the NetDevice for reception  More... | |
| Ptr< const SpectrumModel > | GetRxSpectrumModel () const | 
| Ptr< SpectrumValue > | GetTxPsd () const | 
| Get the power spectral density of the TV transmitter's signal.  More... | |
| void | SetChannel (Ptr< SpectrumChannel > c) | 
| Set the channel attached to this device.  More... | |
| void | SetDevice (Ptr< NetDevice > d) | 
| set the associated NetDevice instance  More... | |
| void | SetMobility (Ptr< MobilityModel > m) | 
| Set the mobility model associated with this device.  More... | |
| virtual void | Start () | 
| Starts the TV Transmitter's transmission on the spectrum channel.  More... | |
| void | StartRx (Ptr< SpectrumSignalParameters > params) | 
| Notify the SpectrumPhy instance of an incoming signal.  More... | |
| virtual void | Stop () | 
| Stops the TV Transmitter's transmission on the spectrum channel.  More... | |
  Public Member Functions inherited from ns3::SpectrumPhy | |
| SpectrumPhy () | |
| virtual | ~SpectrumPhy () | 
  Public Member Functions inherited from ns3::Object | |
| Object () | |
| Constructor.  More... | |
| virtual | ~Object () | 
| Destructor.  More... | |
| void | AggregateObject (Ptr< Object > other) | 
| Aggregate two Objects together.  More... | |
| void | Dispose (void) | 
| Dispose of this Object.  More... | |
| AggregateIterator | GetAggregateIterator (void) const | 
| Get an iterator to the Objects aggregated to this one.  More... | |
| virtual TypeId | GetInstanceTypeId (void) const | 
| Implement the GetInstanceTypeId method defined in ObjectBase.  More... | |
| template<typename T > | |
| Ptr< T > | GetObject (void) const | 
| Get a pointer to the requested aggregated Object.  More... | |
| template<typename T > | |
| Ptr< T > | GetObject (TypeId tid) const | 
| Get a pointer to the requested aggregated Object by TypeId.  More... | |
| void | Initialize (void) | 
| Invoke DoInitialize on all Objects aggregated to this one.  More... | |
  Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| Constructor.  More... | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor.  More... | |
| uint32_t | GetReferenceCount (void) const | 
| Get the reference count of the object.  More... | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) | 
| Assignment.  More... | |
| void | Ref (void) const | 
| Increment the reference count.  More... | |
| void | Unref (void) const | 
| Decrement the reference count.  More... | |
  Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () | 
| Virtual destructor.  More... | |
| void | GetAttribute (std::string name, AttributeValue &value) const | 
| Get the value of an attribute, raising fatal errors if unsuccessful.  More... | |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const | 
| Get the value of an attribute without raising erros.  More... | |
| void | SetAttribute (std::string name, const AttributeValue &value) | 
| Set a single attribute, raising fatal errors if unsuccessful.  More... | |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) | 
| Set a single attribute without raising errors.  More... | |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) | 
| Connect a TraceSource to a Callback with a context.  More... | |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) | 
| Connect a TraceSource to a Callback without a context.  More... | |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) | 
| Disconnect from a TraceSource a Callback previously connected with a context.  More... | |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) | 
| Disconnect from a TraceSource a Callback previously connected without a context.  More... | |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) | 
| Register this type.  More... | |
  Static Public Member Functions inherited from ns3::SpectrumPhy | |
| static TypeId | GetTypeId (void) | 
  Static Public Member Functions inherited from ns3::Object | |
| static TypeId | GetTypeId (void) | 
| Register this type.  More... | |
  Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| static void | Cleanup (void) | 
| Noop.  More... | |
  Static Public Member Functions inherited from ns3::ObjectBase | |
| static TypeId | GetTypeId (void) | 
| Get the type ID.  More... | |
Private Member Functions | |
| virtual void | SetupTx () | 
| Sets up signal to be transmitted.  More... | |
Private Attributes | |
| bool | m_active | 
| True if TV transmitter is transmitting.  More... | |
| Ptr< AntennaModel > | m_antenna | 
| Pointer to antenna model object.  More... | |
| double | m_basePsd | 
| Base power spectral density value (in dBm/Hz) of TV transmitter's signal.  More... | |
| Ptr< SpectrumChannel > | m_channel | 
| Pointer to spectrum channel object.  More... | |
| double | m_channelBandwidth | 
| Bandwidth (in Hz) of TV transmitter's signal.  More... | |
| Ptr< MobilityModel > | m_mobility | 
| Pointer to mobility model object.  More... | |
| Ptr< NetDevice > | m_netDevice | 
| Pointer to net device object.  More... | |
| double | m_startFrequency | 
| Start frequency (in Hz) of TV transmitter's signal.  More... | |
| Time | m_startingTime | 
| Timepoint after simulation begins that TV transmitter will begin transmitting.  More... | |
| Time | m_transmitDuration | 
| Length of time that TV transmitter will transmit for.  More... | |
| enum TvType | m_tvType | 
| Type of TV transmitter.  More... | |
| Ptr< SpectrumValue > | m_txPsd | 
| Pointer to power spectral density of TV transmitter's signal.  More... | |
Additional Inherited Members | |
  Protected Member Functions inherited from ns3::Object | |
| Object (const Object &o) | |
| Copy an Object.  More... | |
| virtual void | DoDispose (void) | 
| Destructor implementation.  More... | |
| virtual void | DoInitialize (void) | 
| Initialize() implementation.  More... | |
| virtual void | NotifyNewAggregate (void) | 
| Notify all Objects aggregated to this one of a new Object being aggregated.  More... | |
  Protected Member Functions inherited from ns3::ObjectBase | |
| void | ConstructSelf (const AttributeConstructionList &attributes) | 
| Complete construction of ObjectBase; invoked by derived classes.  More... | |
| virtual void | NotifyConstructionCompleted (void) | 
| Notifier called once the ObjectBase is fully constructed.  More... | |
  Related Functions inherited from ns3::ObjectBase | |
| static TypeId | GetObjectIid (void) | 
| Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly.  More... | |
SpectrumPhy implementation that creates a customizable TV transmitter which transmits a PSD spectrum specified by user-set attributes.
Introspection did not find any typical Config paths.
This PHY model supports a single antenna model instance which is used for transmission (this PHY model never receives).
 
No TraceSources are defined for this type.
 Size of this type is 128 bytes (on a 64-bit architecture). 
Definition at line 46 of file tv-spectrum-transmitter.h.
| ns3::TvSpectrumTransmitter::TvSpectrumTransmitter | ( | ) | 
Default constructor.
Definition at line 40 of file tv-spectrum-transmitter.cc.
References NS_LOG_FUNCTION.
      
  | 
  virtual | 
Destructor.
Definition at line 57 of file tv-spectrum-transmitter.cc.
References m_antenna, m_channel, m_mobility, m_netDevice, m_txPsd, and NS_LOG_FUNCTION.
      
  | 
  virtual | 
Creates power spectral density (PSD) spectrum of the TV transmitter and sets it for transmission.
8-VSB PSD approximated from Figure 3 of the following article: Baron, Stanley.
Before calling this method, must set attributes and parameters that are applicable to your transmitter.
8-VSB PSD approximated from Figure 3 of the following article: Baron, Stanley. "First-Hand:Digital Television: The Digital Terrestrial Television Broadcasting (DTTB) Standard." IEEE Global History Network. <http://www.ieeeghn.org/wiki/index.php/First-Hand:Digital_Television:The Digital_Terrestrial_Television_Broadcasting_(DTTB)_Standard>.
COFDM PSD approximated from Figure 12 (8k mode) of the following article: Kopp, Carlo. "High Definition Television." High Definition Television. Air Power Australia. http://www.ausairpower.net/AC-1100.html.
Analog PSD approximated from Figure 4 of the following paper: Stephen Shellhammer, Ahmed Sadek, and Wenyi Zhang. "Technical Challenges for Cognitive Radio in the TV White Space Spectrum." Qualcomm Incorporated.
"First-Hand:Digital Television: The Digital Terrestrial Television Broadcasting (DTTB) Standard." IEEE Global History Network. <http://www.ieeeghn.org/wiki/index.php/First-Hand:Digital_Television:The Digital_Terrestrial_Television_Broadcasting_(DTTB)_Standard>.
COFDM PSD approximated from Figure 12 (8k mode) of the following article: Kopp, Carlo. "High Definition Television." High Definition Television. Air Power Australia. http://www.ausairpower.net/AC-1100.html.
Analog PSD approximated from Figure 4 of the following paper: Stephen Shellhammer, Ahmed Sadek, and Wenyi Zhang. "Technical Challenges for Cognitive Radio in the TV White Space Spectrum." Qualcomm Incorporated.
Definition at line 228 of file tv-spectrum-transmitter.cc.
References ns3::BandInfo::fc, ns3::BandInfo::fh, ns3::BandInfo::fl, m_basePsd, m_channelBandwidth, m_startFrequency, m_tvType, m_txPsd, NS_ASSERT, NS_LOG_ERROR, NS_LOG_FUNCTION, TVTYPE_8VSB, TVTYPE_ANALOG, and TVTYPE_COFDM.
Referenced by TvSpectrumTransmitterTestCase::DoRun().
 Here is the caller graph for this function:| Ptr< SpectrumChannel > ns3::TvSpectrumTransmitter::GetChannel | ( | void | ) | const | 
Get the spectrum channel.
Definition at line 182 of file tv-spectrum-transmitter.cc.
References m_channel, and NS_LOG_FUNCTION.
get the associated NetDevice instance
Implements ns3::SpectrumPhy.
Definition at line 154 of file tv-spectrum-transmitter.cc.
References m_netDevice, and NS_LOG_FUNCTION.
      
  | 
  virtual | 
get the associated MobilityModel instance
Implements ns3::SpectrumPhy.
Definition at line 147 of file tv-spectrum-transmitter.cc.
References m_mobility, and NS_LOG_FUNCTION.
      
  | 
  virtual | 
get the AntennaModel used by the NetDevice for reception
Implements ns3::SpectrumPhy.
Definition at line 168 of file tv-spectrum-transmitter.cc.
References m_antenna, and NS_LOG_FUNCTION.
      
  | 
  virtual | 
Implements ns3::SpectrumPhy.
Definition at line 161 of file tv-spectrum-transmitter.cc.
References NS_LOG_FUNCTION.
| Ptr< SpectrumValue > ns3::TvSpectrumTransmitter::GetTxPsd | ( | ) | const | 
Get the power spectral density of the TV transmitter's signal.
Definition at line 542 of file tv-spectrum-transmitter.cc.
References m_txPsd, and NS_LOG_FUNCTION.
Referenced by TvSpectrumTransmitterTestCase::DoRun().
 Here is the caller graph for this function:
      
  | 
  static | 
Register this type.
Definition at line 68 of file tv-spectrum-transmitter.cc.
References m_antenna, m_basePsd, m_channelBandwidth, m_startFrequency, m_startingTime, m_transmitDuration, m_tvType, ns3::MakeDoubleAccessor(), ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::MakePointerAccessor(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::Seconds(), ns3::TypeId::SetParent(), TVTYPE_8VSB, TVTYPE_ANALOG, and TVTYPE_COFDM.
 Here is the call graph for this function:
      
  | 
  virtual | 
Set the channel attached to this device.
| c | the channel | 
Implements ns3::SpectrumPhy.
Definition at line 126 of file tv-spectrum-transmitter.cc.
References m_channel, and NS_LOG_FUNCTION.
set the associated NetDevice instance
| d | the NetDevice instance | 
Implements ns3::SpectrumPhy.
Definition at line 140 of file tv-spectrum-transmitter.cc.
References m_netDevice, and NS_LOG_FUNCTION.
      
  | 
  virtual | 
Set the mobility model associated with this device.
| m | the mobility model | 
Implements ns3::SpectrumPhy.
Definition at line 133 of file tv-spectrum-transmitter.cc.
References m_mobility, and NS_LOG_FUNCTION.
      
  | 
  privatevirtual | 
Sets up signal to be transmitted.
Definition at line 549 of file tv-spectrum-transmitter.cc.
References m_antenna, m_channel, m_transmitDuration, m_txPsd, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by Start().
 Here is the caller graph for this function:
      
  | 
  virtual | 
Starts the TV Transmitter's transmission on the spectrum channel.
Definition at line 562 of file tv-spectrum-transmitter.cc.
References m_active, m_startingTime, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Simulator::Schedule(), and SetupTx().
 Here is the call graph for this function:
      
  | 
  virtual | 
Notify the SpectrumPhy instance of an incoming signal.
| params | the parameters of the signals being received | 
Implements ns3::SpectrumPhy.
Definition at line 175 of file tv-spectrum-transmitter.cc.
References NS_LOG_FUNCTION.
      
  | 
  virtual | 
Stops the TV Transmitter's transmission on the spectrum channel.
Definition at line 574 of file tv-spectrum-transmitter.cc.
References m_active, and NS_LOG_FUNCTION.
      
  | 
  private | 
True if TV transmitter is transmitting.
Definition at line 146 of file tv-spectrum-transmitter.h.
      
  | 
  private | 
Pointer to antenna model object.
Definition at line 132 of file tv-spectrum-transmitter.h.
Referenced by GetRxAntenna(), GetTypeId(), SetupTx(), and ~TvSpectrumTransmitter().
      
  | 
  private | 
Base power spectral density value (in dBm/Hz) of TV transmitter's signal.
Definition at line 142 of file tv-spectrum-transmitter.h.
Referenced by CreateTvPsd(), and GetTypeId().
      
  | 
  private | 
Pointer to spectrum channel object.
Definition at line 134 of file tv-spectrum-transmitter.h.
Referenced by GetChannel(), SetChannel(), SetupTx(), and ~TvSpectrumTransmitter().
      
  | 
  private | 
Bandwidth (in Hz) of TV transmitter's signal.
Definition at line 141 of file tv-spectrum-transmitter.h.
Referenced by CreateTvPsd(), and GetTypeId().
      
  | 
  private | 
Pointer to mobility model object.
Definition at line 131 of file tv-spectrum-transmitter.h.
Referenced by GetMobility(), SetMobility(), and ~TvSpectrumTransmitter().
Pointer to net device object.
Definition at line 133 of file tv-spectrum-transmitter.h.
Referenced by GetDevice(), SetDevice(), and ~TvSpectrumTransmitter().
      
  | 
  private | 
Start frequency (in Hz) of TV transmitter's signal.
Definition at line 140 of file tv-spectrum-transmitter.h.
Referenced by CreateTvPsd(), and GetTypeId().
      
  | 
  private | 
Timepoint after simulation begins that TV transmitter will begin transmitting.
Definition at line 144 of file tv-spectrum-transmitter.h.
Referenced by GetTypeId(), and Start().
      
  | 
  private | 
Length of time that TV transmitter will transmit for.
Definition at line 145 of file tv-spectrum-transmitter.h.
Referenced by GetTypeId(), and SetupTx().
      
  | 
  private | 
Type of TV transmitter.
Definition at line 139 of file tv-spectrum-transmitter.h.
Referenced by CreateTvPsd(), and GetTypeId().
      
  | 
  private | 
Pointer to power spectral density of TV transmitter's signal.
Definition at line 143 of file tv-spectrum-transmitter.h.
Referenced by CreateTvPsd(), GetTxPsd(), SetupTx(), and ~TvSpectrumTransmitter().