ns-3 PLC model
 All Classes Functions Variables Enumerations
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
ns3::PLC_NoiseSource Class Reference

Base class for noise source models. More...

#include <plc-noise.h>

Inheritance diagram for ns3::PLC_NoiseSource:
ns3::PLC_ImpulseNoiseSource ns3::PLC_ImpulsiveNoiseSource ns3::PLC_StaticNoiseSource

List of all members.

Public Types

enum  NoiseSourceType { STATIC, TIMEVARIANT, IMPULSIVE }

Public Member Functions

 PLC_NoiseSource (Ptr< PLC_Node > src_node, Ptr< SpectrumValue > noisePsd, NoiseSourceType type)
void SetNoisePsd (Ptr< SpectrumValue > psd)
Ptr< SpectrumValue > GetNoisePsd (void)
NoiseSourceType GetNoiseSourceType (void)
void SetNode (Ptr< PLC_Node > node)
Ptr< PLC_NodeGetNode (void)
void SetChannel (Ptr< PLC_Channel > channel)
Ptr< PLC_ChannelGetChannel (void)
void Init (void)
virtual void Enable (void)
virtual void Disable (void)
bool IsEnabled (void)

Static Public Member Functions

static TypeId GetTypeId (void)

Protected Member Functions

virtual void pureVirtualDummy (void)=0

Protected Attributes

NoiseSourceType m_noise_source_type
uint32_t m_noise_srcId
Ptr< PLC_Nodem_src_node
Ptr< SpectrumValue > m_noisePsd
Ptr< PLC_Channelm_channel
Ptr< PLC_TxInterfacem_txInterface
bool m_is_enabled
bool m_is_initialized

Detailed Description

Base class for noise source models.

The noise sources act as transmitters in the PLC network. The noise PSD will therefore experience channel distortion before received by the receivers as interfering signal. Thus a a more realistic noise environment can be simulated rather than using a simple AWGN noise model.


Member Enumeration Documentation

Noise source types

currently only impulsive noise source is implemented


Constructor & Destructor Documentation

ns3::PLC_NoiseSource::PLC_NoiseSource ( Ptr< PLC_Node src_node,
Ptr< SpectrumValue >  noisePsd,
NoiseSourceType  type 
)

Constructor

Parameters:
src_nodeThe source node where the noise source is originated
noisePsdThe noise power spectral density
typenoise source type

Member Function Documentation

void ns3::PLC_NoiseSource::Disable ( void  ) [virtual]

Disable the noise source

void ns3::PLC_NoiseSource::Enable ( void  ) [virtual]

Enable the noise source

Reimplemented in ns3::PLC_ImpulsiveNoiseSource.

Returns:
PLC_Channel the noise source is connected to
Ptr<PLC_Node> ns3::PLC_NoiseSource::GetNode ( void  ) [inline]
Returns:
PLC_Node the noise source is located on
Ptr<SpectrumValue> ns3::PLC_NoiseSource::GetNoisePsd ( void  ) [inline]
Returns:
The used noise power spectral density

Get noise source type

Returns:
The type of this noise source
void ns3::PLC_NoiseSource::Init ( void  )

Initialize the noise source, i.e. create the transmit interface on the bounded node

Warning:
To be done before calling PLC_Channel::InitTransmissionChannels(), otherwise the noise source will not be known by the channel
Returns:
True is noise source is enabled
void ns3::PLC_NoiseSource::SetChannel ( Ptr< PLC_Channel channel) [inline]

Set the channel the noise source is connected to

Parameters:
channelPLC_Channel
void ns3::PLC_NoiseSource::SetNode ( Ptr< PLC_Node node) [inline]

Bind the noise source to a specific PLC_Node

Parameters:
node
void ns3::PLC_NoiseSource::SetNoisePsd ( Ptr< SpectrumValue >  psd) [inline]

Set the noise power spectral density

Parameters:
psdThe noise power spectral density

The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations