Class for ID-mapper. More...
#include "satellite-id-mapper.h"
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... | |
void | UpdateMacToBeamId (Address mac, uint32_t beamId) |
Update MAC address to the beam ID maps. More... | |
void | UpdateMacToSatId (Address mac, uint32_t satId) |
Update MAC address to the SAT ID maps. 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... | |
std::map< Ptr< Node >, Address > | m_utNodeToGwAddressMap |
Map between UT nodes and GW address. More... | |
uint32_t | m_utUserIdIndex |
Running UT user index number. More... | |
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 45 of file satellite-id-mapper.h.
ns3::SatIdMapper::SatIdMapper | ( | ) |
Constructor.
Definition at line 51 of file satellite-id-mapper.cc.
ns3::SatIdMapper::~SatIdMapper | ( | ) |
Destructor.
Definition at line 61 of file satellite-id-mapper.cc.
References Reset().
void ns3::SatIdMapper::AttachMacToBeamId | ( | Address | mac, |
uint32_t | beamId | ||
) |
Attach MAC address to the beam ID maps.
mac | MAC address |
beamId | beam ID |
Definition at line 251 of file satellite-id-mapper.cc.
References m_macToBeamIdMap.
void ns3::SatIdMapper::AttachMacToGroupId | ( | Address | mac, |
uint32_t | groupId | ||
) |
Attach MAC address to the group ID maps.
mac | MAC address |
groupId | group ID |
Definition at line 267 of file satellite-id-mapper.cc.
References m_macToGroupIdMap.
void ns3::SatIdMapper::AttachMacToGwId | ( | Address | mac, |
uint32_t | gwId | ||
) |
Attach MAC address to the GW ID maps.
mac | MAC address |
gwId | GW ID |
Definition at line 283 of file satellite-id-mapper.cc.
References m_macToGwIdMap.
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)
mac | MAC address |
Definition at line 299 of file satellite-id-mapper.cc.
References m_gwUserIdIndex, and m_macToGwUserIdMap.
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)
mac | MAC address |
satId | satellite ID |
Definition at line 235 of file satellite-id-mapper.cc.
References m_macToSatIdMap.
void ns3::SatIdMapper::AttachMacToSatIdIsl | ( | Mac48Address | mac, |
uint32_t | satId | ||
) |
Attach GW/UT MAC address to the satellite this node is connected.
mac | MAC address |
satId | The satellite ID this MAC is connected to |
Definition at line 319 of file satellite-id-mapper.cc.
References m_macToSatIdIslMap.
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)
mac | MAC address |
Definition at line 173 of file satellite-id-mapper.cc.
References m_macToTraceIdMap, and m_traceIdIndex.
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)
mac | MAC address |
Definition at line 195 of file satellite-id-mapper.cc.
References m_macToUtIdMap, and m_utIdIndex.
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)
mac | MAC address |
Definition at line 215 of file satellite-id-mapper.cc.
References m_macToUtUserIdMap, and m_utUserIdIndex.
void ns3::SatIdMapper::DoDispose | ( | void | ) |
Do needed dispose actions.
Definition at line 69 of file satellite-id-mapper.cc.
References Reset().
|
inline |
Function for enabling the map prints.
Definition at line 280 of file satellite-id-mapper.h.
References m_enableMapPrint.
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
mac | MAC address |
Definition at line 444 of file satellite-id-mapper.cc.
References m_macToBeamIdMap.
Referenced by ns3::SatStatsHelper::GetIdentifierForUt(), and ns3::SatStatsHelper::GetIdentifierForUtUser().
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)
mac | MAC address |
Definition at line 459 of file satellite-id-mapper.cc.
References m_macToGroupIdMap.
Referenced by ns3::SatStatsHelper::GetIdentifierForUt(), and ns3::SatStatsHelper::GetIdentifierForUtUser().
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
mac | MAC address |
Definition at line 474 of file satellite-id-mapper.cc.
References m_macToGwIdMap.
Referenced by ns3::SatStatsHelper::GetGwId().
Address ns3::SatIdMapper::GetGwMacWithNode | ( | Ptr< Node > | gwNode | ) | const |
gwNode | pointer to a GW node |
Definition at line 521 of file satellite-id-mapper.cc.
Referenced by ns3::SatStatsHelper::GetGwId().
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
mac | MAC address |
Definition at line 489 of file satellite-id-mapper.cc.
References m_macToGwUserIdMap.
std::string ns3::SatIdMapper::GetMacInfo | ( | Address | mac | ) | const |
Function for getting the IDs related to a MAC address in an info string.
mac | MAC address |
Definition at line 667 of file satellite-id-mapper.cc.
References m_macToBeamIdMap, m_macToGroupIdMap, m_macToGwIdMap, m_macToSatIdMap, m_macToTraceIdMap, and m_macToUtIdMap.
Referenced by PrintTraceMap().
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
mac | MAC address |
Definition at line 429 of file satellite-id-mapper.cc.
References m_macToSatIdMap.
Referenced by ns3::SatStatsHelper::GetIdentifierForUt(), ns3::SatStatsHelper::GetIdentifierForUtUser(), and ns3::SatStatsHelper::GetSatId().
int32_t ns3::SatIdMapper::GetSatIdWithMacIsl | ( | Mac48Address | mac | ) | const |
Function for getting the satellite ID connected to a GW/UT MAC address.
mac | MAC address |
Definition at line 504 of file satellite-id-mapper.cc.
References m_macToSatIdIslMap.
Address ns3::SatIdMapper::GetSatMacWithNode | ( | Ptr< Node > | satNode | ) | const |
satNode | pointer to a SAT node |
Definition at line 561 of file satellite-id-mapper.cc.
Referenced by ns3::SatStatsHelper::GetSatId().
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
mac | MAC address |
Definition at line 384 of file satellite-id-mapper.cc.
References m_macToTraceIdMap.
|
static |
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
mac | MAC address |
Definition at line 399 of file satellite-id-mapper.cc.
References m_macToUtIdMap.
Referenced by ns3::SatStatsHelper::GetUtId().
Address ns3::SatIdMapper::GetUtMacWithNode | ( | Ptr< Node > | utNode | ) | const |
utNode | pointer to a UT node |
Definition at line 596 of file satellite-id-mapper.cc.
Referenced by ns3::SatStatsFwdQueueHelper::DoEnlistSource(), ns3::SatStatsHelper::GetIdentifierForUt(), ns3::SatStatsHelper::GetIdentifierForUtUser(), ns3::SatStatsHelper::GetUtId(), ns3::SatStatsHelper::SaveAddressAndIdentifier(), and ns3::SatStatsHelper::UpdateAddressAndIdentifier().
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
mac | MAC address |
Definition at line 414 of file satellite-id-mapper.cc.
References m_macToUtUserIdMap.
Referenced by ns3::SatStatsHelper::GetUtUserId().
Address ns3::SatIdMapper::GetUtUserMacWithNode | ( | Ptr< Node > | utUserNode | ) | const |
utUserNode | pointer to a UT user node |
Definition at line 635 of file satellite-id-mapper.cc.
Referenced by ns3::SatStatsHelper::GetUtUserId().
void ns3::SatIdMapper::PrintTraceMap | ( | ) | const |
Function for printing out the trace map.
Definition at line 737 of file satellite-id-mapper.cc.
References GetMacInfo(), and m_macToTraceIdMap.
Referenced by Reset().
void ns3::SatIdMapper::RemoveMacToSatIdIsl | ( | Mac48Address | mac | ) |
Remove GW/UT MAC address to the satellite this node is connected.
mac | MAC address |
Definition at line 335 of file satellite-id-mapper.cc.
References m_macToSatIdIslMap.
void ns3::SatIdMapper::Reset | ( | ) |
Function for resetting the variables.
Definition at line 79 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().
void ns3::SatIdMapper::ShowIslMap | ( | ) |
Print the map GW/UT address to satellite ID.
Definition at line 159 of file satellite-id-mapper.cc.
References m_macToSatIdIslMap.
void ns3::SatIdMapper::UpdateMacToBeamId | ( | Address | mac, |
uint32_t | beamId | ||
) |
Update MAC address to the beam ID maps.
mac | MAC address |
beamId | beam ID |
Definition at line 365 of file satellite-id-mapper.cc.
References m_macToBeamIdMap.
void ns3::SatIdMapper::UpdateMacToSatId | ( | Address | mac, |
uint32_t | satId | ||
) |
Update MAC address to the SAT ID maps.
mac | MAC address |
satId | satellite ID |
Definition at line 348 of file satellite-id-mapper.cc.
References m_macToSatIdMap.
|
private |
Is map printing enabled or not.
Definition at line 354 of file satellite-id-mapper.h.
Referenced by EnableMapPrint(), and Reset().
|
private |
Running GW user index number.
Definition at line 304 of file satellite-id-mapper.h.
Referenced by AttachMacToGwUserId(), and Reset().
|
private |
Map for MAC to beam ID conversion.
Definition at line 329 of file satellite-id-mapper.h.
Referenced by AttachMacToBeamId(), GetBeamIdWithMac(), GetMacInfo(), Reset(), and UpdateMacToBeamId().
|
private |
Map for MAC to group ID conversion.
Definition at line 334 of file satellite-id-mapper.h.
Referenced by AttachMacToGroupId(), GetGroupIdWithMac(), GetMacInfo(), and Reset().
|
private |
Map for MAC to GW ID conversion.
Definition at line 339 of file satellite-id-mapper.h.
Referenced by AttachMacToGwId(), GetGwIdWithMac(), GetMacInfo(), and Reset().
|
private |
Map for MAC to GW user ID conversion.
Definition at line 344 of file satellite-id-mapper.h.
Referenced by AttachMacToGwUserId(), GetGwUserIdWithMac(), and Reset().
|
private |
Map for GW/UT MAC to associated SAT ID conversion.
Definition at line 359 of file satellite-id-mapper.h.
Referenced by AttachMacToSatIdIsl(), GetSatIdWithMacIsl(), RemoveMacToSatIdIsl(), Reset(), and ShowIslMap().
|
private |
Map for MAC to SAT ID conversion.
Definition at line 324 of file satellite-id-mapper.h.
Referenced by AttachMacToSatId(), GetMacInfo(), GetSatIdWithMac(), Reset(), and UpdateMacToSatId().
|
private |
Map for MAC to trace ID conversion.
Definition at line 309 of file satellite-id-mapper.h.
Referenced by AttachMacToTraceId(), GetMacInfo(), GetTraceIdWithMac(), PrintTraceMap(), and Reset().
|
private |
Map for MAC to UT ID conversion.
Definition at line 314 of file satellite-id-mapper.h.
Referenced by AttachMacToUtId(), GetMacInfo(), GetUtIdWithMac(), and Reset().
|
private |
Map for MAC to UT user ID conversion.
Definition at line 319 of file satellite-id-mapper.h.
Referenced by AttachMacToUtUserId(), GetUtUserIdWithMac(), and Reset().
|
private |
Running trace index number.
Definition at line 289 of file satellite-id-mapper.h.
Referenced by AttachMacToTraceId(), and Reset().
|
private |
Running UT index number.
Definition at line 294 of file satellite-id-mapper.h.
Referenced by AttachMacToUtId(), and Reset().
|
private |
Map between UT nodes and GW address.
Definition at line 349 of file satellite-id-mapper.h.
|
private |
Running UT user index number.
Definition at line 299 of file satellite-id-mapper.h.
Referenced by AttachMacToUtUserId(), and Reset().