Loading...
Searching...
No Matches
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.

Public Member Functions

 SatHandoverModule ()
 Default constructor, which is not used.
 SatHandoverModule (Ptr< Node > utNode, NodeContainer satellites, Ptr< SatAntennaGainPatternContainer > agpContainer)
 Construct a SatHandoverModule.
 ~SatHandoverModule ()
 Destroy a SatHandoverModule.
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.
uint32_t GetAskedBeamId ()
 Get the best beam ID.
uint32_t GetAskedSatId ()
 Get the best sat ID.
void HandoverFinished ()
 Method to call when a handover has been performed.
void SetHandoverRequestCallback (SatHandoverModule::HandoverRequestCallback cb)
 Set the handover recommendation message sending callback.

Static Public Member Functions

static TypeId GetTypeId (void)
 Derived from Object.

Private Member Functions

std::pair< uint32_t, uint32_t > AlgorithmNClosest (GeoCoordinate coords)
 Handover algorithm choosing best beam between N closest satellites.
std::vector< uint32_t > GetNClosestSats (uint32_t numberOfSats)
 Get the N closest satellites to the UT node.

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.
bool m_hasPendingRequest
Time m_lastMessageSentAt
uint32_t m_numberClosestSats
 Number of satellites to consider when using algorithm SAT_N_CLOSEST_SAT.
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 84 of file satellite-handover-module.cc.

References m_antennaGainPatterns, m_askedBeamId, m_askedSatId, m_hasPendingRequest, m_lastMessageSentAt, and m_repeatRequestTimeout.

◆ 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 97 of file satellite-handover-module.cc.

References m_antennaGainPatterns, m_askedBeamId, m_askedSatId, m_handoverDecisionAlgorithm, m_hasPendingRequest, m_lastMessageSentAt, m_numberClosestSats, m_repeatRequestTimeout, m_satellites, m_utNode, and SAT_N_CLOSEST_SAT.

◆ ~SatHandoverModule()

ns3::SatHandoverModule::~SatHandoverModule ( )

Destroy a SatHandoverModule.

Definition at line 114 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 248 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 148 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 ( )
virtual

Dispose of this class instance.

Definition at line 74 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 134 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 128 of file satellite-handover-module.cc.

References m_askedSatId.

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

◆ HandoverFinished()

void ns3::SatHandoverModule::HandoverFinished ( )

Method to call when a handover has been performed.

Definition at line 140 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 120 of file satellite-handover-module.cc.

References m_handoverCallback.

Member Data Documentation

◆ m_antennaGainPatterns

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

◆ m_antennaGainTrace

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

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

Referenced by CheckForHandoverRecommendation(), and GetTypeId().

◆ m_askedBeamId

uint32_t ns3::SatHandoverModule::m_askedBeamId
private

◆ m_askedSatId

uint32_t ns3::SatHandoverModule::m_askedSatId
private

◆ 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 141 of file satellite-handover-module.h.

Referenced by SatHandoverModule(), CheckForHandoverRecommendation(), and GetTypeId().

◆ m_hasPendingRequest

bool ns3::SatHandoverModule::m_hasPendingRequest
private

◆ m_lastMessageSentAt

Time ns3::SatHandoverModule::m_lastMessageSentAt
private

◆ m_numberClosestSats

uint32_t ns3::SatHandoverModule::m_numberClosestSats
private

Number of satellites to consider when using algorithm SAT_N_CLOSEST_SAT.

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

Referenced by SatHandoverModule(), AlgorithmNClosest(), and GetTypeId().

◆ m_repeatRequestTimeout

Time ns3::SatHandoverModule::m_repeatRequestTimeout
private

◆ m_satellites

NodeContainer ns3::SatHandoverModule::m_satellites
private

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

Referenced by SatHandoverModule(), and GetNClosestSats().

◆ m_utNode

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

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

Referenced by SatHandoverModule(), and GetNClosestSats().


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