Update doxygen documentation

This commit is contained in:
Tim Schubert 2020-09-06 21:37:47 +02:00
parent 61b6fd7ea1
commit f17ff6abc6
38 changed files with 1023 additions and 124 deletions

View file

@ -15,12 +15,10 @@ Model Description
The source code for the module lives in the directory ``contrib/leo``. The source code for the module lives in the directory ``contrib/leo``.
This module provides a mobility model for LEO satellites, propagation loss This module provides a mobility model for LEO satellites, propagation loss models for satellite to satellite and satellite to ground transmission.
models for satellite to satellite and satellite to ground transmission. It It also includes a simplistic model of the inter-satellite and satellite-ground channels and the associated network devices.
also includes a simplistic model of the inter-satellite and satellite-ground It contains helpers to build a LEO satellite network based on configurable parameters or import mobility data from TLE files.
channels and the associated network devices. It contains required helpers
to build a LEO satellite network based on configurable parameters or import
mobility data from TLE files.
References References
========== ==========

View file

@ -25,12 +25,34 @@
#include "ns3/applications-module.h" #include "ns3/applications-module.h"
#include "ns3/node-container.h" #include "ns3/node-container.h"
/**
* \file
* \ingroup leo
* Declares ArpCacheHelper
*/
namespace ns3 { namespace ns3 {
/**
* \ingroup leo
* \brief Prepares the ARP cache, so the addresses do not have to be queried
*/
class ArpCacheHelper class ArpCacheHelper
{ {
public: public:
/**
* \brief Install the addresses of the interfaces into the ARP caches of the devices
* \param devices devices
* \param interfaces interfaces
*/
void Install (NetDeviceContainer &devices, Ipv4InterfaceContainer &interfaces) const; void Install (NetDeviceContainer &devices, Ipv4InterfaceContainer &interfaces) const;
/**
* \brief Install the addresses of the interfaces into the ARP caches of the devices
* \param deviceSrc devices
* \param deviceDst devices
* \param interfaces interfaces
*/
void Install (NetDeviceContainer &devicesSrc, NetDeviceContainer &devicesDst, Ipv4InterfaceContainer &interfaces) const; void Install (NetDeviceContainer &devicesSrc, NetDeviceContainer &devicesDst, Ipv4InterfaceContainer &interfaces) const;
}; };

View file

@ -29,29 +29,35 @@
#define LEO_GND_RAD_EARTH 6.371e6 #define LEO_GND_RAD_EARTH 6.371e6
/** /**
* \brief Builds a node container of nodes with constant positions * \file
* * \ingroup leo
* Adds waypoints from file for each node.
*/ */
namespace ns3 namespace ns3
{ {
/**
* \ingroup leo
* \brief Builds a node container of nodes with constant positions
* Adds waypoints from file for each node.
*/
class LeoGndNodeHelper class LeoGndNodeHelper
{ {
public: public:
/// constructor
LeoGndNodeHelper (); LeoGndNodeHelper ();
/// deconstructor
virtual ~LeoGndNodeHelper (); virtual ~LeoGndNodeHelper ();
/** /**
* * \brief Create a node container with nodes at the positions in file
* \param file path to latitude longitude file * \param file path to latitude longitude file
* \returns a node container containing nodes using the specified attributes * \returns a node container containing nodes using the specified attributes
*/ */
NodeContainer Install (const std::string &file); NodeContainer Install (const std::string &file);
/** /**
* * \brief Create a node container with uniformly distributed nodes
* \param latNodes a number of nodes to in latitude direction * \param latNodes a number of nodes to in latitude direction
* \param lonNodes a number of nodes to in longitude direction * \param lonNodes a number of nodes to in longitude direction
* \returns a node container containing nodes using the specified attributes * \returns a node container containing nodes using the specified attributes
@ -59,7 +65,7 @@ public:
NodeContainer Install (uint32_t latNodes, uint32_t lonNodes); NodeContainer Install (uint32_t latNodes, uint32_t lonNodes);
/** /**
* * \brief Install two nodes at two locations
* \param location1 first location * \param location1 first location
* \param location2 second location * \param location2 second location
* \returns a node container containing nodes using the specified attributes * \returns a node container containing nodes using the specified attributes
@ -68,16 +74,17 @@ public:
const LeoLatLong &location2); const LeoLatLong &location2);
/** /**
* Set an attribute for each node * \brief Set an attribute for each node
*
* \param name name of the attribute * \param name name of the attribute
* \param value value of the attribute * \param value value of the attribute
*/ */
void SetAttribute (std::string name, const AttributeValue &value); void SetAttribute (std::string name, const AttributeValue &value);
private: private:
/// Fatory for nodes
ObjectFactory m_gndNodeFactory; ObjectFactory m_gndNodeFactory;
/// Convert the latitude and longitude to a position on a sphere
static Vector3D GetEarthPosition (const LeoLatLong &loc); static Vector3D GetEarthPosition (const LeoLatLong &loc);
}; };

View file

@ -27,17 +27,20 @@
#include <ns3/trace-helper.h> #include <ns3/trace-helper.h>
/**
* \file
* \ingroup leo
* Declares IslNetDevice
*/
namespace ns3 { namespace ns3 {
class NetDevice; class NetDevice;
class Node; class Node;
/** /**
* \ingroup leo
* \brief Build a set of IslNetDevice objects * \brief Build a set of IslNetDevice objects
*
* Normally we eschew multiple inheritance, however, the classes
* PcapUserHelperForDevice and AsciiTraceUserHelperForDevice are
* "mixins".
*/ */
class IslHelper : public PcapHelperForDevice, class IslHelper : public PcapHelperForDevice,
public AsciiTraceHelperForDevice public AsciiTraceHelperForDevice
@ -158,7 +161,6 @@ public:
bool explicitFilename); bool explicitFilename);
private: private:
ObjectFactory m_queueFactory; //!< Queue Factory ObjectFactory m_queueFactory; //!< Queue Factory
ObjectFactory m_channelFactory; //!< Channel Factory ObjectFactory m_channelFactory; //!< Channel Factory
ObjectFactory m_deviceFactory; //!< Device Factory ObjectFactory m_deviceFactory; //!< Device Factory

View file

@ -27,38 +27,136 @@
#include <ns3/trace-helper.h> #include <ns3/trace-helper.h>
/**
* \file
* \ingroup leo
* Declares LeoChannelHelper
*/
namespace ns3 { namespace ns3 {
/** /**
* \ingroup leo
* \brief Build a channel for transmissions between ns3::LeoMockNetDevice s * \brief Build a channel for transmissions between ns3::LeoMockNetDevice s
*/ */
class LeoChannelHelper : public PcapHelperForDevice, class LeoChannelHelper : public PcapHelperForDevice,
public AsciiTraceHelperForDevice public AsciiTraceHelperForDevice
{ {
public: public:
/// constructor
LeoChannelHelper (); LeoChannelHelper ();
/**
* constructor
*
* \param constellation name of the link parameter preset
*/
LeoChannelHelper (std::string constellation); LeoChannelHelper (std::string constellation);
/// destructor
virtual ~LeoChannelHelper () virtual ~LeoChannelHelper ()
{}; {};
/**
* \brief Install the satellites and stations into the channel
* \param satellites satellites
* \param stations ground stations
* \return container of network devices attached to the channel
*/
NetDeviceContainer Install (NodeContainer &satellites, NodeContainer &stations); NetDeviceContainer Install (NodeContainer &satellites, NodeContainer &stations);
/**
* \brief Install the satellites and stations into the channel
* \param satellites satellites
* \param stations ground stations
* \return container of network devices attached to the channel
*/
NetDeviceContainer Install (std::vector<Ptr<Node> > &satellites, std::vector<Ptr<Node> > &stations); NetDeviceContainer Install (std::vector<Ptr<Node> > &satellites, std::vector<Ptr<Node> > &stations);
/**
* \brief Install the satellites and stations into the channel
* \param satellites satellites
* \param stations ground stations
* \return container of network devices attached to the channel
*/
NetDeviceContainer Install (std::vector<std::string> &satellites, std::vector<std::string> &stations); NetDeviceContainer Install (std::vector<std::string> &satellites, std::vector<std::string> &stations);
/**
* \brief Set the type and attributes of the queues of the ground stations
* \param type type of the queue
* \param n1 name of an attribute of the queue
* \param v1 value of an attribute of the queue
* \param n2 name of an attribute of the queue
* \param v2 value of an attribute of the queue
* \param n3 name of an attribute of the queue
* \param v3 value of an attribute of the queue
* \param n4 name of an attribute of the queue
* \param v4 value of an attribute of the queue
*/
void SetGndQueue (std::string type, void SetGndQueue (std::string type,
std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue ()); std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue ());
/**
* \brief Set the type and attributes of the queues of the satellite devices
* \param type type of the queue
* \param n1 name of an attribute of the queue
* \param v1 value of an attribute of the queue
* \param n2 name of an attribute of the queue
* \param v2 value of an attribute of the queue
* \param n3 name of an attribute of the queue
* \param v3 value of an attribute of the queue
* \param n4 name of an attribute of the queue
* \param v4 value of an attribute of the queue
*/
void SetSatQueue (std::string type, void SetSatQueue (std::string type,
std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (), std::string n1 = "", const AttributeValue &v1 = EmptyAttributeValue (),
std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (), std::string n2 = "", const AttributeValue &v2 = EmptyAttributeValue (),
std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (), std::string n3 = "", const AttributeValue &v3 = EmptyAttributeValue (),
std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue ()); std::string n4 = "", const AttributeValue &v4 = EmptyAttributeValue ());
/**
* \brief Set the type and attributes of the devices of the ground devices
* \param type type of the device
* \param n1 name of an attribute of the device
* \param v1 value of an attribute of the device
* \param n2 name of an attribute of the device
* \param v2 value of an attribute of the device
* \param n3 name of an attribute of the device
* \param v3 value of an attribute of the device
* \param n4 name of an attribute of the device
* \param v4 value of an attribute of the device
*/
void SetGndDeviceAttribute (std::string name, const AttributeValue &value); void SetGndDeviceAttribute (std::string name, const AttributeValue &value);
/**
* \brief Set the type and attributes of the devices of the satellite devices
* \param type type of the device
* \param n1 name of an attribute of the device
* \param v1 value of an attribute of the device
* \param n2 name of an attribute of the device
* \param v2 value of an attribute of the device
* \param n3 name of an attribute of the device
* \param v3 value of an attribute of the device
* \param n4 name of an attribute of the device
* \param v4 value of an attribute of the device
*/
void SetSatDeviceAttribute (std::string name, const AttributeValue &value); void SetSatDeviceAttribute (std::string name, const AttributeValue &value);
/**
* \brief Set the type and attributes of the channel
* \param type type of the channel
* \param n1 name of an attribute of the channel
* \param v1 value of an attribute of the channel
* \param n2 name of an attribute of the channel
* \param v2 value of an attribute of the channel
* \param n3 name of an attribute of the channel
* \param v3 value of an attribute of the channel
* \param n4 name of an attribute of the channel
* \param v4 value of an attribute of the channel
*/
void SetChannelAttribute (std::string name, const AttributeValue &value); void SetChannelAttribute (std::string name, const AttributeValue &value);
virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous, bool explicitFilename); virtual void EnablePcapInternal (std::string prefix, Ptr<NetDevice> nd, bool promiscuous, bool explicitFilename);
@ -67,20 +165,44 @@ public:
Ptr<NetDevice> nd, Ptr<NetDevice> nd,
bool explicitFilename); bool explicitFilename);
/**
* \brief Set the link parameter preset
* \param constellation name of the link parameter preset
*/
void SetConstellation (std::string constellation); void SetConstellation (std::string constellation);
private: private:
/// Satellite queues
ObjectFactory m_satQueueFactory; ObjectFactory m_satQueueFactory;
/// Ground station queues
ObjectFactory m_gndDeviceFactory; ObjectFactory m_gndDeviceFactory;
/// Satellite devices
ObjectFactory m_satDeviceFactory; ObjectFactory m_satDeviceFactory;
/// Ground station devices
ObjectFactory m_gndQueueFactory; ObjectFactory m_gndQueueFactory;
/// Channel
ObjectFactory m_channelFactory; ObjectFactory m_channelFactory;
/// Propagation loss models
ObjectFactory m_propagationLossFactory; ObjectFactory m_propagationLossFactory;
//
/// Propagation delay models
ObjectFactory m_propagationDelayFactory; ObjectFactory m_propagationDelayFactory;
/**
* \brief Set the factory and attributes of the queue
* \param factory queue factory
* \param n1 name of an attribute of the factory
* \param v1 value of an attribute of the factory
* \param n2 name of an attribute of the factory
* \param v2 value of an attribute of the factory
* \param n3 name of an attribute of the factory
* \param v3 value of an attribute of the factory
* \param n4 name of an attribute of the factory
* \param v4 value of an attribute of the factory
*/
void SetQueue (ObjectFactory &factory, void SetQueue (ObjectFactory &factory,
std::string type, std::string type,
std::string n1, const AttributeValue &v1, std::string n1, const AttributeValue &v1,
@ -89,6 +211,17 @@ private:
std::string n4, const AttributeValue &v4); std::string n4, const AttributeValue &v4);
/**
* \brief Set the attributes of the link and propagation loss model
* \param eirp EIRP
* \param elevationAngle elevation angle of satellite beam
* \param fspl free space loss
* \param atmosphericLoss atmospheric loss
* \param linkMargin link margin
* \param dataRate data rate
* \param rxGain receiver gain
* \param rxLoss receiver loss
*/
void SetConstellationAttributes (double eirp, void SetConstellationAttributes (double eirp,
double elevationAngle, double elevationAngle,
double fspl, double fspl,

View file

@ -23,32 +23,82 @@
#include "ns3/object.h" #include "ns3/object.h"
#include "ns3/waypoint.h" #include "ns3/waypoint.h"
/**
* \file
* \ingroup leo
* Declares LeoWaypointInputFileStreamContainer
*/
using namespace std; using namespace std;
namespace ns3 namespace ns3
{ {
/**
* \ingroup leo
* \brief Wrapper around a stream of Waypoint
*/
class LeoWaypointInputFileStreamContainer : public Object class LeoWaypointInputFileStreamContainer : public Object
{ {
public: public:
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void); static TypeId GetTypeId (void);
/// constructor
LeoWaypointInputFileStreamContainer (); LeoWaypointInputFileStreamContainer ();
/// destructor
virtual ~LeoWaypointInputFileStreamContainer (); virtual ~LeoWaypointInputFileStreamContainer ();
/**
* constructor
*
* \param filePath path to waypoints file
* \param lastTime the time until which to read waypoints
*/
LeoWaypointInputFileStreamContainer (string filePath, Time lastTime); LeoWaypointInputFileStreamContainer (string filePath, Time lastTime);
/**
* \brief Get next waypoint
* \param [out] next waypoint
* \return true iff there are more waypoints
*/
bool GetNextSample (Waypoint &sample); bool GetNextSample (Waypoint &sample);
/**
* \brief Set the path to the waypoint file
* \param path path to the waypoint file
*/
void SetFile (const string path); void SetFile (const string path);
/**
* \brief Get the path to the waypoint file
* \return path to the waypoint file
*/
string GetFile () const; string GetFile () const;
/**
* \brief Set the path to the last time slot
* \param lastTime last time slot
*/
void SetLastTime (const Time lastTime); void SetLastTime (const Time lastTime);
/**
* \brief Get the last time slot
* \return last time slot
*/
Time GetLastTime () const; Time GetLastTime () const;
private: private:
/// Path to the waypoints file
string m_filePath; string m_filePath;
/// Time of the last timestamp
Time m_lastTime; Time m_lastTime;
/// Waypoint file stream
ifstream m_input; ifstream m_input;
}; };

View file

@ -28,19 +28,27 @@
#include "ns3/leo-orbit.h" #include "ns3/leo-orbit.h"
/** /**
* \brief Builds a node container of nodes with LEO positions using a list of * \file
* orbit definitions. * \ingroup leo
*
* Adds orbits with from a file for each node.
*/ */
namespace ns3 namespace ns3
{ {
/**
* \ingroup leo
* \brief Builds a node container of nodes with LEO positions using a list of
* orbit definitions.
*
* Adds orbits with from a file for each node.
*/
class LeoOrbitNodeHelper class LeoOrbitNodeHelper
{ {
public: public:
/// constructor
LeoOrbitNodeHelper (); LeoOrbitNodeHelper ();
/// destructor
virtual ~LeoOrbitNodeHelper (); virtual ~LeoOrbitNodeHelper ();
/** /**
@ -73,6 +81,7 @@ public:
void SetAttribute (std::string name, const AttributeValue &value); void SetAttribute (std::string name, const AttributeValue &value);
private: private:
/// Factory for nodes
ObjectFactory m_nodeFactory; ObjectFactory m_nodeFactory;
}; };

View file

@ -25,12 +25,34 @@
#ifndef NDS_CACHE_HELPER_ #ifndef NDS_CACHE_HELPER_
#define NDS_CACHE_HELPER_ #define NDS_CACHE_HELPER_
/**
* \file
* \ingroup leo
* Declares NdCacheHelper
*/
namespace ns3 { namespace ns3 {
/**
* \ingroup leo
* \brief Neighbor Cache helper fills the neighbor cache
*/
class NdCacheHelper class NdCacheHelper
{ {
public: public:
/**
* \brief Fill the cache of devices with addresses
* \param devices devices
* \param interfaces interfaces that have addresses
*/
void Install (NetDeviceContainer &devices, Ipv6InterfaceContainer &interfaces) const; void Install (NetDeviceContainer &devices, Ipv6InterfaceContainer &interfaces) const;
/**
* \brief Fill the cache of devices with addresses
* \param devicesSrc devices
* \param devicesDst devices
* \param interfaces interfaces that have addresses
*/
void Install (NetDeviceContainer &devicesSrc, NetDeviceContainer &devicesDst, Ipv6InterfaceContainer &interfaces) const; void Install (NetDeviceContainer &devicesSrc, NetDeviceContainer &devicesDst, Ipv6InterfaceContainer &interfaces) const;
}; };

View file

@ -27,38 +27,46 @@
#include "ns3/leo-input-fstream-container.h" #include "ns3/leo-input-fstream-container.h"
/** /**
* \brief Builds a node container with a waypoint mobility model * \file
* * \ingroup leo
* Adds waypoints from file for each node.
* The node satId must must correspond to the NORAD id from Celestrack.
*/ */
namespace ns3 namespace ns3
{ {
/**
* \ingroup leo
* \brief Builds a node container with a waypoint mobility model
*
* Adds waypoints from file for each node.
* The node satId must must correspond to the NORAD id from Celestrack.
*/
class LeoSatNodeHelper class LeoSatNodeHelper
{ {
public: public:
/// constructor
LeoSatNodeHelper (); LeoSatNodeHelper ();
/// destructor
virtual ~LeoSatNodeHelper (); virtual ~LeoSatNodeHelper ();
/** /**
* * \brief Install the nodes
* \param nodeIds paths to satellite to waypoint files * \param nodeIds paths to satellite to waypoint files
* \returns a node container containing nodes using the specified attributes * \returns a node container containing nodes using the specified attributes
*/ */
NodeContainer Install (std::vector<std::string> &wpFiles); NodeContainer Install (std::vector<std::string> &wpFiles);
/** /**
* Set an attribute for each node * \brief Set an attribute for each node
*
* \param name name of the attribute * \param name name of the attribute
* \param value value of the attribute * \param value value of the attribute
*/ */
void SetAttribute (std::string name, const AttributeValue &value); void SetAttribute (std::string name, const AttributeValue &value);
private: private:
/// Satellite nodes
ObjectFactory m_satNodeFactory; ObjectFactory m_satNodeFactory;
/// Stream of waypoints
LeoWaypointInputFileStreamContainer m_fileStreamContainer; LeoWaypointInputFileStreamContainer m_fileStreamContainer;
}; };

View file

@ -35,33 +35,51 @@
#include "mock-net-device.h" #include "mock-net-device.h"
#include "mock-channel.h" #include "mock-channel.h"
/**
* \file
* \ingroup leo
* IslMockChannel declaration
*/
namespace ns3 { namespace ns3 {
class MockNetDevice; class MockNetDevice;
/** /**
* \ingroup network * \ingroup leo
* \defgroup channel Channel * \brief Simplified model of an inter-satellite channel
*/
/**
* \ingroup channel
* \brief Simplified inter-satellite channel
* *
* A perfect channel with varariable delay (time-of-flight). * This channel distributes packets to all attached devies to which the sender has a line-of-sight.
* It is typically used in conjunction with the IslPropagationLossModel and ConstantSpeedPropagationDelay.
* *
*/ */
class IslMockChannel : public MockChannel class IslMockChannel : public MockChannel
{ {
public: public:
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void); static TypeId GetTypeId (void);
/// constructor
IslMockChannel (); IslMockChannel ();
/// destructor
virtual ~IslMockChannel (); virtual ~IslMockChannel ();
/**
* \brief Starts a transmission of a packet
* \return true iff the transmission was successful
* \param p the packet to transmit
* \param devId the id of the sender device as an index into the attached
* devices
* \param dst the destination address
* \param txTime the transmission delay of the packet
*/
bool TransmitStart (Ptr<const Packet> p, uint32_t devId, Address dst, Time txTime); bool TransmitStart (Ptr<const Packet> p, uint32_t devId, Address dst, Time txTime);
private: private:
std::vector<Ptr<MockNetDevice> > m_link; std::vector<Ptr<MockNetDevice> > m_link; ///< Attached devices
}; // class MockChannel }; // class MockChannel

View file

@ -22,25 +22,44 @@
#include <ns3/object.h> #include <ns3/object.h>
#include <ns3/propagation-loss-model.h> #include <ns3/propagation-loss-model.h>
/**
* \file
* \ingroup leo
*
* Declaration of IslPropagationLossModel
*/
#define LEO_EARTH_RAD 6.371009e6 #define LEO_EARTH_RAD 6.371009e6
namespace ns3 { namespace ns3 {
/**
* \ingroup leo
* \brief An approximate model for the propagation loss between any two low
* earth orbit satellites using the line-of-sight
*
*/
class IslPropagationLossModel : public PropagationLossModel class IslPropagationLossModel : public PropagationLossModel
{ {
public: public:
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void); static TypeId GetTypeId (void);
/// constructor
IslPropagationLossModel (); IslPropagationLossModel ();
/// destructor
virtual ~IslPropagationLossModel (); virtual ~IslPropagationLossModel ();
/** /**
* true if there is at least one intersection of ISL line-of-sight with earth * \brief Check if there is a direc line-of-sight between the two points
* (LOS is blocked by earth)
* *
* Assumes earth is sperical. * Assumes earth is spherical.
* *
* \param a first node * \param a first point
* \param b second node * \param b second point
* \return true iff there is a line-of-sight between the points
*/ */
static bool GetLos (Ptr<MobilityModel> a, Ptr<MobilityModel> b); static bool GetLos (Ptr<MobilityModel> a, Ptr<MobilityModel> b);
private: private:
@ -56,10 +75,7 @@ private:
virtual double DoCalcRxPower (double txPowerDbm, virtual double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a, Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const; Ptr<MobilityModel> b) const;
/**
* Subclasses must implement this; those not using random variables
* can return zero
*/
virtual int64_t DoAssignStreams (int64_t stream); virtual int64_t DoAssignStreams (int64_t stream);
}; };

View file

@ -25,6 +25,13 @@
#include "ns3/mobility-model.h" #include "ns3/mobility-model.h"
#include "ns3/nstime.h" #include "ns3/nstime.h"
/**
* \file
* \ingroup leo
*
* Declaration of LeoCircularOrbitMobilityModel
*/
#define LEO_EARTH_RAD_KM 6371.0090 #define LEO_EARTH_RAD_KM 6371.0090
#define LEO_EARTH_GM_KM_E10 39.8600436 #define LEO_EARTH_GM_KM_E10 39.8600436
@ -41,22 +48,42 @@ class LeoCircularOrbitMobilityModel : public MobilityModel
{ {
public: public:
/** /**
* Register this type with the TypeId system. * \brief Get the type ID.
* \return the object TypeId * \return the object TypeId
*/ */
static TypeId GetTypeId (void); static TypeId GetTypeId (void);
/// constructor
LeoCircularOrbitMobilityModel (); LeoCircularOrbitMobilityModel ();
/// destructor
virtual ~LeoCircularOrbitMobilityModel (); virtual ~LeoCircularOrbitMobilityModel ();
/** /**
* km/s * \brief Gets the speed of the node
* \return the speed in m/s
*/ */
double GetSpeed () const; double GetSpeed () const;
/**
* \brief Gets the altitude
* \return the altitude
*/
double GetAltitude () const; double GetAltitude () const;
/**
* \brief Sets the altitude
* \param the altitude
*/
void SetAltitude (double h); void SetAltitude (double h);
/**
* \brief Gets the inclination
* \return the inclination
*/
double GetInclination () const; double GetInclination () const;
/**
* \brief Sets the inclination
* \param the inclination
*/
void SetInclination (double incl); void SetInclination (double incl);
private: private:
@ -105,30 +132,46 @@ private:
virtual Vector DoGetVelocity (void) const; virtual Vector DoGetVelocity (void) const;
/** /**
* Get the normal vector of the orbital plane * \brief Get the normal vector of the orbital plane
*/ */
Vector3D PlaneNorm () const; Vector3D PlaneNorm () const;
/**
* \brief Gets the distance the satellite has progressed from its original
* position at time t in rad
*
* \param t a point in time
* \return distance in rad
*/
double GetProgress (Time t) const; double GetProgress (Time t) const;
/** /**
* Advances a satellite by a degrees on the orbital plane * \brief Advances a satellite by a degrees inside the orbital plane
* \param a angle by which to rotate
* \param x vector to rotate
* \return rotated vector
*/ */
Vector3D RotatePlane (double a, const Vector3D &x) const; Vector3D RotatePlane (double a, const Vector3D &x) const;
/** /**
* Calculate the position at time * \brief Calculate the position at time t
*
* \param t time * \param t time
* \return position at time t
*/ */
Vector CalcPosition (Time t) const; Vector CalcPosition (Time t) const;
/** /**
* Calc the latitude depending on simulation time inside ITRF coordinate * \brief Calc the latitude depending on simulation time inside ITRF coordinate
* system * system
*
* \return latitude
*/ */
double CalcLatitude () const; double CalcLatitude () const;
/**
* \brief Update the internal position of the mobility model
* \return position that will be returned upon next call to DoGetPosition
*/
Vector Update (); Vector Update ();
}; };

View file

@ -21,32 +21,54 @@
#include "ns3/position-allocator.h" #include "ns3/position-allocator.h"
/**
* \file
* \ingroup leo
*
* Declaration of LeoCircularOrbitAllocator
*/
namespace ns3 { namespace ns3 {
/** /**
* \brief Allocate pairs of latitude and longitude (offset within orbit) for * \ingroup leo
* \brief Allocate pairs of longitude and latitude (offset within orbit) for
* use in LeoCircularOrbitMobilityModel * use in LeoCircularOrbitMobilityModel
*/ */
class LeoCircularOrbitAllocator : public PositionAllocator class LeoCircularOrbitAllocator : public PositionAllocator
{ {
public: public:
/** /**
* Register this type with the TypeId system. * \brief Get the type ID.
* \return the object TypeId * \return the object TypeId
*/ */
static TypeId GetTypeId (); static TypeId GetTypeId ();
/// constructor
LeoCircularOrbitAllocator (); LeoCircularOrbitAllocator ();
/// destructor
virtual ~LeoCircularOrbitAllocator (); virtual ~LeoCircularOrbitAllocator ();
/**
* \brief Gets the next position on the latitude longitude grid
*
* If all positions have been returned once, the first position is returned
* again and so on.
*
* \return the next latitude, longitude pair
*/
virtual Vector GetNext (void) const; virtual Vector GetNext (void) const;
virtual int64_t AssignStreams (int64_t stream); virtual int64_t AssignStreams (int64_t stream);
private: private:
/// Number of orbits two distribute the satellites on
uint64_t m_numOrbits; uint64_t m_numOrbits;
/// Number of satellites per orbit
uint64_t m_numSatellites; uint64_t m_numSatellites;
/// The last orit that has been assigned
mutable uint64_t m_lastOrbit; mutable uint64_t m_lastOrbit;
/// The last position inside the orbit that has been assigned
mutable uint64_t m_lastSatellite; mutable uint64_t m_lastSatellite;
}; };

View file

@ -21,20 +21,47 @@
#include <iostream> #include <iostream>
/**
* \file
* \ingroup leo
*
* Declaration of LeoLatLong
*/
namespace ns3 { namespace ns3 {
/**
* \brief Wrapper around a pair of latitude and longitude
*/
class LeoLatLong class LeoLatLong
{ {
public: public:
/// constructor
LeoLatLong (); LeoLatLong ();
/// destructor
LeoLatLong (double latitude, double longitude); LeoLatLong (double latitude, double longitude);
virtual ~LeoLatLong(); virtual ~LeoLatLong();
/// Latitude
double latitude; double latitude;
/// Longitude
double longitude; double longitude;
}; };
/**
* \brief Serialize the LeoLatLong instance using a colon as a separator
* \param os stream to serialize into
* \param latLong to serialize
* \return returns the stream
*/
std::ostream &operator << (std::ostream &os, const LeoLatLong &latLong); std::ostream &operator << (std::ostream &os, const LeoLatLong &latLong);
/**
* \brief Deserialize the LeoLatLong instance using a colon as a separator
* \param is stream to deserialize from
* \param latLong to deserialize into
* \return returns the stream
*/
std::istream &operator >> (std::istream &is, LeoLatLong &latLong); std::istream &operator >> (std::istream &is, LeoLatLong &latLong);
}; };

View file

@ -34,29 +34,42 @@
#include "ns3/propagation-loss-model.h" #include "ns3/propagation-loss-model.h"
#include "mock-channel.h" #include "mock-channel.h"
/**
* \file
* \ingroup leo
*
* Declaration of LeoMockChannl
*/
namespace ns3 { namespace ns3 {
/** /**
* \ingroup leo * \ingroup leo
* \defgroup channel Channel * \brief Channel between satellite and gateway
*/
/**
* \ingroup channel
* \brief Mocked satellite-gateway, satellite-terminal channel types
* *
* Delivers packets to all attached devices on opposing site (satellite to
* gateway and vice-versa)
*
* Usually used together with LeoPropagationLossModel and LeoPropagationDelay.
*/ */
class LeoMockChannel : public MockChannel class LeoMockChannel : public MockChannel
{ {
public: public:
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void); static TypeId GetTypeId (void);
/// constructor
LeoMockChannel (); LeoMockChannel ();
/// destructor
virtual ~LeoMockChannel (); virtual ~LeoMockChannel ();
/** /**
* \see MockChannel::TransmitStart * \see MockChannel::TransmitStart
* *
* A packet is transmitted if the destination is reachable via the beam. * \brief A packet is transmitted if the destination is reachable via the beam.
*/ */
virtual bool TransmitStart (Ptr<const Packet> p, uint32_t devId, Address dst, Time txTime); virtual bool TransmitStart (Ptr<const Packet> p, uint32_t devId, Address dst, Time txTime);
@ -71,7 +84,11 @@ private:
* type (no sat-sat or ground-ground). * type (no sat-sat or ground-ground).
*/ */
typedef std::map<Address, Ptr<MockNetDevice> > DeviceIndex; typedef std::map<Address, Ptr<MockNetDevice> > DeviceIndex;
/// Devices that are on the ground (gateways)
DeviceIndex m_groundDevices; DeviceIndex m_groundDevices;
/// Devices that are in space (satellites)
DeviceIndex m_satelliteDevices; DeviceIndex m_satelliteDevices;
}; // class MockChannel }; // class MockChannel

View file

@ -21,37 +21,66 @@
#include "mock-net-device.h" #include "mock-net-device.h"
/**
* \file
* \ingroup leo
*/
namespace ns3 namespace ns3
{ {
/** /**
* \brief A mocked satellite-ground link communication device with a type * \ingroup leo
*/ * \brief A satellite-ground communication device with a type
*/
class LeoMockNetDevice : public MockNetDevice class LeoMockNetDevice : public MockNetDevice
{ {
public: public:
/**
* \brief Type of the device. Can either be on ground or in space.
*/
enum DeviceType enum DeviceType
{ {
/// Device is on the ground
GND, GND,
/// Device is in space
SAT SAT
}; };
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void); static TypeId GetTypeId (void);
/// constructor
LeoMockNetDevice (); LeoMockNetDevice ();
/// destructor
virtual ~LeoMockNetDevice () virtual ~LeoMockNetDevice ()
{ {
} }
/**
* \brief Get the type of this device
* \return device type
*/
DeviceType GetDeviceType () const; DeviceType GetDeviceType () const;
/**
* \brief Set the type of this device
* \return device type
*/
void SetDeviceType (DeviceType deviceType); void SetDeviceType (DeviceType deviceType);
protected: protected:
virtual double DoCalcRxPower (double rxPower) const; virtual double DoCalcRxPower (double rxPower) const;
private: private:
/// Device type
DeviceType m_deviceType; DeviceType m_deviceType;
/// Receiver loss
double m_rxLoss; double m_rxLoss;
/// Receiver gain
double m_rxGain; double m_rxGain;
}; };

View file

@ -19,18 +19,17 @@
#ifndef LEO_ONEWEB_CONSTANTS #ifndef LEO_ONEWEB_CONSTANTS
#define LEO_ONEWEB_CONSTANTS #define LEO_ONEWEB_CONSTANTS
/**
* \file
* \ingroup leo
*
* Declaration of constants
*/
namespace ns3 { namespace ns3 {
/** /**
* \ingroup leo * \ingroup leo
* \defgroup constants Channel
*/
/**
* \ingroup constants
* \defgroup oneweb
*/
/**
* \ingroup oneweb
* \brief Constants for oneweb network estimated from channel parameters * \brief Constants for oneweb network estimated from channel parameters
* *
* Source http://systemarchitect.mit.edu/docs/delportillo18b.pdf * Source http://systemarchitect.mit.edu/docs/delportillo18b.pdf

View file

@ -21,21 +21,56 @@
#include "ns3/uinteger.h" #include "ns3/uinteger.h"
/**
* \file
* \ingroup leo
*/
namespace ns3 namespace ns3
{ {
class LeoOrbit; class LeoOrbit;
/**
* \brief Serialize an orbit
* \return the stream
* \param os the stream
* \param [in] orbit is an Orbit
*/
std::ostream &operator << (std::ostream &os, const LeoOrbit &orbit); std::ostream &operator << (std::ostream &os, const LeoOrbit &orbit);
/**
* \brief Deserialize an orbit
* \return the stream
* \param is the stream
* \param [out] orbit is the Orbit
*/
std::istream &operator >> (std::istream &is, LeoOrbit &orbit); std::istream &operator >> (std::istream &is, LeoOrbit &orbit);
/**
* \ingroup leo
* \brief Orbit definition
*/
class LeoOrbit { class LeoOrbit {
public: public:
/// constructor
LeoOrbit (); LeoOrbit ();
/**
* \brief Constructor
* \param a altitude
* \param i inclination
* \param p number planes
* \param s number of satellites in plane
*/
LeoOrbit (double a, double i, double p, double s) : alt (a), inc (i), planes (p), sats (s) {} LeoOrbit (double a, double i, double p, double s) : alt (a), inc (i), planes (p), sats (s) {}
/// destructor
virtual ~LeoOrbit (); virtual ~LeoOrbit ();
/// Altitude of orbit
double alt; double alt;
/// Inclination of orbit
double inc; double inc;
/// Number of planes with that altitude and inclination
uint16_t planes; uint16_t planes;
/// Number of satellites in those planes
uint16_t sats; uint16_t sats;
}; };

View file

@ -23,31 +23,45 @@
#define LEO_GND_RAD_EARTH 6.371e6 #define LEO_GND_RAD_EARTH 6.371e6
/**
* \file
* \ingroup leo
*
* Declaration of LeoPolarPositionAllocator
*/
namespace ns3 { namespace ns3 {
/** /**
* \brief Allocate pairs of latitude and longitude. * \ingroup leo
* \brief Allocator for pairs of latitude and longitude.
*/ */
class LeoPolarPositionAllocator : public PositionAllocator class LeoPolarPositionAllocator : public PositionAllocator
{ {
public: public:
/** /**
* Register this type with the TypeId system. * \brief Get the type ID.
* \return the object TypeId * \return the object TypeId
*/ */
static TypeId GetTypeId (); static TypeId GetTypeId ();
/// constructor
LeoPolarPositionAllocator (); LeoPolarPositionAllocator ();
/// desctructor
virtual ~LeoPolarPositionAllocator (); virtual ~LeoPolarPositionAllocator ();
virtual Vector GetNext (void) const; virtual Vector GetNext (void) const;
virtual int64_t AssignStreams (int64_t stream); virtual int64_t AssignStreams (int64_t stream);
private: private:
/// Number of latitudial positions
uint32_t m_latNum; uint32_t m_latNum;
/// Number of longitudinal positions
uint32_t m_lonNum; uint32_t m_lonNum;
/// Current latitudinal position
mutable uint32_t m_lat; mutable uint32_t m_lat;
/// Current longitudinal position
mutable uint32_t m_lon; mutable uint32_t m_lon;
}; };

View file

@ -25,13 +25,30 @@
#define LEO_PROP_EARTH_RAD 6.37101e6 #define LEO_PROP_EARTH_RAD 6.37101e6
#define LEO_SPEED_OF_LIGHT_IN_AIR 299702458 #define LEO_SPEED_OF_LIGHT_IN_AIR 299702458
/**
* \file
* \ingroup leo
* Declaration of LeoPropagationLossModel
*/
namespace ns3 { namespace ns3 {
/**
* \ingroup leo
* \brief Propagation loss model for transmissions between satellites and
* gateways
*/
class LeoPropagationLossModel : public PropagationLossModel class LeoPropagationLossModel : public PropagationLossModel
{ {
public: public:
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void); static TypeId GetTypeId (void);
/// constructor
LeoPropagationLossModel (); LeoPropagationLossModel ();
/// destructor
virtual ~LeoPropagationLossModel (); virtual ~LeoPropagationLossModel ();
private: private:
@ -57,9 +74,7 @@ private:
double m_linkMargin; double m_linkMargin;
/** /**
* Returns the Rx Power taking into account only the particular * \brief Calculate the Rx Power
* PropagationLossModel.
*
* \param txPowerDbm current transmission power (in dBm) * \param txPowerDbm current transmission power (in dBm)
* \param a the mobility model of the source * \param a the mobility model of the source
* \param b the mobility model of the destination * \param b the mobility model of the destination
@ -68,15 +83,26 @@ private:
virtual double DoCalcRxPower (double txPowerDbm, virtual double DoCalcRxPower (double txPowerDbm,
Ptr<MobilityModel> a, Ptr<MobilityModel> a,
Ptr<MobilityModel> b) const; Ptr<MobilityModel> b) const;
/**
* Subclasses must implement this; those not using random variables
* can return zero
*/
virtual int64_t DoAssignStreams (int64_t stream); virtual int64_t DoAssignStreams (int64_t stream);
/**
* \brief Set the elevation angle
* \param angle elevation
*/
void SetElevationAngle (double angle); void SetElevationAngle (double angle);
/**
* \brief Get the elevation angle
* \return elevation angle
*/
double GetElevationAngle () const; double GetElevationAngle () const;
/**
* \brief Get the maximum communication distance for satellite
* \param sat satellite
* \return distance
*/
double GetCutoffDistance (const Ptr<MobilityModel> sat) const; double GetCutoffDistance (const Ptr<MobilityModel> sat) const;
}; };

View file

@ -19,18 +19,16 @@
#ifndef LEO_STARLINK_CONSTANTS #ifndef LEO_STARLINK_CONSTANTS
#define LEO_STARLINK_CONSTANTS #define LEO_STARLINK_CONSTANTS
/**
* \file
* \ingroup leo
* Definition of Starlink link constants
*/
namespace ns3 { namespace ns3 {
/** /**
* \ingroup leo * \ingroup leo
* \defgroup constants Channel
*/
/**
* \ingroup constants
* \defgroup starlink
*/
/**
* \ingroup starlink
* \brief Constants for starlink network estimated from channel parameters * \brief Constants for starlink network estimated from channel parameters
* *
* Source http://systemarchitect.mit.edu/docs/delportillo18b.pdf * Source http://systemarchitect.mit.edu/docs/delportillo18b.pdf

View file

@ -19,18 +19,16 @@
#ifndef LEO_TELESAT_CONSTANTS #ifndef LEO_TELESAT_CONSTANTS
#define LEO_TELESAT_CONSTANTS #define LEO_TELESAT_CONSTANTS
/**
* \file
* \ingroup leo
* Definition of Telesat link constants
*/
namespace ns3 { namespace ns3 {
/** /**
* \ingroup leo * \ingroup leo
* \defgroup constants Channel
*/
/**
* \ingroup constants
* \defgroup telesat
*/
/**
* \ingroup starlink
* \brief Constants for Telesat network estimated from channel parameters * \brief Constants for Telesat network estimated from channel parameters
* *
* Source http://systemarchitect.mit.edu/docs/delportillo18b.pdf * Source http://systemarchitect.mit.edu/docs/delportillo18b.pdf

View file

@ -34,27 +34,39 @@
#include "ns3/propagation-loss-model.h" #include "ns3/propagation-loss-model.h"
#include "mock-net-device.h" #include "mock-net-device.h"
/**
* \file
* \ingroup leo
* Declaration of class MockNetDevice
*/
namespace ns3 { namespace ns3 {
class MockNetDevice; class MockNetDevice;
/** /**
* \ingroup network * \ingroup leo
* \defgroup channel Channel * \brief Base class for LeoMockChannel and IslMockChannel
*/
/**
* \ingroup channel
* \brief Mocked channel
*
*/ */
class MockChannel : public Channel class MockChannel : public Channel
{ {
public: public:
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void); static TypeId GetTypeId (void);
/// constructor
MockChannel (); MockChannel ();
/// destructor
virtual ~MockChannel (); virtual ~MockChannel ();
/**
* \brief Get device at index i
* \param i index
* \return pointer to device
*/
Ptr<NetDevice> GetDevice (std::size_t i) const; Ptr<NetDevice> GetDevice (std::size_t i) const;
/** /**
@ -71,13 +83,41 @@ public:
*/ */
virtual bool Detach (uint32_t deviceId); virtual bool Detach (uint32_t deviceId);
/**
* \brief Get number of devices in channel
* \return number of devices
*/
std::size_t GetNDevices (void) const; std::size_t GetNDevices (void) const;
/**
* \brief Start to transmit a packet
*
* Subclasses must implement this.
*/
virtual bool TransmitStart (Ptr<const Packet> p, uint32_t devId, Address dst, Time txTime) = 0; virtual bool TransmitStart (Ptr<const Packet> p, uint32_t devId, Address dst, Time txTime) = 0;
/**
* \brief Get the propagation loss model
* \return propagation loss in dBm
*/
Ptr<PropagationLossModel> GetPropagationLoss (void) const; Ptr<PropagationLossModel> GetPropagationLoss (void) const;
/**
* \brief Set the propagation loss model
* \param model propagation loss
*/
void SetPropagationLoss (Ptr<PropagationLossModel> model); void SetPropagationLoss (Ptr<PropagationLossModel> model);
/**
* \brief Get the propagation delay model
* \return propagation delay
*/
Ptr<PropagationDelayModel> GetPropagationDelay (void) const; Ptr<PropagationDelayModel> GetPropagationDelay (void) const;
/**
* \brief Set the propagation delay model
* \param delay propagation delay
*/
void SetPropagationDelay (Ptr<PropagationDelayModel> delay); void SetPropagationDelay (Ptr<PropagationDelayModel> delay);
protected: protected:
@ -90,25 +130,39 @@ protected:
/** /**
* \brief Get the propagation delay associated with this channel * \brief Get the propagation delay associated with this channel
* \param first mobility model
* \param second mobility model
* \param txTime time of the transmission
* \returns Propagation time delay * \returns Propagation time delay
*/ */
Time GetPropagationDelay (Ptr<MobilityModel> first, Ptr<MobilityModel> second, Time txTime) const; Time GetPropagationDelay (Ptr<MobilityModel> first, Ptr<MobilityModel> second, Time txTime) const;
/**
* \brief Get a device by it's address
* \param addr address of the device
* \return pointer to the device if it is attached to the channel, null otherwise
*/
Ptr<MockNetDevice> GetDevice (Address &addr) const; Ptr<MockNetDevice> GetDevice (Address &addr) const;
/**
* \brief Deliver a packet to a destination
* \param p packet
* \param src source of a packet
* \param dst destination of a packet
* \param txTime transmission time of the packet
* \return true iff the transmission has been successful
*/
bool Deliver ( Ptr<const Packet> p, Ptr<MockNetDevice> src, Ptr<MockNetDevice> dst, Time txTime); bool Deliver ( Ptr<const Packet> p, Ptr<MockNetDevice> src, Ptr<MockNetDevice> dst, Time txTime);
private: private:
/// All devices that are attached to the channel
std::vector<Ptr<MockNetDevice> > m_link; std::vector<Ptr<MockNetDevice> > m_link;
/** /// Propagation delay model to be used with this channel
* \brief Propagation delay model to be used with this channel
*/
Ptr<PropagationDelayModel> m_propagationDelay; Ptr<PropagationDelayModel> m_propagationDelay;
/**
* \brief Propagation loss model to be used with this channel /// Propagation loss model to be used with this channel
*/
Ptr<PropagationLossModel> m_propagationLoss; Ptr<PropagationLossModel> m_propagationLoss;
}; // class MockChannel }; // class MockChannel

View file

@ -33,6 +33,15 @@
#include "ns3/mac48-address.h" #include "ns3/mac48-address.h"
#include "ns3/mobility-model.h" #include "ns3/mobility-model.h"
/**
* \file
* \ingroup leo
* Declares MockNetDevice
*
* Lots of stuff copied and adapted from PointToPointNetDevice and
* CsmaNetDevice
*/
namespace ns3 { namespace ns3 {
template <typename Item> class Queue; template <typename Item> class Queue;
@ -40,6 +49,10 @@ class NetDeviceQueueInterface;
class MockChannel; class MockChannel;
class ErrorModel; class ErrorModel;
/**
* \ingroup leo
* \brief Network device for use with MockChannel
*/
class MockNetDevice : public NetDevice class MockNetDevice : public NetDevice
{ {
public: public:
@ -492,4 +505,4 @@ private:
} // namespace ns3 } // namespace ns3
#endif /* ISL_NET_DEVICE_H */ #endif /* MOCK_NET_DEVICE_H */

View file

@ -21,12 +21,27 @@
#include "ns3/uinteger.h" #include "ns3/uinteger.h"
/**
* \file
* \ingroup leo
* Declares Orbit
*/
/**
* \ingroup leo
* \brief Orbit
*/
class Orbit { class Orbit {
public: public:
/// constructor
Orbit (double a, double i, double p, double s) : alt (a), inc (i), planes (p), sats (s) {} Orbit (double a, double i, double p, double s) : alt (a), inc (i), planes (p), sats (s) {}
/// Altitude
double alt; double alt;
/// Inclination
double inc; double inc;
/// Number of planes
uint16_t planes; uint16_t planes;
/// Number of satellites in plane
uint16_t sats; uint16_t sats;
}; };

View file

@ -28,6 +28,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class EmptyGndNodeHelperTestCase : public TestCase class EmptyGndNodeHelperTestCase : public TestCase
{ {
public: public:
@ -60,6 +72,12 @@ EmptyGndNodeHelperTestCase::DoRun (void)
// ------------------------------------------------------------------------- // // ------------------------------------------------------------------------- //
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class SomeGndNodeHelperTestCase : public TestCase class SomeGndNodeHelperTestCase : public TestCase
{ {
public: public:
@ -92,6 +110,12 @@ SomeGndNodeHelperTestCase::DoRun (void)
NS_ASSERT_MSG (mob != Ptr<MobilityModel> (), "Mobility model is valid"); NS_ASSERT_MSG (mob != Ptr<MobilityModel> (), "Mobility model is valid");
} }
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class GndNodeHelperTestSuite : public TestSuite class GndNodeHelperTestSuite : public TestSuite
{ {
public: public:

View file

@ -27,6 +27,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class IslMockChannelTransmitUnknownTestCase : public TestCase class IslMockChannelTransmitUnknownTestCase : public TestCase
{ {
public: public:
@ -49,6 +61,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class IslMockChannelTransmitKnownTestCase : public TestCase class IslMockChannelTransmitKnownTestCase : public TestCase
{ {
public: public:
@ -82,6 +100,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class IslMockChannelTestSuite : public TestSuite class IslMockChannelTestSuite : public TestSuite
{ {
public: public:

View file

@ -25,6 +25,18 @@ using namespace ns3;
#define EARTH_RAD 6.3781e6 #define EARTH_RAD 6.3781e6
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class IslPropagationAngleTestCase1 : public TestCase class IslPropagationAngleTestCase1 : public TestCase
{ {
public: public:
@ -42,6 +54,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class IslPropagationAngleTestCase2 : public TestCase class IslPropagationAngleTestCase2 : public TestCase
{ {
public: public:
@ -59,6 +77,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class IslPropagationTestSuite : public TestSuite class IslPropagationTestSuite : public TestSuite
{ {
public: public:

View file

@ -30,6 +30,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class IslIcmpTestCase : public TestCase class IslIcmpTestCase : public TestCase
{ {
public: public:
@ -109,6 +121,12 @@ IslIcmpTestCase::DoRun (void)
Simulator::Destroy (); Simulator::Destroy ();
} }
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class IslTestSuite : public TestSuite class IslTestSuite : public TestSuite
{ {
public: public:

View file

@ -30,6 +30,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoAnimTestCase1 : public TestCase class LeoAnimTestCase1 : public TestCase
{ {
public: public:
@ -118,10 +130,12 @@ LeoAnimTestCase1::DoRun (void)
Simulator::Destroy (); Simulator::Destroy ();
} }
// The TestSuite class names the TestSuite, identifies what type of TestSuite, /**
// and enables the TestCases to be run. Typically, only the constructor for * \ingroup leo-test
// this class must be defined * \ingroup tests
// *
* \brief Unit tests
*/
class LeoAnimTestSuite : public TestSuite class LeoAnimTestSuite : public TestSuite
{ {
public: public:

View file

@ -21,6 +21,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoWaypointFileEmptyTestCase : public TestCase class LeoWaypointFileEmptyTestCase : public TestCase
{ {
public: public:
@ -57,6 +69,12 @@ LeoWaypointFileEmptyTestCase::DoRun (void)
NS_TEST_ASSERT_MSG_EQ ((i == 0), true, "Reading waypoints from empty"); NS_TEST_ASSERT_MSG_EQ ((i == 0), true, "Reading waypoints from empty");
} }
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoWaypointSomeEntriesTestCase : public TestCase class LeoWaypointSomeEntriesTestCase : public TestCase
{ {
public: public:
@ -93,6 +111,12 @@ LeoWaypointSomeEntriesTestCase::DoRun (void)
NS_TEST_ASSERT_MSG_EQ ((i > 0), true, "Reading from non-empty stream succeeds"); NS_TEST_ASSERT_MSG_EQ ((i > 0), true, "Reading from non-empty stream succeeds");
} }
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoWaypointsTestSuite : public TestSuite class LeoWaypointsTestSuite : public TestSuite
{ {
public: public:

View file

@ -24,6 +24,18 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("LeoMobilityTestSuite"); NS_LOG_COMPONENT_DEFINE ("LeoMobilityTestSuite");
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoMobilityWaypointTestCase : public TestCase class LeoMobilityWaypointTestCase : public TestCase
{ {
public: public:
@ -57,6 +69,12 @@ LeoMobilityWaypointTestCase::DoRun (void)
NS_TEST_ASSERT_MSG_EQ ((mobility->WaypointsLeft () > 2), true, "Reading waypoints from empty"); NS_TEST_ASSERT_MSG_EQ ((mobility->WaypointsLeft () > 2), true, "Reading waypoints from empty");
} }
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoMobilityTestSuite : public TestSuite class LeoMobilityTestSuite : public TestSuite
{ {
public: public:

View file

@ -27,6 +27,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoMockChannelTransmitUnknownTestCase : public TestCase class LeoMockChannelTransmitUnknownTestCase : public TestCase
{ {
public: public:
@ -49,6 +61,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoMockChannelTransmitKnownTestCase : public TestCase class LeoMockChannelTransmitKnownTestCase : public TestCase
{ {
public: public:
@ -86,6 +104,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoMockChannelTransmitSpaceGroundTestCase : public TestCase class LeoMockChannelTransmitSpaceGroundTestCase : public TestCase
{ {
public: public:
@ -123,6 +147,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoMockChannelTransmitSpaceSpaceTestCase : public TestCase class LeoMockChannelTransmitSpaceSpaceTestCase : public TestCase
{ {
public: public:
@ -160,6 +190,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoMockChannelTransmitGroundGroundTestCase : public TestCase class LeoMockChannelTransmitGroundGroundTestCase : public TestCase
{ {
public: public:
@ -197,6 +233,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoMockChannelTestSuite : public TestSuite class LeoMockChannelTestSuite : public TestSuite
{ {
public: public:

View file

@ -27,6 +27,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoOrbitSpeedTestCase : public TestCase class LeoOrbitSpeedTestCase : public TestCase
{ {
public: public:
@ -42,6 +54,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoOrbitPositionTestCase : public TestCase class LeoOrbitPositionTestCase : public TestCase
{ {
public: public:
@ -58,6 +76,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoOrbitProgressTestCase : public TestCase class LeoOrbitProgressTestCase : public TestCase
{ {
public: public:
@ -85,6 +109,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoOrbitLatitudeTestCase : public TestCase class LeoOrbitLatitudeTestCase : public TestCase
{ {
public: public:
@ -106,6 +136,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoOrbitOffsetTestCase : public TestCase class LeoOrbitOffsetTestCase : public TestCase
{ {
public: public:
@ -127,6 +163,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoOrbitTracingTestCase : public TestCase class LeoOrbitTracingTestCase : public TestCase
{ {
public: public:
@ -178,6 +220,12 @@ void LeoOrbitTracingTestCase::CourseChange (std::string context, Ptr<const Mobil
} }
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoOrbitTestSuite : TestSuite class LeoOrbitTestSuite : TestSuite
{ {
public: public:

View file

@ -24,6 +24,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoPropagationRxNoLosTestCase : public TestCase class LeoPropagationRxNoLosTestCase : public TestCase
{ {
public: public:
@ -44,6 +56,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoPropagationRxLosTestCase : public TestCase class LeoPropagationRxLosTestCase : public TestCase
{ {
public: public:
@ -67,6 +85,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoPropagationBadAngleTestCase : public TestCase class LeoPropagationBadAngleTestCase : public TestCase
{ {
public: public:
@ -87,6 +111,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoPropagationLossTestCase : public TestCase class LeoPropagationLossTestCase : public TestCase
{ {
public: public:
@ -109,6 +139,12 @@ private:
} }
}; };
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoPropagationTestSuite : public TestSuite class LeoPropagationTestSuite : public TestSuite
{ {
public: public:

View file

@ -29,6 +29,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoTestCase1 : public TestCase class LeoTestCase1 : public TestCase
{ {
public: public:
@ -146,10 +158,12 @@ LeoTestCase1::DoRun (void)
Simulator::Destroy (); Simulator::Destroy ();
} }
// The TestSuite class names the TestSuite, identifies what type of TestSuite, /**
// and enables the TestCases to be run. Typically, only the constructor for * \ingroup leo-test
// this class must be defined * \ingroup tests
// *
* \brief Unit tests
*/
class LeoTestSuite : public TestSuite class LeoTestSuite : public TestSuite
{ {
public: public:

View file

@ -29,6 +29,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class LeoTraceTestCase1 : public TestCase class LeoTraceTestCase1 : public TestCase
{ {
public: public:
@ -135,10 +147,12 @@ LeoTraceTestCase1::DoRun (void)
Simulator::Destroy (); Simulator::Destroy ();
} }
// The TestSuite class names the TestSuite, identifies what type of TestSuite, /**
// and enables the TestCases to be run. Typically, only the constructor for * \ingroup leo-test
// this class must be defined * \ingroup tests
// *
* \brief Unit tests
*/
class LeoTraceTestSuite : public TestSuite class LeoTraceTestSuite : public TestSuite
{ {
public: public:

View file

@ -28,6 +28,18 @@
using namespace ns3; using namespace ns3;
/**
* \ingroup leo
* \defgroup leo-test LEO module tests
*/
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class EmptySatNodeHelperTestCase : public TestCase class EmptySatNodeHelperTestCase : public TestCase
{ {
public: public:
@ -60,6 +72,12 @@ EmptySatNodeHelperTestCase::DoRun (void)
// ------------------------------------------------------------------------- // // ------------------------------------------------------------------------- //
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class SingleSatNodeHelperTestCase : public TestCase class SingleSatNodeHelperTestCase : public TestCase
{ {
public: public:
@ -96,6 +114,12 @@ SingleSatNodeHelperTestCase::DoRun (void)
NS_ASSERT_MSG (mob != Ptr<MobilityModel> (), "Mobility model is valid"); NS_ASSERT_MSG (mob != Ptr<MobilityModel> (), "Mobility model is valid");
} }
/**
* \ingroup leo-test
* \ingroup tests
*
* \brief Unit tests
*/
class SatNodeHelperTestSuite : public TestSuite class SatNodeHelperTestSuite : public TestSuite
{ {
public: public: