A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::TvSpectrumTransmitter Class Reference

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 ()
 
 ~TvSpectrumTransmitter () override
 
virtual void CreateTvPsd ()
 Creates power spectral density (PSD) spectrum of the TV transmitter and sets it for transmission.
 
Ptr< ObjectGetAntenna () const override
 Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
 
Ptr< SpectrumChannelGetChannel () const
 Get the spectrum channel.
 
Ptr< NetDeviceGetDevice () const override
 Get the associated NetDevice instance.
 
Ptr< MobilityModelGetMobility () const override
 Get the associated MobilityModel instance.
 
Ptr< const SpectrumModelGetRxSpectrumModel () const override
 
Ptr< SpectrumValueGetTxPsd () 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
 
virtual Ptr< ObjectGetAntenna () const =0
 Get the AntennaModel used by this SpectrumPhy instance for transmission and/or reception.
 
virtual Ptr< NetDeviceGetDevice () const =0
 Get the associated NetDevice instance.
 
virtual Ptr< MobilityModelGetMobility () const =0
 Get the associated MobilityModel instance.
 
virtual Ptr< const SpectrumModelGetRxSpectrumModel () const =0
 
SpectrumPhyoperator= (const SpectrumPhy &)=delete
 
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.
 
virtual void SetMobility (Ptr< MobilityModel > m)=0
 Set the mobility model associated with this device.
 
virtual void StartRx (Ptr< SpectrumSignalParameters > params)=0
 Notify the SpectrumPhy instance of an incoming signal.
 
- 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 override
 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< ObjectGetObject () 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< ObjectGetObject (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.
 
- 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.
 
SimpleRefCountoperator= (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) 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.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
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< AntennaModelm_antenna
 Pointer to antenna model object.
 
double m_basePsd
 Base power spectral density value (in dBm/Hz) of TV transmitter's signal.
 
Ptr< SpectrumChannelm_channel
 Pointer to spectrum channel object.
 
double m_channelBandwidth
 Bandwidth (in Hz) of TV transmitter's signal.
 
Ptr< MobilityModelm_mobility
 Pointer to mobility model object.
 
Ptr< NetDevicem_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< SpectrumValuem_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.
 

Detailed Description

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).


Attributes

  • Antenna: The AntennaModel to be used. Allows classes inherited from ns3::AntennaModel. Defaults to ns3::IsotropicAntennaModel.
  • BasePsd: The base power spectral density (in dBm/Hz) of the TV transmitter's transmitted spectrum. Base PSD is the maximum PSD of the spectrum excluding pilots. For analog and COFDM transmitters this is the maximum PSD, but for 8-VSB transmitters this is the maximum PSD of the main signal spectrum (flat-top segment) since the pilot actually has the maximum PSD overall.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 20
    • Flags: constructwriteread
  • ChannelBandwidth: The bandwidth (in Hz) of the TV transmitter's signal. Must be greater than or equal to 0.
    • Set with class: ns3::DoubleValue
    • Underlying type: double 0:1.79769e+308
    • Initial value: 6e+06
    • Flags: constructwriteread
  • StartFrequency: The lower end frequency (in Hz) of the TV transmitter's signal. Must be greater than or equal to 0.
    • Set with class: ns3::DoubleValue
    • Underlying type: double 0:1.79769e+308
    • Initial value: 5e+08
    • Flags: constructwriteread
  • StartingTime: The time point after the simulation begins in which the TV transmitter will begin transmitting.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +0ns
    • Flags: constructwriteread
  • TransmitDuration: The duration of time that the TV transmitter will transmit for.
    • Set with class: ns3::TimeValue
    • Underlying type: Time +9.22337e+18ns:+9.22337e+18ns
    • Initial value: +2e+08ns
    • Flags: constructwriteread
  • TvType: The type of TV transmitter/modulation to be used.
    • Set with class: ns3::EnumValue
    • Underlying type: 8vsb|cofdm|analog
    • Initial value: 8vsb
    • Flags: constructwriteread

No TraceSources are defined for this type.
Size of this type is 128 bytes (on a 64-bit architecture).

Definition at line 44 of file tv-spectrum-transmitter.h.

Member Enumeration Documentation

◆ TvType

types of TV transmitters: analog, digital 8-VSB, or digital COFDM

Enumerator
TVTYPE_ANALOG 
TVTYPE_8VSB 
TVTYPE_COFDM 

Definition at line 50 of file tv-spectrum-transmitter.h.

Constructor & Destructor Documentation

◆ TvSpectrumTransmitter()

ns3::TvSpectrumTransmitter::TvSpectrumTransmitter ( )

Definition at line 42 of file tv-spectrum-transmitter.cc.

References NS_LOG_FUNCTION.

◆ ~TvSpectrumTransmitter()

ns3::TvSpectrumTransmitter::~TvSpectrumTransmitter ( )
override

Member Function Documentation

◆ CreateTvPsd()

void ns3::TvSpectrumTransmitter::CreateTvPsd ( )
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 243 of file tv-spectrum-transmitter.cc.

References 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.

◆ GetAntenna()

Ptr< Object > ns3::TvSpectrumTransmitter::GetAntenna ( ) const
overridevirtual

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.

Returns
a Ptr to the AntennaModel used by this SpectrumPhy instance for transmission and/or reception

Implements ns3::SpectrumPhy.

Definition at line 173 of file tv-spectrum-transmitter.cc.

References m_antenna, and NS_LOG_FUNCTION.

◆ GetChannel()

Ptr< SpectrumChannel > ns3::TvSpectrumTransmitter::GetChannel ( ) const

Get the spectrum channel.

Returns
a pointer to the assigned spectrum channel

Definition at line 186 of file tv-spectrum-transmitter.cc.

References m_channel, and NS_LOG_FUNCTION.

◆ GetDevice()

Ptr< NetDevice > ns3::TvSpectrumTransmitter::GetDevice ( ) const
overridevirtual

Get the associated NetDevice instance.

Returns
a Ptr to the associated NetDevice instance

Implements ns3::SpectrumPhy.

Definition at line 159 of file tv-spectrum-transmitter.cc.

References m_netDevice, and NS_LOG_FUNCTION.

◆ GetMobility()

Ptr< MobilityModel > ns3::TvSpectrumTransmitter::GetMobility ( ) const
overridevirtual

Get the associated MobilityModel instance.

Returns
a Ptr to the associated MobilityModel instance

Implements ns3::SpectrumPhy.

Definition at line 152 of file tv-spectrum-transmitter.cc.

References m_mobility, and NS_LOG_FUNCTION.

◆ GetRxSpectrumModel()

Ptr< const SpectrumModel > ns3::TvSpectrumTransmitter::GetRxSpectrumModel ( ) const
overridevirtual
Returns
returns the SpectrumModel that this SpectrumPhy expects to be used for all SpectrumValues that are passed to StartRx. If 0 is returned, it means that any model will be accepted.

Implements ns3::SpectrumPhy.

Definition at line 166 of file tv-spectrum-transmitter.cc.

References NS_LOG_FUNCTION.

◆ GetTxPsd()

Ptr< SpectrumValue > ns3::TvSpectrumTransmitter::GetTxPsd ( ) const

Get the power spectral density of the TV transmitter's signal.

Returns
a pointer to the PSD

Definition at line 554 of file tv-spectrum-transmitter.cc.

References m_txPsd, and NS_LOG_FUNCTION.

◆ GetTypeId()

◆ SetChannel()

void ns3::TvSpectrumTransmitter::SetChannel ( Ptr< SpectrumChannel c)
overridevirtual

Set the channel attached to this device.

Parameters
cthe channel

Implements ns3::SpectrumPhy.

Definition at line 131 of file tv-spectrum-transmitter.cc.

References m_channel, and NS_LOG_FUNCTION.

◆ SetDevice()

void ns3::TvSpectrumTransmitter::SetDevice ( Ptr< NetDevice d)
overridevirtual

Set the associated NetDevice instance.

Parameters
dthe NetDevice instance

Implements ns3::SpectrumPhy.

Definition at line 145 of file tv-spectrum-transmitter.cc.

References m_netDevice, and NS_LOG_FUNCTION.

◆ SetMobility()

void ns3::TvSpectrumTransmitter::SetMobility ( Ptr< MobilityModel m)
overridevirtual

Set the mobility model associated with this device.

Parameters
mthe mobility model

Implements ns3::SpectrumPhy.

Definition at line 138 of file tv-spectrum-transmitter.cc.

References m_mobility, and NS_LOG_FUNCTION.

◆ SetupTx()

void ns3::TvSpectrumTransmitter::SetupTx ( )
privatevirtual

Sets up signal to be transmitted.

Definition at line 561 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:

◆ Start()

void ns3::TvSpectrumTransmitter::Start ( )
virtual

Starts the TV Transmitter's transmission on the spectrum channel.

Definition at line 574 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:

◆ StartRx()

void ns3::TvSpectrumTransmitter::StartRx ( Ptr< SpectrumSignalParameters params)
overridevirtual

Notify the SpectrumPhy instance of an incoming signal.

Parameters
paramsthe parameters of the signals being received

Implements ns3::SpectrumPhy.

Definition at line 180 of file tv-spectrum-transmitter.cc.

References NS_LOG_FUNCTION.

◆ Stop()

void ns3::TvSpectrumTransmitter::Stop ( )
virtual

Stops the TV Transmitter's transmission on the spectrum channel.

Definition at line 586 of file tv-spectrum-transmitter.cc.

References m_active, and NS_LOG_FUNCTION.

Member Data Documentation

◆ m_active

bool ns3::TvSpectrumTransmitter::m_active
private

True if TV transmitter is transmitting.

Definition at line 140 of file tv-spectrum-transmitter.h.

Referenced by Start(), and Stop().

◆ m_antenna

Ptr<AntennaModel> ns3::TvSpectrumTransmitter::m_antenna
private

Pointer to antenna model object.

Definition at line 125 of file tv-spectrum-transmitter.h.

Referenced by ~TvSpectrumTransmitter(), GetAntenna(), GetTypeId(), and SetupTx().

◆ m_basePsd

double ns3::TvSpectrumTransmitter::m_basePsd
private

Base power spectral density value (in dBm/Hz) of TV transmitter's signal.

Definition at line 135 of file tv-spectrum-transmitter.h.

Referenced by CreateTvPsd(), and GetTypeId().

◆ m_channel

Ptr<SpectrumChannel> ns3::TvSpectrumTransmitter::m_channel
private

Pointer to spectrum channel object.

Definition at line 127 of file tv-spectrum-transmitter.h.

Referenced by ~TvSpectrumTransmitter(), GetChannel(), SetChannel(), and SetupTx().

◆ m_channelBandwidth

double ns3::TvSpectrumTransmitter::m_channelBandwidth
private

Bandwidth (in Hz) of TV transmitter's signal.

Definition at line 134 of file tv-spectrum-transmitter.h.

Referenced by CreateTvPsd(), and GetTypeId().

◆ m_mobility

Ptr<MobilityModel> ns3::TvSpectrumTransmitter::m_mobility
private

Pointer to mobility model object.

Definition at line 124 of file tv-spectrum-transmitter.h.

Referenced by ~TvSpectrumTransmitter(), GetMobility(), and SetMobility().

◆ m_netDevice

Ptr<NetDevice> ns3::TvSpectrumTransmitter::m_netDevice
private

Pointer to net device object.

Definition at line 126 of file tv-spectrum-transmitter.h.

Referenced by ~TvSpectrumTransmitter(), GetDevice(), and SetDevice().

◆ m_startFrequency

double ns3::TvSpectrumTransmitter::m_startFrequency
private

Start frequency (in Hz) of TV transmitter's signal.

Definition at line 133 of file tv-spectrum-transmitter.h.

Referenced by CreateTvPsd(), and GetTypeId().

◆ m_startingTime

Time ns3::TvSpectrumTransmitter::m_startingTime
private

Timepoint after simulation begins that TV transmitter will begin transmitting.

Definition at line 137 of file tv-spectrum-transmitter.h.

Referenced by GetTypeId(), and Start().

◆ m_transmitDuration

Time ns3::TvSpectrumTransmitter::m_transmitDuration
private

Length of time that TV transmitter will transmit for.

Definition at line 139 of file tv-spectrum-transmitter.h.

Referenced by GetTypeId(), and SetupTx().

◆ m_tvType

TvType ns3::TvSpectrumTransmitter::m_tvType
private

Type of TV transmitter.

Definition at line 132 of file tv-spectrum-transmitter.h.

Referenced by CreateTvPsd(), and GetTypeId().

◆ m_txPsd

Ptr<SpectrumValue> ns3::TvSpectrumTransmitter::m_txPsd
private

Pointer to power spectral density of TV transmitter's signal.

Definition at line 136 of file tv-spectrum-transmitter.h.

Referenced by ~TvSpectrumTransmitter(), CreateTvPsd(), GetTxPsd(), and SetupTx().


The documentation for this class was generated from the following files: