utils/mobility-visualizer-model.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri, 21 Mar 2008 13:41:16 -0700
changeset 2693 56e28e34e109
parent 2503 e667dc0f350e
permissions -rw-r--r--
TypeId::GetAttributeListN -> TypeId::GetAttributeN
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     2
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     3
#include <vector>
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     4
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     5
#include "ns3/ptr.h"
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     6
#include "ns3/mobility-model.h"
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     7
#include "ns3/mobility-model-notifier.h"
2399
fd9d94d518d2 convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2256
diff changeset
     8
#include "ns3/position-allocator.h"
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
     9
#include "ns3/default-value.h"
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    10
#include "ns3/command-line.h"
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    11
#include "ns3/command-line.h"
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    12
#include "ns3/simulator.h"
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    13
#include "ns3/nstime.h"
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    14
#include "ns3/node.h"
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    15
#include "ns3/node-list.h"
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    16
#include "ns3/rectangle-default-value.h"
2256
50be2c20cd94 merge with HEAD again
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2231
diff changeset
    17
#include "ns3/type-id-default-value.h"
2399
fd9d94d518d2 convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2256
diff changeset
    18
#include "ns3/mobility-helper.h"
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    19
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    20
#include "mobility-visualizer.h"
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    21
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    22
using namespace ns3;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    23
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    24
static Time g_sampleInterval = Seconds (SAMPLE_INTERVAL);
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    25
static uint32_t g_numNodes = 10;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    26
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    27
template <typename T>
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    28
static const T* DefaultValueListGet (const std::string &name)
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    29
{
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    30
  for (DefaultValueList::Iterator iter = DefaultValueList::Begin ();
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    31
       iter != DefaultValueList::End (); iter++)
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    32
    {
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    33
      const DefaultValueBase *value = *iter;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    34
      if (value->GetName () == name)
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    35
        {
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    36
          return dynamic_cast<const T*> (value);
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    37
        }
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    38
    }
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    39
  return NULL;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    40
}
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    41
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    42
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    43
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    44
static void 
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    45
Sample ()
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    46
{
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    47
  
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    48
  ViewUpdateData *data = new ViewUpdateData;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    49
  for (NodeList::Iterator nodeIter = NodeList::Begin (); nodeIter != NodeList::End (); nodeIter++)
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    50
    {
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    51
      Ptr<Node> node = *nodeIter;
2257
71a58e70c671 QueryInterface -> GetObject
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2256
diff changeset
    52
      Ptr<MobilityModel> mobility = node->GetObject<MobilityModel> ();
1817
8b0520433350 replace Position and Speed by Vector
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1816
diff changeset
    53
      Vector pos = mobility->GetPosition ();
1818
fbdc8361dc77 GetSpeed -> GetVelocity
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1817
diff changeset
    54
      Vector vel = mobility->GetVelocity ();
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    55
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    56
      NodeUpdate update;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    57
      update.node = PeekPointer<Node> (node);
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    58
      update.x = pos.x;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    59
      update.y = pos.y;
1817
8b0520433350 replace Position and Speed by Vector
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1816
diff changeset
    60
      update.vx = vel.x;
8b0520433350 replace Position and Speed by Vector
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1816
diff changeset
    61
      update.vy = vel.y;
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    62
      data->updateList.push_back (update);
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    63
    }
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    64
  data->time = Simulator::Now ().GetSeconds ();
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    65
  view_update (data);
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    66
  Simulator::Schedule (g_sampleInterval, Sample);
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    67
}
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    68
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    69
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    70
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    71
int model_init (int argc, char *argv[], double *x1, double *y1, double *x2, double *y2)
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    72
{
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    73
  DefaultValue::Bind ("RandomWalk2dMode", "Time");
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    74
  DefaultValue::Bind ("RandomWalk2dTime", "5s");
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    75
  DefaultValue::Bind ("RandomWalk2dSpeed", "Constant:20.0");
1665
73844d079af9 Draw the velocity vector
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 1664
diff changeset
    76
  DefaultValue::Bind ("RandomDirection2dSpeed", "Uniform:10.0:20.0");
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    77
  DefaultValue::Bind ("RandomWalk2dBounds", "0:400:0:300");
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    78
  DefaultValue::Bind ("RandomDirection2dArea", "0:400:0:300");
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    79
  DefaultValue::Bind ("RandomWaypointSpeed", "Uniform:10:30");
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    80
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    81
//   DefaultValue::Bind ("RandomDiscPositionX", "100");
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    82
//   DefaultValue::Bind ("RandomDiscPositionY", "50");
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    83
//   DefaultValue::Bind ("RandomDiscPositionRho", "Uniform:0:30");
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    84
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    85
  DefaultValue::Bind ("RandomTopologyPositionType", "RandomRectanglePosition");
2322
4b8bc80d1034 RandomWalk2dMobilityModel changed name to RandomWalkMobilityModel (typo or intentional?)
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 2258
diff changeset
    86
  DefaultValue::Bind ("RandomTopologyMobilityType", "RandomWalkMobilityModel");
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    87
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    88
//   CommandLine::AddArgValue ("sample-interval","sample interval", g_sampleInterval);
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    89
//   CommandLine::AddArgValue ("num-nodes","number of nodes", g_numNodes);
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    90
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    91
  CommandLine::Parse (argc, argv);
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    92
2399
fd9d94d518d2 convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2256
diff changeset
    93
  MobilityHelper mobility;
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    94
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    95
  for (uint32_t i = 0; i < g_numNodes; i++)
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    96
    {
2230
9f13ac3291e0 add CreateObject<> to instanciate subclasses of the Object base class. Replaces Create<>.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1818
diff changeset
    97
      Ptr<Node> node = CreateObject<Node> ();
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    98
    }
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
    99
2399
fd9d94d518d2 convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2256
diff changeset
   100
  mobility.EnableNotifier ();
fd9d94d518d2 convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2256
diff changeset
   101
  mobility.Layout (NodeList::Begin (), NodeList::End ());
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   102
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   103
  Simulator::Schedule (g_sampleInterval, Sample);
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   104
2402
0950067d70a2 merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2399 2258
diff changeset
   105
  // XXX: The following is not really going to work with the params.
0950067d70a2 merge with HEAD
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2399 2258
diff changeset
   106
2399
fd9d94d518d2 convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2256
diff changeset
   107
  if (mobility.GetMobilityModelType () == "RandomWalk2dMobilityModel")
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   108
    {
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   109
      Rectangle bounds = DefaultValueListGet<RectangleDefaultValue> ("RandomWalk2dBounds")->GetValue ();
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   110
      *x1 = bounds.xMin;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   111
      *y1 = bounds.yMin;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   112
      *x2 = bounds.xMax;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   113
      *y2 = bounds.yMax;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   114
      std::cout << "RECT " << bounds.xMin << " " << bounds.xMax << " "
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   115
                << bounds.yMin << " " << bounds.yMax << std::endl;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   116
    }
2399
fd9d94d518d2 convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2256
diff changeset
   117
  else if (mobility.GetMobilityModelType () == "RandomDirection2dMobilityModel")
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   118
    {
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   119
      Rectangle bounds = DefaultValueListGet<RectangleDefaultValue> ("RandomDirection2dArea")->GetValue ();
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   120
      *x1 = bounds.xMin;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   121
      *y1 = bounds.yMin;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   122
      *x2 = bounds.xMax;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   123
      *y2 = bounds.yMax;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   124
      std::cout << "RECT " << bounds.xMin << " " << bounds.xMax << " "
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   125
                << bounds.yMin << " " << bounds.yMax << std::endl;      
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   126
    }
2399
fd9d94d518d2 convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2256
diff changeset
   127
  else if (mobility.GetMobilityModelType () == "RandomWaypointMobilityModel")
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   128
    {
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   129
      std::cerr << "bounds for RandomWaypointMobilityModel not implemented" << std::endl;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   130
      //ClassId posType = DefaultValueList::Get<ClassIdDefaultValue> ("RandomWaypointPosition")->GetValue ();
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   131
      std::cout << "?" << std::endl; // too hard to represent an abstract/probabilistic model graphically
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   132
    }
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   133
  else
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   134
    {
2399
fd9d94d518d2 convert Mobility subsystem to Value framework
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2256
diff changeset
   135
      NS_FATAL_ERROR ("mobility type " << mobility.GetMobilityModelType () << " not supported");
1664
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   136
    }
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   137
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   138
  std::cerr << g_sampleInterval << std::endl;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   139
  return 0;
306c81333d64 Add a small mobility model visualization tool
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
diff changeset
   140
}