ns3::SatHandoverModule Class Reference

UT handover module. More...

#include "satellite-handover-module.h"

+ Inheritance diagram for ns3::SatHandoverModule:
+ Collaboration diagram for ns3::SatHandoverModule:

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< SatAntennaGainPatternContainerm_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
 

Detailed Description

UT handover module.

Definition at line 44 of file satellite-handover-module.h.

Member Typedef Documentation

◆ HandoverRequestCallback

typedef Callback<void, uint32_t, uint32_t> ns3::SatHandoverModule::HandoverRequestCallback

Handover recommendation message sending callback.

Parameters
uint32_tThe satellite ID this UT want to change to
uint32_tThe beam ID this UT want to change to

Definition at line 57 of file satellite-handover-module.h.

Member Enumeration Documentation

◆ HandoverDecisionAlgorithm_t

Enumerator
SAT_N_CLOSEST_SAT 

Definition at line 47 of file satellite-handover-module.h.

Constructor & Destructor Documentation

◆ SatHandoverModule() [1/2]

ns3::SatHandoverModule::SatHandoverModule ( )

Default constructor, which is not used.

Definition at line 92 of file satellite-handover-module.cc.

◆ SatHandoverModule() [2/2]

ns3::SatHandoverModule::SatHandoverModule ( Ptr< Node >  utNode,
NodeContainer  satellites,
Ptr< SatAntennaGainPatternContainer agpContainer 
)

Construct a SatHandoverModule.

Parameters
nodeThe UT node linked to this module
satellitesThe list of satellites used in the scenario
agpContainerthe antenna gain patterns of the simulation

Definition at line 105 of file satellite-handover-module.cc.

◆ ~SatHandoverModule()

ns3::SatHandoverModule::~SatHandoverModule ( )

Destroy a SatHandoverModule.

Definition at line 122 of file satellite-handover-module.cc.

Member Function Documentation

◆ AlgorithmNClosest()

std::pair< uint32_t, uint32_t > ns3::SatHandoverModule::AlgorithmNClosest ( GeoCoordinate  coords)
private

Handover algorithm choosing best beam between N closest satellites.

Parameters
coordsCoordiantes of UT
Returns
A pair containing satellite ID and beam ID

Definition at line 256 of file satellite-handover-module.cc.

References GetNClosestSats(), m_antennaGainPatterns, and m_numberClosestSats.

Referenced by CheckForHandoverRecommendation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ 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.

Parameters
satIdThe current satellite ID the underlying mobility model is emitting in
beamIdThe current beam ID the underlying mobility model is emitting in
Returns
whether or not an handover recommendation has been sent

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.

+ Here is the call graph for this function:

◆ DoDispose()

void ns3::SatHandoverModule::DoDispose ( void  )
virtual

Dispose of this class instance.

Definition at line 82 of file satellite-handover-module.cc.

References m_antennaGainPatterns, and m_handoverCallback.

◆ GetAskedBeamId()

uint32_t ns3::SatHandoverModule::GetAskedBeamId ( )

Get the best beam ID.

Returns
The best beam ID

Definition at line 142 of file satellite-handover-module.cc.

References m_askedBeamId.

◆ GetAskedSatId()

uint32_t ns3::SatHandoverModule::GetAskedSatId ( )

Get the best sat ID.

Returns
The best sat ID

Definition at line 136 of file satellite-handover-module.cc.

References m_askedSatId.

◆ GetInstanceTypeId()

TypeId ns3::SatHandoverModule::GetInstanceTypeId ( void  ) const
virtual

Derived from Object.

Definition at line 74 of file satellite-handover-module.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetNClosestSats()

std::vector< uint32_t > ns3::SatHandoverModule::GetNClosestSats ( uint32_t  numberOfSats)
private

Get the N closest satellites to the UT node.

Parameters
numberOfSatsNumber of satellites to get
Returns
Closest satellites IDs

Definition at line 221 of file satellite-handover-module.cc.

References ns3::SatMobilityModel::GetDistanceFrom(), m_satellites, m_utNode, and satMobility.

Referenced by AlgorithmNClosest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::SatHandoverModule::GetTypeId ( void  )
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().

+ Here is the caller graph for this function:

◆ HandoverFinished()

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.

◆ SetHandoverRequestCallback()

void ns3::SatHandoverModule::SetHandoverRequestCallback ( SatHandoverModule::HandoverRequestCallback  cb)

Set the handover recommendation message sending callback.

Parameters
cbcallback 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().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_antennaGainPatterns

Ptr<SatAntennaGainPatternContainer> ns3::SatHandoverModule::m_antennaGainPatterns
private

◆ m_antennaGainTrace

TracedCallback<double> ns3::SatHandoverModule::m_antennaGainTrace
private

Definition at line 165 of file satellite-handover-module.h.

Referenced by CheckForHandoverRecommendation(), and GetTypeId().

◆ m_askedBeamId

uint32_t ns3::SatHandoverModule::m_askedBeamId
private

Definition at line 163 of file satellite-handover-module.h.

Referenced by CheckForHandoverRecommendation(), and GetAskedBeamId().

◆ m_askedSatId

uint32_t ns3::SatHandoverModule::m_askedSatId
private

Definition at line 162 of file satellite-handover-module.h.

Referenced by CheckForHandoverRecommendation(), and GetAskedSatId().

◆ m_handoverCallback

HandoverRequestCallback ns3::SatHandoverModule::m_handoverCallback
private

◆ m_handoverDecisionAlgorithm

HandoverDecisionAlgorithm_t ns3::SatHandoverModule::m_handoverDecisionAlgorithm
private

Algorithm used to detect if handover is needed.

Definition at line 146 of file satellite-handover-module.h.

Referenced by CheckForHandoverRecommendation(), and GetTypeId().

◆ m_hasPendingRequest

bool ns3::SatHandoverModule::m_hasPendingRequest
private

◆ m_lastMessageSentAt

Time ns3::SatHandoverModule::m_lastMessageSentAt
private

Definition at line 159 of file satellite-handover-module.h.

Referenced by CheckForHandoverRecommendation().

◆ m_numberClosestSats

uint32_t ns3::SatHandoverModule::m_numberClosestSats
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().

◆ m_repeatRequestTimeout

Time ns3::SatHandoverModule::m_repeatRequestTimeout
private

Definition at line 160 of file satellite-handover-module.h.

Referenced by CheckForHandoverRecommendation(), and GetTypeId().

◆ m_satellites

NodeContainer ns3::SatHandoverModule::m_satellites
private

Definition at line 156 of file satellite-handover-module.h.

Referenced by GetNClosestSats().

◆ m_utNode

Ptr<Node> ns3::SatHandoverModule::m_utNode
private

Definition at line 155 of file satellite-handover-module.h.

Referenced by GetNClosestSats().


The documentation for this class was generated from the following files: