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:
 Inheritance diagram for ns3::TvSpectrumTransmitter: Collaboration 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 () | |
| ~TvSpectrumTransmitter () override | |
| virtual void | CreateTvPsd () | 
| Creates power spectral density (PSD) spectrum of the TV transmitter and sets it for transmission. | |
| Ptr< Object > | GetAntenna () const override | 
| Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception. | |
| Ptr< SpectrumChannel > | GetChannel () const | 
| Get the spectrum channel. | |
| Ptr< NetDevice > | GetDevice () const override | 
| Get the associated NetDevice instance. | |
| Ptr< MobilityModel > | GetMobility () const override | 
| Get the associated MobilityModel instance. | |
| Ptr< const SpectrumModel > | GetRxSpectrumModel () const override | 
| Ptr< SpectrumValue > | GetTxPsd () const | 
| Get the power spectral density of the TV transmitter's signal. | |
| void | SetChannel (Ptr< SpectrumChannel > c) override | 
| Set the channel attached to this device. | |
| void | SetDevice (Ptr< NetDevice > d) override | 
| Set the associated NetDevice instance. | |
| void | SetMobility (Ptr< MobilityModel > m) override | 
| Set the mobility model associated with this device. | |
| virtual void | Start () | 
| Starts the TV Transmitter's transmission on the spectrum channel. | |
| void | StartRx (Ptr< SpectrumSignalParameters > params) override | 
| Notify the SpectrumPhy instance of an incoming signal. | |
| virtual void | Stop () | 
| Stops the TV Transmitter's transmission on the spectrum channel. | |
|  Public Member Functions inherited from ns3::SpectrumPhy | |
| SpectrumPhy () | |
| SpectrumPhy (const SpectrumPhy &)=delete | |
| ~SpectrumPhy () override | |
| SpectrumPhy & | operator= (const SpectrumPhy &)=delete | 
|  Public Member Functions inherited from ns3::Object | |
| Object () | |
| Constructor. | |
| ~Object () override | |
| Destructor. | |
| void | AggregateObject (Ptr< Object > other) | 
| Aggregate two Objects together. | |
| void | Dispose () | 
| Dispose of this Object. | |
| AggregateIterator | GetAggregateIterator () const | 
| Get an iterator to the Objects aggregated to this one. | |
| TypeId | GetInstanceTypeId () const final | 
| Get the most derived TypeId for this Object. | |
| template<typename T > | |
| Ptr< T > | GetObject () const | 
| Get a pointer to the requested aggregated Object. | |
| template<> | |
| Ptr< Object > | GetObject () const | 
| Specialization of ()  for objects of type ns3::Object. | |
| template<typename T > | |
| Ptr< T > | GetObject (TypeId tid) const | 
| Get a pointer to the requested aggregated Object by TypeId. | |
| template<> | |
| Ptr< Object > | GetObject (TypeId tid) const | 
| Specialization of (TypeId tid)  for objects of type ns3::Object. | |
| void | Initialize () | 
| Invoke DoInitialize on all Objects aggregated to this one. | |
| bool | IsInitialized () const | 
| Check if the object has been initialized. | |
| void | UnidirectionalAggregateObject (Ptr< Object > other) | 
| Aggregate an Object to another Object. | |
|  Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount () | |
| Default constructor. | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor. | |
| uint32_t | GetReferenceCount () const | 
| Get the reference count of the object. | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) | 
| Assignment operator. | |
| void | Ref () const | 
| Increment the reference count. | |
| void | Unref () const | 
| Decrement the reference count. | |
|  Public Member Functions inherited from ns3::ObjectBase | |
| virtual | ~ObjectBase () | 
| Virtual destructor. | |
| void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const | 
| Get the value of an attribute, raising fatal errors if unsuccessful. | |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const | 
| Get the value of an attribute without raising errors. | |
| void | SetAttribute (std::string name, const AttributeValue &value) | 
| Set a single attribute, raising fatal errors if unsuccessful. | |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) | 
| Set a single attribute without raising errors. | |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) | 
| Connect a TraceSource to a Callback with a context. | |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) | 
| Connect a TraceSource to a Callback without a context. | |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) | 
| Disconnect from a TraceSource a Callback previously connected with a context. | |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) | 
| Disconnect from a TraceSource a Callback previously connected without a context. | |
| Static Public Member Functions | |
| static TypeId | GetTypeId () | 
| Register this type. | |
|  Static Public Member Functions inherited from ns3::SpectrumPhy | |
| static TypeId | GetTypeId () | 
| Get the type ID. | |
|  Static Public Member Functions inherited from ns3::Object | |
| static TypeId | GetTypeId () | 
| Register this type. | |
|  Static Public Member Functions inherited from ns3::ObjectBase | |
| static TypeId | GetTypeId () | 
| Get the type ID. | |
| Private Member Functions | |
| virtual void | SetupTx () | 
| Sets up signal to be transmitted. | |
| Private Attributes | |
| bool | m_active | 
| True if TV transmitter is transmitting. | |
| Ptr< AntennaModel > | m_antenna | 
| Pointer to antenna model object. | |
| double | m_basePsd | 
| Base power spectral density value (in dBm/Hz) of TV transmitter's signal. | |
| Ptr< SpectrumChannel > | m_channel | 
| Pointer to spectrum channel object. | |
| double | m_channelBandwidth | 
| Bandwidth (in Hz) of TV transmitter's signal. | |
| Ptr< MobilityModel > | m_mobility | 
| Pointer to mobility model object. | |
| Ptr< NetDevice > | m_netDevice | 
| Pointer to net device object. | |
| double | m_startFrequency | 
| Start frequency (in Hz) of TV transmitter's signal. | |
| Time | m_startingTime | 
| Timepoint after simulation begins that TV transmitter will begin transmitting. | |
| Time | m_transmitDuration | 
| Length of time that TV transmitter will transmit for. | |
| TvType | m_tvType | 
| Type of TV transmitter. | |
| Ptr< SpectrumValue > | m_txPsd | 
| Pointer to power spectral density of TV transmitter's signal. | |
| Additional Inherited Members | |
|  Protected Member Functions inherited from ns3::Object | |
| Object (const Object &o) | |
| Copy an Object. | |
| virtual void | DoDispose () | 
| Destructor implementation. | |
| virtual void | DoInitialize () | 
| Initialize() implementation. | |
| virtual void | NotifyNewAggregate () | 
| Notify all Objects aggregated to this one of a new Object being aggregated. | |
|  Protected Member Functions inherited from ns3::ObjectBase | |
| void | ConstructSelf (const AttributeConstructionList &attributes) | 
| Complete construction of ObjectBase; invoked by derived classes. | |
| virtual void | NotifyConstructionCompleted () | 
| Notifier called once the ObjectBase is fully constructed. | |
|  Related Symbols inherited from ns3::ObjectBase | |
| static TypeId | GetObjectIid () | 
| Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
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).
 
Time -9.22337e+18ns:+9.22337e+18ns Time -9.22337e+18ns:+9.22337e+18ns 8vsb|cofdm|analog No TraceSources are defined for this type.
 Group: Spectrum
Size of this type is 152 bytes (on a 64-bit architecture).
Definition at line 34 of file tv-spectrum-transmitter.h.
types of TV transmitters: analog, digital 8-VSB, or digital COFDM
| Enumerator | |
|---|---|
| TVTYPE_ANALOG | |
| TVTYPE_8VSB | |
| TVTYPE_COFDM | |
Definition at line 40 of file tv-spectrum-transmitter.h.
| ns3::TvSpectrumTransmitter::TvSpectrumTransmitter | ( | ) | 
Definition at line 31 of file tv-spectrum-transmitter.cc.
References NS_LOG_FUNCTION.
| 
 | override | 
Definition at line 48 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 233 of file tv-spectrum-transmitter.cc.
References ns3::Create(), ns3::BandInfo::fc, ns3::BandInfo::fh, ns3::BandInfo::fl, ns3::g_tvSpectrumModelMap, 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.
 Here is the call graph for this function:
 Here is the call graph for this function:Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
Note that in general and depending on each module design, there can be multiple SpectrumPhy instances per NetDevice.
Implements ns3::SpectrumPhy.
Definition at line 163 of file tv-spectrum-transmitter.cc.
References m_antenna, and NS_LOG_FUNCTION.
| Ptr< SpectrumChannel > ns3::TvSpectrumTransmitter::GetChannel | ( | ) | const | 
Get the spectrum channel.
Definition at line 176 of file tv-spectrum-transmitter.cc.
References m_channel, and NS_LOG_FUNCTION.
Get the associated NetDevice instance.
Implements ns3::SpectrumPhy.
Definition at line 149 of file tv-spectrum-transmitter.cc.
References m_netDevice, and NS_LOG_FUNCTION.
| 
 | overridevirtual | 
Get the associated MobilityModel instance.
Implements ns3::SpectrumPhy.
Definition at line 142 of file tv-spectrum-transmitter.cc.
References m_mobility, and NS_LOG_FUNCTION.
| 
 | overridevirtual | 
Implements ns3::SpectrumPhy.
Definition at line 156 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.
| 
 | static | 
Register this type.
Definition at line 59 of file tv-spectrum-transmitter.cc.
References m_antenna, m_basePsd, m_channelBandwidth, m_startFrequency, m_startingTime, m_transmitDuration, m_tvType, ns3::MakeDoubleAccessor(), ns3::MakeDoubleChecker(), ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), ns3::MakePointerAccessor(), ns3::MakePointerChecker(), ns3::MakeTimeAccessor(), ns3::MakeTimeChecker(), ns3::Seconds(), ns3::TypeId::SetParent(), TVTYPE_8VSB, TVTYPE_ANALOG, and TVTYPE_COFDM.
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | overridevirtual | 
Set the channel attached to this device.
| c | the channel | 
Implements ns3::SpectrumPhy.
Definition at line 121 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 135 of file tv-spectrum-transmitter.cc.
References m_netDevice, and NS_LOG_FUNCTION.
| 
 | overridevirtual | 
Set the mobility model associated with this device.
| m | the mobility model | 
Implements ns3::SpectrumPhy.
Definition at line 128 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 ns3::Create(), ns3::Object::GetObject(), m_antenna, m_channel, m_transmitDuration, m_txPsd, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by Start().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 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:
 Here is the call graph for this function:| 
 | overridevirtual | 
Notify the SpectrumPhy instance of an incoming signal.
| params | the parameters of the signals being received | 
Implements ns3::SpectrumPhy.
Definition at line 170 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 130 of file tv-spectrum-transmitter.h.
| 
 | private | 
Pointer to antenna model object.
Definition at line 115 of file tv-spectrum-transmitter.h.
Referenced by ~TvSpectrumTransmitter(), GetAntenna(), GetTypeId(), and SetupTx().
| 
 | private | 
Base power spectral density value (in dBm/Hz) of TV transmitter's signal.
Definition at line 125 of file tv-spectrum-transmitter.h.
Referenced by CreateTvPsd(), and GetTypeId().
| 
 | private | 
Pointer to spectrum channel object.
Definition at line 117 of file tv-spectrum-transmitter.h.
Referenced by ~TvSpectrumTransmitter(), GetChannel(), SetChannel(), and SetupTx().
| 
 | private | 
Bandwidth (in Hz) of TV transmitter's signal.
Definition at line 124 of file tv-spectrum-transmitter.h.
Referenced by CreateTvPsd(), and GetTypeId().
| 
 | private | 
Pointer to mobility model object.
Definition at line 114 of file tv-spectrum-transmitter.h.
Referenced by ~TvSpectrumTransmitter(), GetMobility(), and SetMobility().
Pointer to net device object.
Definition at line 116 of file tv-spectrum-transmitter.h.
Referenced by ~TvSpectrumTransmitter(), GetDevice(), and SetDevice().
| 
 | private | 
Start frequency (in Hz) of TV transmitter's signal.
Definition at line 123 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 127 of file tv-spectrum-transmitter.h.
Referenced by GetTypeId(), and Start().
| 
 | private | 
Length of time that TV transmitter will transmit for.
Definition at line 129 of file tv-spectrum-transmitter.h.
Referenced by GetTypeId(), and SetupTx().
| 
 | private | 
Type of TV transmitter.
Definition at line 122 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 126 of file tv-spectrum-transmitter.h.
Referenced by ~TvSpectrumTransmitter(), CreateTvPsd(), GetTxPsd(), and SetupTx().