This helper is used to create groups of UTs. More...
#include "satellite-group-helper.h"
Inheritance diagram for ns3::SatGroupHelper:
Collaboration diagram for ns3::SatGroupHelper:Public Member Functions | |
| SatGroupHelper () | |
| Default constructor for SatGroupHelper. More... | |
| virtual | ~SatGroupHelper () |
| Destructor for SatGroupHelper. More... | |
| void | AddNodeToGroupAfterScenarioCreation (uint32_t groupId, Ptr< Node > node) |
| Schedule a node to be added to a group when scenario creation is finished. More... | |
| void | AddUtNodesToGroup (uint32_t groupId, NodeContainer nodes) |
| Add several nodes to a group. More... | |
| void | AddUtNodeToGroup (uint32_t groupId, Ptr< Node > node) |
| Add a node to a group. More... | |
| void | CreateGroupFromPosition (uint32_t groupId, NodeContainer nodes, GeoCoordinate center, uint32_t radius) |
| Create a new group using a central position and a radius. More... | |
| void | CreateGroupsUniformly (std::vector< uint32_t > groupIds, NodeContainer nodes) |
| Create several groups and distribute nodes among them. More... | |
| void | CreateUtNodesFromPosition (uint32_t groupId, uint32_t nb, GeoCoordinate center, uint32_t radius) |
| Create a new group using a central position and a radius, and create UT nodes inside this area. More... | |
| virtual void | DoDispose () |
| Dispose of this class instance. More... | |
| std::vector< std::pair< GeoCoordinate, uint32_t > > | GetAdditionalNodesPerBeam () |
| Get the position of nodes to add to the scenario. More... | |
| std::list< uint32_t > | GetGroups () |
| Get the list of groups created. More... | |
| virtual TypeId | GetInstanceTypeId (void) const |
| Get the type ID of instance. More... | |
| uint32_t | GetN () |
| Count the number of groups created. More... | |
| NodeContainer | GetUtNodes (uint32_t groupId) const |
| void | Init () |
| Initialize the helper. More... | |
| void | SetSatConstellationEnabled () |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| Get the type ID. More... | |
Private Member Functions | |
| uint32_t | GetGroupId (Ptr< Node > node) const |
| Get the group to which a node belongs. More... | |
| NodeContainer | GetNodesNotAddedFromPosition (NodeContainer nodes) |
| Get list of nodes not created from position by group helper. More... | |
| bool | IsGroupExisting (uint32_t groupId) const |
| Tells if the groupId is already existing in the database. More... | |
Private Attributes | |
| std::vector< std::pair< GeoCoordinate, uint32_t > > | m_additionalNodesPerBeam |
| Nodes created by position to add to scenario. More... | |
| std::list< uint32_t > | m_groupsList |
| List of group ID created. More... | |
| std::map< uint32_t, std::set< Ptr< Node > > > | m_groupsMap |
| Container to associate nodes to the groups. More... | |
| std::map< Ptr< Node >, uint32_t > | m_nodesToAdd |
| bool | m_satConstellationEnabled |
| Use a constellation of satellites. More... | |
| bool | m_scenarioCreated |
This helper is used to create groups of UTs.
Definition at line 49 of file satellite-group-helper.h.
| ns3::SatGroupHelper::SatGroupHelper | ( | ) |
Default constructor for SatGroupHelper.
Definition at line 59 of file satellite-group-helper.cc.
|
inlinevirtual |
Destructor for SatGroupHelper.
Definition at line 72 of file satellite-group-helper.h.
| void ns3::SatGroupHelper::AddNodeToGroupAfterScenarioCreation | ( | uint32_t | groupId, |
| Ptr< Node > | node | ||
| ) |
Schedule a node to be added to a group when scenario creation is finished.
This should not be used in a user scenario, only in intern calls.
| groupId | The ID of created group. Cannot be an already existing group |
| node | The associated node |
Definition at line 250 of file satellite-group-helper.cc.
References m_nodesToAdd.
| void ns3::SatGroupHelper::AddUtNodesToGroup | ( | uint32_t | groupId, |
| NodeContainer | nodes | ||
| ) |
Add several nodes to a group.
| groupId | The group ID where the nodes are added |
| nodes | The nodes to add |
Definition at line 125 of file satellite-group-helper.cc.
References AddUtNodeToGroup(), and m_scenarioCreated.
Here is the call graph for this function:| void ns3::SatGroupHelper::AddUtNodeToGroup | ( | uint32_t | groupId, |
| Ptr< Node > | node | ||
| ) |
Add a node to a group.
| groupId | The group ID where the node is added |
| node | The node to add |
Definition at line 90 of file satellite-group-helper.cc.
References GetGroupId(), IsGroupExisting(), m_groupsList, m_groupsMap, m_satConstellationEnabled, and m_scenarioCreated.
Referenced by AddUtNodesToGroup(), CreateGroupFromPosition(), CreateGroupsUniformly(), and Init().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::SatGroupHelper::CreateGroupFromPosition | ( | uint32_t | groupId, |
| NodeContainer | nodes, | ||
| GeoCoordinate | center, | ||
| uint32_t | radius | ||
| ) |
Create a new group using a central position and a radius.
| groupId | The ID of created group. Cannot be an already existing group |
| nodes | The input nodes, used to determine if each one belong to the group or not |
| center | The center of the circle |
| radius | The radius of the circle in meters |
Definition at line 142 of file satellite-group-helper.cc.
References AddUtNodeToGroup(), GetN(), GetNodesNotAddedFromPosition(), GetUtNodes(), m_scenarioCreated, and ns3::GeoCoordinate::ToVector().
Here is the call graph for this function:| void ns3::SatGroupHelper::CreateGroupsUniformly | ( | std::vector< uint32_t > | groupIds, |
| NodeContainer | nodes | ||
| ) |
Create several groups and distribute nodes among them.
| groupIds | The list of group IDs to create. They all must be empty |
| nodes | The nodes to distribute in the groups |
Definition at line 182 of file satellite-group-helper.cc.
References AddUtNodeToGroup(), GetN(), GetNodesNotAddedFromPosition(), GetUtNodes(), and m_scenarioCreated.
Here is the call graph for this function:| void ns3::SatGroupHelper::CreateUtNodesFromPosition | ( | uint32_t | groupId, |
| uint32_t | nb, | ||
| GeoCoordinate | center, | ||
| uint32_t | radius | ||
| ) |
Create a new group using a central position and a radius, and create UT nodes inside this area.
| groupId | The ID of created group. Cannot be an already existing group |
| nb | The number of nodes to create in this circle |
| center | The center of the circle |
| radius | The radius of the circle in meters |
Definition at line 214 of file satellite-group-helper.cc.
References m_additionalNodesPerBeam, m_groupsList, and m_scenarioCreated.
|
virtual |
Dispose of this class instance.
Definition at line 67 of file satellite-group-helper.cc.
References m_groupsMap.
| std::vector< std::pair< GeoCoordinate, uint32_t > > ns3::SatGroupHelper::GetAdditionalNodesPerBeam | ( | ) |
Get the position of nodes to add to the scenario.
Definition at line 258 of file satellite-group-helper.cc.
References m_additionalNodesPerBeam.
|
private |
Get the group to which a node belongs.
| node | The node to analyse |
Definition at line 339 of file satellite-group-helper.cc.
References m_groupsMap.
Referenced by AddUtNodeToGroup().
Here is the caller graph for this function:| std::list< uint32_t > ns3::SatGroupHelper::GetGroups | ( | ) |
Get the list of groups created.
Definition at line 321 of file satellite-group-helper.cc.
References m_groupsList.
|
virtual |
Get the type ID of instance.
Definition at line 52 of file satellite-group-helper.cc.
References GetTypeId().
Here is the call graph for this function:| uint32_t ns3::SatGroupHelper::GetN | ( | ) |
Count the number of groups created.
Definition at line 313 of file satellite-group-helper.cc.
References m_groupsMap.
Referenced by CreateGroupFromPosition(), and CreateGroupsUniformly().
Here is the caller graph for this function:
|
private |
Get list of nodes not created from position by group helper.
| nodes | The list of nodes to filter |
Definition at line 354 of file satellite-group-helper.cc.
References m_nodesToAdd.
Referenced by CreateGroupFromPosition(), and CreateGroupsUniformly().
Here is the caller graph for this function:
|
static |
Get the type ID.
Definition at line 44 of file satellite-group-helper.cc.
Referenced by GetInstanceTypeId().
Here is the caller graph for this function:| NodeContainer ns3::SatGroupHelper::GetUtNodes | ( | uint32_t | groupId | ) | const |
| groupId | The group ID |
Definition at line 266 of file satellite-group-helper.cc.
References IsGroupExisting(), and m_groupsMap.
Referenced by CreateGroupFromPosition(), and CreateGroupsUniformly().
Here is the call graph for this function:
Here is the caller graph for this function:| void ns3::SatGroupHelper::Init | ( | ) |
Initialize the helper.
Should be call only by SatHelper internally
Definition at line 75 of file satellite-group-helper.cc.
References AddUtNodeToGroup(), m_nodesToAdd, and m_scenarioCreated.
Here is the call graph for this function:
|
private |
Tells if the groupId is already existing in the database.
| groupId | The group to test |
Definition at line 333 of file satellite-group-helper.cc.
References m_groupsMap.
Referenced by AddUtNodeToGroup(), and GetUtNodes().
Here is the caller graph for this function:| void ns3::SatGroupHelper::SetSatConstellationEnabled | ( | ) |
Definition at line 327 of file satellite-group-helper.cc.
References m_satConstellationEnabled.
|
private |
Nodes created by position to add to scenario.
vector: <position, group ID>
Definition at line 199 of file satellite-group-helper.h.
Referenced by CreateUtNodesFromPosition(), and GetAdditionalNodesPerBeam().
|
private |
List of group ID created.
Definition at line 194 of file satellite-group-helper.h.
Referenced by AddUtNodeToGroup(), CreateUtNodesFromPosition(), and GetGroups().
|
private |
Container to associate nodes to the groups.
Definition at line 189 of file satellite-group-helper.h.
Referenced by AddUtNodeToGroup(), DoDispose(), GetGroupId(), GetN(), GetUtNodes(), and IsGroupExisting().
|
private |
Definition at line 204 of file satellite-group-helper.h.
Referenced by AddNodeToGroupAfterScenarioCreation(), GetNodesNotAddedFromPosition(), and Init().
|
private |
Use a constellation of satellites.
Definition at line 215 of file satellite-group-helper.h.
Referenced by AddUtNodeToGroup(), and SetSatConstellationEnabled().
|
private |
Definition at line 210 of file satellite-group-helper.h.
Referenced by AddUtNodesToGroup(), AddUtNodeToGroup(), CreateGroupFromPosition(), CreateGroupsUniformly(), CreateUtNodesFromPosition(), and Init().