24 #include <ns3/simulator.h>
31 NS_LOG_COMPONENT_DEFINE(
"SatPerFragmentInterference");
36 NS_OBJECT_ENSURE_REGISTERED(SatPerFragmentInterference);
41 static TypeId tid = TypeId(
"ns3::SatPerFragmentInterference")
43 .AddConstructor<SatPerFragmentInterference>();
51 NS_LOG_FUNCTION(
this);
57 m_ifPowerAtEventChangeW(),
58 m_maxFragmentsCount(1)
60 NS_LOG_FUNCTION(
this);
66 m_ifPowerAtEventChangeW(),
67 m_maxFragmentsCount(1)
69 NS_LOG_FUNCTION(
this);
74 NS_LOG_FUNCTION(
this);
77 std::vector<std::pair<double, double>>
80 NS_LOG_FUNCTION(
this);
92 NS_FATAL_ERROR(
"Interference computation did not find a single fragment");
101 std::vector<std::pair<double, double>> ifPowerPerFragment;
102 ifPowerPerFragment.reserve(fragmentsCount);
105 std::pair<double, double> eventChangeInPower = *iter;
108 ifPowerPerFragment.emplace_back(iter->first - eventChangeInPower.first,
109 eventChangeInPower.second);
110 eventChangeInPower = *iter;
114 if (eventChangeInPower.first != 1.0)
116 ifPowerPerFragment.emplace_back(1.0 - eventChangeInPower.first, eventChangeInPower.second);
119 return ifPowerPerFragment;
132 double interferenceValue,
137 ifPowerW += interferenceValue;
ChannelType_t
Types of channel.
TypeId GetInstanceTypeId(void) const
Inherited from ObjectBase base class.
SatPerFragmentInterference()
Default constructor.
uint32_t m_maxFragmentsCount
static TypeId GetTypeId()
Inherited from ObjectBase base class.
void onInterferentEvent(long double timeRatio, double interferenceValue, double &ifPowerW)
Helper function meant for subclasses to override.
std::vector< std::pair< double, double > > m_ifPowerAtEventChangeW
~SatPerFragmentInterference()
Destructor.
void onOwnStartReached(double ifPowerW)
Helper function meant for subclasses to override.
std::vector< std::pair< double, double > > DoCalculate(Ptr< SatInterference::InterferenceChangeEvent > event)
Calculates interference power for the given reference Sets final power at end time to finalPower.
Packet by packet interference.
virtual std::vector< std::pair< double, double > > DoCalculate(Ptr< SatInterference::InterferenceChangeEvent > event)
Calculates interference power for the given reference Sets final power at end time to finalPower.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.