INET Framework for OMNeT++/OMNEST
inet::TurtleMobility Class Reference

LOGO-style movement model, with the script coming from XML. More...

#include <TurtleMobility.h>

Inheritance diagram for inet::TurtleMobility:
inet::LineSegmentsMobilityBase inet::MovingMobilityBase inet::MobilityBase inet::IMobility

Public Member Functions

 TurtleMobility ()
 
virtual double getMaxSpeed () const override
 Returns the maximum possible speed at any future time. More...
 
- Public Member Functions inherited from inet::LineSegmentsMobilityBase
 LineSegmentsMobilityBase ()
 
- Public Member Functions inherited from inet::MovingMobilityBase
virtual const CoordgetCurrentPosition () override
 Returns the position at the current simulation time. More...
 
virtual const CoordgetCurrentVelocity () override
 Returns the velocity at the current simulation time. More...
 
virtual const CoordgetCurrentAcceleration () override
 Returns the acceleration at the current simulation time. More...
 
virtual const QuaterniongetCurrentAngularPosition () override
 Returns the angular position at the current simulation time. More...
 
virtual const QuaterniongetCurrentAngularVelocity () override
 Returns the angular velocity at the current simulation time. More...
 
virtual const QuaterniongetCurrentAngularAcceleration () override
 Returns the angular acceleration at the current simulation time. More...
 
- Public Member Functions inherited from inet::MobilityBase
virtual const CoordgetConstraintAreaMax () const override
 Returns the maximum position along each axes for. More...
 
virtual const CoordgetConstraintAreaMin () const override
 Returns the minimum position along each axes for. More...
 
- Public Member Functions inherited from inet::IMobility
virtual ~IMobility ()
 

Protected Member Functions

virtual int numInitStages () const override
 Returns the required number of initialize stages. More...
 
virtual void initialize (int stage) override
 Initializes mobility model parameters. More...
 
virtual void setInitialPosition () override
 Initializes the position according to the mobility model. More...
 
virtual void setTargetPosition () override
 Overridden from LineSegmentsMobilityBase. More...
 
virtual void move () override
 Overridden from LineSegmentsMobilityBase. More...
 
virtual void resumeScript ()
 Process next statements from script. More...
 
virtual void executeStatement (cXMLElement *nextStatement)
 Execute the given statement. More...
 
virtual double getValue (const char *s)
 Parse attrs in the script – accepts things like "uniform(10,50) as well. More...
 
virtual void gotoNextStatement ()
 Advance nextStatement pointer. More...
 
virtual void computeMaxSpeed (cXMLElement *nodes)
 
- Protected Member Functions inherited from inet::LineSegmentsMobilityBase
virtual void initializePosition () override
 Initializes mobility position. More...
 
- Protected Member Functions inherited from inet::MovingMobilityBase
 MovingMobilityBase ()
 
virtual ~MovingMobilityBase ()
 
virtual void handleSelfMessage (cMessage *message) override
 Called upon arrival of a self messages, subclasses must override. More...
 
void scheduleUpdate ()
 Schedules the move timer that will update the mobility state. More...
 
void moveAndUpdate ()
 Moves and notifies listeners. More...
 
virtual void orient ()
 
- Protected Member Functions inherited from inet::MobilityBase
 MobilityBase ()
 
virtual int getId () const override
 
virtual void checkPosition ()
 Checks whether the position is valid or not. More...
 
virtual void initializeOrientation ()
 Initializes the orientation from module parameters. More...
 
virtual void refreshDisplay () const override
 Moves the visual representation module's icon to the new position on the screen. More...
 
virtual void updateDisplayStringFromMobilityState () const
 
virtual void handleParameterChange (const char *name) override
 Allows changing parameters from the GUI. More...
 
virtual void handleMessage (cMessage *msg) override
 This modules should only receive self-messages. More...
 
virtual void emitMobilityStateChangedSignal ()
 Emits a signal with the updated mobility state. More...
 
virtual Coord getRandomPosition ()
 Returns a new random position satisfying the constraint area. More...
 
virtual cModule * findSubjectModule ()
 Returns the module that represents the object moved by this mobility module. More...
 
virtual bool isOutside ()
 Returns true if the mobility is outside of the constraint area. More...
 
virtual void reflectIfOutside (Coord &targetPosition, Coord &velocity, rad &angle, rad &elevation, Quaternion &quaternion)
 Utility function to reflect the node if it goes outside the constraint area. More...
 
virtual void wrapIfOutside (Coord &targetPosition)
 Utility function to wrap the node to the opposite edge (torus) if it goes outside the constraint area. More...
 
virtual void placeRandomlyIfOutside (Coord &targetPosition)
 Utility function to place the node randomly if it goes outside the constraint area. More...
 
virtual void raiseErrorIfOutside ()
 Utility function to raise an error if the node gets outside the constraint area. More...
 
virtual void handleIfOutside (BorderPolicy policy, Coord &targetPosition, Coord &velocity)
 Invokes one of reflectIfOutside(), wrapIfOutside() and placeRandomlyIfOutside(), depending on the given border policy. More...
 
virtual void handleIfOutside (BorderPolicy policy, Coord &targetPosition, Coord &velocity, rad &heading)
 
virtual void handleIfOutside (BorderPolicy policy, Coord &targetPosition, Coord &velocity, rad &heading, rad &elevation)
 
virtual void handleIfOutside (BorderPolicy policy, Coord &targetPosition, Coord &velocity, rad &heading, rad &elevation, Quaternion &quaternion)
 

Protected Attributes

cXMLElement * turtleScript
 
cXMLElement * nextStatement
 
double speed
 
rad heading
 
rad elevation
 
BorderPolicy borderPolicy
 
std::stack< long > loopVars
 
double maxSpeed
 
- Protected Attributes inherited from inet::LineSegmentsMobilityBase
Coord targetPosition
 End position of current linear movement. More...
 
- Protected Attributes inherited from inet::MovingMobilityBase
cMessage * moveTimer
 The message used for mobility state changes. More...
 
simtime_t updateInterval
 The simulation time interval used to regularly signal mobility state changes. More...
 
bool stationary
 A mobility model may decide to become stationary at any time. More...
 
Coord lastVelocity
 The last velocity that was reported at lastUpdate. More...
 
Quaternion lastAngularVelocity
 The last angular velocity that was reported at lastUpdate. More...
 
simtime_t lastUpdate
 The simulation time when the mobility state was last updated. More...
 
simtime_t nextChange
 The next simulation time when the mobility module needs to update its internal state. More...
 
bool faceForward
 
- Protected Attributes inherited from inet::MobilityBase
cModule * subjectModule
 Pointer to visual representation module, to speed up repeated access. More...
 
const CanvasProjectioncanvasProjection
 The 2D projection used on the canvas. More...
 
Coord constraintAreaMin
 3 dimensional position and size of the constraint area (in meters). More...
 
Coord constraintAreaMax
 
Coord lastPosition
 The last position that was reported. More...
 
Quaternion lastOrientation
 The last orientation that was reported. More...
 
StringFormat format
 

Additional Inherited Members

- Public Types inherited from inet::MobilityBase
enum  BorderPolicy { REFLECT, WRAP, PLACERANDOMLY, RAISEERROR }
 Selects how a mobility module should behave if it reaches the edge of the constraint area. More...
 
- Static Public Attributes inherited from inet::IMobility
static simsignal_t mobilityStateChangedSignal = cComponent::registerSignal("mobilityStateChanged")
 A signal used to publish mobility state changes. More...
 

Detailed Description

LOGO-style movement model, with the script coming from XML.

See NED file for more info.

Constructor & Destructor Documentation

◆ TurtleMobility()

inet::TurtleMobility::TurtleMobility ( )
16  :
17  turtleScript(nullptr),
18  nextStatement(nullptr),
19  speed(0),
20  heading(deg(0)),
21  elevation(deg(0)),
23  maxSpeed(0)
24 {
25 }

Member Function Documentation

◆ computeMaxSpeed()

void inet::TurtleMobility::computeMaxSpeed ( cXMLElement *  nodes)
protectedvirtual
365 {
366  // Recursively traverse the whole config file, looking for
367  // speed attributes
368  cXMLElementList childs = nodes->getChildren();
369  for (auto& child : childs) {
370  const char *speedAttr = child->getAttribute("speed");
371  if (speedAttr) {
372  double speed = atof(speedAttr);
373  if (speed > maxSpeed)
374  maxSpeed = speed;
375  }
376  computeMaxSpeed(child);
377  }
378 }

Referenced by initialize().

◆ executeStatement()

void inet::TurtleMobility::executeStatement ( cXMLElement *  nextStatement)
protectedvirtual

Execute the given statement.

98 {
99  ASSERT(nextChange != -1);
100  const char *tag = stmt->getTagName();
101 
102  EV_DEBUG << "doing <" << tag << ">\n";
103 
104  if (!strcmp(tag, "repeat")) {
105  const char *nAttr = stmt->getAttribute("n");
106  long n = -1; // infinity -- that's the default
107 
108  if (nAttr) {
109  n = (long)getValue(nAttr);
110 
111  if (n < 0)
112  throw cRuntimeError("<repeat>: negative repeat count at %s", stmt->getSourceLocation());
113  }
114 
115  loopVars.push(n);
116  }
117  else if (!strcmp(tag, "set")) {
118  const char *speedAttr = stmt->getAttribute("speed");
119  const char *headingAttr = stmt->getAttribute("heading");
120  if (headingAttr == nullptr)
121  headingAttr = stmt->getAttribute("angle"); // for backward compatibility
122  const char *elevationAttr = stmt->getAttribute("elevation");
123  const char *xAttr = stmt->getAttribute("x");
124  const char *yAttr = stmt->getAttribute("y");
125  const char *zAttr = stmt->getAttribute("z");
126  const char *bpAttr = stmt->getAttribute("borderPolicy");
127 
128  if (speedAttr)
129  speed = getValue(speedAttr);
130 
131  if (headingAttr)
132  heading = deg(getValue(headingAttr));
133 
134  if (elevationAttr)
135  elevation = deg(getValue(elevationAttr));
136 
137  if (xAttr)
139 
140  if (yAttr)
142 
143  if (zAttr)
145 
146  if (speed <= 0)
147  throw cRuntimeError("<set>: speed is negative or zero at %s", stmt->getSourceLocation());
148 
149  if (bpAttr) {
150  if (!strcmp(bpAttr, "reflect"))
152  else if (!strcmp(bpAttr, "wrap"))
153  borderPolicy = WRAP;
154  else if (!strcmp(bpAttr, "placerandomly"))
156  else if (!strcmp(bpAttr, "error"))
158  else
159  throw cRuntimeError("<set>: value for attribute borderPolicy is invalid, should be "
160  "'reflect', 'wrap', 'placerandomly' or 'error' at %s",
161  stmt->getSourceLocation());
162  }
163  }
164  else if (!strcmp(tag, "forward")) {
165  const char *dAttr = stmt->getAttribute("d");
166  const char *tAttr = stmt->getAttribute("t");
167 
168  if (!dAttr && !tAttr)
169  throw cRuntimeError("<forward>: must have at least attribute 't' or 'd' (or both) at %s", stmt->getSourceLocation());
170 
171  double d, t;
172 
173  if (tAttr && dAttr) {
174  // cover distance d in time t (current speed is ignored)
175  d = getValue(dAttr);
176  t = getValue(tAttr);
177  }
178  else if (dAttr) {
179  // travel distance d at current speed
180  d = getValue(dAttr);
181  t = d / speed;
182  }
183  else {
184  // tAttr only: travel for time t at current speed
185  t = getValue(tAttr);
186  d = speed * t;
187  }
188 
189  if (t < 0)
190  throw cRuntimeError("<forward>: time (attribute t) is negative at %s", stmt->getSourceLocation());
191 
192  if (d < 0)
193  throw cRuntimeError("<forward>: distance (attribute d) is negative at %s", stmt->getSourceLocation());
194 
195  Coord direction = Quaternion(EulerAngles(heading, -elevation, rad(0))).rotate(Coord::X_AXIS);
196 
197  targetPosition += direction * d;
198  nextChange += t;
199  }
200  else if (!strcmp(tag, "turn")) {
201  const char *headingAttr = stmt->getAttribute("heading");
202  if (headingAttr == nullptr)
203  headingAttr = stmt->getAttribute("angle"); // for backward compatibility
204  const char *elevationAttr = stmt->getAttribute("elevation");
205 
206  if (headingAttr)
207  heading += deg(getValue(headingAttr));
208 
209  if (elevationAttr)
210  elevation += deg(getValue(elevationAttr));
211  }
212  else if (!strcmp(tag, "wait")) {
213  const char *tAttr = stmt->getAttribute("t");
214 
215  if (!tAttr)
216  throw cRuntimeError("<wait>: required attribute 't' missing at %s", stmt->getSourceLocation());
217 
218  double t = getValue(tAttr);
219 
220  if (t < 0)
221  throw cRuntimeError("<wait>: time (attribute t) is negative (%g) at %s", t, stmt->getSourceLocation());
222 
223  nextChange += t; // targetPosition is unchanged
224  }
225  else if (!strcmp(tag, "moveto")) {
226  const char *xAttr = stmt->getAttribute("x");
227  const char *yAttr = stmt->getAttribute("y");
228  const char *zAttr = stmt->getAttribute("z");
229  const char *tAttr = stmt->getAttribute("t");
230 
231  if (xAttr)
232  targetPosition.x = getValue(xAttr);
233 
234  if (yAttr)
235  targetPosition.y = getValue(yAttr);
236 
237  if (zAttr)
238  targetPosition.z = getValue(zAttr);
239 
240  // travel to targetPosition at current speed, or get there in time t (ignoring current speed then)
241  double t = tAttr ? getValue(tAttr) : lastPosition.distance(targetPosition) / speed;
242 
243  if (t < 0)
244  throw cRuntimeError("<wait>: time (attribute t) is negative at %s", stmt->getSourceLocation());
245 
246  nextChange += t;
247  }
248  else if (!strcmp(tag, "moveby")) {
249  const char *xAttr = stmt->getAttribute("x");
250  const char *yAttr = stmt->getAttribute("y");
251  const char *zAttr = stmt->getAttribute("z");
252  const char *tAttr = stmt->getAttribute("t");
253 
254  if (xAttr)
255  targetPosition.x += getValue(xAttr);
256 
257  if (yAttr)
258  targetPosition.y += getValue(yAttr);
259 
260  if (zAttr)
261  targetPosition.z += getValue(zAttr);
262 
263  // travel to targetPosition at current speed, or get there in time t (ignoring current speed then)
264  double t = tAttr ? getValue(tAttr) : lastPosition.distance(targetPosition) / speed;
265 
266  if (t < 0)
267  throw cRuntimeError("<wait>: time (attribute t) is negative at %s", stmt->getSourceLocation());
268 
269  nextChange += t;
270  }
271 }

Referenced by resumeScript().

◆ getMaxSpeed()

virtual double inet::TurtleMobility::getMaxSpeed ( ) const
inlineoverridevirtual

Returns the maximum possible speed at any future time.

Reimplemented from inet::MobilityBase.

71 { return maxSpeed; }

◆ getValue()

double inet::TurtleMobility::getValue ( const char *  s)
protectedvirtual

Parse attrs in the script – accepts things like "uniform(10,50) as well.

274 {
275  // first, textually replace $MAXX and $MAXY with their actual values
276  std::string str;
277  if (strchr(s, '$')) {
278  char strMinX[32], strMinY[32], strMinZ[32];
279  char strMaxX[32], strMaxY[32], strMaxZ[32];
280  sprintf(strMinX, "%g", constraintAreaMin.x);
281  sprintf(strMinY, "%g", constraintAreaMin.y);
282  sprintf(strMinZ, "%g", constraintAreaMin.z);
283  sprintf(strMaxX, "%g", constraintAreaMax.x);
284  sprintf(strMaxY, "%g", constraintAreaMax.y);
285  sprintf(strMaxZ, "%g", constraintAreaMax.z);
286 
287  str = s;
288  std::string::size_type pos;
289 
290  while ((pos = str.find("$MINX")) != std::string::npos)
291  str.replace(pos, sizeof("$MINX") - 1, strMinX);
292 
293  while ((pos = str.find("$MINY")) != std::string::npos)
294  str.replace(pos, sizeof("$MINY") - 1, strMinY);
295 
296  while ((pos = str.find("$MINZ")) != std::string::npos)
297  str.replace(pos, sizeof("$MINZ") - 1, strMinZ);
298 
299  while ((pos = str.find("$MAXX")) != std::string::npos)
300  str.replace(pos, sizeof("$MAXX") - 1, strMaxX);
301 
302  while ((pos = str.find("$MAXY")) != std::string::npos)
303  str.replace(pos, sizeof("$MAXY") - 1, strMaxY);
304 
305  while ((pos = str.find("$MAXZ")) != std::string::npos)
306  str.replace(pos, sizeof("$MAXZ") - 1, strMaxZ);
307 
308  s = str.c_str();
309  }
310 
311  // then use cDynamicExpression to evaluate the string
312  try {
313  cDynamicExpression expr;
314  expr.parse(s);
315  return expr.doubleValue(this);
316  }
317  catch (std::exception& e) {
318  throw cRuntimeError("Wrong value '%s' around %s: %s", s,
319  nextStatement->getSourceLocation(), e.what());
320  }
321 }

Referenced by executeStatement().

◆ gotoNextStatement()

void inet::TurtleMobility::gotoNextStatement ( )
protectedvirtual

Advance nextStatement pointer.

324 {
325  // "statement either doesn't have a child, or it's a <repeat> and loop count is already pushed on the stack"
326  ASSERT(!nextStatement->getFirstChild() || (!strcmp(nextStatement->getTagName(), "repeat")
327  && !loopVars.empty()));
328 
329  if (nextStatement->getFirstChild() && (loopVars.top() != 0 || (loopVars.pop(), false))) { // !=0: positive or -1
330  // statement must be a <repeat> if it has children; repeat count>0 must be
331  // on the stack; let's start doing the body.
332  nextStatement = nextStatement->getFirstChild();
333  }
334  else if (!nextStatement->getNextSibling()) {
335  // no sibling -- either end of <repeat> body, or end of script
336  ASSERT(nextStatement->getParentNode() == turtleScript ? loopVars.empty() : !loopVars.empty());
337 
338  if (!loopVars.empty()) {
339  // decrement and check loop counter
340  if (loopVars.top() != -1) // -1 means infinity
341  loopVars.top()--;
342 
343  if (loopVars.top() != 0) { // positive or -1
344  // go to beginning of <repeat> block again
345  nextStatement = nextStatement->getParentNode()->getFirstChild();
346  }
347  else {
348  // end of loop -- locate next statement after the <repeat>
349  nextStatement = nextStatement->getParentNode();
351  }
352  }
353  else {
354  // end of script
355  nextStatement = nullptr;
356  }
357  }
358  else {
359  // go to next statement (must exist -- see "if" above)
360  nextStatement = nextStatement->getNextSibling();
361  }
362 }

Referenced by resumeScript().

◆ initialize()

void inet::TurtleMobility::initialize ( int  stage)
overrideprotectedvirtual

Initializes mobility model parameters.

Reimplemented from inet::MovingMobilityBase.

28 {
30 
31  EV_TRACE << "initializing TurtleMobility stage " << stage << endl;
32  if (stage == INITSTAGE_LOCAL) {
33  WATCH(speed);
34  WATCH(heading);
35  WATCH(elevation);
36  WATCH(borderPolicy);
37  computeMaxSpeed(par("turtleScript"));
38  }
39 }

◆ move()

void inet::TurtleMobility::move ( )
overrideprotectedvirtual

Overridden from LineSegmentsMobilityBase.

Reimplemented from inet::LineSegmentsMobilityBase.

71 {
73  Coord dummyCoord;
75 }

◆ numInitStages()

virtual int inet::TurtleMobility::numInitStages ( ) const
inlineoverrideprotectedvirtual

Returns the required number of initialize stages.

Reimplemented from inet::MobilityBase.

39 { return NUM_INIT_STAGES; }

◆ resumeScript()

void inet::TurtleMobility::resumeScript ( )
protectedvirtual

Process next statements from script.

Will set a new nextChange and targetPosition.

81 {
82  simtime_t now = simTime();
83 
84  while (nextChange == now) {
85  if (nextStatement != nullptr) {
88  }
89  else {
90  nextChange = -1;
91  stationary = true;
93  }
94  }
95 }

Referenced by setInitialPosition(), and setTargetPosition().

◆ setInitialPosition()

void inet::TurtleMobility::setInitialPosition ( )
overrideprotectedvirtual

Initializes the position according to the mobility model.

Reimplemented from inet::MobilityBase.

42 {
44 
45  turtleScript = par("turtleScript");
46  nextStatement = turtleScript->getFirstChild();
47 
48  speed = 1;
49  heading = deg(0);
50  elevation = deg(0);
52 
53  // a dirty trick to extract starting position out of the script
54  // (start doing it, but then rewind to the beginning)
55  nextChange = simTime();
56  resumeScript();
58  nextChange = simTime();
59  nextStatement = turtleScript->getFirstChild();
60 
61  while (!loopVars.empty())
62  loopVars.pop();
63 }

◆ setTargetPosition()

void inet::TurtleMobility::setTargetPosition ( )
overrideprotectedvirtual

Overridden from LineSegmentsMobilityBase.

Invokes resumeScript().

Implements inet::LineSegmentsMobilityBase.

66 {
67  resumeScript();
68 }

Member Data Documentation

◆ borderPolicy

BorderPolicy inet::TurtleMobility::borderPolicy
protected

◆ elevation

rad inet::TurtleMobility::elevation
protected

◆ heading

rad inet::TurtleMobility::heading
protected

◆ loopVars

std::stack<long> inet::TurtleMobility::loopVars
protected

◆ maxSpeed

double inet::TurtleMobility::maxSpeed
protected

Referenced by computeMaxSpeed().

◆ nextStatement

cXMLElement* inet::TurtleMobility::nextStatement
protected

◆ speed

double inet::TurtleMobility::speed
protected

◆ turtleScript

cXMLElement* inet::TurtleMobility::turtleScript
protected

The documentation for this class was generated from the following files:
inet::MobilityBase::REFLECT
@ REFLECT
reflect off the wall
Definition: MobilityBase.h:56
inet::MobilityBase::WRAP
@ WRAP
reappear at the opposite edge (torus)
Definition: MobilityBase.h:57
inet::TurtleMobility::turtleScript
cXMLElement * turtleScript
Definition: TurtleMobility.h:27
inet::MobilityBase::lastPosition
Coord lastPosition
The last position that was reported.
Definition: MobilityBase.h:73
inet::units::units::deg
fscale< rad, rad2degScale > deg
Definition: Units.h:1158
inet::MobilityBase::PLACERANDOMLY
@ PLACERANDOMLY
placed at a randomly chosen position within the constraint area
Definition: MobilityBase.h:58
inet::TurtleMobility::heading
rad heading
Definition: TurtleMobility.h:32
inet::LineSegmentsMobilityBase::targetPosition
Coord targetPosition
End position of current linear movement.
Definition: LineSegmentsMobilityBase.h:28
inet::MovingMobilityBase::stationary
bool stationary
A mobility model may decide to become stationary at any time.
Definition: MovingMobilityBase.h:32
inet::units::constants::e
const value< double, units::C > e(1.602176487e-19)
inet::Coord::x
double x
Definition: Coord.h:36
inet::TurtleMobility::computeMaxSpeed
virtual void computeMaxSpeed(cXMLElement *nodes)
Definition: TurtleMobility.cc:364
inet::TurtleMobility::loopVars
std::stack< long > loopVars
Definition: TurtleMobility.h:35
inet::TurtleMobility::getValue
virtual double getValue(const char *s)
Parse attrs in the script – accepts things like "uniform(10,50) as well.
Definition: TurtleMobility.cc:273
inet::TurtleMobility::speed
double speed
Definition: TurtleMobility.h:31
inet::LineSegmentsMobilityBase::move
virtual void move() override
Moves according to the mobility model to the current simulation time.
Definition: LineSegmentsMobilityBase.cc:31
inet::units::values::s
value< double, units::s > s
Definition: Units.h:1235
inet::MovingMobilityBase::initialize
virtual void initialize(int stage) override
Initializes mobility model parameters.
Definition: MovingMobilityBase.cc:26
inet::MobilityBase::handleIfOutside
virtual void handleIfOutside(BorderPolicy policy, Coord &targetPosition, Coord &velocity)
Invokes one of reflectIfOutside(), wrapIfOutside() and placeRandomlyIfOutside(), depending on the giv...
Definition: MobilityBase.cc:353
inet::TurtleMobility::maxSpeed
double maxSpeed
Definition: TurtleMobility.h:36
inet::MobilityBase::constraintAreaMax
Coord constraintAreaMax
Definition: MobilityBase.h:70
inet::MovingMobilityBase::nextChange
simtime_t nextChange
The next simulation time when the mobility module needs to update its internal state.
Definition: MovingMobilityBase.h:46
inet::TurtleMobility::executeStatement
virtual void executeStatement(cXMLElement *nextStatement)
Execute the given statement.
Definition: TurtleMobility.cc:97
inet::TurtleMobility::nextStatement
cXMLElement * nextStatement
Definition: TurtleMobility.h:30
inet::Coord::z
double z
Definition: Coord.h:38
inet::INITSTAGE_LOCAL
INET_API InitStage INITSTAGE_LOCAL
Initialization of local state that don't use or affect other modules includes:
inet::Coord::X_AXIS
static const Coord X_AXIS
Definition: Coord.h:29
NUM_INIT_STAGES
#define NUM_INIT_STAGES
Definition: InitStageRegistry.h:73
inet::TurtleMobility::resumeScript
virtual void resumeScript()
Process next statements from script.
Definition: TurtleMobility.cc:80
inet::MobilityBase::setInitialPosition
virtual void setInitialPosition()
Initializes the position from the display string or from module parameters.
Definition: MobilityBase.cc:122
inet::MobilityBase::constraintAreaMin
Coord constraintAreaMin
3 dimensional position and size of the constraint area (in meters).
Definition: MobilityBase.h:70
inet::TurtleMobility::elevation
rad elevation
Definition: TurtleMobility.h:33
inet::units::values::rad
value< double, units::rad > rad
Definition: Units.h:1245
inet::Coord::y
double y
Definition: Coord.h:37
inet::TurtleMobility::gotoNextStatement
virtual void gotoNextStatement()
Advance nextStatement pointer.
Definition: TurtleMobility.cc:323
inet::MobilityBase::RAISEERROR
@ RAISEERROR
stop the simulation with error
Definition: MobilityBase.h:59
inet::TurtleMobility::borderPolicy
BorderPolicy borderPolicy
Definition: TurtleMobility.h:34