diff --git a/src/node/random-rectangle-topology.cc b/src/node/random-rectangle-topology.cc index b35122b1f..ef6034320 100644 --- a/src/node/random-rectangle-topology.cc +++ b/src/node/random-rectangle-topology.cc @@ -20,9 +20,25 @@ */ #include "random-rectangle-topology.h" #include "static-position.h" +#include "ns3/random-variable-default-value.h" namespace ns3 { +static RandomVariableDefaultValue +g_xVariable ("RandomRectangleTopologyX", + "Random variable to choose the x coordinate of the elements of a RandomRectangleTopology.", + "Uniform:-100:100"); +static RandomVariableDefaultValue +g_yVariable ("RandomRectangleTopologyY", + "Random variable to choose the y coordinate of the elements of a RandomRectangleTopology.", + "Uniform:-100:100"); + +RandomRectangleTopology::RandomRectangleTopology () + : m_xVariable (g_xVariable.GetCopy ()), + m_yVariable (g_yVariable.GetCopy ()), + m_positionModel (StaticPosition::cid) +{} + RandomRectangleTopology::RandomRectangleTopology (double xMin, double xMax, double yMin, double yMax) : m_xVariable (new UniformVariable (xMin, xMax)), m_yVariable (new UniformVariable (yMin, yMax)),