ns3::SatIdMapper Class Reference

Class for ID-mapper. More...

#include "satellite-id-mapper.h"

+ Inheritance diagram for ns3::SatIdMapper:
+ Collaboration diagram for ns3::SatIdMapper:

Public Member Functions

 SatIdMapper ()
 Constructor. More...
 
 ~SatIdMapper ()
 Destructor. More...
 
void AttachMacToBeamId (Address mac, uint32_t beamId)
 Attach MAC address to the beam ID maps. More...
 
void AttachMacToGroupId (Address mac, uint32_t groupId)
 Attach MAC address to the group ID maps. More...
 
void AttachMacToGwId (Address mac, uint32_t gwId)
 Attach MAC address to the GW ID maps. More...
 
uint32_t AttachMacToGwUserId (Address mac)
 Attach MAC address to the GW user ID maps and give it a running GW user ID (starting from 1) More...
 
void AttachMacToSatId (Address mac, uint32_t satId)
 Attach MAC address to the SAT ID maps and give it a running SAT ID (starting from 1) More...
 
void AttachMacToSatIdIsl (Mac48Address mac, uint32_t satId)
 Attach GW/UT MAC address to the satellite this node is connected. More...
 
uint32_t AttachMacToTraceId (Address mac)
 Attach MAC address to the Trace ID maps and give it a running trace ID (starting from 1) More...
 
uint32_t AttachMacToUtId (Address mac)
 Attach MAC address to the UT ID maps and give it a running UT ID (starting from 1) More...
 
uint32_t AttachMacToUtUserId (Address mac)
 Attach MAC address to the UT user ID maps and give it a running UT user ID (starting from 1) More...
 
void DoDispose ()
 Do needed dispose actions. More...
 
void EnableMapPrint (bool enableMapPrint)
 Function for enabling the map prints. More...
 
int32_t GetBeamIdWithMac (Address mac) const
 Function for getting the beam ID with MAC. More...
 
int32_t GetGroupIdWithMac (Address mac) const
 Function for getting the group ID with MAC. More...
 
int32_t GetGwIdWithMac (Address mac) const
 Function for getting the GW ID with MAC. More...
 
Address GetGwMacWithNode (Ptr< Node > gwNode) const
 
int32_t GetGwUserIdWithMac (Address mac) const
 Function for getting the GW user ID with MAC. More...
 
std::string GetMacInfo (Address mac) const
 Function for getting the IDs related to a MAC address in an info string. More...
 
int32_t GetSatIdWithMac (Address mac) const
 Function for getting the SAT ID with MAC. More...
 
int32_t GetSatIdWithMacIsl (Mac48Address mac) const
 Function for getting the satellite ID connected to a GW/UT MAC address. More...
 
Address GetSatMacWithNode (Ptr< Node > satNode) const
 
int32_t GetTraceIdWithMac (Address mac) const
 Function for getting the trace ID with MAC. More...
 
int32_t GetUtIdWithMac (Address mac) const
 Function for getting the UT ID with MAC. More...
 
Address GetUtMacWithNode (Ptr< Node > utNode) const
 
int32_t GetUtUserIdWithMac (Address mac) const
 Function for getting the UT user ID with MAC. More...
 
Address GetUtUserMacWithNode (Ptr< Node > utUserNode) const
 
void PrintTraceMap () const
 Function for printing out the trace map. More...
 
void RemoveMacToSatIdIsl (Mac48Address mac)
 Remove GW/UT MAC address to the satellite this node is connected. More...
 
void Reset ()
 Function for resetting the variables. More...
 
void ShowIslMap ()
 Print the map GW/UT address to satellite ID. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 NS-3 type id function. More...
 

Private Attributes

bool m_enableMapPrint
 Is map printing enabled or not. More...
 
uint32_t m_gwUserIdIndex
 Running GW user index number. More...
 
std::map< Address, uint32_t > m_macToBeamIdMap
 Map for MAC to beam ID conversion. More...
 
std::map< Address, uint32_t > m_macToGroupIdMap
 Map for MAC to group ID conversion. More...
 
std::map< Address, uint32_t > m_macToGwIdMap
 Map for MAC to GW ID conversion. More...
 
std::map< Address, uint32_t > m_macToGwUserIdMap
 Map for MAC to GW user ID conversion. More...
 
std::map< Mac48Address, uint32_t > m_macToSatIdIslMap
 Map for GW/UT MAC to associated SAT ID conversion. More...
 
std::map< Address, uint32_t > m_macToSatIdMap
 Map for MAC to SAT ID conversion. More...
 
std::map< Address, uint32_t > m_macToTraceIdMap
 Map for MAC to trace ID conversion. More...
 
std::map< Address, uint32_t > m_macToUtIdMap
 Map for MAC to UT ID conversion. More...
 
std::map< Address, uint32_t > m_macToUtUserIdMap
 Map for MAC to UT user ID conversion. More...
 
uint32_t m_traceIdIndex
 Running trace index number. More...
 
uint32_t m_utIdIndex
 Running UT index number. More...
 
uint32_t m_utUserIdIndex
 Running UT user index number. More...
 

Detailed Description

Class for ID-mapper.

The class enables mapping of a specific MAC-address to UT/GW/user/beam/group ID. These IDs can be obtained with MAC-address by using the provided functions. It is also possible to obtain the MAC-address with node.

Definition at line 43 of file satellite-id-mapper.h.

Constructor & Destructor Documentation

◆ SatIdMapper()

ns3::SatIdMapper::SatIdMapper ( )

Constructor.

Definition at line 47 of file satellite-id-mapper.cc.

◆ ~SatIdMapper()

ns3::SatIdMapper::~SatIdMapper ( )

Destructor.

Definition at line 57 of file satellite-id-mapper.cc.

References Reset().

+ Here is the call graph for this function:

Member Function Documentation

◆ AttachMacToBeamId()

void ns3::SatIdMapper::AttachMacToBeamId ( Address  mac,
uint32_t  beamId 
)

Attach MAC address to the beam ID maps.

Parameters
macMAC address
beamIdbeam ID

Definition at line 247 of file satellite-id-mapper.cc.

References m_macToBeamIdMap.

◆ AttachMacToGroupId()

void ns3::SatIdMapper::AttachMacToGroupId ( Address  mac,
uint32_t  groupId 
)

Attach MAC address to the group ID maps.

Parameters
macMAC address
groupIdgroup ID

Definition at line 263 of file satellite-id-mapper.cc.

References m_macToGroupIdMap.

◆ AttachMacToGwId()

void ns3::SatIdMapper::AttachMacToGwId ( Address  mac,
uint32_t  gwId 
)

Attach MAC address to the GW ID maps.

Parameters
macMAC address
gwIdGW ID

Definition at line 279 of file satellite-id-mapper.cc.

References m_macToGwIdMap.

◆ AttachMacToGwUserId()

uint32_t ns3::SatIdMapper::AttachMacToGwUserId ( Address  mac)

Attach MAC address to the GW user ID maps and give it a running GW user ID (starting from 1)

Parameters
macMAC address
Returns
the GW user ID assigned to the given MAC address

Definition at line 295 of file satellite-id-mapper.cc.

References m_gwUserIdIndex, and m_macToGwUserIdMap.

◆ AttachMacToSatId()

void ns3::SatIdMapper::AttachMacToSatId ( Address  mac,
uint32_t  satId 
)

Attach MAC address to the SAT ID maps and give it a running SAT ID (starting from 1)

Parameters
macMAC address
satIdsatellite ID

Definition at line 231 of file satellite-id-mapper.cc.

References m_macToSatIdMap.

◆ AttachMacToSatIdIsl()

void ns3::SatIdMapper::AttachMacToSatIdIsl ( Mac48Address  mac,
uint32_t  satId 
)

Attach GW/UT MAC address to the satellite this node is connected.

Parameters
macMAC address
satIdThe satellite ID this MAC is connected to

Definition at line 315 of file satellite-id-mapper.cc.

References m_macToSatIdIslMap.

◆ AttachMacToTraceId()

uint32_t ns3::SatIdMapper::AttachMacToTraceId ( Address  mac)

Attach MAC address to the Trace ID maps and give it a running trace ID (starting from 1)

Parameters
macMAC address
Returns
the trace ID assigned to the given MAC address

Definition at line 169 of file satellite-id-mapper.cc.

References m_macToTraceIdMap, and m_traceIdIndex.

◆ AttachMacToUtId()

uint32_t ns3::SatIdMapper::AttachMacToUtId ( Address  mac)

Attach MAC address to the UT ID maps and give it a running UT ID (starting from 1)

Parameters
macMAC address
Returns
the UT ID assigned to the given MAC address

Definition at line 191 of file satellite-id-mapper.cc.

References m_macToUtIdMap, and m_utIdIndex.

◆ AttachMacToUtUserId()

uint32_t ns3::SatIdMapper::AttachMacToUtUserId ( Address  mac)

Attach MAC address to the UT user ID maps and give it a running UT user ID (starting from 1)

Parameters
macMAC address
Returns
the UT user ID assigned to the given MAC address

Definition at line 211 of file satellite-id-mapper.cc.

References m_macToUtUserIdMap, and m_utUserIdIndex.

◆ DoDispose()

void ns3::SatIdMapper::DoDispose ( void  )

Do needed dispose actions.

Definition at line 65 of file satellite-id-mapper.cc.

References Reset().

+ Here is the call graph for this function:

◆ EnableMapPrint()

void ns3::SatIdMapper::EnableMapPrint ( bool  enableMapPrint)
inline

Function for enabling the map prints.

Definition at line 264 of file satellite-id-mapper.h.

References m_enableMapPrint.

◆ GetBeamIdWithMac()

int32_t ns3::SatIdMapper::GetBeamIdWithMac ( Address  mac) const

Function for getting the beam ID with MAC.

Returns -1 if the MAC is not in the map

Parameters
macMAC address
Returns
beam ID

Definition at line 406 of file satellite-id-mapper.cc.

References m_macToBeamIdMap.

Referenced by ns3::SatStatsHelper::GetIdentifierForUt(), and ns3::SatStatsHelper::GetIdentifierForUtUser().

+ Here is the caller graph for this function:

◆ GetGroupIdWithMac()

int32_t ns3::SatIdMapper::GetGroupIdWithMac ( Address  mac) const

Function for getting the group ID with MAC.

Returns 0 if the MAC is not in the map (default group)

Parameters
macMAC address
Returns
group ID

Definition at line 421 of file satellite-id-mapper.cc.

References m_macToGroupIdMap.

Referenced by ns3::SatStatsHelper::GetIdentifierForUt(), and ns3::SatStatsHelper::GetIdentifierForUtUser().

+ Here is the caller graph for this function:

◆ GetGwIdWithMac()

int32_t ns3::SatIdMapper::GetGwIdWithMac ( Address  mac) const

Function for getting the GW ID with MAC.

Returns -1 if the MAC is not in the map

Parameters
macMAC address
Returns
GW ID

Definition at line 436 of file satellite-id-mapper.cc.

References m_macToGwIdMap.

Referenced by ns3::SatStatsHelper::GetGwId().

+ Here is the caller graph for this function:

◆ GetGwMacWithNode()

Address ns3::SatIdMapper::GetGwMacWithNode ( Ptr< Node >  gwNode) const
Parameters
gwNodepointer to a GW node
Returns
the MAC address of the GW node's first satellite beam network device, or an invalid address if such device is not found.

Definition at line 483 of file satellite-id-mapper.cc.

Referenced by ns3::SatStatsHelper::GetGwId().

+ Here is the caller graph for this function:

◆ GetGwUserIdWithMac()

int32_t ns3::SatIdMapper::GetGwUserIdWithMac ( Address  mac) const

Function for getting the GW user ID with MAC.

Returns -1 if the MAC is not in the map

Parameters
macMAC address
Returns
GW user ID

Definition at line 451 of file satellite-id-mapper.cc.

References m_macToGwUserIdMap.

◆ GetMacInfo()

std::string ns3::SatIdMapper::GetMacInfo ( Address  mac) const

Function for getting the IDs related to a MAC address in an info string.

Parameters
macMAC address
Returns
info string

Definition at line 629 of file satellite-id-mapper.cc.

References m_macToBeamIdMap, m_macToGroupIdMap, m_macToGwIdMap, m_macToSatIdMap, m_macToTraceIdMap, and m_macToUtIdMap.

Referenced by PrintTraceMap().

+ Here is the caller graph for this function:

◆ GetSatIdWithMac()

int32_t ns3::SatIdMapper::GetSatIdWithMac ( Address  mac) const

Function for getting the SAT ID with MAC.

Returns -1 if the MAC is not in the map

Parameters
macMAC address
Returns
SAT user ID

Definition at line 391 of file satellite-id-mapper.cc.

References m_macToSatIdMap.

Referenced by ns3::SatStatsHelper::GetIdentifierForUt(), ns3::SatStatsHelper::GetIdentifierForUtUser(), and ns3::SatStatsHelper::GetSatId().

+ Here is the caller graph for this function:

◆ GetSatIdWithMacIsl()

int32_t ns3::SatIdMapper::GetSatIdWithMacIsl ( Mac48Address  mac) const

Function for getting the satellite ID connected to a GW/UT MAC address.

Parameters
macMAC address
Returns
satellite ID

Definition at line 466 of file satellite-id-mapper.cc.

References m_macToSatIdIslMap.

◆ GetSatMacWithNode()

Address ns3::SatIdMapper::GetSatMacWithNode ( Ptr< Node >  satNode) const
Parameters
satNodepointer to a SAT node
Returns
the MAC address of the SAT node's first satellite beam network device, or an invalid address if such device is not found.

Definition at line 523 of file satellite-id-mapper.cc.

Referenced by ns3::SatStatsHelper::GetSatId().

+ Here is the caller graph for this function:

◆ GetTraceIdWithMac()

int32_t ns3::SatIdMapper::GetTraceIdWithMac ( Address  mac) const

Function for getting the trace ID with MAC.

Returns -1 if the MAC is not in the map

Parameters
macMAC address
Returns
Trace ID

Definition at line 346 of file satellite-id-mapper.cc.

References m_macToTraceIdMap.

◆ GetTypeId()

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

NS-3 type id function.

Returns
type id

Definition at line 40 of file satellite-id-mapper.cc.

◆ GetUtIdWithMac()

int32_t ns3::SatIdMapper::GetUtIdWithMac ( Address  mac) const

Function for getting the UT ID with MAC.

Returns -1 if the MAC is not in the map

Parameters
macMAC address
Returns
UT ID

Definition at line 361 of file satellite-id-mapper.cc.

References m_macToUtIdMap.

Referenced by ns3::SatStatsHelper::GetUtId().

+ Here is the caller graph for this function:

◆ GetUtMacWithNode()

◆ GetUtUserIdWithMac()

int32_t ns3::SatIdMapper::GetUtUserIdWithMac ( Address  mac) const

Function for getting the UT user ID with MAC.

Returns -1 if the MAC is not in the map

Parameters
macMAC address
Returns
UT user ID

Definition at line 376 of file satellite-id-mapper.cc.

References m_macToUtUserIdMap.

Referenced by ns3::SatStatsHelper::GetUtUserId().

+ Here is the caller graph for this function:

◆ GetUtUserMacWithNode()

Address ns3::SatIdMapper::GetUtUserMacWithNode ( Ptr< Node >  utUserNode) const
Parameters
utUserNodepointer to a UT user node
Returns
MAC address of the UT user node's subscriber network device, or an invalid address if such device is not found.

Definition at line 597 of file satellite-id-mapper.cc.

Referenced by ns3::SatStatsHelper::GetUtUserId().

+ Here is the caller graph for this function:

◆ PrintTraceMap()

void ns3::SatIdMapper::PrintTraceMap ( ) const

Function for printing out the trace map.

Definition at line 699 of file satellite-id-mapper.cc.

References GetMacInfo(), and m_macToTraceIdMap.

Referenced by Reset().

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

◆ RemoveMacToSatIdIsl()

void ns3::SatIdMapper::RemoveMacToSatIdIsl ( Mac48Address  mac)

Remove GW/UT MAC address to the satellite this node is connected.

Parameters
macMAC address

Definition at line 331 of file satellite-id-mapper.cc.

References m_macToSatIdIslMap.

◆ Reset()

void ns3::SatIdMapper::Reset ( )

Function for resetting the variables.

Definition at line 75 of file satellite-id-mapper.cc.

References m_enableMapPrint, m_gwUserIdIndex, m_macToBeamIdMap, m_macToGroupIdMap, m_macToGwIdMap, m_macToGwUserIdMap, m_macToSatIdIslMap, m_macToSatIdMap, m_macToTraceIdMap, m_macToUtIdMap, m_macToUtUserIdMap, m_traceIdIndex, m_utIdIndex, m_utUserIdIndex, and PrintTraceMap().

Referenced by ~SatIdMapper(), and DoDispose().

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

◆ ShowIslMap()

void ns3::SatIdMapper::ShowIslMap ( )

Print the map GW/UT address to satellite ID.

Definition at line 155 of file satellite-id-mapper.cc.

References m_macToSatIdIslMap.

Member Data Documentation

◆ m_enableMapPrint

bool ns3::SatIdMapper::m_enableMapPrint
private

Is map printing enabled or not.

Definition at line 333 of file satellite-id-mapper.h.

Referenced by EnableMapPrint(), and Reset().

◆ m_gwUserIdIndex

uint32_t ns3::SatIdMapper::m_gwUserIdIndex
private

Running GW user index number.

Definition at line 288 of file satellite-id-mapper.h.

Referenced by AttachMacToGwUserId(), and Reset().

◆ m_macToBeamIdMap

std::map<Address, uint32_t> ns3::SatIdMapper::m_macToBeamIdMap
private

Map for MAC to beam ID conversion.

Definition at line 313 of file satellite-id-mapper.h.

Referenced by AttachMacToBeamId(), GetBeamIdWithMac(), GetMacInfo(), and Reset().

◆ m_macToGroupIdMap

std::map<Address, uint32_t> ns3::SatIdMapper::m_macToGroupIdMap
private

Map for MAC to group ID conversion.

Definition at line 318 of file satellite-id-mapper.h.

Referenced by AttachMacToGroupId(), GetGroupIdWithMac(), GetMacInfo(), and Reset().

◆ m_macToGwIdMap

std::map<Address, uint32_t> ns3::SatIdMapper::m_macToGwIdMap
private

Map for MAC to GW ID conversion.

Definition at line 323 of file satellite-id-mapper.h.

Referenced by AttachMacToGwId(), GetGwIdWithMac(), GetMacInfo(), and Reset().

◆ m_macToGwUserIdMap

std::map<Address, uint32_t> ns3::SatIdMapper::m_macToGwUserIdMap
private

Map for MAC to GW user ID conversion.

Definition at line 328 of file satellite-id-mapper.h.

Referenced by AttachMacToGwUserId(), GetGwUserIdWithMac(), and Reset().

◆ m_macToSatIdIslMap

std::map<Mac48Address, uint32_t> ns3::SatIdMapper::m_macToSatIdIslMap
private

Map for GW/UT MAC to associated SAT ID conversion.

Definition at line 338 of file satellite-id-mapper.h.

Referenced by AttachMacToSatIdIsl(), GetSatIdWithMacIsl(), RemoveMacToSatIdIsl(), Reset(), and ShowIslMap().

◆ m_macToSatIdMap

std::map<Address, uint32_t> ns3::SatIdMapper::m_macToSatIdMap
private

Map for MAC to SAT ID conversion.

Definition at line 308 of file satellite-id-mapper.h.

Referenced by AttachMacToSatId(), GetMacInfo(), GetSatIdWithMac(), and Reset().

◆ m_macToTraceIdMap

std::map<Address, uint32_t> ns3::SatIdMapper::m_macToTraceIdMap
private

Map for MAC to trace ID conversion.

Definition at line 293 of file satellite-id-mapper.h.

Referenced by AttachMacToTraceId(), GetMacInfo(), GetTraceIdWithMac(), PrintTraceMap(), and Reset().

◆ m_macToUtIdMap

std::map<Address, uint32_t> ns3::SatIdMapper::m_macToUtIdMap
private

Map for MAC to UT ID conversion.

Definition at line 298 of file satellite-id-mapper.h.

Referenced by AttachMacToUtId(), GetMacInfo(), GetUtIdWithMac(), and Reset().

◆ m_macToUtUserIdMap

std::map<Address, uint32_t> ns3::SatIdMapper::m_macToUtUserIdMap
private

Map for MAC to UT user ID conversion.

Definition at line 303 of file satellite-id-mapper.h.

Referenced by AttachMacToUtUserId(), GetUtUserIdWithMac(), and Reset().

◆ m_traceIdIndex

uint32_t ns3::SatIdMapper::m_traceIdIndex
private

Running trace index number.

Definition at line 273 of file satellite-id-mapper.h.

Referenced by AttachMacToTraceId(), and Reset().

◆ m_utIdIndex

uint32_t ns3::SatIdMapper::m_utIdIndex
private

Running UT index number.

Definition at line 278 of file satellite-id-mapper.h.

Referenced by AttachMacToUtId(), and Reset().

◆ m_utUserIdIndex

uint32_t ns3::SatIdMapper::m_utUserIdIndex
private

Running UT user index number.

Definition at line 283 of file satellite-id-mapper.h.

Referenced by AttachMacToUtUserId(), and Reset().


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