From cedd6d624b8404b69d41a7f799e7a459f220ca6e Mon Sep 17 00:00:00 2001 From: Tiago Cerqueira Date: Mon, 6 Oct 2014 16:00:06 -0700 Subject: [PATCH] Doxygen for mobility module --- src/mobility/model/box.h | 12 +++---- .../model/random-walk-2d-mobility-model.h | 6 +++- src/mobility/model/waypoint-mobility-model.h | 32 +++++++++++++++++++ src/mobility/model/waypoint.h | 8 +++-- 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/src/mobility/model/box.h b/src/mobility/model/box.h index e19082ab7..dc9c1c682 100644 --- a/src/mobility/model/box.h +++ b/src/mobility/model/box.h @@ -85,17 +85,17 @@ public: */ Vector CalculateIntersection (const Vector ¤t, const Vector &speed) const; - /* The x coordinate of the left bound of the box */ + /** The x coordinate of the left bound of the box */ double xMin; - /* The x coordinate of the right bound of the box */ + /** The x coordinate of the right bound of the box */ double xMax; - /* The y coordinate of the bottom bound of the box */ + /** The y coordinate of the bottom bound of the box */ double yMin; - /* The y coordinate of the top bound of the box */ + /** The y coordinate of the top bound of the box */ double yMax; - /* The z coordinate of the down bound of the box */ + /** The z coordinate of the down bound of the box */ double zMin; - /* The z coordinate of the up bound of the box */ + /** The z coordinate of the up bound of the box */ double zMax; }; diff --git a/src/mobility/model/random-walk-2d-mobility-model.h b/src/mobility/model/random-walk-2d-mobility-model.h index e15da1102..52626468e 100644 --- a/src/mobility/model/random-walk-2d-mobility-model.h +++ b/src/mobility/model/random-walk-2d-mobility-model.h @@ -47,13 +47,17 @@ class RandomWalk2dMobilityModel : public MobilityModel { public: static TypeId GetTypeId (void); - + /** An enum representing the different working modes of this module. */ enum Mode { MODE_DISTANCE, MODE_TIME }; private: + /** + * \brief Performs the rebound of the node if it reaches a boundary + * \param timeLeft The remaining time of the walk + */ void Rebound (Time timeLeft); void DoWalk (Time timeLeft); void DoInitializePrivate (void); diff --git a/src/mobility/model/waypoint-mobility-model.h b/src/mobility/model/waypoint-mobility-model.h index 4788b9b36..dcc77cab1 100644 --- a/src/mobility/model/waypoint-mobility-model.h +++ b/src/mobility/model/waypoint-mobility-model.h @@ -128,17 +128,49 @@ private: friend class ::WaypointMobilityModelNotifyTest; // To allow Update() calls and access to m_current void Update (void) const; + /** + * \brief The dispose method. + * + * Subclasses must override this method. + */ virtual void DoDispose (void); + /** + * \brief Get current position. + * \return A vector with the current position of the node. + */ virtual Vector DoGetPosition (void) const; + /** + * \brief Sets a new position for the node + * \param position A vector to be added as the new position + */ virtual void DoSetPosition (const Vector &position); + /** + * \brief Returns the current velocity of a node + * \return The velocity vector of a node. + */ virtual Vector DoGetVelocity (void) const; + /** + * \brief This variable is set to true if there are no waypoints in the std::deque + */ bool m_first; bool m_lazyNotify; bool m_initialPositionIsWaypoint; + /** + * \brief The double ended queue containing the ns3::Waypoint objects + */ mutable std::deque m_waypoints; + /** + * \brief The ns3::Waypoint currently being used + */ mutable Waypoint m_current; + /** + * \brief The next ns3::Waypoint in the deque + */ mutable Waypoint m_next; + /** + * \brief The current velocity vector + */ mutable Vector m_velocity; }; diff --git a/src/mobility/model/waypoint.h b/src/mobility/model/waypoint.h index b962d7e28..96d7d4fef 100644 --- a/src/mobility/model/waypoint.h +++ b/src/mobility/model/waypoint.h @@ -46,9 +46,13 @@ public: * Create a waypoint at time 0 and position (0,0,0). */ Waypoint (); - /* The waypoint time */ + /** + * \brief The waypoint time + */ Time time; - /* The position of the waypoint */ + /** + * \brief The position of the waypoint + */ Vector position; };