UT handover module. More...
#include "satellite-handover-module.h"
Public Types | |
enum | HandoverDecisionAlgorithm_t { SAT_N_CLOSEST_SAT } |
typedef Callback< void, uint32_t, uint32_t > | HandoverRequestCallback |
Handover recommendation message sending callback. More... | |
Public Member Functions | |
SatHandoverModule () | |
Default constructor, which is not used. More... | |
SatHandoverModule (Ptr< Node > utNode, NodeContainer satellites, Ptr< SatAntennaGainPatternContainer > agpContainer) | |
Construct a SatHandoverModule. More... | |
~SatHandoverModule () | |
Destroy a SatHandoverModule. More... | |
bool | CheckForHandoverRecommendation (uint32_t satId, uint32_t beamId) |
Inspect whether or not the given beam is still suitable for the underlying mobility model. More... | |
virtual void | DoDispose () |
Dispose of this class instance. More... | |
uint32_t | GetAskedBeamId () |
Get the best beam ID. More... | |
uint32_t | GetAskedSatId () |
Get the best sat ID. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Derived from Object. More... | |
void | HandoverFinished () |
Method to call when a handover has been performed. More... | |
void | SetHandoverRequestCallback (SatHandoverModule::HandoverRequestCallback cb) |
Set the handover recommendation message sending callback. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Derived from Object. More... | |
Private Member Functions | |
std::pair< uint32_t, uint32_t > | AlgorithmNClosest (GeoCoordinate coords) |
Handover algorithm choosing best beam between N closest satellites. More... | |
std::vector< uint32_t > | GetNClosestSats (uint32_t numberOfSats) |
Get the N closest satellites to the UT node. More... | |
Private Attributes | |
Ptr< SatAntennaGainPatternContainer > | m_antennaGainPatterns |
TracedCallback< double > | m_antennaGainTrace |
uint32_t | m_askedBeamId |
uint32_t | m_askedSatId |
HandoverRequestCallback | m_handoverCallback |
HandoverDecisionAlgorithm_t | m_handoverDecisionAlgorithm |
Algorithm used to detect if handover is needed. More... | |
bool | m_hasPendingRequest |
Time | m_lastMessageSentAt |
uint32_t | m_numberClosestSats |
Number of satellites to consider when using algorithm SAT_N_CLOSEST_SAT. More... | |
Time | m_repeatRequestTimeout |
NodeContainer | m_satellites |
Ptr< Node > | m_utNode |
UT handover module.
Definition at line 44 of file satellite-handover-module.h.
typedef Callback<void, uint32_t, uint32_t> ns3::SatHandoverModule::HandoverRequestCallback |
Handover recommendation message sending callback.
uint32_t | The satellite ID this UT want to change to |
uint32_t | The beam ID this UT want to change to |
Definition at line 57 of file satellite-handover-module.h.
Enumerator | |
---|---|
SAT_N_CLOSEST_SAT |
Definition at line 47 of file satellite-handover-module.h.
ns3::SatHandoverModule::SatHandoverModule | ( | ) |
Default constructor, which is not used.
Definition at line 92 of file satellite-handover-module.cc.
ns3::SatHandoverModule::SatHandoverModule | ( | Ptr< Node > | utNode, |
NodeContainer | satellites, | ||
Ptr< SatAntennaGainPatternContainer > | agpContainer | ||
) |
Construct a SatHandoverModule.
node | The UT node linked to this module |
satellites | The list of satellites used in the scenario |
agpContainer | the antenna gain patterns of the simulation |
Definition at line 105 of file satellite-handover-module.cc.
ns3::SatHandoverModule::~SatHandoverModule | ( | ) |
Destroy a SatHandoverModule.
Definition at line 122 of file satellite-handover-module.cc.
|
private |
Handover algorithm choosing best beam between N closest satellites.
coords | Coordiantes of UT |
Definition at line 256 of file satellite-handover-module.cc.
References GetNClosestSats(), m_antennaGainPatterns, and m_numberClosestSats.
Referenced by CheckForHandoverRecommendation().
bool ns3::SatHandoverModule::CheckForHandoverRecommendation | ( | uint32_t | satId, |
uint32_t | beamId | ||
) |
Inspect whether or not the given beam is still suitable for the underlying mobility model.
satId | The current satellite ID the underlying mobility model is emitting in |
beamId | The current beam ID the underlying mobility model is emitting in |
Definition at line 156 of file satellite-handover-module.cc.
References AlgorithmNClosest(), m_antennaGainPatterns, m_antennaGainTrace, m_askedBeamId, m_askedSatId, m_handoverCallback, m_handoverDecisionAlgorithm, m_hasPendingRequest, m_lastMessageSentAt, m_repeatRequestTimeout, and SAT_N_CLOSEST_SAT.
|
virtual |
Dispose of this class instance.
Definition at line 82 of file satellite-handover-module.cc.
References m_antennaGainPatterns, and m_handoverCallback.
uint32_t ns3::SatHandoverModule::GetAskedBeamId | ( | ) |
Get the best beam ID.
Definition at line 142 of file satellite-handover-module.cc.
References m_askedBeamId.
uint32_t ns3::SatHandoverModule::GetAskedSatId | ( | ) |
Get the best sat ID.
Definition at line 136 of file satellite-handover-module.cc.
References m_askedSatId.
|
virtual |
Derived from Object.
Definition at line 74 of file satellite-handover-module.cc.
References GetTypeId().
|
private |
Get the N closest satellites to the UT node.
numberOfSats | Number of satellites to get |
Definition at line 221 of file satellite-handover-module.cc.
References ns3::SatMobilityModel::GetDistanceFrom(), m_satellites, m_utNode, and satMobility.
Referenced by AlgorithmNClosest().
|
static |
Derived from Object.
Definition at line 43 of file satellite-handover-module.cc.
References m_antennaGainTrace, m_handoverDecisionAlgorithm, m_numberClosestSats, m_repeatRequestTimeout, and SAT_N_CLOSEST_SAT.
Referenced by GetInstanceTypeId().
void ns3::SatHandoverModule::HandoverFinished | ( | ) |
Method to call when a handover has been performed.
Definition at line 148 of file satellite-handover-module.cc.
References m_hasPendingRequest.
void ns3::SatHandoverModule::SetHandoverRequestCallback | ( | SatHandoverModule::HandoverRequestCallback | cb | ) |
Set the handover recommendation message sending callback.
cb | callback to send handover recommendation messages |
Definition at line 128 of file satellite-handover-module.cc.
References m_handoverCallback.
Referenced by ns3::SatGwHelperDvb::Install(), ns3::SatUtHelperDvb::Install(), and ns3::SatUtHelperLora::Install().
|
private |
Definition at line 157 of file satellite-handover-module.h.
Referenced by AlgorithmNClosest(), CheckForHandoverRecommendation(), and DoDispose().
|
private |
Definition at line 165 of file satellite-handover-module.h.
Referenced by CheckForHandoverRecommendation(), and GetTypeId().
|
private |
Definition at line 163 of file satellite-handover-module.h.
Referenced by CheckForHandoverRecommendation(), and GetAskedBeamId().
|
private |
Definition at line 162 of file satellite-handover-module.h.
Referenced by CheckForHandoverRecommendation(), and GetAskedSatId().
|
private |
Definition at line 153 of file satellite-handover-module.h.
Referenced by CheckForHandoverRecommendation(), DoDispose(), and SetHandoverRequestCallback().
|
private |
Algorithm used to detect if handover is needed.
Definition at line 146 of file satellite-handover-module.h.
Referenced by CheckForHandoverRecommendation(), and GetTypeId().
|
private |
Definition at line 161 of file satellite-handover-module.h.
Referenced by CheckForHandoverRecommendation(), and HandoverFinished().
|
private |
Definition at line 159 of file satellite-handover-module.h.
Referenced by CheckForHandoverRecommendation().
|
private |
Number of satellites to consider when using algorithm SAT_N_CLOSEST_SAT.
Definition at line 151 of file satellite-handover-module.h.
Referenced by AlgorithmNClosest(), and GetTypeId().
|
private |
Definition at line 160 of file satellite-handover-module.h.
Referenced by CheckForHandoverRecommendation(), and GetTypeId().
|
private |
Definition at line 156 of file satellite-handover-module.h.
Referenced by GetNClosestSats().
|
private |
Definition at line 155 of file satellite-handover-module.h.
Referenced by GetNClosestSats().