25 #include <ns3/double.h>
27 #include <ns3/simulator.h>
33 NS_LOG_COMPONENT_DEFINE(
"SatConstantInterference");
38 NS_OBJECT_ENSURE_REGISTERED(SatConstantInterference);
43 static TypeId tid = TypeId(
"ns3::SatConstantInterference")
45 .AddConstructor<SatConstantInterference>()
46 .AddAttribute(
"ConstantInterferencePower",
47 "Constant interference power in linear format.",
50 MakeDoubleChecker<double_t>());
71 Ptr<SatInterference::InterferenceChangeEvent>
74 NS_LOG_FUNCTION(
this << duration.GetSeconds() << power << rxAddress);
76 Ptr<SatInterference::InterferenceChangeEvent> event;
77 event = Create<SatInterference::InterferenceChangeEvent>(0, duration, power, rxAddress);
82 std::vector<std::pair<double, double>>
85 NS_LOG_FUNCTION(
this);
89 NS_LOG_WARN(
"Most likely two overlapping receptions! With random access carrier"
90 " this should be fine, but with dedicated access prohibited!");
93 std::vector<std::pair<double, double>> ifPowerPerFragment;
94 ifPowerPerFragment.emplace_back(1.0,
m_power);
96 return ifPowerPerFragment;
102 NS_LOG_FUNCTION(
this);
110 NS_LOG_FUNCTION(
this);
118 NS_LOG_FUNCTION(
this);
virtual Ptr< SatInterference::InterferenceChangeEvent > DoAdd(Time rxDuration, double rxPower, Address rxAddress)
Adds interference power to interference object.
SatConstantInterference()
Default constructor.
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.
~SatConstantInterference()
Destructor for SatConstantInterference.
TypeId GetInstanceTypeId(void) const
virtual void DoNotifyRxEnd(Ptr< SatInterference::InterferenceChangeEvent > event)
Notifies that RX is ended by a receiver.
virtual void DoReset(void)
Resets current interference.
virtual void DoNotifyRxStart(Ptr< SatInterference::InterferenceChangeEvent > event)
Notifies that RX is started by a receiver.
static TypeId GetTypeId(void)
Get the type ID.
Abstract class defining interface for interference calculations objects.
void Reset(void)
Resets current interference.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.