24 #include <ns3/simulator.h>
26 NS_LOG_COMPONENT_DEFINE(
"SatPerFragmentInterference");
31 NS_OBJECT_ENSURE_REGISTERED(SatPerFragmentInterference);
36 static TypeId tid = TypeId(
"ns3::SatPerFragmentInterference")
38 .AddConstructor<SatPerFragmentInterference>();
46 NS_LOG_FUNCTION(
this);
52 m_ifPowerAtEventChangeW(),
53 m_maxFragmentsCount(1)
55 NS_LOG_FUNCTION(
this);
61 m_ifPowerAtEventChangeW(),
62 m_maxFragmentsCount(1)
64 NS_LOG_FUNCTION(
this);
69 NS_LOG_FUNCTION(
this);
72 std::vector<std::pair<double, double>>
75 NS_LOG_FUNCTION(
this);
87 NS_FATAL_ERROR(
"Interference computation did not find a single fragment");
96 std::vector<std::pair<double, double>> ifPowerPerFragment;
97 ifPowerPerFragment.reserve(fragmentsCount);
100 std::pair<double, double> eventChangeInPower = *iter;
103 ifPowerPerFragment.emplace_back(iter->first - eventChangeInPower.first,
104 eventChangeInPower.second);
105 eventChangeInPower = *iter;
109 if (eventChangeInPower.first != 1.0)
111 ifPowerPerFragment.emplace_back(1.0 - eventChangeInPower.first, eventChangeInPower.second);
114 return ifPowerPerFragment;
127 double interferenceValue,
132 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.