27 #include <ns3/simulator.h>
29 NS_LOG_COMPONENT_DEFINE(
"SatUtHandoverModule");
34 NS_OBJECT_ENSURE_REGISTERED(SatUtHandoverModule);
40 TypeId(
"ns3::SatUtHandoverModule")
42 .AddConstructor<SatUtHandoverModule>()
43 .AddAttribute(
"Timeout",
44 "Amount of time to wait before sending a new handover recommendation if "
45 "no TIM-U is received",
46 TimeValue(MilliSeconds(600)),
49 .AddTraceSource(
"AntennaGainTrace",
50 "Trace antenna gains when checking for beam compliance",
52 "ns3::SatAntennaGainPattern::AntennaGainTrace");
59 NS_LOG_FUNCTION(
this);
67 NS_LOG_FUNCTION(
this);
76 : m_antennaGainPatterns(NULL),
77 m_lastMessageSentAt(0),
78 m_repeatRequestTimeout(600),
79 m_hasPendingRequest(false),
82 NS_LOG_FUNCTION(
this);
84 NS_FATAL_ERROR(
"SatUtHandoverModule default constructor should not be used!");
88 : m_antennaGainPatterns(agpContainer),
91 NS_LOG_FUNCTION(
this << agpContainer);
96 NS_LOG_FUNCTION(
this);
102 NS_LOG_FUNCTION(
this << &cb);
116 NS_LOG_FUNCTION(
this << beamId);
125 Ptr<SatMobilityModel> mobilityModel = GetObject<SatMobilityModel>();
128 NS_LOG_FUNCTION(
"Bailing out for lack of mobility model");
138 NS_LOG_FUNCTION(
"Current beam is good, do nothing");
150 Time now = Simulator::Now();
151 if (bestBeamId != beamId &&
154 NS_LOG_FUNCTION(
"Sending handover recommendation for beam " << bestBeamId);
GeoCoordinate class is used to store and operate with geodetic coordinates.
Callback< void, uint32_t > HandoverRequestCallback
Handover recommendation message sending callback.
void SetHandoverRequestCallback(SatUtHandoverModule::HandoverRequestCallback cb)
Set the handover recommendation message sending callback.
~SatUtHandoverModule()
Destroy a SatUtHandoverModule.
bool CheckForHandoverRecommendation(uint32_t satId, uint32_t beamId)
Inspect whether or not the given beam is still suitable for the underlying mobility model.
virtual void DoDispose()
Dispose of this class instance.
SatUtHandoverModule()
Default constructor, which is not used.
HandoverRequestCallback m_handoverCallback
Ptr< SatAntennaGainPatternContainer > m_antennaGainPatterns
uint32_t GetAskedBeamId()
Get the best beam ID.
static TypeId GetTypeId(void)
Derived from Object.
TracedCallback< double > m_antennaGainTrace
Time m_repeatRequestTimeout
virtual TypeId GetInstanceTypeId(void) const
Derived from Object.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.