Satellite channel implementation. More...
#include "satellite-channel.h"
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< SatFreeSpaceLoss > | GetFreeSpaceLoss () 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< SatFreeSpaceLoss > | m_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... | |
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:
Definition at line 66 of file satellite-channel.h.
typedef Callback<double, SatEnums::ChannelType_t, uint32_t, uint32_t> ns3::SatChannel::CarrierFreqConverter |
channelType | The type of channel |
freqId | The id of the carrier |
carrierId | The id of the carrier |
Definition at line 109 of file satellite-channel.h.
typedef std::vector<Ptr<SatPhyRx> > ns3::SatChannel::PhyRxContainer |
Define type PhyRxContainer.
Definition at line 100 of file satellite-channel.h.
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 84 of file satellite-channel.h.
ns3::SatChannel::SatChannel | ( | ) |
Default constructor.
Definition at line 58 of file satellite-channel.cc.
|
virtual |
Destructor for SatChannel.
Definition at line 81 of file satellite-channel.cc.
|
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.
phyRx | the SatPhyRx instance to be added to the channel as a receiver. |
Definition at line 142 of file satellite-channel.cc.
References m_phyRxContainer.
|
privatevirtual |
Dispose SatChannel.
Definition at line 87 of file satellite-channel.cc.
References m_phyRxContainer, and m_propagationDelay.
|
private |
Function for fading output trace.
rxParams | Rx parameters |
phyRx | The receiver SatPhyRx entity |
fadingValue | fading value |
Definition at line 530 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().
|
private |
Function for Rx power input trace from C/N0 values.
rxParams | Rx parameters |
phyRx | The receiver SatPhyRx entity |
Definition at line 449 of file satellite-channel.cc.
References ns3::SatConstVariables::BOLTZMANN_CONSTANT, DoRxPowerCalculation(), 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().
|
private |
Function for calculating the Rx power.
rxParams | Rx parameters |
phyRx | The 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 564 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().
|
private |
Function for Rx power input trace.
rxParams | Rx parameters |
phyRx | The receiver SatPhyRx entity |
Definition at line 401 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().
|
private |
Function for Rx power output trace.
rxParams | Rx parameters |
phyRx | The receiver SatPhyRx entity |
Definition at line 357 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().
|
virtual |
Get the type of the channel.
Definition at line 728 of file satellite-channel.cc.
References m_channelType, and ns3::SatEnums::UNKNOWN_CH.
|
virtual |
Get a device for a certain receiver index.
i | Index |
Definition at line 777 of file satellite-channel.cc.
References m_phyRxContainer.
|
private |
Function for getting the external source fading value.
rxParams | Rx parameters |
phyRx | The receiver SatPhyRx entity |
Definition at line 628 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().
|
virtual |
Get the propagation delay model used in the SatChannel.
Definition at line 762 of file satellite-channel.cc.
References m_freeSpaceLoss.
|
virtual |
Definition at line 770 of file satellite-channel.cc.
References m_phyRxContainer.
|
virtual |
Get the propagation delay model to be used in the SatChannel.
Definition at line 745 of file satellite-channel.cc.
References m_propagationDelay.
|
private |
Function for getting the source MAC address from Rx parameters.
TODO get rid of source MAC address peeking.
rxParams | Rx parameters |
Definition at line 676 of file satellite-channel.cc.
References ns3::SatMacTag::GetSourceAddress().
Referenced by DoFadingOutputTrace(), DoRxCnoInputTrace(), DoRxPowerCalculation(), DoRxPowerInputTrace(), DoRxPowerOutputTrace(), and GetExternalFadingTrace().
|
static |
Get the type ID.
Definition at line 96 of file satellite-channel.cc.
References ALL_BEAMS, m_enableExternalFadingInputTrace, m_enableFadingOutputTrace, m_enableRxPowerOutputTrace, m_fwdMode, m_rxPowerCalculationMode, ONLY_DEST_BEAM, ONLY_DEST_NODE, ns3::SatEnums::RX_CNO_INPUT_TRACE, ns3::SatEnums::RX_PWR_CALCULATION, and ns3::SatEnums::RX_PWR_INPUT_TRACE.
|
virtual |
This method is used to remove a SatPhyRx instance from a SatChannel instance, e.g.
due to a spot-beam handover
phyRx | the SatPhyRx instance to be removed from the channel. |
Definition at line 150 of file satellite-channel.cc.
References m_phyRxContainer.
|
private |
Used internally to schedule the StartRx method call after the propagation delay.
rxParams | Parameters of the signal being received |
phyRx | The 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 276 of file satellite-channel.cc.
References m_propagationDelay, and StartRx().
Referenced by StartTx().
|
virtual |
Set the bandwidth converter callback.
converter | The bandwidth converter callback. |
Definition at line 720 of file satellite-channel.cc.
References m_carrierBandwidthConverter.
|
virtual |
Set the type of the channel.
chType | Type of the channel. |
Definition at line 695 of file satellite-channel.cc.
References m_channelType, and ns3::SatEnums::UNKNOWN_CH.
Referenced by ns3::SatBeamHelper::GetChannelPair().
|
virtual |
Set the propagation delay model to be used in the SatChannel.
delay | Ptr to the propagation delay model to be used. |
Definition at line 754 of file satellite-channel.cc.
References m_freeSpaceLoss.
|
virtual |
Set the frequency converter callback.
converter | The frequency converter callback. |
Definition at line 712 of file satellite-channel.cc.
References m_carrierFreqConverter.
|
virtual |
Set the frequency id of the channel.
freqId | The frequency id of the channel. |
Definition at line 704 of file satellite-channel.cc.
References m_freqId.
|
virtual |
Set the propagation delay model to be used in the SatChannel.
delay | Ptr to the propagation delay model to be used. |
Definition at line 737 of file satellite-channel.cc.
References m_propagationDelay.
|
private |
Used internally to start the packet reception of at the phyRx.
rxParams | Parameters of the signal being received |
phyRx | The receiver SatPhyRx entity |
Definition at line 319 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().
|
virtual |
Used by attached SatPhyTx instances to transmit signals to the channel.
params | the 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 164 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().
|
private |
Bandwidth converter callback.
Definition at line 225 of file satellite-channel.h.
Referenced by DoRxCnoInputTrace(), DoRxPowerInputTrace(), DoRxPowerOutputTrace(), and SetBandwidthConverter().
|
private |
Frequency converter callback.
Definition at line 220 of file satellite-channel.h.
Referenced by SetFrequencyConverter(), and StartRx().
|
private |
Type of the channel.
Definition at line 215 of file satellite-channel.h.
Referenced by DoFadingOutputTrace(), DoRxCnoInputTrace(), DoRxPowerCalculation(), DoRxPowerInputTrace(), DoRxPowerOutputTrace(), GetChannelType(), GetExternalFadingTrace(), SetChannelType(), StartRx(), and StartTx().
|
private |
Defines whether external fading input tracing is in use or not.
Definition at line 260 of file satellite-channel.h.
Referenced by DoRxCnoInputTrace(), DoRxPowerCalculation(), DoRxPowerInputTrace(), and GetTypeId().
|
private |
Defines whether fading output tracing is in use or not.
Definition at line 255 of file satellite-channel.h.
Referenced by DoRxPowerCalculation(), and GetTypeId().
|
private |
Defines whether Rx power output tracing is in use or not.
Definition at line 250 of file satellite-channel.h.
Referenced by GetTypeId(), and StartRx().
|
private |
Free space loss model to be used with this channel.
Definition at line 240 of file satellite-channel.h.
Referenced by DoRxPowerCalculation(), GetFreeSpaceLoss(), and SetFreeSpaceLoss().
|
private |
Frequency id of the channel.
Definition at line 230 of file satellite-channel.h.
Referenced by SetFrequencyId(), and StartRx().
|
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 205 of file satellite-channel.h.
Referenced by GetTypeId(), and StartTx().
|
private |
Container of SatPhyRx instances attached to the channel.
Definition at line 210 of file satellite-channel.h.
Referenced by AddRx(), DoDispose(), GetDevice(), GetNDevices(), RemoveRx(), and StartTx().
|
private |
Propagation delay model to be used with this channel.
Definition at line 235 of file satellite-channel.h.
Referenced by DoDispose(), GetPropagationDelayModel(), ScheduleRx(), and SetPropagationDelayModel().
|
private |
Defines the mode used for Rx power calculation.
Definition at line 245 of file satellite-channel.h.
Referenced by GetTypeId(), and StartRx().