ns-3
ns3::SingleModelSpectrumChannel Class Reference

SpectrumChannel implementation which handles a single spectrum model. More...

#include <single-model-spectrum-channel.h>

Inheritance diagram for ns3::SingleModelSpectrumChannel:
Collaboration diagram for ns3::SingleModelSpectrumChannel:

List of all members.

Public Types

typedef std::vector< Ptr
< SpectrumPhy > > 
PhyList

Public Member Functions

virtual void AddPropagationLossModel (Ptr< PropagationLossModel > loss)
virtual void AddSpectrumPropagationLossModel (Ptr< SpectrumPropagationLossModel > loss)
virtual void SetPropagationDelayModel (Ptr< PropagationDelayModel > delay)
virtual void AddRx (Ptr< SpectrumPhy > phy)
 add a SpectrumPhy to a channel, so it can receive packets
virtual void StartTx (Ptr< SpectrumSignalParameters > params)
virtual uint32_t GetNDevices (void) const
virtual Ptr< NetDeviceGetDevice (uint32_t i) const
virtual Ptr
< SpectrumPropagationLossModel
GetSpectrumPropagationLossModel (void)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::SingleModelSpectrumChannel.

Detailed Description

SpectrumChannel implementation which handles a single spectrum model.

All SpectrumPhy layers attached to this SpectrumChannel


Member Function Documentation

set the single-frequency propagation loss model to be used

Warning:
only models that do not depend on the TX power should be used.
Parameters:
lossa pointer to the propagation loss model to be used.

Implements ns3::SpectrumChannel.

References NS_ASSERT, and NS_LOG_FUNCTION.

add a SpectrumPhy to a channel, so it can receive packets

This method is used to attach a SpectrumPhy instance to a SpectrumChannel instance, so that the SpectrumPhy can receive packets sent on that channel. Note that a SpectrumPhy that only transmits (without receiveing ever) does not need to be added to the channel.

This method is to be implemented by all classes inheriting from SpectrumChannel.

Parameters:
phythe SpectrumPhy instance to be added to the channel as a receiver.

Implements ns3::SpectrumChannel.

References NS_LOG_FUNCTION.

set the frequency-dependent propagation loss model to be used

Parameters:
lossa pointer to the propagation loss model to be used.

Implements ns3::SpectrumChannel.

References NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::LteHelper::LteHelper().

Ptr< NetDevice > ns3::SingleModelSpectrumChannel::GetDevice ( uint32_t  i) const [virtual]
Parameters:
iindex of NetDevice to retrieve
Returns:
one of the NetDevices connected to this channel.

This method must be implemented by subclasses.

Implements ns3::Channel.

References NS_LOG_FUNCTION.

uint32_t ns3::SingleModelSpectrumChannel::GetNDevices ( void  ) const [virtual]
Returns:
the number of NetDevices connected to this Channel.

This method must be implemented by subclasses.

Implements ns3::Channel.

References NS_LOG_FUNCTION.

This method returns the TypeId associated to ns3::SingleModelSpectrumChannel.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Channel/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Channel/$ns3::SpectrumChannel/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::SpectrumChannel/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::SpectrumChannel/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Channel/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Channel/$ns3::SpectrumChannel/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::ChannelListPriv/ChannelList/[i]/$ns3::SpectrumChannel/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::SingleModelSpectrumChannel
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::SpectrumChannel/$ns3::SingleModelSpectrumChannel

Attributes defined for this type:

  • MaxLossDb: If a single-frequency PropagationLossModel is used, this value represents the maximum loss in dB for which transmissions will be passed to the receiving PHY. Signals for which the PropagationLossModel returns a loss bigger than this value will not be propagated to the receiver. This parameter is to be used to reduce the computational load by not propagating signals that are far beyond the interference range. Note that the default value corresponds to considering all signals for reception. Tune this value with care.
    • Set with class: ns3::DoubleValue
    • Underlying type: double -1.79769e+308:1.79769e+308
    • Initial value: 1e+09
    • Flags: construct write read

Attributes defined in parent class ns3::Channel:

TraceSources defined for this type:

  • PropagationLoss: If a PropagationLossModel is plugged on the channel, this trace is fired whenever a new path loss value is calculated. The first and second parameters to the trace are pointers respectively to the TX and RX SpectrumPhy instances, whereas the third parameters is the loss value in dB. Note that the loss value reported by this trace is the single-frequency loss value obtained by PropagationLossModel, and is not affected by whether an additional SpectrumPropagationLossModel is being used or not.

Reimplemented from ns3::SpectrumChannel.

References ns3::MakeTraceSourceAccessor(), NS_LOG_FUNCTION_NOARGS, and ns3::TypeId::SetParent().

set the propagation delay model to be used

Parameters:
delayPtr to the propagation delay model to be used.

Implements ns3::SpectrumChannel.

References NS_ASSERT, and NS_LOG_FUNCTION.


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