Doxygen cleanup in mobility module
authorPavel Boyko <boyko@iitp.ru>
Mon, 02 Aug 2010 13:00:17 +0400
changeset 6471 a2028222c362
parent 6470 cd04d218ba62
child 6472 54ce45443509
Doxygen cleanup in mobility module
doc/modules
src/mobility/box.h
src/mobility/constant-acceleration-mobility-model.h
src/mobility/constant-position-mobility-model.h
src/mobility/constant-velocity-helper.h
src/mobility/constant-velocity-mobility-model.h
src/mobility/gauss-markov-mobility-model.h
src/mobility/hierarchical-mobility-model.h
src/mobility/mobility-model.h
src/mobility/mobility.h
src/mobility/position-allocator.h
src/mobility/random-direction-2d-mobility-model.h
src/mobility/random-walk-2d-mobility-model.h
src/mobility/random-waypoint-mobility-model.h
src/mobility/rectangle.h
src/mobility/steady-state-random-waypoint-mobility-model.h
src/mobility/waypoint-mobility-model.h
src/mobility/waypoint.h
--- a/doc/modules	Tue Jul 27 14:34:47 2010 -0400
+++ b/doc/modules	Mon Aug 02 13:00:17 2010 +0400
@@ -55,8 +55,6 @@
  * 
  * @defgroup applications Applications
  *
- * @defgroup mobility Mobility
- *
  * @defgroup constants Constants
  * @brief Constants you can change
  *
--- a/src/mobility/box.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/box.h	Mon Aug 02 13:00:17 2010 +0400
@@ -27,6 +27,7 @@
 namespace ns3 {
 
 /**
+ * \ingroup mobility
  * \brief a 3d box
  */
 class Box
--- a/src/mobility/constant-acceleration-mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/constant-acceleration-mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -24,9 +24,9 @@
 namespace ns3 {
 
 /**
- * \brief a position model for which the current acceleration does not
- *        change once it has been set and until it is set again 
- *        explicitely to a new value.
+ * \ingroup mobility
+ *
+ * \brief Mobility model for which the current acceleration does not change once it has been set and until it is set again explicitely to a new value.
  */
 class ConstantAccelerationMobilityModel : public MobilityModel 
 {
--- a/src/mobility/constant-position-mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/constant-position-mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -25,9 +25,9 @@
 namespace ns3 {
 
 /**
- * \brief a position model for which the current position does not
- *        change once it has been set and until it is set again 
- *        explicitely to a new value.
+ * \ingroup mobility
+ *
+ * \brief Mobility model for which the current position does not change once it has been set and until it is set again explicitely to a new value.
  */
 class ConstantPositionMobilityModel : public MobilityModel 
 {
--- a/src/mobility/constant-velocity-helper.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/constant-velocity-helper.h	Mon Aug 02 13:00:17 2010 +0400
@@ -28,6 +28,11 @@
 
 class Rectangle;
 
+/**
+ * \ingroup mobility
+ *
+ * \brief Utility class used to move node with constant velocity.
+ */
 class ConstantVelocityHelper
 {
  public:
--- a/src/mobility/constant-velocity-mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/constant-velocity-mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -28,9 +28,9 @@
 namespace ns3 {
 
 /**
- * \brief a position model for which the current speed does not
- *        change once it has been set and until it is set again 
- *        explicitely to a new value.
+ * \ingroup mobility
+ *
+ * \brief Mobility model for which the current speed does not change once it has been set and until it is set again explicitely to a new value.
  */
 class ConstantVelocityMobilityModel : public MobilityModel 
 {
--- a/src/mobility/gauss-markov-mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/gauss-markov-mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -35,7 +35,8 @@
 namespace ns3 {
 
 /**
- * \brief description of gauss markov mobility model
+ * \ingroup mobility
+ * \brief Gauss-Markov mobility model
  *
  * This is a 3D version of the Gauss-Markov mobility model described in [1]. 
  * Unlike the other mobility models in ns-3, which are memoryless, the Gauss
@@ -51,32 +52,31 @@
  * version of the "rectangle" field that is used in 2-dimensional ns-3 mobility models.
  * 
  * Here is an example of how to implement the model and set the initial node positions:
- * 
- *   MobilityHelper mobility;
- * 
- *   mobility.SetMobilityModel ("ns3::GaussMarkovMobilityModel",
- *     "Bounds", BoxValue (Box (0, 150000, 0, 150000, 0, 10000)),
- *     "TimeStep", TimeValue (Seconds (0.5)),
- *     "Alpha", DoubleValue (0.85),
- *     "MeanVelocity", RandomVariableValue (UniformVariable (800, 1200)),
- *     "MeanDirection", RandomVariableValue (UniformVariable (0, 6.283185307)),
- *     "MeanPitch", RandomVariableValue (UniformVariable (0.05, 0.05)),
- *     "NormalVelocity", RandomVariableValue (NormalVariable (0.0, 0.0, 0.0)),
- *     "NormalDirection", RandomVariableValue (NormalVariable (0.0, 0.2, 0.4)),
- *     "NormalPitch", RandomVariableValue (NormalVariable (0.0, 0.02, 0.04)));
- * 
- *   mobility.SetPositionAllocator ("ns3::RandomBoxPositionAllocator",
- *     "X", RandomVariableValue (UniformVariable (0, 150000)),
- *     "Y", RandomVariableValue (UniformVariable (0, 150000)),
- *     "Z", RandomVariableValue (UniformVariable (0, 10000)));
- *
- *   mobility.Install (wifiStaNodes);
- *
+ * \code
+    MobilityHelper mobility;
+  
+    mobility.SetMobilityModel ("ns3::GaussMarkovMobilityModel",
+      "Bounds", BoxValue (Box (0, 150000, 0, 150000, 0, 10000)),
+      "TimeStep", TimeValue (Seconds (0.5)),
+      "Alpha", DoubleValue (0.85),
+      "MeanVelocity", RandomVariableValue (UniformVariable (800, 1200)),
+      "MeanDirection", RandomVariableValue (UniformVariable (0, 6.283185307)),
+      "MeanPitch", RandomVariableValue (UniformVariable (0.05, 0.05)),
+      "NormalVelocity", RandomVariableValue (NormalVariable (0.0, 0.0, 0.0)),
+      "NormalDirection", RandomVariableValue (NormalVariable (0.0, 0.2, 0.4)),
+      "NormalPitch", RandomVariableValue (NormalVariable (0.0, 0.02, 0.04)));
+  
+    mobility.SetPositionAllocator ("ns3::RandomBoxPositionAllocator",
+      "X", RandomVariableValue (UniformVariable (0, 150000)),
+      "Y", RandomVariableValue (UniformVariable (0, 150000)),
+      "Z", RandomVariableValue (UniformVariable (0, 10000)));
+ 
+    mobility.Install (wifiStaNodes);
+ * \endcode
  * [1] Tracy Camp, Jeff Boleng, Vanessa Davies, "A Survey of Mobility Models
  * for Ad Hoc Network Research", Wireless Communications and Mobile Computing,
  * Wiley, vol.2 iss.5, September 2002, pp.483-502
  */
-
 class GaussMarkovMobilityModel : public MobilityModel
 {
 public:
--- a/src/mobility/hierarchical-mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/hierarchical-mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -25,7 +25,8 @@
 namespace ns3 {
 
 /**
- * \brief a hierarchical mobility model.
+ * \ingroup mobility
+ * \brief Hierarchical mobility model.
  * 
  * This model allows you to specify the position of a child object
  * relative to a parent object.
@@ -43,13 +44,13 @@
  * position, never the parent.  The child mobility model always uses a
  * coordinate system relative to the parent model position.
  *
- * @note: as a special case, the parent model may be NULL, which is
+ * \note: as a special case, the parent model may be NULL, which is
  * semantically equivalent to having a ConstantPositionMobilityModel
  * as parent positioned at origin (0,0,0).  In other words, setting
  * the parent model to NULL makes the child model and the hierarchical
  * model start using world absolute coordinates.
  *
- * @warning: changing the parent/child mobility models in the middle
+ * \warning: changing the parent/child mobility models in the middle
  * of a simulation will probably not play very well with the
  * ConfigStore APIs, so do this only if you know what you are doing.
  */
@@ -61,14 +62,14 @@
   HierarchicalMobilityModel ();
 
   /**
-   * \returns the child mobility model.
+   * \return the child mobility model.
    *
    * This allows you to get access to the position of the child
    * relative to its parent.
    */
   Ptr<MobilityModel> GetChild (void) const;
   /**
-   * \returns the parent mobility model.
+   * \return the parent mobility model.
    *
    * This allows you to get access to the position of the 
    * parent mobility model which is used as the reference 
--- a/src/mobility/mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -27,11 +27,14 @@
 namespace ns3 {
 
 /**
- * \brief keep track of the current position of an object
+ * \ingroup mobility
+ * \brief Keep track of the current position and velocity of an object.
  *
  * All space coordinates in this class and its subclasses are
  * understood to be meters or meters/s. i.e., they are all
  * metric international units.
+ *
+ * This is a base class for all specific mobility models.
  */
 class MobilityModel : public Object
 {
@@ -41,7 +44,7 @@
   virtual ~MobilityModel () = 0;
 
   /**
-   * \returns the current position
+   * \return the current position
    */
   Vector GetPosition (void) const;
   /**
@@ -49,12 +52,12 @@
    */
   void SetPosition (const Vector &position);
   /**
-   * \returns the current velocity.
+   * \return the current velocity.
    */
   Vector GetVelocity (void) const;
   /**
    * \param position a reference to another mobility model
-   * \returns the distance between the two objects. Unit is meters.
+   * \return the distance between the two objects. Unit is meters.
    */
   double GetDistanceFrom (Ptr<const MobilityModel> position) const;
 protected:
@@ -65,7 +68,7 @@
   void NotifyCourseChange (void) const;
 private:
   /**
-   * \returns the current position.
+   * \return the current position.
    *
    * Concrete subclasses of this base class must 
    * implement this method.
@@ -79,7 +82,7 @@
    */
   virtual void DoSetPosition (const Vector &position) = 0;
   /**
-   * \returns the current velocity.
+   * \return the current velocity.
    *
    * Concrete subclasses of this base class must 
    * implement this method.
--- a/src/mobility/mobility.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/mobility.h	Mon Aug 02 13:00:17 2010 +0400
@@ -1,36 +1,10 @@
 /**
- * \addtogroup mobility Mobility
+ * \defgroup mobility Mobility
  *
  * The mobility support includes:
  *  - a set of mobility models which are used to track and maintain
  *    the "current" cartesian position and speed of an object.
  *
- *  - a "course change notifier" trace which can be used to register
+ *  - a "course change notifier" trace source which can be used to register
  *    listeners to the course changes of a mobility model
- *
- * The mobility models themselves are:
- *   - ns3::ConstantPositionMobilityModel: a model which maintains a constant position
- *     until it is changed by the user.
- *
- *   - ns3::ConstantVelocityMobilityModel: a model which maintains a constant speed
- *     until it is changed by the user.
- *
- *   - ns3::HierarchicalMobilityModel: a model which calculates the current 
- *     absolute position from a "reference" (parent) mobility model
- *     and a "relative" (child) mobility model. This allows users to
- *     compose mobility models.
- *
- *   - ns3::RandomWalk2dMobilityModel: a 2d "brownian" motion mobility model
- *     where the bounds of the mobility area are a rectangle.
- *
- *   - ns3::RandomWaypointMobilityModel: a 3d random waypoint mobility model.
- *
- *   - ns3::RandomDirection2dMobilityModel: a 2d random direction mobility
- *     model where the bounds of the mobility are are a rectangle.
- *
- *   - ns3::WaypointMobilityModel: A model which determines paths from sets
- *     of ns3::Waypoint objects, similar to using events to update velocity
- *     and direction with a ns3::ConstantVelocityMobilityModel. This model
- *     is slightly faster for this task and uses less memory.
- *
  */
--- a/src/mobility/position-allocator.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/position-allocator.h	Mon Aug 02 13:00:17 2010 +0400
@@ -27,8 +27,8 @@
 namespace ns3 {
 
 /**
- * \brief allocate a set of positions. The allocation strategy is implemented
- *        in subclasses.
+ * \ingroup mobility
+ * \brief Allocate a set of positions. The allocation strategy is implemented in subclasses.
  *
  * This is a pure abstract base class.
  */
@@ -39,7 +39,7 @@
   PositionAllocator ();
   virtual ~PositionAllocator ();
   /**
-   * \returns the next chosen position.
+   * \return the next chosen position.
    *
    * This method _must_ be implement in subclasses.
    */
@@ -47,6 +47,7 @@
 };
 
 /**
+ * \ingroup mobility
  * \brief Allocate positions from a deterministic list specified by the user.
  *
  * The first call to ListPositionAllocator::GetNext  will return the
@@ -59,8 +60,7 @@
   ListPositionAllocator ();
 
   /**
-   * \param v the position to append at the end of the list of 
-   *        positions to return from GetNext.
+   * \param v the position to append at the end of the list of positions to return from GetNext.
    */
   void Add (Vector v);
   virtual Vector GetNext (void) const;
@@ -70,6 +70,7 @@
 };
 
 /**
+ * \ingroup mobility
  * \brief Allocate positions on a rectangular 2d grid.
  */
 class GridPositionAllocator : public PositionAllocator
@@ -124,27 +125,27 @@
   void SetLayoutType (enum LayoutType layoutType);
 
   /**
-   * \returns the x coordinate of the first allocated position.
+   * \return the x coordinate of the first allocated position.
    */
   double GetMinX (void) const;
   /**
-   * \returns the y coordinate of the first allocated position.
+   * \return the y coordinate of the first allocated position.
    */
   double GetMinY (void) const;
   /**
-   * \returns the x interval between two x-consecutive positions.
+   * \return the x interval between two x-consecutive positions.
    */
   double GetDeltaX (void) const;
   /**
-   * \returns the y interval between two y-consecutive positions.
+   * \return the y interval between two y-consecutive positions.
    */
   double GetDeltaY (void) const;
   /**
-   * \returns the number of positions to allocate on each row or each column.
+   * \return the number of positions to allocate on each row or each column.
    */
   uint32_t GetN (void) const;
   /**
-   * \returns the currently-selected layout type.
+   * \return the currently-selected layout type.
    */
   enum LayoutType GetLayoutType (void) const;
   
@@ -161,8 +162,8 @@
 };
 
 /**
- * \brief allocate random positions within a rectangle
- * according to a pair of random variables.
+ * \infroup mobility
+ * \brief Allocate random positions within a rectangle according to a pair of random variables.
  */
 class RandomRectanglePositionAllocator : public PositionAllocator
 {
@@ -181,8 +182,8 @@
 };
 
 /**
- * \brief allocate random positions within a 3D box
- * according to a set of three random variables.
+ * \ingroup mobility
+ * \brief Allocate random positions within a 3D box according to a set of three random variables.
  */
 class RandomBoxPositionAllocator : public PositionAllocator
 {
@@ -203,9 +204,9 @@
 };
 
 /**
- * \brief allocate random positions within a disc
- * according to a given distribution for the polar coordinates of each
- * node with respect to the provided center of the disc 
+ * \ingroup mobility
+ * \brief Allocate random positions within a disc according to a given distribution for the polar coordinates of each node 
+          with respect to the provided center of the disc 
  */
 class RandomDiscPositionAllocator : public PositionAllocator
 {
@@ -229,6 +230,9 @@
 
 
 /**
+ * \ingroup mobility
+ * \brief Allocate the positions uniformely (with constant density) randomly within a disc.
+ *
  * UniformDiscPositionAllocator allocates the positions randomly within a disc \f$ D \f$ lying on the
  * plane \f$ z=0 \f$ and having center at coordinates \f$ (x,y,0) \f$
  * and radius \f$ \rho \f$. The random positions are chosen such that,
@@ -250,21 +254,17 @@
   virtual ~UniformDiscPositionAllocator ();
 
   /** 
-   * 
-   * @param rho the value of the radius of the disc
+   * \param rho the value of the radius of the disc
    */
   void SetRho (double rho);
 
   /** 
-   * 
-   * 
-   * @param x  the X coordinate of the center of the disc
+   * \param x  the X coordinate of the center of the disc
    */
   void SetX (double x);
 
   /** 
-   * 
-   * @param y   the Y coordinate of the center of the disc 
+   * \param y   the Y coordinate of the center of the disc 
    */
   void SetY (double y);
 
--- a/src/mobility/random-direction-2d-mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/random-direction-2d-mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -32,7 +32,8 @@
 namespace ns3 {
 
 /**
- * \brief a RandomDirection mobility model
+ * \ingroup mobility
+ * \brief Random direction mobility model.
  *
  * The movement of objects is based on random directions: each object
  * pauses for a specific delay, chooses a random direction and speed and 
--- a/src/mobility/random-walk-2d-mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/random-walk-2d-mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -32,7 +32,8 @@
 
 
 /**
- * \brief a 2D random walk position model
+ * \ingroup mobility
+ * \brief 2D random walk mobility model.
  *
  * Each instance moves with a speed and direction choosen at random
  * with the user-provided random variables until
--- a/src/mobility/random-waypoint-mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/random-waypoint-mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -29,7 +29,8 @@
 namespace ns3 {
 
 /**
- * \brief a random waypoint mobility model
+ * \ingroup mobility
+ * \brief Random waypoint mobility model.
  *
  * Each object chooses a random destination "waypoint", a random speed,
  * and a random pause time: it then pauses for the specified pause time,
--- a/src/mobility/rectangle.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/rectangle.h	Mon Aug 02 13:00:17 2010 +0400
@@ -27,6 +27,7 @@
 namespace ns3 {
 
 /**
+ * \ingroup mobility
  * \brief a 2d rectangle
  */
 class Rectangle
@@ -54,8 +55,7 @@
   Rectangle ();
   /**
    * \param position the position to test.
-   * \returns true if the input position is located within the rectangle, 
-   *          false otherwise.
+   * \return true if the input position is located within the rectangle, false otherwise.
    *
    * This method compares only the x and y coordinates of the input position.
    * It ignores the z coordinate.
@@ -63,7 +63,7 @@
   bool IsInside (const Vector &position) const;
   /**
    * \param position the position to test.
-   * \returns the side of the rectangle the input position is closest to.
+   * \return the side of the rectangle the input position is closest to.
    *
    * This method compares only the x and y coordinates of the input position.
    * It ignores the z coordinate.
@@ -72,7 +72,7 @@
   /**
    * \param current the current position
    * \param speed the current speed
-   * \returns the intersection point between the rectangle and the current+speed vector.
+   * \return the intersection point between the rectangle and the current+speed vector.
    *
    * This method assumes that the current position is located _inside_
    * the rectangle and checks for this with an assert.
@@ -95,6 +95,7 @@
 std::istream &operator >> (std::istream &is, Rectangle &rectangle);
 
 /**
+ * \ingroup mobility
  * \class ns3::RectangleValue
  * \brief hold objects of type ns3::Rectangle
  */
--- a/src/mobility/steady-state-random-waypoint-mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/steady-state-random-waypoint-mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -29,7 +29,8 @@
 namespace ns3 {
 
 /**
- * \brief a steady-state random waypoint mobility model
+ * \ingroup mobility
+ * \brief Steady-state random waypoint mobility model.
  *
  * This model based on random waypoint mobility (RWM) model for case when 
  * speed, pause and position are uniformly distributed random variables. 
--- a/src/mobility/waypoint-mobility-model.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/waypoint-mobility-model.h	Mon Aug 02 13:00:17 2010 +0400
@@ -29,7 +29,8 @@
 namespace ns3 {
 
 /**
- * \brief a waypoint-based mobility model
+ * \ingroup mobility
+ * \brief Waypoint-based mobility model.
  *
  * Each object determines its velocity and position at a given time
  * from a set of ns3::Waypoint objects. The position of each object
--- a/src/mobility/waypoint.h	Tue Jul 27 14:34:47 2010 -0400
+++ b/src/mobility/waypoint.h	Mon Aug 02 13:00:17 2010 +0400
@@ -28,8 +28,8 @@
 namespace ns3 {
 
 /**
+ * \ingroup mobility
  * \brief a (time, location) pair.
- *
  */
 class Waypoint
 {
@@ -53,6 +53,7 @@
 };
 
 /**
+ * \ingroup mobility
  * \class ns3::WaypointValue
  * \brief hold objects of type ns3::Waypoint
  */