A Discrete-Event Network Simulator
API
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
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:

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 ()
 
virtual ~TvSpectrumTransmitter ()
 
virtual void CreateTvPsd ()
 Creates power spectral density (PSD) spectrum of the TV transmitter and sets it for transmission. More...
 
Ptr< SpectrumChannelGetChannel () const
 Get the spectrum channel. More...
 
Ptr< NetDeviceGetDevice () const
 Get the associated NetDevice instance. More...
 
Ptr< MobilityModelGetMobility ()
 Get the associated MobilityModel instance. More...
 
Ptr< AntennaModelGetRxAntenna ()
 Get the AntennaModel used by the NetDevice for reception. More...
 
Ptr< const SpectrumModelGetRxSpectrumModel () const
 
Ptr< SpectrumValueGetTxPsd () 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
 Get the most derived TypeId for this Object. 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...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. 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)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. 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< AntennaModelm_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< SpectrumChannelm_channel
 Pointer to spectrum channel object. More...
 
double m_channelBandwidth
 Bandwidth (in Hz) of TV transmitter's signal. More...
 
Ptr< MobilityModelm_mobility
 Pointer to mobility model object. More...
 
Ptr< NetDevicem_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< SpectrumValuem_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...
 

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

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.

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 53 of file tv-spectrum-transmitter.h.

Constructor & Destructor Documentation

◆ TvSpectrumTransmitter()

ns3::TvSpectrumTransmitter::TvSpectrumTransmitter ( )

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

References NS_LOG_FUNCTION.

◆ ~TvSpectrumTransmitter()

ns3::TvSpectrumTransmitter::~TvSpectrumTransmitter ( )
virtual

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.

Returns
a pointer to the power spectral density of the TV transmitter

"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 240 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.

◆ GetChannel()

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

Get the spectrum channel.

Returns
a pointer to the assigned spectrum channel

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

References m_channel, and NS_LOG_FUNCTION.

◆ GetDevice()

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

Get the associated NetDevice instance.

Returns
a Ptr to the associated NetDevice instance

Implements ns3::SpectrumPhy.

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

References m_netDevice, and NS_LOG_FUNCTION.

◆ GetMobility()

Ptr< MobilityModel > ns3::TvSpectrumTransmitter::GetMobility ( )
virtual

Get the associated MobilityModel instance.

Returns
a Ptr to the associated MobilityModel instance

Implements ns3::SpectrumPhy.

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

References m_mobility, and NS_LOG_FUNCTION.

◆ GetRxAntenna()

Ptr< AntennaModel > ns3::TvSpectrumTransmitter::GetRxAntenna ( )
virtual

Get the AntennaModel used by the NetDevice for reception.

Returns
a Ptr to 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.

◆ GetRxSpectrumModel()

Ptr< const SpectrumModel > ns3::TvSpectrumTransmitter::GetRxSpectrumModel ( ) const
virtual
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 161 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()

TypeId ns3::TvSpectrumTransmitter::GetTypeId ( void  )
static

◆ SetChannel()

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

Set the channel attached to this device.

Parameters
cthe channel

Implements ns3::SpectrumPhy.

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

References m_channel, and NS_LOG_FUNCTION.

◆ SetDevice()

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

Set the associated NetDevice instance.

Parameters
dthe NetDevice instance

Implements ns3::SpectrumPhy.

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

References m_netDevice, and NS_LOG_FUNCTION.

◆ SetMobility()

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

Set the mobility model associated with this device.

Parameters
mthe mobility model

Implements ns3::SpectrumPhy.

Definition at line 133 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().

◆ Start()

void ns3::TvSpectrumTransmitter::Start ( void  )
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().

◆ StartRx()

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

Notify the SpectrumPhy instance of an incoming signal.

Parameters
paramsthe parameters of the signals being received

Implements ns3::SpectrumPhy.

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

References NS_LOG_FUNCTION.

◆ Stop()

void ns3::TvSpectrumTransmitter::Stop ( void  )
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 146 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 132 of file tv-spectrum-transmitter.h.

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

◆ m_basePsd

double ns3::TvSpectrumTransmitter::m_basePsd
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().

◆ m_channel

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

Pointer to spectrum channel object.

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

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

◆ m_channelBandwidth

double ns3::TvSpectrumTransmitter::m_channelBandwidth
private

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

Definition at line 141 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 131 of file tv-spectrum-transmitter.h.

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

◆ m_netDevice

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

Pointer to net device object.

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

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

◆ m_startFrequency

double ns3::TvSpectrumTransmitter::m_startFrequency
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().

◆ m_startingTime

Time ns3::TvSpectrumTransmitter::m_startingTime
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().

◆ m_transmitDuration

Time ns3::TvSpectrumTransmitter::m_transmitDuration
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().

◆ m_tvType

enum TvType ns3::TvSpectrumTransmitter::m_tvType
private

Type of TV transmitter.

Definition at line 139 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 143 of file tv-spectrum-transmitter.h.

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


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