ns3::SatChannel Class Reference

Satellite channel implementation. More...

#include "satellite-channel.h"

+ Inheritance diagram for ns3::SatChannel:
+ Collaboration diagram for ns3::SatChannel:

Public Types

typedef Callback< double, SatEnums::ChannelType_t, uint32_t, uint32_t > CarrierFreqConverter
 
typedef std::vector< Ptr< SatPhyRx > > PhyRxContainer
 Define type PhyRxContainer. More...
 
enum  SatChannelFwdMode_e { ONLY_DEST_NODE , ONLY_DEST_BEAM , ALL_BEAMS }
 ONLY_DEST_NODE = only the receivers to which this transmission is intended to shall receive the packet ONLY_DEST_BEAM = only the receivers within the proper spot-beam shall receive the packet ALL_BEAMS = all receivers in the channel shall receive the packet. More...
 

Public Member Functions

 SatChannel ()
 Default constructor. More...
 
virtual ~SatChannel ()
 Destructor for SatChannel. More...
 
virtual void AddRx (Ptr< SatPhyRx > phyRx)
 This method is used to attach the receiver entity SatPhyRx instance to a SatChannel instance, so that the SatPhyRx can receive packets sent on that channel. More...
 
virtual SatEnums::ChannelType_t GetChannelType ()
 Get the type of the channel. More...
 
virtual Ptr< NetDevice > GetDevice (std::size_t i) const
 Get a device for a certain receiver index. More...
 
virtual Ptr< SatFreeSpaceLossGetFreeSpaceLoss () const
 Get the propagation delay model used in the SatChannel. More...
 
virtual std::size_t GetNDevices (void) const
 
virtual Ptr< PropagationDelayModel > GetPropagationDelayModel ()
 Get the propagation delay model to be used in the SatChannel. More...
 
virtual void RemoveRx (Ptr< SatPhyRx > phyRx)
 This method is used to remove a SatPhyRx instance from a SatChannel instance, e.g. More...
 
virtual void SetBandwidthConverter (SatTypedefs::CarrierBandwidthConverter_t converter)
 Set the bandwidth converter callback. More...
 
virtual void SetChannelType (SatEnums::ChannelType_t chType)
 Set the type of the channel. More...
 
virtual void SetFreeSpaceLoss (Ptr< SatFreeSpaceLoss > delay)
 Set the propagation delay model to be used in the SatChannel. More...
 
virtual void SetFrequencyConverter (CarrierFreqConverter converter)
 Set the frequency converter callback. More...
 
virtual void SetFrequencyId (uint32_t freqId)
 Set the frequency id of the channel. More...
 
virtual void SetPropagationDelayModel (Ptr< PropagationDelayModel > delay)
 Set the propagation delay model to be used in the SatChannel. More...
 
virtual void StartTx (Ptr< SatSignalParameters > params)
 Used by attached SatPhyTx instances to transmit signals to the channel. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Member Functions

virtual void DoDispose ()
 Dispose SatChannel. More...
 
void DoFadingOutputTrace (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx, double fadingValue)
 Function for fading output trace. More...
 
void DoRxCnoInputTrace (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx)
 Function for Rx power input trace from C/N0 values. More...
 
void DoRxPowerCalculation (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx)
 Function for calculating the Rx power. More...
 
void DoRxPowerInputTrace (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx)
 Function for Rx power input trace. More...
 
void DoRxPowerOutputTrace (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx)
 Function for Rx power output trace. More...
 
double GetExternalFadingTrace (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx)
 Function for getting the external source fading value. More...
 
Mac48Address GetSourceAddress (Ptr< SatSignalParameters > rxParams)
 Function for getting the source MAC address from Rx parameters. More...
 
void ScheduleRx (Ptr< SatSignalParameters > txParams, Ptr< SatPhyRx > phyRx)
 Used internally to schedule the StartRx method call after the propagation delay. More...
 
void StartRx (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx)
 Used internally to start the packet reception of at the phyRx. More...
 

Private Attributes

SatTypedefs::CarrierBandwidthConverter_t m_carrierBandwidthConverter
 Bandwidth converter callback. More...
 
CarrierFreqConverter m_carrierFreqConverter
 Frequency converter callback. More...
 
SatEnums::ChannelType_t m_channelType
 Type of the channel. More...
 
bool m_enableExternalFadingInputTrace
 Defines whether external fading input tracing is in use or not. More...
 
bool m_enableFadingOutputTrace
 Defines whether fading output tracing is in use or not. More...
 
bool m_enableRxPowerOutputTrace
 Defines whether Rx power output tracing is in use or not. More...
 
Ptr< SatFreeSpaceLossm_freeSpaceLoss
 Free space loss model to be used with this channel. More...
 
uint32_t m_freqId
 Frequency id of the channel. More...
 
SatChannelFwdMode_e m_fwdMode
 Forwarding mode of the SatChannel: SINGLE_RX = only the proper receiver of the packet shall receive the packet MULTI_RX = all receivers in the channel shall receive the packet. More...
 
PhyRxContainer m_phyRxContainer
 Container of SatPhyRx instances attached to the channel. More...
 
Ptr< PropagationDelayModel > m_propagationDelay
 Propagation delay model to be used with this channel. More...
 
SatEnums::RxPowerCalculationMode_t m_rxPowerCalculationMode
 Defines the mode used for Rx power calculation. More...
 

Detailed Description

Satellite channel implementation.

Satellite channel is responsible of passing through packets from the transmitter to the receiver. One SatChannel is mapped into a frequency band, which means that there may be several nodes (UTs, GWs, satellite receivers) attached to the same channel as a transmitter or a receiver. There may be also several spot-beams using the same SatChannel, i.e. the ones which are using the same frequency band. This enables the per- packet interference calculation at the receiver side. Receiver checks all incoming packets whether they are intended to be received or whether the packet is causing interference with a certain received power.

The main tasks of the SatChannel are:

  • Pass through packets to a set of receivers
  • Calculate the propagation delay for the packet based on propagation delay model
  • Calculate the received signal power for the packet based on free-space loss model and fading (Markov/Loo)
  • Handle the fading input/output trace functionality

Definition at line 62 of file satellite-channel.h.

Member Typedef Documentation

◆ CarrierFreqConverter

typedef Callback<double, SatEnums::ChannelType_t, uint32_t, uint32_t> ns3::SatChannel::CarrierFreqConverter
Parameters
channelTypeThe type of channel
freqIdThe id of the carrier
carrierIdThe id of the carrier
Returns
The center frequency of the carrier.

Definition at line 105 of file satellite-channel.h.

◆ PhyRxContainer

typedef std::vector<Ptr<SatPhyRx> > ns3::SatChannel::PhyRxContainer

Define type PhyRxContainer.

Definition at line 96 of file satellite-channel.h.

Member Enumeration Documentation

◆ SatChannelFwdMode_e

ONLY_DEST_NODE = only the receivers to which this transmission is intended to shall receive the packet ONLY_DEST_BEAM = only the receivers within the proper spot-beam shall receive the packet ALL_BEAMS = all receivers in the channel shall receive the packet.

Enumerator
ONLY_DEST_NODE 
ONLY_DEST_BEAM 
ALL_BEAMS 

Definition at line 80 of file satellite-channel.h.

Constructor & Destructor Documentation

◆ SatChannel()

ns3::SatChannel::SatChannel ( )

Default constructor.

Definition at line 55 of file satellite-channel.cc.

◆ ~SatChannel()

ns3::SatChannel::~SatChannel ( )
virtual

Destructor for SatChannel.

Definition at line 78 of file satellite-channel.cc.

Member Function Documentation

◆ AddRx()

void ns3::SatChannel::AddRx ( Ptr< SatPhyRx phyRx)
virtual

This method is used to attach the receiver entity SatPhyRx instance to a SatChannel instance, so that the SatPhyRx can receive packets sent on that channel.

Parameters
phyRxthe SatPhyRx instance to be added to the channel as a receiver.

Definition at line 138 of file satellite-channel.cc.

References m_phyRxContainer.

◆ DoDispose()

void ns3::SatChannel::DoDispose ( void  )
privatevirtual

Dispose SatChannel.

Definition at line 84 of file satellite-channel.cc.

References m_phyRxContainer, and m_propagationDelay.

◆ DoFadingOutputTrace()

void ns3::SatChannel::DoFadingOutputTrace ( Ptr< SatSignalParameters rxParams,
Ptr< SatPhyRx phyRx,
double  fadingValue 
)
private

Function for fading output trace.

Parameters
rxParamsRx parameters
phyRxThe receiver SatPhyRx entity
fadingValuefading value

Definition at line 525 of file satellite-channel.cc.

References ns3::SatEnums::FORWARD_FEEDER_CH, ns3::SatEnums::FORWARD_USER_CH, GetSourceAddress(), m_channelType, ns3::SatEnums::RETURN_FEEDER_CH, and ns3::SatEnums::RETURN_USER_CH.

Referenced by DoRxPowerCalculation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRxCnoInputTrace()

void ns3::SatChannel::DoRxCnoInputTrace ( Ptr< SatSignalParameters rxParams,
Ptr< SatPhyRx phyRx 
)
private

◆ DoRxPowerCalculation()

void ns3::SatChannel::DoRxPowerCalculation ( Ptr< SatSignalParameters rxParams,
Ptr< SatPhyRx phyRx 
)
private

Function for calculating the Rx power.

Parameters
rxParamsRx parameters
phyRxThe receiver SatPhyRx entity

Get the external (weather) fading trace value from the external fading container. The external fading is considered to be loss, thus it is taken into account at the end of the function by dividing in linear format.

Do fading output trace. Note, that the external fading is not utilized in fading output, but only the s.c. internal (Markov) fading provided by the simulator.

Definition at line 559 of file satellite-channel.cc.

References DoFadingOutputTrace(), ns3::SatEnums::FORWARD_FEEDER_CH, ns3::SatEnums::FORWARD_USER_CH, GetExternalFadingTrace(), GetSourceAddress(), m_channelType, m_enableExternalFadingInputTrace, m_enableFadingOutputTrace, m_freeSpaceLoss, ns3::SatEnums::RETURN_FEEDER_CH, and ns3::SatEnums::RETURN_USER_CH.

Referenced by DoRxCnoInputTrace(), and StartRx().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRxPowerInputTrace()

void ns3::SatChannel::DoRxPowerInputTrace ( Ptr< SatSignalParameters rxParams,
Ptr< SatPhyRx phyRx 
)
private

Function for Rx power input trace.

Parameters
rxParamsRx parameters
phyRxThe receiver SatPhyRx entity

Definition at line 396 of file satellite-channel.cc.

References ns3::SatEnums::EFFECTIVE_BANDWIDTH, ns3::SatEnums::FORWARD_FEEDER_CH, ns3::SatEnums::FORWARD_USER_CH, ns3::SatEnums::GetChannelTypeName(), GetExternalFadingTrace(), GetSourceAddress(), ns3::SatUtils::LinearToDb(), m_carrierBandwidthConverter, m_channelType, m_enableExternalFadingInputTrace, ns3::SatEnums::RETURN_FEEDER_CH, and ns3::SatEnums::RETURN_USER_CH.

Referenced by StartRx().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoRxPowerOutputTrace()

void ns3::SatChannel::DoRxPowerOutputTrace ( Ptr< SatSignalParameters rxParams,
Ptr< SatPhyRx phyRx 
)
private

Function for Rx power output trace.

Parameters
rxParamsRx parameters
phyRxThe receiver SatPhyRx entity

Definition at line 352 of file satellite-channel.cc.

References ns3::SatEnums::EFFECTIVE_BANDWIDTH, ns3::SatEnums::FORWARD_FEEDER_CH, ns3::SatEnums::FORWARD_USER_CH, ns3::SatEnums::GetChannelTypeName(), GetSourceAddress(), ns3::SatUtils::LinearToDb(), m_carrierBandwidthConverter, m_channelType, ns3::SatEnums::RETURN_FEEDER_CH, and ns3::SatEnums::RETURN_USER_CH.

Referenced by StartRx().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetChannelType()

SatEnums::ChannelType_t ns3::SatChannel::GetChannelType ( )
virtual

Get the type of the channel.

Returns
Type of the channel.

Definition at line 723 of file satellite-channel.cc.

References m_channelType, and ns3::SatEnums::UNKNOWN_CH.

◆ GetDevice()

Ptr< NetDevice > ns3::SatChannel::GetDevice ( std::size_t  i) const
virtual

Get a device for a certain receiver index.

Parameters
iIndex
Returns
A netdevice attached to this channel

Definition at line 772 of file satellite-channel.cc.

References m_phyRxContainer.

◆ GetExternalFadingTrace()

double ns3::SatChannel::GetExternalFadingTrace ( Ptr< SatSignalParameters rxParams,
Ptr< SatPhyRx phyRx 
)
private

Function for getting the external source fading value.

Parameters
rxParamsRx parameters
phyRxThe receiver SatPhyRx entity
Returns
fading value

Definition at line 623 of file satellite-channel.cc.

References ns3::SatEnums::FORWARD_FEEDER_CH, ns3::SatEnums::FORWARD_USER_CH, GetSourceAddress(), m_channelType, ns3::SatEnums::RETURN_FEEDER_CH, and ns3::SatEnums::RETURN_USER_CH.

Referenced by DoRxCnoInputTrace(), DoRxPowerCalculation(), and DoRxPowerInputTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetFreeSpaceLoss()

Ptr< SatFreeSpaceLoss > ns3::SatChannel::GetFreeSpaceLoss ( ) const
virtual

Get the propagation delay model used in the SatChannel.

Returns
Ptr to the propagation delay model used.

Definition at line 757 of file satellite-channel.cc.

References m_freeSpaceLoss.

◆ GetNDevices()

std::size_t ns3::SatChannel::GetNDevices ( void  ) const
virtual
Returns
Number of receivers in the channel

Definition at line 765 of file satellite-channel.cc.

References m_phyRxContainer.

◆ GetPropagationDelayModel()

Ptr< PropagationDelayModel > ns3::SatChannel::GetPropagationDelayModel ( )
virtual

Get the propagation delay model to be used in the SatChannel.

Returns
Ptr to the propagation delay model to be used.

Definition at line 740 of file satellite-channel.cc.

References m_propagationDelay.

◆ GetSourceAddress()

Mac48Address ns3::SatChannel::GetSourceAddress ( Ptr< SatSignalParameters rxParams)
private

Function for getting the source MAC address from Rx parameters.

TODO get rid of source MAC address peeking.

Parameters
rxParamsRx parameters
Returns
source MAC address

Definition at line 671 of file satellite-channel.cc.

References ns3::SatMacTag::GetSourceAddress().

Referenced by DoFadingOutputTrace(), DoRxCnoInputTrace(), DoRxPowerCalculation(), DoRxPowerInputTrace(), DoRxPowerOutputTrace(), and GetExternalFadingTrace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypeId()

◆ RemoveRx()

void ns3::SatChannel::RemoveRx ( Ptr< SatPhyRx phyRx)
virtual

This method is used to remove a SatPhyRx instance from a SatChannel instance, e.g.

due to a spot-beam handover

Parameters
phyRxthe SatPhyRx instance to be removed from the channel.

Definition at line 145 of file satellite-channel.cc.

References m_phyRxContainer.

◆ ScheduleRx()

void ns3::SatChannel::ScheduleRx ( Ptr< SatSignalParameters txParams,
Ptr< SatPhyRx phyRx 
)
private

Used internally to schedule the StartRx method call after the propagation delay.

Parameters
rxParamsParameters of the signal being received
phyRxThe receiver SatPhyRx entity

In transparent mode (at the satellite), the satellite should start transmitting the packet right away when its reception is started. Thus, there is no delay of the burst duration (between the reception and transmission) at the satellite at all.

In satellite model, propagation delay should be always set by using SetPropagationDelayModel () method!

Definition at line 271 of file satellite-channel.cc.

References m_propagationDelay, and StartRx().

Referenced by StartTx().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetBandwidthConverter()

void ns3::SatChannel::SetBandwidthConverter ( SatTypedefs::CarrierBandwidthConverter_t  converter)
virtual

Set the bandwidth converter callback.

Parameters
converterThe bandwidth converter callback.

Definition at line 715 of file satellite-channel.cc.

References m_carrierBandwidthConverter.

◆ SetChannelType()

void ns3::SatChannel::SetChannelType ( SatEnums::ChannelType_t  chType)
virtual

Set the type of the channel.

Parameters
chTypeType of the channel.

Definition at line 690 of file satellite-channel.cc.

References m_channelType, and ns3::SatEnums::UNKNOWN_CH.

Referenced by ns3::SatBeamHelper::GetChannelPair().

+ Here is the caller graph for this function:

◆ SetFreeSpaceLoss()

void ns3::SatChannel::SetFreeSpaceLoss ( Ptr< SatFreeSpaceLoss delay)
virtual

Set the propagation delay model to be used in the SatChannel.

Parameters
delayPtr to the propagation delay model to be used.

Definition at line 749 of file satellite-channel.cc.

References m_freeSpaceLoss.

◆ SetFrequencyConverter()

void ns3::SatChannel::SetFrequencyConverter ( CarrierFreqConverter  converter)
virtual

Set the frequency converter callback.

Parameters
converterThe frequency converter callback.

Definition at line 707 of file satellite-channel.cc.

References m_carrierFreqConverter.

◆ SetFrequencyId()

void ns3::SatChannel::SetFrequencyId ( uint32_t  freqId)
virtual

Set the frequency id of the channel.

Parameters
freqIdThe frequency id of the channel.

Definition at line 699 of file satellite-channel.cc.

References m_freqId.

◆ SetPropagationDelayModel()

void ns3::SatChannel::SetPropagationDelayModel ( Ptr< PropagationDelayModel >  delay)
virtual

Set the propagation delay model to be used in the SatChannel.

Parameters
delayPtr to the propagation delay model to be used.

Definition at line 732 of file satellite-channel.cc.

References m_propagationDelay.

◆ StartRx()

void ns3::SatChannel::StartRx ( Ptr< SatSignalParameters rxParams,
Ptr< SatPhyRx phyRx 
)
private

Used internally to start the packet reception of at the phyRx.

Parameters
rxParamsParameters of the signal being received
phyRxThe receiver SatPhyRx entity

Definition at line 314 of file satellite-channel.cc.

References DoRxCnoInputTrace(), DoRxPowerCalculation(), DoRxPowerInputTrace(), DoRxPowerOutputTrace(), m_carrierFreqConverter, m_channelType, m_enableRxPowerOutputTrace, m_freqId, m_rxPowerCalculationMode, ns3::SatEnums::RX_CNO_INPUT_TRACE, ns3::SatEnums::RX_PWR_CALCULATION, and ns3::SatEnums::RX_PWR_INPUT_TRACE.

Referenced by ScheduleRx().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StartTx()

void ns3::SatChannel::StartTx ( Ptr< SatSignalParameters params)
virtual

Used by attached SatPhyTx instances to transmit signals to the channel.

Parameters
paramsthe parameters of the signals being transmitted

The packet shall be received by only by the receivers to whom this transmission is intended to. Note, that with ONLY_DEST_NODE mode, the PerPacket interference may not be used, since there will be no interference.

The packet shall be received by only by the receivers within the same spot-beam. Note, that with ONLY_DEST_BEAM mode, the PerPacket interference may not be used, since there will be no interference.

The packet shall be received by all the receivers in the channel. The intended receiver shall receive the packet, while other receivers in the channel see the packet as co-channel interference. Note, that ALL_BEAMS mode is needed by the PerPacket interference.

Definition at line 159 of file satellite-channel.cc.

References ALL_BEAMS, ns3::SatEnums::FORWARD_FEEDER_CH, ns3::SatEnums::FORWARD_USER_CH, ns3::SatMacTag::GetDestAddress(), m_channelType, m_fwdMode, m_phyRxContainer, ONLY_DEST_BEAM, ONLY_DEST_NODE, ns3::SatEnums::RETURN_FEEDER_CH, ns3::SatEnums::RETURN_USER_CH, and ScheduleRx().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_carrierBandwidthConverter

SatTypedefs::CarrierBandwidthConverter_t ns3::SatChannel::m_carrierBandwidthConverter
private

Bandwidth converter callback.

Definition at line 221 of file satellite-channel.h.

Referenced by DoRxCnoInputTrace(), DoRxPowerInputTrace(), DoRxPowerOutputTrace(), and SetBandwidthConverter().

◆ m_carrierFreqConverter

CarrierFreqConverter ns3::SatChannel::m_carrierFreqConverter
private

Frequency converter callback.

Definition at line 216 of file satellite-channel.h.

Referenced by SetFrequencyConverter(), and StartRx().

◆ m_channelType

◆ m_enableExternalFadingInputTrace

bool ns3::SatChannel::m_enableExternalFadingInputTrace
private

Defines whether external fading input tracing is in use or not.

Definition at line 256 of file satellite-channel.h.

Referenced by DoRxCnoInputTrace(), DoRxPowerCalculation(), DoRxPowerInputTrace(), and GetTypeId().

◆ m_enableFadingOutputTrace

bool ns3::SatChannel::m_enableFadingOutputTrace
private

Defines whether fading output tracing is in use or not.

Definition at line 251 of file satellite-channel.h.

Referenced by DoRxPowerCalculation(), and GetTypeId().

◆ m_enableRxPowerOutputTrace

bool ns3::SatChannel::m_enableRxPowerOutputTrace
private

Defines whether Rx power output tracing is in use or not.

Definition at line 246 of file satellite-channel.h.

Referenced by GetTypeId(), and StartRx().

◆ m_freeSpaceLoss

Ptr<SatFreeSpaceLoss> ns3::SatChannel::m_freeSpaceLoss
private

Free space loss model to be used with this channel.

Definition at line 236 of file satellite-channel.h.

Referenced by DoRxPowerCalculation(), GetFreeSpaceLoss(), and SetFreeSpaceLoss().

◆ m_freqId

uint32_t ns3::SatChannel::m_freqId
private

Frequency id of the channel.

Definition at line 226 of file satellite-channel.h.

Referenced by SetFrequencyId(), and StartRx().

◆ m_fwdMode

SatChannelFwdMode_e ns3::SatChannel::m_fwdMode
private

Forwarding mode of the SatChannel: SINGLE_RX = only the proper receiver of the packet shall receive the packet MULTI_RX = all receivers in the channel shall receive the packet.

Definition at line 201 of file satellite-channel.h.

Referenced by GetTypeId(), and StartTx().

◆ m_phyRxContainer

PhyRxContainer ns3::SatChannel::m_phyRxContainer
private

Container of SatPhyRx instances attached to the channel.

Definition at line 206 of file satellite-channel.h.

Referenced by AddRx(), DoDispose(), GetDevice(), GetNDevices(), RemoveRx(), and StartTx().

◆ m_propagationDelay

Ptr<PropagationDelayModel> ns3::SatChannel::m_propagationDelay
private

Propagation delay model to be used with this channel.

Definition at line 231 of file satellite-channel.h.

Referenced by DoDispose(), GetPropagationDelayModel(), ScheduleRx(), and SetPropagationDelayModel().

◆ m_rxPowerCalculationMode

SatEnums::RxPowerCalculationMode_t ns3::SatChannel::m_rxPowerCalculationMode
private

Defines the mode used for Rx power calculation.

Definition at line 241 of file satellite-channel.h.

Referenced by GetTypeId(), and StartRx().


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