# HG changeset patch # User Tiago Cerqueira <1090678@isep.ipp.pt> # Date 1412366581 25200 # Node ID d05f1778b5a8e45c0dc9b8131cf688809fcf402b # Parent 754c8256c35c98bcbf54ab0da80d4632281f4e8d additional mobility documentation diff -r 754c8256c35c -r d05f1778b5a8 src/mobility/model/box.h --- a/src/mobility/model/box.h Thu Oct 02 21:17:48 2014 -0700 +++ b/src/mobility/model/box.h Fri Oct 03 13:03:01 2014 -0700 @@ -85,17 +85,17 @@ */ 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 -r 754c8256c35c -r d05f1778b5a8 src/mobility/model/random-walk-2d-mobility-model.h --- a/src/mobility/model/random-walk-2d-mobility-model.h Thu Oct 02 21:17:48 2014 -0700 +++ b/src/mobility/model/random-walk-2d-mobility-model.h Fri Oct 03 13:03:01 2014 -0700 @@ -47,13 +47,17 @@ { 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 -r 754c8256c35c -r d05f1778b5a8 src/mobility/model/waypoint-mobility-model.h --- a/src/mobility/model/waypoint-mobility-model.h Thu Oct 02 21:17:48 2014 -0700 +++ b/src/mobility/model/waypoint-mobility-model.h Fri Oct 03 13:03:01 2014 -0700 @@ -128,17 +128,49 @@ 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 -r 754c8256c35c -r d05f1778b5a8 src/mobility/model/waypoint.h --- a/src/mobility/model/waypoint.h Thu Oct 02 21:17:48 2014 -0700 +++ b/src/mobility/model/waypoint.h Fri Oct 03 13:03:01 2014 -0700 @@ -46,9 +46,13 @@ * 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; };