21#ifndef SATELLITE_PHY_RX_CARRIER_PER_WINDOW_H
22#define SATELLITE_PHY_RX_CARRIER_PER_WINDOW_H
29#include "ns3/singleton.h"
72 std::vector<std::pair<double, double>>
gamma;
85 Ptr<SatPhyRxCarrierConf> carrierConf,
86 Ptr<SatWaveformConf> waveformConf,
87 bool randomAccessEnabled);
165 typedef std::list<SatPhyRxCarrierPerWindow::essaPacketRxParams_s>
packetList_t;
205 void DoSic(packetList_t::iterator processedPacket,
206 std::pair<packetList_t::iterator, packetList_t::iterator> windowBounds);
218 const std::pair<packetList_t::iterator, packetList_t::iterator> windowBounds);
231 std::pair<packetList_t::iterator, packetList_t::iterator>
GetWindowBounds(Time startTime,
SatChannelEstimationErrorContainer is responsible of adding a channel estimation error on top of raw ...
This class implements a tag that carries information about the slot IDs of CRDSA packet replicas.
Abstract class for storing link results.
The SatNodeInfo implements a container for all needed node related information.
The SatPhy models the basic physical layer of the satellite system.
Base class for all SatPhyRxCarriers.
CarrierType
Possible carrier types.
Inherited the base functionality of SatPhyRxCarriers for ground station nodes.
SatPhyRxCarrierPerSlot(uint32_t carrierId, Ptr< SatPhyRxCarrierConf > carrierConf, Ptr< SatWaveformConf > waveformConf, bool randomAccessEnabled)
Constructor.
bool m_windowEndSchedulingInitialized
Has the window end scheduling been initialized.
void BeginEndScheduling()
Function for initializing the window end scheduling.
uint32_t m_payloadBytesInWindow
The number of payload bytes in the window.
void CleanOldPackets(const Time windowStartTime)
Remove old packets from packet container.
Time m_windowDuration
The duration of the sliding window.
void CalculatePacketInterferenceVectors(SatPhyRxCarrierPerWindow::essaPacketRxParams_s &packet)
Calculate gamma and Interference vectors for a single packet.
void AddEssaPacket(SatPhyRxCarrierPerWindow::essaPacketRxParams_s essaPacketParams)
Function for storing the received E-SSA packets.
double GetEffectiveSnir(const SatPhyRxCarrierPerWindow::essaPacketRxParams_s &packet)
Get the effective SNIR of the packet using the Mutual Information function.
virtual void ReceiveSlot(SatPhyRxCarrier::rxParams_s packetRxParams, const uint32_t nPackets)
Receive a slot.
uint32_t m_sicEnabled
Enable Sic.
double CalculateNormalizedOfferedRandomAccessLoad()
Function for calculating the normalized offered random access load.
static TypeId GetTypeId(void)
Get the TypeId of the class.
virtual ~SatPhyRxCarrierPerWindow()
Destructor.
Time m_windowDelay
The delay before processing a sliding window.
void DoWindowEnd()
Function called when a window ends.
TracedCallback< uint32_t, const Address &, bool > m_essaRxErrorTrace
EssaRxError trace source.
Time m_firstWindow
The time of the first window.
void MeasureRandomAccessLoad()
Function for measuring the random access load.
std::pair< double, double > GetNormalizedPacketInterferenceTime(const SatPhyRxCarrierPerWindow::essaPacketRxParams_s &packet, const SatPhyRxCarrierPerWindow::essaPacketRxParams_s &interferingPacket)
Get the normalized start and end time between two interfering packets.
SatPhyRxCarrierPerWindow(uint32_t carrierId, Ptr< SatPhyRxCarrierConf > carrierConf, Ptr< SatWaveformConf > waveformConf, bool randomAccessEnabled)
Constructor.
bool PacketCanBeDetected(const SatPhyRxCarrierPerWindow::essaPacketRxParams_s &packet)
Function for processing a window.
virtual CarrierType GetCarrierType()
Method for querying the type of the carrier.
double m_detectionThreshold
SNIR detection threshold for a packet (in magnitude).
virtual void DoDispose()
Dispose implementation.
void EliminatePreviousInterferences(SatPhyRxCarrierPerWindow::essaPacketRxParams_s &packet)
Calculate gamma and Interference vectors for a single packet.
std::pair< packetList_t::iterator, packetList_t::iterator > GetWindowBounds(Time startTime, Time endTime)
Get a pair of iterators, pointing to the first element in the window, and to the first after the wind...
void DoSic(packetList_t::iterator processedPacket, std::pair< packetList_t::iterator, packetList_t::iterator > windowBounds)
Perform SIC for a given decoded packet.
std::list< SatPhyRxCarrierPerWindow::essaPacketRxParams_s > packetList_t
Time m_windowStep
The step of the sliding window.
packetList_t m_essaPacketContainer
ESSA packet container.
uint32_t m_spreadingFactor
The spreading factor of packets.
packetList_t::iterator GetHighestSnirPacket(const std::pair< packetList_t::iterator, packetList_t::iterator > windowBounds)
Get the packet with the highst SNIR on the list.
uint32_t m_windowSicIterations
The number of SIC iterations performed on each window.
TracedCallback< double > m_windowLoadTrace
WindowLoad trace source.
TracedCallback< uint32_t, const Address &, bool > m_essaRxCollisionTrace
EssaRxError trace source.
void ProcessWindow(Time startTime, Time endTime)
Function for processing a window.
void(* WindowLoadTraceCallback)(double windowLoad)
Callback signature for WindowLoadTrace trace source.
Actual physical layer transmission container.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
Struct for storing the packet specific Rx parameters.
Struct for storing the E-SSA packet specific Rx parameters.
std::vector< std::pair< double, double > > gamma
Mac48Address sourceAddress
bool hasBeenTreatedInWindow
Ptr< SatSignalParameters > rxParams