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 ()
 Create a base SatHelper for creating customized Satellite topologies. More...
 
 SatHelper (std::string scenarioName)
 Create a base SatHelper for creating customized Satellite topologies. More...
 
virtual ~SatHelper ()
 Destructor for SatHelper. More...
 
void CreateConstellationScenario (BeamUserInfoMap_t &info, GetNextUtUserCountCallback getNextUtUserCountCallback)
 Creates satellite objects according to constellation parameters. 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, bool checkBeam)
 Creates satellite objects according to user defined scenario. More...
 
void DoDispose ()
 Dispose of this class instance. More...
 
NodeContainer GeoSatNodes ()
 
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
 
uint32_t GetClosestSat (GeoCoordinate position)
 Get closest satellite to a ground station. More...
 
Ptr< SatGroupHelperGetGroupHelper () const
 
NodeContainer GetGwUsers () const
 
TypeId GetInstanceTypeId (void) const
 Get the type ID of object instance. More...
 
Ipv4Address GetUserAddress (Ptr< Node > node)
 
Ptr< SatUserHelperGetUserHelper () const
 
NodeContainer GetUtUsers () const
 
NodeContainer GetUtUsers (NodeContainer utNodes) const
 
NodeContainer GetUtUsers (Ptr< Node > utNode) const
 
NodeContainer GwNodes ()
 
bool IsSatConstellationEnabled ()
 
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 (uint32_t satId, 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 PrintTopology (std::ostream &os) const
 Print all the satellite topology. 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 SetGwAddressInUt ()
 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...
 
NodeContainer UtNodes ()
 

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::string path, std::vector< std::string > &tles, std::vector< std::pair< uint32_t, uint32_t >> &isls)
 Load a constellation topology. More...
 
void SetGeoSatMobility (Ptr< Node > node)
 Sets mobility to created Sat Geo node. More...
 
void SetGwMobility (uint32_t satId, Ptr< Node > gw, uint32_t gwIndex)
 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, 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
 
std::string m_geoPosFileName
 
Ptr< SatGroupHelperm_groupHelper
 Group helper. More...
 
std::map< Ptr< Node >, Ptr< Node > > m_gwDistribution
 Map indicating the GW node associated to each UT node. 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...
 
NodeContainer m_gwUser
 Gateway container. More...
 
uint32_t m_gwUsers
 Number of users created in public network (behind GWs) in full or user-defined scenario. 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_satConstellationFolder
 Folder where are stored satellite constellation data. More...
 
bool m_satMobilitySGP4Enabled
 The satellite moves following a SGP4 model. More...
 
std::string m_satMobilitySGP4TleFileName
 TLE input filename used for SGP4 mobility. More...
 
bool m_scenarioCreated
 flag to check if scenario is already created. More...
 
std::string m_scenarioCreationFileName
 File name for scenario creation trace output. 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...
 
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_waveformConfFileName
 
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 55 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 61 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 108 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 67 of file satellite-helper.h.

Constructor & Destructor Documentation

◆ SatHelper() [1/2]

◆ SatHelper() [2/2]

ns3::SatHelper::SatHelper ( std::string  scenarioName)

Create a base SatHelper for creating customized Satellite topologies.

◆ ~SatHelper()

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

Destructor for SatHelper.

Definition at line 100 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 1827 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 1651 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:

◆ CreateConstellationScenario()

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

Creates 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 692 of file satellite-helper.cc.

References DoCreateScenario(), m_antennaGainPatterns, m_beamHelper, m_groupHelper, m_gwSats, m_gwUsers, and m_satConf.

+ Here is the call 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 1410 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 588 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 565 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 351 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 551 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 618 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,
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
checkBeamCheck that positions (set through SatConf) match with given beam (the beam is the best according to configured antenna patterns).

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

References DoCreateScenario(), m_antennaGainPatterns, m_creationSummaryTrace, m_gwUsers, m_satConf, 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 1393 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 1401 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 1427 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 376 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 438 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 402 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 1588 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 1566 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:

◆ GeoSatNodes()

NodeContainer ns3::SatHelper::GeoSatNodes ( )
inline

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

References m_beamHelper.

◆ GetAntennaGainPatterns()

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

Definition at line 530 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 1198 of file satellite-helper.cc.

References m_antennaGainPatterns, m_beamHelper, m_satConf, and m_satMobilitySGP4Enabled.

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 543 of file satellite-helper.cc.

References m_satConf.

◆ GetBeamHelper()

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

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

References m_beamHelper.

◆ GetClosestSat()

uint32_t ns3::SatHelper::GetClosestSat ( GeoCoordinate  position)

Get closest satellite to a ground station.

Parameters
positionThe position of the ground station
Returns
The ID of the closest satellite

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

References m_beamHelper.

Referenced by SetGwAddressInUt().

+ Here is the caller graph for this function:

◆ GetGroupHelper()

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

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

References m_groupHelper.

◆ GetGwUsers()

NodeContainer ns3::SatHelper::GetGwUsers ( ) const
Returns
container having GW users.

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

References m_userHelper.

◆ GetInstanceTypeId()

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

Get the type ID of object instance.

Returns
the TypeId of object instance

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

References GetTypeId().

+ Here is the call graph for this function:

◆ GetTypeId()

◆ GetUserAddress()

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

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

◆ GetUserHelper()

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

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

References m_userHelper.

◆ GetUtUsers() [1/3]

NodeContainer ns3::SatHelper::GetUtUsers ( ) const
Returns
container having UT users

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

References m_userHelper.

Referenced by GetUtUsers().

+ Here is the caller graph for this function:

◆ GetUtUsers() [2/3]

NodeContainer ns3::SatHelper::GetUtUsers ( NodeContainer  utNodes) const
Parameters
utNodesContainer to UT nodes, which user nodes are requested.
Returns
A container having UT specific user nodes in satellite network.

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

References GetUtUsers().

+ Here is the call graph for this function:

◆ GetUtUsers() [3/3]

NodeContainer ns3::SatHelper::GetUtUsers ( Ptr< Node >  utNode) const
Parameters
utNodePointer to UT node, which user nodes are requested.
Returns
A container having UT specific user nodes in satellite network.

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

References m_userHelper.

◆ GwNodes()

NodeContainer ns3::SatHelper::GwNodes ( )
inline

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

References m_beamHelper.

Referenced by DoCreateScenario(), and SetBeamRoutingConstellations().

+ Here is the caller graph for this function:

◆ 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 1262 of file satellite-helper.cc.

References m_beamHelper, 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 305 of file satellite-helper.h.

References m_satConstellationEnabled.

◆ LoadConstellationTopology()

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

Load a constellation topology.

Parameters
pathFolder where configuration files are located
tlesvector to store read TLEs
islsvector to store read ISLs

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

References m_fwdConfFileName, m_geoPosFileName, m_rtnConfFileName, m_satConf, m_satMobilitySGP4TleFileName, and m_waveformConfFileName.

Referenced by SatHelper().

+ Here is the caller graph for this function:

◆ LoadMobileUtFromFile()

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
satIdID of satellite
filenameName of the trace file containing UT positions

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

References m_antennaGainPatterns.

Referenced by LoadMobileUTsFromFolder().

+ Here is the caller graph for this function:

◆ LoadMobileUTsFromFolder()

void ns3::SatHelper::LoadMobileUTsFromFolder ( uint32_t  satId,
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
satIdID of satellite
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 1034 of file satellite-helper.cc.

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

+ Here is the call graph for this function:

◆ PrintTopology()

void ns3::SatHelper::PrintTopology ( std::ostream &  os) const

Print all the satellite topology.

Parameters
osoutput stream in which the data should be printed

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

References m_beamHelper, and m_userHelper.

◆ SetAntennaGainPatterns()

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

Set the antenna gain patterns.

Parameters
antennaGainPatternThe pattern to set

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

References m_antennaGainPatterns.

◆ SetBeamRoutingConstellations()

void ns3::SatHelper::SetBeamRoutingConstellations ( )

Populate the routes, when using constellations.

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

References GwNodes(), m_userHelper, and m_utsDistribution.

Referenced by DoCreateScenario().

+ Here is the call graph for this function:
+ 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 629 of file satellite-helper.cc.

References m_utPositions.

◆ SetGeoSatMobility()

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

Sets mobility to created Sat Geo node.

Parameters
nodenode pointer of Geo Satellite to set mobility

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

References m_satConf.

Referenced by SatHelper().

+ Here is the caller graph for this function:

◆ SetGroupHelper()

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

set the group helper.

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

References m_groupHelper.

◆ SetGwAddressInUt()

void ns3::SatHelper::SetGwAddressInUt ( )

Set the value of GW address for each UT.

This method is called when using constellations.

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

References GetClosestSat(), m_beamHelper, and m_gwDistribution.

Referenced by DoCreateScenario().

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

◆ SetGwMobility()

void ns3::SatHelper::SetGwMobility ( uint32_t  satId,
Ptr< Node >  gw,
uint32_t  gwIndex 
)
private

Sets mobilities to created GW nodes.

Parameters
satIdID of the satellite link to this GW
gwGW to set mobility
gwIndexIndex of GW in SatConf

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

References InstallMobilityObserver(), and m_satConf.

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 1290 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 1616 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 1742 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()

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

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

References m_satConf.

Referenced by SatHelper().

+ Here is the caller graph for this function:

◆ 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 1114 of file satellite-helper.cc.

References GetBeamAllocator(), InstallMobilityObserver(), m_antennaGainPatterns, m_beamHelper, 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 1157 of file satellite-helper.cc.

References InstallMobilityObserver(), m_antennaGainPatterns, m_beamHelper, 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 636 of file satellite-helper.cc.

References m_utPositionsByBeam.

◆ UtNodes()

NodeContainer ns3::SatHelper::UtNodes ( )
inline

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

References m_beamHelper.

Referenced by DoCreateScenario().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_antennaGainPatterns

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

◆ 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 404 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 409 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 456 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 385 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 421 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 396 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 426 of file satellite-helper.h.

Referenced by EnableCreationTraces(), and GetTypeId().

◆ m_fwdConfFileName

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

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

Referenced by SatHelper(), GetTypeId(), and LoadConstellationTopology().

◆ m_geoPosFileName

std::string ns3::SatHelper::m_geoPosFileName
private

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

Referenced by SatHelper(), GetTypeId(), and LoadConstellationTopology().

◆ m_groupHelper

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

◆ m_gwDistribution

std::map<Ptr<Node>, Ptr<Node> > ns3::SatHelper::m_gwDistribution
private

Map indicating the GW node associated to each UT node.

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

Referenced by DoCreateScenario(), and SetGwAddressInUt().

◆ 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 406 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 410 of file satellite-helper.h.

Referenced by GetTypeId(), and SetNetworkAddresses().

◆ m_gwPosFileName

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

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

Referenced by SatHelper(), and GetTypeId().

◆ m_gwSats

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

Map of closest satellite for each GW.

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

Referenced by CreateConstellationScenario(), and DoCreateScenario().

◆ m_gwUser

NodeContainer ns3::SatHelper::m_gwUser
private

Gateway container.

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

◆ 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 441 of file satellite-helper.h.

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

◆ m_mobileUtsByBeam

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

List of mobile UTs by beam ID.

Definition at line 492 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 497 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 431 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 326 of file satellite-helper.h.

Referenced by SatHelper(), GetTypeId(), and LoadConstellationTopology().

◆ m_satConf

◆ m_satConstellationEnabled

bool ns3::SatHelper::m_satConstellationEnabled
private

Use a constellation of satellites.

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

Referenced by SatHelper(), DoCreateScenario(), GetTypeId(), and IsSatConstellationEnabled().

◆ m_satConstellationFolder

std::string ns3::SatHelper::m_satConstellationFolder
private

Folder where are stored satellite constellation data.

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

Referenced by SatHelper(), and GetTypeId().

◆ m_satMobilitySGP4Enabled

bool ns3::SatHelper::m_satMobilitySGP4Enabled
private

The satellite moves following a SGP4 model.

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

Referenced by SatHelper(), GetBeamAllocator(), and GetTypeId().

◆ m_satMobilitySGP4TleFileName

std::string ns3::SatHelper::m_satMobilitySGP4TleFileName
private

TLE input filename used for SGP4 mobility.

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

Referenced by SatHelper(), GetTypeId(), and LoadConstellationTopology().

◆ m_scenarioCreated

bool ns3::SatHelper::m_scenarioCreated
private

flag to check if scenario is already created.

Definition at line 416 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 461 of file satellite-helper.h.

Referenced by EnableCreationTraces(), and GetTypeId().

◆ m_standard

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

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

Referenced by SatHelper(), DoCreateScenario(), and GetTypeId().

◆ m_userHelper

◆ m_utCreationFileName

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

File name for UT creation trace output.

Definition at line 466 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 407 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 411 of file satellite-helper.h.

Referenced by GetTypeId(), and SetNetworkAddresses().

◆ m_utPositions

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

User defined UT positions from SatConf (or manually set)

Definition at line 487 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 482 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 512 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 436 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 401 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 447 of file satellite-helper.h.

Referenced by CreateFullScenario(), and GetTypeId().

◆ m_waveformConfFileName

std::string ns3::SatHelper::m_waveformConfFileName
private

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

Referenced by SatHelper(), GetTypeId(), and LoadConstellationTopology().

◆ m_wfConfigFileName

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

File name for Waveform configurations file.

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

◆ MAX_ADDRESS_PREFIX_LENGTH

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

Definition at line 318 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 317 of file satellite-helper.h.

Referenced by CheckNetwork().


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