ns3::SatHelper Class Reference

Build a satellite network set with needed objects and configuration. More...

#include "satellite-helper.h"

+ Inheritance diagram for ns3::SatHelper:
+ Collaboration diagram for ns3::SatHelper:

Public Types

typedef std::map< std::pair< uint32_t, uint32_t >, SatBeamUserInfoBeamUserInfoMap_t
 definition for beam map key is pair sat ID / beam ID and value is UT/user info. More...
 
typedef Callback< uint32_t > GetNextUtUserCountCallback
 Get number of Users for a UT. More...
 
enum  PreDefinedScenario_t { NONE , SIMPLE , LARGER , FULL }
 Values for pre-defined scenarios to be used by helper when building satellite network topology base. More...
 

Public Member Functions

 SatHelper ()
 Default constructor. More...
 
 SatHelper (std::string scenarioPath)
 Create a base SatHelper for creating customized Satellite topologies. More...
 
virtual ~SatHelper ()
 Destructor for SatHelper. More...
 
void CreatePredefinedScenario (PreDefinedScenario_t scenario)
 Create a pre-defined SatHelper to make life easier when creating Satellite topologies. More...
 
void CreateUserDefinedScenario (BeamUserInfoMap_t &info)
 Creates satellite objects according to user defined scenario. More...
 
void CreateUserDefinedScenarioFromListPositions (uint32_t satId, BeamUserInfoMap_t &info, std::string inputFileUtListPositions, bool checkBeam)
 Creates satellite objects according to user defined scenario. More...
 
void DoDispose ()
 Dispose of this class instance. More...
 
Ptr< SatAntennaGainPatternContainerGetAntennaGainPatterns ()
 
Ptr< SatSpotBeamPositionAllocatorGetBeamAllocator (uint32_t beamId)
 Create a SatSpotBeamPositionAllocator able to generate random position within the given beam. More...
 
uint32_t GetBeamCount () const
 Get count of the beams (configurations). More...
 
Ptr< SatBeamHelperGetBeamHelper () const
 
Ptr< SatGroupHelperGetGroupHelper () const
 
TypeId GetInstanceTypeId (void) const
 Get the type ID of object instance. More...
 
Ipv4Address GetUserAddress (Ptr< Node > node)
 
Ptr< SatUserHelperGetUserHelper () const
 
bool IsSatConstellationEnabled ()
 
void LoadConstellationScenario (BeamUserInfoMap_t &info, GetNextUtUserCountCallback getNextUtUserCountCallback)
 Load satellite objects according to constellation parameters. More...
 
Ptr< Node > LoadMobileUtFromFile (const std::string &filename)
 Load an UT with a SatTracedMobilityModel associated to them from the given file. More...
 
Ptr< Node > LoadMobileUtFromFile (uint32_t satId, const std::string &filename)
 Load an UT with a SatTracedMobilityModel associated to them from the given file. More...
 
void LoadMobileUTsFromFolder (const std::string &folderName, Ptr< RandomVariableStream > utUsers)
 Load UTs with a SatTracedMobilityModel associated to them from the files found in the given folder. More...
 
void SetAntennaGainPatterns (Ptr< SatAntennaGainPatternContainer > antennaGainPattern)
 Set the antenna gain patterns. More...
 
void SetBeamRoutingConstellations ()
 Populate the routes, when using constellations. More...
 
void SetCustomUtPositionAllocator (Ptr< SatListPositionAllocator > posAllocator)
 Set custom position allocator. More...
 
void SetGroupHelper (Ptr< SatGroupHelper > groupHelper)
 set the group helper. More...
 
void SetGwAddressInUts ()
 Set the value of GW address for each UT. More...
 
void SetMulticastGroupRoutes (Ptr< Node > source, NodeContainer receivers, Ipv4Address sourceAddress, Ipv4Address groupAddress)
 Set multicast group to satellite network and IP router. More...
 
void SetUtPositionAllocatorForBeam (uint32_t beamId, Ptr< SatListPositionAllocator > posAllocator)
 Set custom position allocator for specific beam. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Types

typedef SatBeamHelper::MulticastBeamInfo_t MulticastBeamInfo_t
 
typedef SatBeamHelper::MulticastBeamInfoItem_t MulticastBeamInfoItem_t
 

Private Member Functions

void CheckNetwork (std::string networkName, const Ipv4Address &firstNetwork, const Ipv4Mask &mask, const std::set< uint32_t > &networkAddresses, uint32_t networkCount, uint32_t hostCount) const
 Check validity of the configured network space. More...
 
bool ConstructMulticastInfo (Ptr< Node > sourceUtNode, NodeContainer receivers, MulticastBeamInfo_t &beamInfo, Ptr< NetDevice > &routerUserOutputDev)
 Construct multicast information from source UT node and group receivers. More...
 
std::string CreateCreationSummary (std::string title)
 Creates trace summary starting with give title. More...
 
void CreateFullScenario ()
 Creates satellite objects according to full scenario. More...
 
void CreateLargerScenario ()
 Creates satellite objects according to larger scenario. More...
 
void CreateSimpleScenario ()
 Creates satellite objects according to simple scenario. More...
 
void CreationSummarySink (std::string title)
 Sink for creation summary traces. More...
 
void DoCreateScenario (BeamUserInfoMap_t &info, uint32_t gwUsers)
 Creates satellite objects according to given beam info. More...
 
void EnableCreationTraces ()
 Enables creation traces to be written in given file. More...
 
void EnableDetailedCreationTraces ()
 Enables creation traces in sub-helpers. More...
 
void EnablePacketTrace ()
 Enable packet traces. More...
 
Ptr< NetDevice > FindMatchingDevice (Ptr< NetDevice > devA, Ptr< Node > nodeB)
 Find given device's counterpart (device belonging to same network) device from given node. More...
 
bool FindMatchingDevices (Ptr< Node > nodeA, Ptr< Node > nodeB, std::pair< Ptr< NetDevice >, Ptr< NetDevice >> &matchingDevices)
 Find counterpart (device belonging to same network) devices from given nodes. More...
 
void InstallMobilityObserver (uint32_t satId, NodeContainer nodes) const
 Install Satellite Mobility Observer to nodes, if observer doesn't exist already in a node. More...
 
void LoadConstellationTopology (std::vector< std::string > &tles, std::vector< std::pair< uint32_t, uint32_t >> &isls)
 Load a constellation topology. More...
 
void ReadStandard (std::string pathName)
 Read to standard use from file given in path. More...
 
void SetGwMobility (NodeContainer gwNodes)
 Sets mobilities to created GW nodes. More...
 
void SetMulticastRouteToSourceNetwork (Ptr< Node > source, Ptr< Node > destination)
 Set multicast traffic to source's nwtwork by finding source network utilizing given destination node. More...
 
void SetNetworkAddresses (BeamUserInfoMap_t &info, uint32_t gwUsers) const
 Set configured network addresses to user and beam helpers. More...
 
void SetSatMobility (Ptr< Node > node)
 Sets mobility to created Sat node. More...
 
void SetSatMobility (Ptr< Node > node, std::string tle)
 Sets SGP4 mobility to created Sat node. More...
 
void SetUtMobility (NodeContainer uts, uint32_t satId, uint32_t beamId)
 Sets mobility to created UT nodes. More...
 
void SetUtMobilityFromPosition (NodeContainer uts, uint32_t satId, uint32_t beamId, std::vector< std::pair< GeoCoordinate, uint32_t >> positionsAndGroupId)
 Sets mobility to created UT nodes when position is known. More...
 

Static Private Member Functions

static void CreationDetailsSink (Ptr< OutputStreamWrapper > stream, std::string context, std::string info)
 Sink for creation details traces. More...
 

Private Attributes

Ptr< SatAntennaGainPatternContainerm_antennaGainPatterns
 Antenna gain patterns for all spot-beams. More...
 
Ptr< SatBeamHelperm_beamHelper
 Beam helper. More...
 
Ipv4Address m_beamNetworkAddress
 Initial network number of satellite devices, e.g., 10.1.1.0. More...
 
Ipv4Mask m_beamNetworkMask
 Network mask number of satellite devices. More...
 
BeamUserInfoMap_t m_beamUserInfos
 Info for beam creation in user defined scenario. More...
 
TracedCallback< std::string > m_creationDetailsTrace
 Trace callback for creation traces (details) More...
 
TracedCallback< std::string > m_creationSummaryTrace
 Trace callback for creation traces (summary) More...
 
bool m_creationTraces
 flag to indicate if creation trace should be enabled for scenario creation. More...
 
Ptr< OutputStreamWrapper > m_creationTraceStream
 Stream wrapper used for creation traces. More...
 
bool m_detailedCreationTraces
 flag to indicate if detailed creation trace should be enabled for scenario creation. More...
 
std::string m_fwdConfFileName
 
Ptr< SatGroupHelperm_groupHelper
 Group helper. More...
 
Ipv4Address m_gwNetworkAddress
 Initial network number of GW, router, and GW users, e.g., 10.2.1.0. More...
 
Ipv4Mask m_gwNetworkMask
 Network mask number of GW, router, and GW users. More...
 
std::string m_gwPosFileName
 
std::map< uint32_t, uint32_t > m_gwSats
 Map of closest satellite for each GW. More...
 
uint32_t m_gwUsers
 Number of users created in public network (behind GWs) in full or user-defined scenario. More...
 
bool m_handoversEnabled
 Enable handovers for all UTs and GWs. More...
 
std::map< uint32_t, NodeContainer > m_mobileUtsByBeam
 List of mobile UTs by beam ID. More...
 
std::multimap< uint32_t, uint32_t > m_mobileUtsUsersByBeam
 List of users by mobile UT by beam ID. More...
 
bool m_packetTraces
 flag to indicate if packet trace should be enabled after scenario creation. More...
 
std::string m_rtnConfFileName
 Configuration file names as attributes of this class. More...
 
Ptr< SatConfm_satConf
 Configuration for satellite network. More...
 
bool m_satConstellationEnabled
 Use a constellation of satellites. More...
 
std::string m_satPosFileName
 
bool m_scenarioCreated
 flag to check if scenario is already created. More...
 
std::string m_scenarioCreationFileName
 File name for scenario creation trace output. More...
 
std::string m_scenarioPath
 Scenario folder path. More...
 
SatEnums::Standard_t m_standard
 
Ptr< SatUserHelperm_userHelper
 User helper. More...
 
std::string m_utCreationFileName
 File name for UT creation trace output. More...
 
Ipv4Address m_utNetworkAddress
 Initial network number of UT and UT users, e.g., 10.3.1.0. More...
 
Ipv4Mask m_utNetworkMask
 Network mask number of UT and UT users. More...
 
std::string m_utPosFileName
 
Ptr< SatListPositionAllocatorm_utPositions
 User defined UT positions from SatConf (or manually set) More...
 
std::map< uint32_t, Ptr< SatListPositionAllocator > > m_utPositionsByBeam
 User defined UT positions by beam ID. More...
 
std::map< Ptr< NetDevice >, NetDeviceContainer > m_utsDistribution
 Map indicating all UT NetDevices associated to each GW NetDevice. More...
 
uint32_t m_utsInBeam
 Number of UTs created per Beam in full or user-defined scenario. More...
 
Ptr< OutputStreamWrapper > m_utTraceStream
 Stream wrapper used for UT position traces. More...
 
uint32_t m_utUsers
 Number of users created in end user network (behind every UT) in full or user-defined scenario. More...
 
std::string m_waveformConfDirectoryName
 
std::string m_wfConfigFileName
 File name for Waveform configurations file. More...
 

Static Private Attributes

static const uint16_t MAX_ADDRESS_PREFIX_LENGTH = 31
 
static const uint16_t MIN_ADDRESS_PREFIX_LENGTH = 1
 

Detailed Description

Build a satellite network set with needed objects and configuration.

Utilizes SatUserHelper and SatBeamHelper helper objects.

Definition at line 61 of file satellite-helper.h.

Member Typedef Documentation

◆ BeamUserInfoMap_t

typedef std::map<std::pair<uint32_t, uint32_t>, SatBeamUserInfo> ns3::SatHelper::BeamUserInfoMap_t

definition for beam map key is pair sat ID / beam ID and value is UT/user info.

Definition at line 67 of file satellite-helper.h.

◆ GetNextUtUserCountCallback

typedef Callback<uint32_t> ns3::SatHelper::GetNextUtUserCountCallback

Get number of Users for a UT.

Returns
The number of UT users

Definition at line 116 of file satellite-helper.h.

◆ MulticastBeamInfo_t

◆ MulticastBeamInfoItem_t

Member Enumeration Documentation

◆ PreDefinedScenario_t

Values for pre-defined scenarios to be used by helper when building satellite network topology base.

Enumerator
NONE 

NONE Not used.

SIMPLE 

SIMPLE Simple scenario used as base.

LARGER 

LARGER Larger scenario used as base.

FULL 

FULL Full scenario used as base.

Definition at line 73 of file satellite-helper.h.

Constructor & Destructor Documentation

◆ SatHelper() [1/2]

ns3::SatHelper::SatHelper ( )

Default constructor.

Not in use.

Definition at line 185 of file satellite-helper.cc.

◆ SatHelper() [2/2]

◆ ~SatHelper()

virtual ns3::SatHelper::~SatHelper ( )
inlinevirtual

Destructor for SatHelper.

Definition at line 108 of file satellite-helper.h.

Member Function Documentation

◆ CheckNetwork()

void ns3::SatHelper::CheckNetwork ( std::string  networkName,
const Ipv4Address &  firstNetwork,
const Ipv4Mask &  mask,
const std::set< uint32_t > &  networkAddresses,
uint32_t  networkCount,
uint32_t  hostCount 
) const
private

Check validity of the configured network space.

Parameters
networkNameName string of the network to check. To be used when printing out possible errors.
firstNetworkAddress of the first network.
maskThe mask of the networks.
networkAddressesThe container of first address values of the networks used all together.
networkCountThe number of the networks created in network.
hostCountThe maximum number of the hosts created in a network.

Definition at line 1788 of file satellite-helper.cc.

References MAX_ADDRESS_PREFIX_LENGTH, and MIN_ADDRESS_PREFIX_LENGTH.

Referenced by SetNetworkAddresses().

+ Here is the caller graph for this function:

◆ ConstructMulticastInfo()

bool ns3::SatHelper::ConstructMulticastInfo ( Ptr< Node >  sourceUtNode,
NodeContainer  receivers,
MulticastBeamInfo_t beamInfo,
Ptr< NetDevice > &  routerUserOutputDev 
)
private

Construct multicast information from source UT node and group receivers.

Parameters
sourceUtNodePointer to UT source node. When NULL source node is not UT.
receiversContainer of the multicast group receivers.
beamInfoBeam information to be filled in for multicast group.
routerUserOutputDevPointer to router output device for backbone network (GW users). Set to NULL when traffic is not needed to route backbone network.
Returns
true when multicast traffic shall be routed to source's network.

Definition at line 1612 of file satellite-helper.cc.

References FindMatchingDevices(), m_beamHelper, and m_userHelper.

Referenced by SetMulticastGroupRoutes().

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

◆ CreateCreationSummary()

std::string ns3::SatHelper::CreateCreationSummary ( std::string  title)
private

Creates trace summary starting with give title.

Parameters
titletitle for summary
Returns
std::string as summary

Definition at line 1496 of file satellite-helper.cc.

References m_beamHelper, and m_userHelper.

Referenced by CreationSummarySink().

+ Here is the caller graph for this function:

◆ CreateFullScenario()

void ns3::SatHelper::CreateFullScenario ( )
private

Creates satellite objects according to full scenario.

Definition at line 526 of file satellite-helper.cc.

References DoCreateScenario(), m_beamUserInfos, m_creationSummaryTrace, m_gwUsers, m_satConf, m_utsInBeam, and m_utUsers.

Referenced by CreatePredefinedScenario().

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

◆ CreateLargerScenario()

void ns3::SatHelper::CreateLargerScenario ( )
private

Creates satellite objects according to larger scenario.

Definition at line 503 of file satellite-helper.cc.

References ns3::SatBeamUserInfo::AppendUt(), DoCreateScenario(), m_creationSummaryTrace, and ns3::SatBeamUserInfo::SetUtUserCount().

Referenced by CreatePredefinedScenario().

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

◆ CreatePredefinedScenario()

void ns3::SatHelper::CreatePredefinedScenario ( PreDefinedScenario_t  scenario)

Create a pre-defined SatHelper to make life easier when creating Satellite topologies.

Definition at line 334 of file satellite-helper.cc.

References CreateFullScenario(), CreateLargerScenario(), CreateSimpleScenario(), FULL, LARGER, and SIMPLE.

+ Here is the call graph for this function:

◆ CreateSimpleScenario()

void ns3::SatHelper::CreateSimpleScenario ( )
private

Creates satellite objects according to simple scenario.

Definition at line 489 of file satellite-helper.cc.

References DoCreateScenario(), and m_creationSummaryTrace.

Referenced by CreatePredefinedScenario().

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

◆ CreateUserDefinedScenario()

void ns3::SatHelper::CreateUserDefinedScenario ( BeamUserInfoMap_t info)

Creates satellite objects according to user defined scenario.

Parameters
infoinformation of the beams, and beam UTs and users in beams

Definition at line 556 of file satellite-helper.cc.

References DoCreateScenario(), m_creationSummaryTrace, and m_gwUsers.

+ Here is the call graph for this function:

◆ CreateUserDefinedScenarioFromListPositions()

void ns3::SatHelper::CreateUserDefinedScenarioFromListPositions ( uint32_t  satId,
BeamUserInfoMap_t info,
std::string  inputFileUtListPositions,
bool  checkBeam 
)

Creates satellite objects according to user defined scenario.

Positions are read from different input files from file set by attribute ns3::SatConf::UtPositionInputFileName.

Parameters
satIdThe ID of the satellite
infoinformation of the beams, and beam UTs and users in beams
inputFileUtListPositionsPath to the list of UT positions
checkBeamCheck that positions (set through SatConf) match with given beam (the beam is the best according to configured antenna patterns).

Definition at line 582 of file satellite-helper.cc.

References DoCreateScenario(), m_antennaGainPatterns, m_creationSummaryTrace, m_gwUsers, m_satConf, m_utPosFileName, and m_utPositions.

+ Here is the call graph for this function:

◆ CreationDetailsSink()

void ns3::SatHelper::CreationDetailsSink ( Ptr< OutputStreamWrapper >  stream,
std::string  context,
std::string  info 
)
staticprivate

Sink for creation details traces.

Parameters
streamstream for traces
contextcontext for traces
infocreation info

Definition at line 1479 of file satellite-helper.cc.

Referenced by EnableDetailedCreationTraces().

+ Here is the caller graph for this function:

◆ CreationSummarySink()

void ns3::SatHelper::CreationSummarySink ( std::string  title)
private

Sink for creation summary traces.

Parameters
titlecreation summary title

Definition at line 1487 of file satellite-helper.cc.

References CreateCreationSummary(), m_beamHelper, m_creationTraceStream, and m_utTraceStream.

Referenced by EnableCreationTraces().

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

◆ DoCreateScenario()

◆ DoDispose()

void ns3::SatHelper::DoDispose ( )

Dispose of this class instance.

Definition at line 1513 of file satellite-helper.cc.

References m_antennaGainPatterns, m_beamHelper, m_mobileUtsByBeam, m_mobileUtsUsersByBeam, m_userHelper, and m_utPositionsByBeam.

◆ EnableCreationTraces()

void ns3::SatHelper::EnableCreationTraces ( )
private

Enables creation traces to be written in given file.

Definition at line 359 of file satellite-helper.cc.

References CreationSummarySink(), EnableDetailedCreationTraces(), m_creationTraceStream, m_detailedCreationTraces, m_scenarioCreationFileName, m_utCreationFileName, and m_utTraceStream.

Referenced by DoCreateScenario().

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

◆ EnableDetailedCreationTraces()

void ns3::SatHelper::EnableDetailedCreationTraces ( )
private

Enables creation traces in sub-helpers.

Definition at line 416 of file satellite-helper.cc.

References CreationDetailsSink(), m_beamHelper, m_creationTraceStream, and m_userHelper.

Referenced by EnableCreationTraces().

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

◆ EnablePacketTrace()

void ns3::SatHelper::EnablePacketTrace ( )
private

Enable packet traces.

Definition at line 385 of file satellite-helper.cc.

References m_beamHelper.

Referenced by DoCreateScenario().

+ Here is the caller graph for this function:

◆ FindMatchingDevice()

Ptr< NetDevice > ns3::SatHelper::FindMatchingDevice ( Ptr< NetDevice >  devA,
Ptr< Node >  nodeB 
)
private

Find given device's counterpart (device belonging to same network) device from given node.

Parameters
devAPointer to the device whose counterpart device is found from given node.
nodeBPointer to node where given device's counterpart device is searched.
Returns
Pointer to device belonging to same network with given device in given node. NULL in cast that counterpart device is not found.

Definition at line 1549 of file satellite-helper.cc.

Referenced by FindMatchingDevices(), and SetMulticastGroupRoutes().

+ Here is the caller graph for this function:

◆ FindMatchingDevices()

bool ns3::SatHelper::FindMatchingDevices ( Ptr< Node >  nodeA,
Ptr< Node >  nodeB,
std::pair< Ptr< NetDevice >, Ptr< NetDevice >> &  matchingDevices 
)
private

Find counterpart (device belonging to same network) devices from given nodes.

Returns
The device belonging to same network with given device on given node.
Parameters
nodeAPointer to node A where given device's counterpart device is searched.
nodeBPointer to node A where given device's counterpart device is searched.
matchingDevicesPair consisting pointers to found devices. first belongs to nodeA and second to nodeB.
Returns
true when counterpart devices are found from given nodes, false in other cases.

Definition at line 1527 of file satellite-helper.cc.

References FindMatchingDevice().

Referenced by ConstructMulticastInfo(), SetMulticastGroupRoutes(), and SetMulticastRouteToSourceNetwork().

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

◆ GetAntennaGainPatterns()

Ptr< SatAntennaGainPatternContainer > ns3::SatHelper::GetAntennaGainPatterns ( )
Returns
Get the antenna gain patterns

Definition at line 468 of file satellite-helper.cc.

References m_antennaGainPatterns.

◆ GetBeamAllocator()

Ptr< SatSpotBeamPositionAllocator > ns3::SatHelper::GetBeamAllocator ( uint32_t  beamId)

Create a SatSpotBeamPositionAllocator able to generate random position within the given beam.

Parameters
beamIdthe beam for which the position allocator should be configured

Definition at line 1282 of file satellite-helper.cc.

References m_antennaGainPatterns, m_satConf, and m_satConstellationEnabled.

Referenced by SetUtMobility().

+ Here is the caller graph for this function:

◆ GetBeamCount()

uint32_t ns3::SatHelper::GetBeamCount ( ) const

Get count of the beams (configurations).

Returns
beam count

Definition at line 481 of file satellite-helper.cc.

References m_satConf.

◆ GetBeamHelper()

Ptr< SatBeamHelper > ns3::SatHelper::GetBeamHelper ( ) const
Returns
pointer to beam helper.

Definition at line 440 of file satellite-helper.cc.

References m_beamHelper.

◆ GetGroupHelper()

Ptr< SatGroupHelper > ns3::SatHelper::GetGroupHelper ( ) const
Returns
pointer to group helper.

Definition at line 447 of file satellite-helper.cc.

References m_groupHelper.

◆ GetInstanceTypeId()

TypeId ns3::SatHelper::GetInstanceTypeId ( void  ) const

Get the type ID of object instance.

Returns
the TypeId of object instance

Definition at line 178 of file satellite-helper.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::SatHelper::GetTypeId ( void  )
static

◆ GetUserAddress()

Ipv4Address ns3::SatHelper::GetUserAddress ( Ptr< Node >  node)
Parameters
nodepointer to user node.
Returns
address of the user.

Definition at line 429 of file satellite-helper.cc.

◆ GetUserHelper()

Ptr< SatUserHelper > ns3::SatHelper::GetUserHelper ( ) const
Returns
pointer to user helper.

Definition at line 474 of file satellite-helper.cc.

References m_userHelper.

◆ InstallMobilityObserver()

void ns3::SatHelper::InstallMobilityObserver ( uint32_t  satId,
NodeContainer  nodes 
) const
private

Install Satellite Mobility Observer to nodes, if observer doesn't exist already in a node.

Parameters
satIdID of the satellite.
nodesNodecontainer of nodes to install mobility observer.

Definition at line 1347 of file satellite-helper.cc.

References satMobility, and ns3::SatEnums::TRANSPARENT.

Referenced by LoadMobileUTsFromFolder(), SetGwMobility(), SetUtMobility(), and SetUtMobilityFromPosition().

+ Here is the caller graph for this function:

◆ IsSatConstellationEnabled()

bool ns3::SatHelper::IsSatConstellationEnabled ( )
inline

Definition at line 275 of file satellite-helper.h.

References m_satConstellationEnabled.

◆ LoadConstellationScenario()

void ns3::SatHelper::LoadConstellationScenario ( BeamUserInfoMap_t info,
GetNextUtUserCountCallback  getNextUtUserCountCallback 
)

Load satellite objects according to constellation parameters.

Parameters
infoListinformation of the enabled beams. UT information is given in parameters files.
getNextUtUserCountCallbackCallback to get number of users per UT.

Definition at line 635 of file satellite-helper.cc.

References m_antennaGainPatterns, m_groupHelper, m_gwSats, and m_satConf.

◆ LoadConstellationTopology()

void ns3::SatHelper::LoadConstellationTopology ( std::vector< std::string > &  tles,
std::vector< std::pair< uint32_t, uint32_t >> &  isls 
)
private

Load a constellation topology.

Parameters
tlesvector to store read TLEs
islsvector to store read ISLs

Definition at line 391 of file satellite-helper.cc.

References m_fwdConfFileName, m_gwPosFileName, m_rtnConfFileName, m_satConf, m_satPosFileName, m_scenarioPath, m_utPosFileName, and m_waveformConfDirectoryName.

Referenced by SatHelper().

+ Here is the caller graph for this function:

◆ LoadMobileUtFromFile() [1/2]

Ptr< Node > ns3::SatHelper::LoadMobileUtFromFile ( const std::string &  filename)

Load an UT with a SatTracedMobilityModel associated to them from the given file.

Parameters
filenameName of the trace file containing UT positions

Definition at line 1090 of file satellite-helper.cc.

References m_antennaGainPatterns, m_handoversEnabled, and ns3::GeoCoordinate::SPHERE.

Referenced by LoadMobileUTsFromFolder().

+ Here is the caller graph for this function:

◆ LoadMobileUtFromFile() [2/2]

Ptr< Node > ns3::SatHelper::LoadMobileUtFromFile ( uint32_t  satId,
const std::string &  filename 
)

Load an UT with a SatTracedMobilityModel associated to them from the given file.

Parameters
satIdSatellite ID
filenameName of the trace file containing UT positions

Definition at line 1122 of file satellite-helper.cc.

References m_antennaGainPatterns, and m_handoversEnabled.

◆ LoadMobileUTsFromFolder()

void ns3::SatHelper::LoadMobileUTsFromFolder ( const std::string &  folderName,
Ptr< RandomVariableStream >  utUsers 
)

Load UTs with a SatTracedMobilityModel associated to them from the files found in the given folder.

Each UT will be associated to the beam it is at it's starting position.

Parameters
folderNameName of the folder to search for mobility trace files
utUsersStream to generate the number of users associated to each loaded UT

Definition at line 1040 of file satellite-helper.cc.

References InstallMobilityObserver(), LoadMobileUtFromFile(), m_mobileUtsByBeam, and m_mobileUtsUsersByBeam.

+ Here is the call graph for this function:

◆ ReadStandard()

void ns3::SatHelper::ReadStandard ( std::string  pathName)
private

Read to standard use from file given in path.

Parameters
pathNamePath of file containing the standard used

Definition at line 1857 of file satellite-helper.cc.

References ns3::SatEnums::DVB, ns3::SatEnums::LORA, and m_standard.

Referenced by SatHelper().

+ Here is the caller graph for this function:

◆ SetAntennaGainPatterns()

void ns3::SatHelper::SetAntennaGainPatterns ( Ptr< SatAntennaGainPatternContainer antennaGainPattern)

Set the antenna gain patterns.

Parameters
antennaGainPatternThe pattern to set

Definition at line 461 of file satellite-helper.cc.

References m_antennaGainPatterns.

◆ SetBeamRoutingConstellations()

void ns3::SatHelper::SetBeamRoutingConstellations ( )

Populate the routes, when using constellations.

Definition at line 1013 of file satellite-helper.cc.

References m_userHelper, and m_utsDistribution.

Referenced by DoCreateScenario().

+ Here is the caller graph for this function:

◆ SetCustomUtPositionAllocator()

void ns3::SatHelper::SetCustomUtPositionAllocator ( Ptr< SatListPositionAllocator posAllocator)

Set custom position allocator.

Parameters
posAllocator

Definition at line 567 of file satellite-helper.cc.

References m_utPositions.

◆ SetGroupHelper()

void ns3::SatHelper::SetGroupHelper ( Ptr< SatGroupHelper groupHelper)

set the group helper.

Definition at line 454 of file satellite-helper.cc.

References m_groupHelper.

◆ SetGwAddressInUts()

void ns3::SatHelper::SetGwAddressInUts ( )

Set the value of GW address for each UT.

This method is called when using constellations.

Definition at line 983 of file satellite-helper.cc.

References ns3::SatEnums::DVB, ns3::SatEnums::LORA, and m_standard.

Referenced by DoCreateScenario().

+ Here is the caller graph for this function:

◆ SetGwMobility()

void ns3::SatHelper::SetGwMobility ( NodeContainer  gwNodes)
private

Sets mobilities to created GW nodes.

Parameters
gwNodesnode container of UTs to set mobility

Definition at line 1149 of file satellite-helper.cc.

References InstallMobilityObserver(), m_antennaGainPatterns, m_handoversEnabled, m_satConf, and m_satConstellationEnabled.

Referenced by DoCreateScenario().

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

◆ SetMulticastGroupRoutes()

void ns3::SatHelper::SetMulticastGroupRoutes ( Ptr< Node >  source,
NodeContainer  receivers,
Ipv4Address  sourceAddress,
Ipv4Address  groupAddress 
)

Set multicast group to satellite network and IP router.

Add needed routes to net devices.

Parameters
sourceSource node of the multicast group (GW or UT connected user node)
receiversReceiver nodes of the multicast group. (GW or UT connected user nodes)
sourceAddressSource address of the multicast group.
groupAddressAddress of the multicast group.

Definition at line 1376 of file satellite-helper.cc.

References ConstructMulticastInfo(), FindMatchingDevice(), FindMatchingDevices(), m_beamHelper, m_userHelper, and SetMulticastRouteToSourceNetwork().

+ Here is the call graph for this function:

◆ SetMulticastRouteToSourceNetwork()

void ns3::SatHelper::SetMulticastRouteToSourceNetwork ( Ptr< Node >  source,
Ptr< Node >  destination 
)
private

Set multicast traffic to source's nwtwork by finding source network utilizing given destination node.

Note that all multicast traffic is routed by source through selected device in source node to found network.

Parameters
sourcePointer to source node of the multicast traffic.
destinationPointer to destination node where to find matching source network

Definition at line 1577 of file satellite-helper.cc.

References FindMatchingDevices().

Referenced by SetMulticastGroupRoutes().

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

◆ SetNetworkAddresses()

void ns3::SatHelper::SetNetworkAddresses ( BeamUserInfoMap_t info,
uint32_t  gwUsers 
) const
private

Set configured network addresses to user and beam helpers.

Definition at line 1703 of file satellite-helper.cc.

References CheckNetwork(), m_beamHelper, m_beamNetworkAddress, m_beamNetworkMask, m_gwNetworkAddress, m_gwNetworkMask, m_userHelper, m_utNetworkAddress, and m_utNetworkMask.

Referenced by DoCreateScenario().

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

◆ SetSatMobility() [1/2]

void ns3::SatHelper::SetSatMobility ( Ptr< Node >  node)
private

Sets mobility to created Sat node.

Parameters
nodenode pointer of Satellite to set mobility

Definition at line 1309 of file satellite-helper.cc.

References m_satConf.

Referenced by SatHelper().

+ Here is the caller graph for this function:

◆ SetSatMobility() [2/2]

void ns3::SatHelper::SetSatMobility ( Ptr< Node >  node,
std::string  tle 
)
private

Sets SGP4 mobility to created Sat node.

Parameters
nodenode pointer of Satellite to set mobility
tlethe TLE linked to this satellite

Definition at line 1323 of file satellite-helper.cc.

References m_satConf.

◆ SetUtMobility()

void ns3::SatHelper::SetUtMobility ( NodeContainer  uts,
uint32_t  satId,
uint32_t  beamId 
)
private

Sets mobility to created UT nodes.

Parameters
utsnode container of UTs to set mobility
satIdthe satellite id, where the UTs should be placed
beamIdthe spot-beam id, where the UTs should be placed

Definition at line 1196 of file satellite-helper.cc.

References GetBeamAllocator(), InstallMobilityObserver(), m_antennaGainPatterns, m_utPositions, and m_utPositionsByBeam.

Referenced by DoCreateScenario().

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

◆ SetUtMobilityFromPosition()

void ns3::SatHelper::SetUtMobilityFromPosition ( NodeContainer  uts,
uint32_t  satId,
uint32_t  beamId,
std::vector< std::pair< GeoCoordinate, uint32_t >>  positionsAndGroupId 
)
private

Sets mobility to created UT nodes when position is known.

Parameters
utsnode container of UTs to set mobility
satIdthe satellite id, where the UTs should be placed
beamIdthe spot-beam id, where the UTs should be placed
positionsAndGroupIdthe list of known positions, associated to a group ID

Definition at line 1240 of file satellite-helper.cc.

References InstallMobilityObserver(), m_antennaGainPatterns, and m_groupHelper.

Referenced by DoCreateScenario().

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

◆ SetUtPositionAllocatorForBeam()

void ns3::SatHelper::SetUtPositionAllocatorForBeam ( uint32_t  beamId,
Ptr< SatListPositionAllocator posAllocator 
)

Set custom position allocator for specific beam.

This overrides the custom position allocator for this beam.

Parameters
beamId
posAllocator

Definition at line 574 of file satellite-helper.cc.

References m_utPositionsByBeam.

Member Data Documentation

◆ m_antennaGainPatterns

◆ m_beamHelper

◆ m_beamNetworkAddress

Ipv4Address ns3::SatHelper::m_beamNetworkAddress
private

Initial network number of satellite devices, e.g., 10.1.1.0.

Definition at line 354 of file satellite-helper.h.

Referenced by GetTypeId(), and SetNetworkAddresses().

◆ m_beamNetworkMask

Ipv4Mask ns3::SatHelper::m_beamNetworkMask
private

Network mask number of satellite devices.

Definition at line 359 of file satellite-helper.h.

Referenced by GetTypeId(), and SetNetworkAddresses().

◆ m_beamUserInfos

BeamUserInfoMap_t ns3::SatHelper::m_beamUserInfos
private

Info for beam creation in user defined scenario.

first is ID of the beam and second is number of beam created in beam. If second is zero then default number of UTs is created (number set by attribute UtCount)

Info is set by attribute BeamInfo

Definition at line 411 of file satellite-helper.h.

Referenced by CreateFullScenario().

◆ m_creationDetailsTrace

TracedCallback<std::string> ns3::SatHelper::m_creationDetailsTrace
private

Trace callback for creation traces (details)

Definition at line 335 of file satellite-helper.h.

Referenced by GetTypeId().

◆ m_creationSummaryTrace

TracedCallback<std::string> ns3::SatHelper::m_creationSummaryTrace
private

◆ m_creationTraces

bool ns3::SatHelper::m_creationTraces
private

flag to indicate if creation trace should be enabled for scenario creation.

Definition at line 376 of file satellite-helper.h.

Referenced by DoCreateScenario(), and GetTypeId().

◆ m_creationTraceStream

Ptr<OutputStreamWrapper> ns3::SatHelper::m_creationTraceStream
private

Stream wrapper used for creation traces.

Definition at line 346 of file satellite-helper.h.

Referenced by CreationSummarySink(), EnableCreationTraces(), and EnableDetailedCreationTraces().

◆ m_detailedCreationTraces

bool ns3::SatHelper::m_detailedCreationTraces
private

flag to indicate if detailed creation trace should be enabled for scenario creation.

Definition at line 381 of file satellite-helper.h.

Referenced by EnableCreationTraces(), and GetTypeId().

◆ m_fwdConfFileName

std::string ns3::SatHelper::m_fwdConfFileName
private

Definition at line 296 of file satellite-helper.h.

Referenced by SatHelper(), and LoadConstellationTopology().

◆ m_groupHelper

Ptr<SatGroupHelper> ns3::SatHelper::m_groupHelper
private

◆ m_gwNetworkAddress

Ipv4Address ns3::SatHelper::m_gwNetworkAddress
private

Initial network number of GW, router, and GW users, e.g., 10.2.1.0.

Definition at line 356 of file satellite-helper.h.

Referenced by GetTypeId(), and SetNetworkAddresses().

◆ m_gwNetworkMask

Ipv4Mask ns3::SatHelper::m_gwNetworkMask
private

Network mask number of GW, router, and GW users.

Definition at line 360 of file satellite-helper.h.

Referenced by GetTypeId(), and SetNetworkAddresses().

◆ m_gwPosFileName

std::string ns3::SatHelper::m_gwPosFileName
private

Definition at line 297 of file satellite-helper.h.

Referenced by SatHelper(), and LoadConstellationTopology().

◆ m_gwSats

std::map<uint32_t, uint32_t> ns3::SatHelper::m_gwSats
private

Map of closest satellite for each GW.

Definition at line 457 of file satellite-helper.h.

Referenced by LoadConstellationScenario().

◆ m_gwUsers

uint32_t ns3::SatHelper::m_gwUsers
private

Number of users created in public network (behind GWs) in full or user-defined scenario.

Definition at line 396 of file satellite-helper.h.

Referenced by CreateFullScenario(), CreateUserDefinedScenario(), CreateUserDefinedScenarioFromListPositions(), and GetTypeId().

◆ m_handoversEnabled

bool ns3::SatHelper::m_handoversEnabled
private

Enable handovers for all UTs and GWs.

If false, only moving UTs can perform handovers.

Definition at line 366 of file satellite-helper.h.

Referenced by DoCreateScenario(), GetTypeId(), LoadMobileUtFromFile(), and SetGwMobility().

◆ m_mobileUtsByBeam

std::map<uint32_t, NodeContainer> ns3::SatHelper::m_mobileUtsByBeam
private

List of mobile UTs by beam ID.

Definition at line 447 of file satellite-helper.h.

Referenced by DoCreateScenario(), DoDispose(), and LoadMobileUTsFromFolder().

◆ m_mobileUtsUsersByBeam

std::multimap<uint32_t, uint32_t> ns3::SatHelper::m_mobileUtsUsersByBeam
private

List of users by mobile UT by beam ID.

Definition at line 452 of file satellite-helper.h.

Referenced by DoCreateScenario(), DoDispose(), and LoadMobileUTsFromFolder().

◆ m_packetTraces

bool ns3::SatHelper::m_packetTraces
private

flag to indicate if packet trace should be enabled after scenario creation.

Definition at line 386 of file satellite-helper.h.

Referenced by DoCreateScenario(), and GetTypeId().

◆ m_rtnConfFileName

std::string ns3::SatHelper::m_rtnConfFileName
private

Configuration file names as attributes of this class.

Definition at line 295 of file satellite-helper.h.

Referenced by SatHelper(), and LoadConstellationTopology().

◆ m_satConf

◆ m_satConstellationEnabled

bool ns3::SatHelper::m_satConstellationEnabled
private

Use a constellation of satellites.

Definition at line 305 of file satellite-helper.h.

Referenced by SatHelper(), DoCreateScenario(), GetBeamAllocator(), IsSatConstellationEnabled(), and SetGwMobility().

◆ m_satPosFileName

std::string ns3::SatHelper::m_satPosFileName
private

Definition at line 298 of file satellite-helper.h.

Referenced by SatHelper(), and LoadConstellationTopology().

◆ m_scenarioCreated

bool ns3::SatHelper::m_scenarioCreated
private

flag to check if scenario is already created.

Definition at line 371 of file satellite-helper.h.

Referenced by DoCreateScenario().

◆ m_scenarioCreationFileName

std::string ns3::SatHelper::m_scenarioCreationFileName
private

File name for scenario creation trace output.

Definition at line 416 of file satellite-helper.h.

Referenced by EnableCreationTraces(), and GetTypeId().

◆ m_scenarioPath

std::string ns3::SatHelper::m_scenarioPath
private

Scenario folder path.

Definition at line 290 of file satellite-helper.h.

Referenced by SatHelper(), and LoadConstellationTopology().

◆ m_standard

SatEnums::Standard_t ns3::SatHelper::m_standard
private

Definition at line 310 of file satellite-helper.h.

Referenced by SatHelper(), DoCreateScenario(), ReadStandard(), and SetGwAddressInUts().

◆ m_userHelper

◆ m_utCreationFileName

std::string ns3::SatHelper::m_utCreationFileName
private

File name for UT creation trace output.

Definition at line 421 of file satellite-helper.h.

Referenced by EnableCreationTraces(), and GetTypeId().

◆ m_utNetworkAddress

Ipv4Address ns3::SatHelper::m_utNetworkAddress
private

Initial network number of UT and UT users, e.g., 10.3.1.0.

Definition at line 357 of file satellite-helper.h.

Referenced by GetTypeId(), and SetNetworkAddresses().

◆ m_utNetworkMask

Ipv4Mask ns3::SatHelper::m_utNetworkMask
private

Network mask number of UT and UT users.

Definition at line 361 of file satellite-helper.h.

Referenced by GetTypeId(), and SetNetworkAddresses().

◆ m_utPosFileName

std::string ns3::SatHelper::m_utPosFileName
private

◆ m_utPositions

Ptr<SatListPositionAllocator> ns3::SatHelper::m_utPositions
private

User defined UT positions from SatConf (or manually set)

Definition at line 442 of file satellite-helper.h.

Referenced by CreateUserDefinedScenarioFromListPositions(), SetCustomUtPositionAllocator(), and SetUtMobility().

◆ m_utPositionsByBeam

std::map<uint32_t, Ptr<SatListPositionAllocator> > ns3::SatHelper::m_utPositionsByBeam
private

User defined UT positions by beam ID.

This is preferred to m_utPositions, which is a common list for all UTs.

Definition at line 437 of file satellite-helper.h.

Referenced by DoDispose(), SetUtMobility(), and SetUtPositionAllocatorForBeam().

◆ m_utsDistribution

std::map<Ptr<NetDevice>, NetDeviceContainer> ns3::SatHelper::m_utsDistribution
private

Map indicating all UT NetDevices associated to each GW NetDevice.

Definition at line 462 of file satellite-helper.h.

Referenced by DoCreateScenario(), and SetBeamRoutingConstellations().

◆ m_utsInBeam

uint32_t ns3::SatHelper::m_utsInBeam
private

Number of UTs created per Beam in full or user-defined scenario.

Definition at line 391 of file satellite-helper.h.

Referenced by CreateFullScenario(), and GetTypeId().

◆ m_utTraceStream

Ptr<OutputStreamWrapper> ns3::SatHelper::m_utTraceStream
private

Stream wrapper used for UT position traces.

Definition at line 351 of file satellite-helper.h.

Referenced by CreationSummarySink(), and EnableCreationTraces().

◆ m_utUsers

uint32_t ns3::SatHelper::m_utUsers
private

Number of users created in end user network (behind every UT) in full or user-defined scenario.

Definition at line 402 of file satellite-helper.h.

Referenced by CreateFullScenario(), and GetTypeId().

◆ m_waveformConfDirectoryName

std::string ns3::SatHelper::m_waveformConfDirectoryName
private

Definition at line 300 of file satellite-helper.h.

Referenced by SatHelper(), and LoadConstellationTopology().

◆ m_wfConfigFileName

std::string ns3::SatHelper::m_wfConfigFileName
private

File name for Waveform configurations file.

Definition at line 426 of file satellite-helper.h.

◆ MAX_ADDRESS_PREFIX_LENGTH

const uint16_t ns3::SatHelper::MAX_ADDRESS_PREFIX_LENGTH = 31
staticprivate

Definition at line 282 of file satellite-helper.h.

Referenced by CheckNetwork().

◆ MIN_ADDRESS_PREFIX_LENGTH

const uint16_t ns3::SatHelper::MIN_ADDRESS_PREFIX_LENGTH = 1
staticprivate

Definition at line 281 of file satellite-helper.h.

Referenced by CheckNetwork().


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