mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-09 10:31:43 +02:00
refactor stuff
This commit is contained in:
parent
57b04d6424
commit
97de8c9d24
15 changed files with 135 additions and 88 deletions
|
@ -230,6 +230,8 @@ LeoChannelHelper::EnableAsciiInternal (
|
|||
NetDeviceContainer
|
||||
LeoChannelHelper::Install (std::vector<Ptr<Node> > &satellites, std::vector<Ptr<Node> > &stations)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
|
||||
Ptr<LeoMockChannel> channel = m_channelFactory.Create<LeoMockChannel> ();
|
||||
|
||||
NetDeviceContainer container;
|
||||
|
@ -243,6 +245,8 @@ LeoChannelHelper::Install (std::vector<Ptr<Node> > &satellites, std::vector<Ptr<
|
|||
dev->SetQueue (queue);
|
||||
dev->Attach (channel);
|
||||
container.Add (dev);
|
||||
|
||||
NS_LOG_DEBUG ("Added device for node " << node->GetId ());
|
||||
}
|
||||
|
||||
for (Ptr<Node> node : stations)
|
||||
|
@ -254,6 +258,8 @@ LeoChannelHelper::Install (std::vector<Ptr<Node> > &satellites, std::vector<Ptr<
|
|||
dev->SetQueue (queue);
|
||||
dev->Attach (channel);
|
||||
container.Add (dev);
|
||||
|
||||
NS_LOG_DEBUG ("Added device for node " << node->GetId ());
|
||||
}
|
||||
|
||||
return container;
|
||||
|
@ -270,15 +276,19 @@ LeoChannelHelper::Install (NodeContainer &satellites, NodeContainer &stations)
|
|||
NetDeviceContainer
|
||||
LeoChannelHelper::Install (std::vector<std::string> &satellites, std::vector<std::string> &stations)
|
||||
{
|
||||
NS_LOG_FUNCTION (this);
|
||||
|
||||
std::vector<Ptr<Node> > sats;
|
||||
std::vector<Ptr<Node> > stats;
|
||||
for (std::string name : satellites)
|
||||
{
|
||||
NS_LOG_DEBUG ("Adding node " << name);
|
||||
Ptr<Node> node = Names::Find<Node>(name);
|
||||
sats.push_back (node);
|
||||
}
|
||||
for (std::string name : stations)
|
||||
{
|
||||
NS_LOG_DEBUG ("Adding node " << name);
|
||||
Ptr<Node> node = Names::Find<Node>(name);
|
||||
stats.push_back (node);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue