mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 18:13:57 +02:00
Cleanup
This commit is contained in:
parent
f7bd15f1a8
commit
8d5cbfe8fe
9 changed files with 50 additions and 99 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "ns3/assert.h"
|
||||
#include "ns3/string.h"
|
||||
#include "ns3/data-rate.h"
|
||||
#include "ns3/net-device-queue-interface.h"
|
||||
|
||||
#include "../model/leo-mock-channel.h"
|
||||
#include "../model/leo-mock-net-device.h"
|
||||
|
@ -347,6 +348,12 @@ LeoChannelHelper::Install (std::vector<Ptr<Node> > &satellites, std::vector<Ptr<
|
|||
node->AddDevice (dev);
|
||||
Ptr<Queue<Packet> > queue = m_satQueueFactory.Create<Queue<Packet> > ();
|
||||
dev->SetQueue (queue);
|
||||
|
||||
// Aggregate NetDeviceQueueInterface objects
|
||||
Ptr<NetDeviceQueueInterface> ndqi = CreateObject<NetDeviceQueueInterface> ();
|
||||
ndqi->GetTxQueue (0)->ConnectQueueTraces (queue);
|
||||
dev->AggregateObject (ndqi);
|
||||
|
||||
dev->Attach (channel);
|
||||
container.Add (dev);
|
||||
|
||||
|
@ -360,6 +367,12 @@ LeoChannelHelper::Install (std::vector<Ptr<Node> > &satellites, std::vector<Ptr<
|
|||
node->AddDevice (dev);
|
||||
Ptr<Queue<Packet> > queue = m_gndQueueFactory.Create<Queue<Packet> > ();
|
||||
dev->SetQueue (queue);
|
||||
|
||||
// Aggregate NetDeviceQueueInterface objects
|
||||
Ptr<NetDeviceQueueInterface> ndqi = CreateObject<NetDeviceQueueInterface> ();
|
||||
ndqi->GetTxQueue (0)->ConnectQueueTraces (queue);
|
||||
dev->AggregateObject (ndqi);
|
||||
|
||||
dev->Attach (channel);
|
||||
container.Add (dev);
|
||||
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
|
||||
#ifndef LEO_ORBIT_NODE_HELPER_H
|
||||
#define LEO_ORBIT_NODE_HELPER_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "ns3/object-factory.h"
|
||||
#include "ns3/node-container.h"
|
||||
#include "ns3/constant-position-mobility-model.h"
|
||||
|
||||
/**
|
||||
* \brief Builds a node container of nodes with constant positions
|
||||
*
|
||||
* Adds waypoints from file for each node.
|
||||
*/
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
class LeoGndNodeHelper
|
||||
{
|
||||
public:
|
||||
LeoGndNodeHelper ();
|
||||
virtual ~LeoGndNodeHelper ();
|
||||
|
||||
/**
|
||||
*
|
||||
* \param wpFile path to waypoint file
|
||||
* \returns a node container containing nodes using the specified attributes
|
||||
*/
|
||||
NodeContainer Install (const std::string &wpFile);
|
||||
|
||||
/**
|
||||
* Set an attribute for each node
|
||||
*
|
||||
* \param name name of the attribute
|
||||
* \param value value of the attribute
|
||||
*/
|
||||
void SetAttribute (std::string name, const AttributeValue &value);
|
||||
|
||||
private:
|
||||
ObjectFactory m_gndNodeFactory;
|
||||
};
|
||||
|
||||
}; // namespace ns3
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue