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. | |
| 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. | |
| virtual | ~SatChannel () |
| Destructor for SatChannel. | |
| 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. | |
| virtual SatEnums::ChannelType_t | GetChannelType () |
| Get the type of the channel. | |
| virtual Ptr< NetDevice > | GetDevice (std::size_t i) const |
| Get a device for a certain receiver index. | |
| virtual Ptr< SatFreeSpaceLoss > | GetFreeSpaceLoss () const |
| Get the propagation delay model used in the SatChannel. | |
| virtual std::size_t | GetNDevices (void) const |
| virtual Ptr< PropagationDelayModel > | GetPropagationDelayModel () |
| Get the propagation delay model to be used in the SatChannel. | |
| virtual void | NotifyConstructionCompleted () override |
| Notifier called once the ObjectBase is fully constructed. | |
| virtual void | RemoveRx (Ptr< SatPhyRx > phyRx) |
| This method is used to remove a SatPhyRx instance from a SatChannel instance, e.g. | |
| virtual void | SetBandwidthConverter (SatTypedefs::CarrierBandwidthConverter_t converter) |
| Set the bandwidth converter callback. | |
| virtual void | SetChannelType (SatEnums::ChannelType_t chType) |
| Set the type of the channel. | |
| virtual void | SetFreeSpaceLoss (Ptr< SatFreeSpaceLoss > delay) |
| Set the propagation delay model to be used in the SatChannel. | |
| virtual void | SetFrequencyConverter (CarrierFreqConverter converter) |
| Set the frequency converter callback. | |
| virtual void | SetFrequencyId (uint32_t freqId) |
| Set the frequency id of the channel. | |
| virtual void | SetPropagationDelayModel (Ptr< PropagationDelayModel > delay) |
| Set the propagation delay model to be used in the SatChannel. | |
| virtual void | StartTx (Ptr< SatSignalParameters > params) |
| Used by attached SatPhyTx instances to transmit signals to the channel. | |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| Get the type ID. | |
Private Member Functions | |
| virtual void | DoDispose () |
| Dispose SatChannel. | |
| void | DoFadingOutputTrace (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx, double fadingValue) |
| Function for fading output trace. | |
| void | DoRxCnoInputTrace (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx) |
| Function for Rx power input trace from C/N0 values. | |
| void | DoRxPowerCalculation (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx) |
| Function for calculating the Rx power. | |
| void | DoRxPowerInputTrace (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx) |
| Function for Rx power input trace. | |
| void | DoRxPowerOutputTrace (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx) |
| Function for Rx power output trace. | |
| double | GetExternalFadingTrace (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx) |
| Function for getting the external source fading value. | |
| Mac48Address | GetSourceAddress (Ptr< SatSignalParameters > rxParams) |
| Function for getting the source MAC address from Rx parameters. | |
| void | ScheduleRx (Ptr< SatSignalParameters > txParams, Ptr< SatPhyRx > phyRx) |
| Used internally to schedule the StartRx method call after the propagation delay. | |
| void | StartRx (Ptr< SatSignalParameters > rxParams, Ptr< SatPhyRx > phyRx) |
| Used internally to start the packet reception of at the phyRx. | |
Private Attributes | |
| SatTypedefs::CarrierBandwidthConverter_t | m_carrierBandwidthConverter |
| Bandwidth converter callback. | |
| CarrierFreqConverter | m_carrierFreqConverter |
| Frequency converter callback. | |
| SatEnums::ChannelType_t | m_channelType |
| Type of the channel. | |
| bool | m_enableExternalFadingInputTrace |
| Defines whether external fading input tracing is in use or not. | |
| bool | m_enableFadingOutputTrace |
| Defines whether fading output tracing is in use or not. | |
| bool | m_enableRxPowerOutputTrace |
| Defines whether Rx power output tracing is in use or not. | |
| Ptr< SatFreeSpaceLoss > | m_freeSpaceLoss |
| Free space loss model to be used with this channel. | |
| uint32_t | m_freqId |
| Frequency id of the channel. | |
| 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. | |
| PhyRxContainer | m_phyRxContainer |
| Container of SatPhyRx instances attached to the channel. | |
| Ptr< PropagationDelayModel > | m_propagationDelay |
| Propagation delay model to be used with this channel. | |
| SatEnums::RxPowerCalculationMode_t | m_rxPowerCalculationMode |
| Defines the mode used for Rx power calculation. | |
| Ptr< SatFadingExternalInputTraceContainer > | m_satFadingExternalInputTraceContainer |
| External fading input tracing container. | |
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 67 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 120 of file satellite-channel.h.
| typedef std::vector<Ptr<SatPhyRx> > ns3::SatChannel::PhyRxContainer |
Define type PhyRxContainer.
Definition at line 111 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 95 of file satellite-channel.h.
| ns3::SatChannel::SatChannel | ( | ) |
Default constructor.
Definition at line 58 of file satellite-channel.cc.
References SatChannel(), m_carrierFreqConverter, m_channelType, m_enableExternalFadingInputTrace, m_enableFadingOutputTrace, m_enableRxPowerOutputTrace, m_freeSpaceLoss, m_freqId, m_fwdMode, m_phyRxContainer, m_propagationDelay, m_rxPowerCalculationMode, m_satFadingExternalInputTraceContainer, and ONLY_DEST_BEAM.
Referenced by SatChannel().
|
virtual |
Destructor for SatChannel.
Definition at line 96 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 157 of file satellite-channel.cc.
References m_phyRxContainer.
|
privatevirtual |
Dispose SatChannel.
Definition at line 102 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 545 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 464 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 579 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 416 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 372 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 743 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 792 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 643 of file satellite-channel.cc.
References ns3::SatEnums::FORWARD_FEEDER_CH, ns3::SatEnums::FORWARD_USER_CH, GetSourceAddress(), m_channelType, m_satFadingExternalInputTraceContainer, 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 777 of file satellite-channel.cc.
References m_freeSpaceLoss.
|
virtual |
Definition at line 785 of file satellite-channel.cc.
References m_phyRxContainer.
|
virtual |
Get the propagation delay model to be used in the SatChannel.
Definition at line 760 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 691 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 111 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.
|
overridevirtual |
Notifier called once the ObjectBase is fully constructed.
This method is invoked once all member attributes have been initialized. Subclasses can override this method to be notified of this event but if they do this, they must chain up to their parent's NotifyConstructionCompleted method.
Definition at line 83 of file satellite-channel.cc.
References m_enableExternalFadingInputTrace, and m_satFadingExternalInputTraceContainer.
|
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 165 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 291 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 735 of file satellite-channel.cc.
References m_carrierBandwidthConverter.
|
virtual |
Set the type of the channel.
| chType | Type of the channel. |
Definition at line 710 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 769 of file satellite-channel.cc.
References m_freeSpaceLoss.
|
virtual |
Set the frequency converter callback.
| converter | The frequency converter callback. |
Definition at line 727 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 719 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 752 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 334 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 179 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 236 of file satellite-channel.h.
Referenced by DoRxCnoInputTrace(), DoRxPowerInputTrace(), DoRxPowerOutputTrace(), and SetBandwidthConverter().
|
private |
Frequency converter callback.
Definition at line 231 of file satellite-channel.h.
Referenced by SatChannel(), SetFrequencyConverter(), and StartRx().
|
private |
Type of the channel.
Definition at line 226 of file satellite-channel.h.
Referenced by SatChannel(), 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 271 of file satellite-channel.h.
Referenced by SatChannel(), DoRxCnoInputTrace(), DoRxPowerCalculation(), DoRxPowerInputTrace(), GetTypeId(), and NotifyConstructionCompleted().
|
private |
Defines whether fading output tracing is in use or not.
Definition at line 266 of file satellite-channel.h.
Referenced by SatChannel(), DoRxPowerCalculation(), and GetTypeId().
|
private |
Defines whether Rx power output tracing is in use or not.
Definition at line 261 of file satellite-channel.h.
Referenced by SatChannel(), GetTypeId(), and StartRx().
|
private |
Free space loss model to be used with this channel.
Definition at line 251 of file satellite-channel.h.
Referenced by SatChannel(), DoRxPowerCalculation(), GetFreeSpaceLoss(), and SetFreeSpaceLoss().
|
private |
Frequency id of the channel.
Definition at line 241 of file satellite-channel.h.
Referenced by SatChannel(), 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 216 of file satellite-channel.h.
Referenced by SatChannel(), GetTypeId(), and StartTx().
|
private |
Container of SatPhyRx instances attached to the channel.
Definition at line 221 of file satellite-channel.h.
Referenced by SatChannel(), AddRx(), DoDispose(), GetDevice(), GetNDevices(), RemoveRx(), and StartTx().
|
private |
Propagation delay model to be used with this channel.
Definition at line 246 of file satellite-channel.h.
Referenced by SatChannel(), DoDispose(), GetPropagationDelayModel(), ScheduleRx(), and SetPropagationDelayModel().
|
private |
Defines the mode used for Rx power calculation.
Definition at line 256 of file satellite-channel.h.
Referenced by SatChannel(), GetTypeId(), and StartRx().
|
private |
External fading input tracing container.
Definition at line 276 of file satellite-channel.h.
Referenced by SatChannel(), GetExternalFadingTrace(), and NotifyConstructionCompleted().