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

This mobility module does not move at all; it can be used for standalone stationary nodes. More...

#include <StationaryMobility.h>

Inheritance diagram for inet::StationaryMobility:
inet::MobilityBase inet::IMobility inet::LinearNodeDistributionMobility inet::StaticConcentricMobility inet::StaticGridMobility

Public Member Functions

 StationaryMobility ()
 
 StationaryMobility (Coord position)
 
virtual Coord getCurrentPosition () override
 Returns the current position at the current simulation time. More...
 
virtual Coord getCurrentSpeed () override
 Returns the current speed at the current simulation time. More...
 
virtual double getMaxSpeed () const override
 Returns the maximum possible speed at any future time. More...
 
virtual Coord getConstraintAreaMax () const override
 Returns the current angular acceleration at the current simulation time. More...
 
virtual Coord getConstraintAreaMin () const override
 
- Public Member Functions inherited from inet::MobilityBase
virtual EulerAngles getCurrentAngularPosition () override
 Returns the current acceleration at the current simulation time. More...
 
virtual EulerAngles getCurrentAngularSpeed () override
 Returns the current angular speed at the current simulation time. More...
 
- Public Member Functions inherited from inet::IMobility
virtual ~IMobility ()
 

Protected Member Functions

virtual void handleSelfMessage (cMessage *message) override
 Never happens. More...
 
- Protected Member Functions inherited from inet::MobilityBase
 MobilityBase ()
 
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 initializePosition ()
 Initializes mobility position. More...
 
virtual void setInitialPosition ()
 Initializes the position from the display string or from module parameters. More...
 
virtual void checkPosition ()
 Checks whether the position is valid or not. More...
 
virtual void initializeOrientation ()
 Initializes the orientation from module parameters. More...
 
virtual void handleMessage (cMessage *msg) override
 This modules should only receive self-messages. More...
 
virtual void updateVisualRepresentation ()
 Moves the visual representation module's icon to the new position on the screen. 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 * findVisualRepresentation ()
 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 &speed, double &angle)
 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 &speed, double &angle)
 Invokes one of reflectIfOutside(), wrapIfOutside() and placeRandomlyIfOutside(), depending on the given border policy. More...
 

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...
 
- Protected Attributes inherited from inet::MobilityBase
cModule * visualRepresentation
 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...
 
EulerAngles lastOrientation
 The last position that was reported. More...
 

Detailed Description

This mobility module does not move at all; it can be used for standalone stationary nodes.

Author
Andras Varga

Constructor & Destructor Documentation

inet::StationaryMobility::StationaryMobility ( )
inline
41  {
42  }
inet::StationaryMobility::StationaryMobility ( Coord  position)
inline
44 { lastPosition = position; }
Coord lastPosition
The last position that was reported.
Definition: MobilityBase.h:78

Member Function Documentation

virtual Coord inet::StationaryMobility::getConstraintAreaMax ( ) const
inlineoverridevirtual

Returns the current angular acceleration at the current simulation time.

Reimplemented from inet::MobilityBase.

54 { return lastPosition; }
Coord lastPosition
The last position that was reported.
Definition: MobilityBase.h:78
virtual Coord inet::StationaryMobility::getConstraintAreaMin ( ) const
inlineoverridevirtual

Reimplemented from inet::MobilityBase.

55 { return lastPosition; }
Coord lastPosition
The last position that was reported.
Definition: MobilityBase.h:78
virtual Coord inet::StationaryMobility::getCurrentPosition ( )
inlineoverridevirtual

Returns the current position at the current simulation time.

Implements inet::IMobility.

47 { return lastPosition; }
Coord lastPosition
The last position that was reported.
Definition: MobilityBase.h:78
virtual Coord inet::StationaryMobility::getCurrentSpeed ( )
inlineoverridevirtual

Returns the current speed at the current simulation time.

Implements inet::IMobility.

50 { return Coord::ZERO; }
static const Coord ZERO
Definition: Coord.h:41
virtual double inet::StationaryMobility::getMaxSpeed ( ) const
inlineoverridevirtual

Returns the maximum possible speed at any future time.

Reimplemented from inet::MobilityBase.

52 { return 0; }
void inet::StationaryMobility::handleSelfMessage ( cMessage *  message)
overrideprotectedvirtual

Never happens.

Implements inet::MobilityBase.

25 {
26  ASSERT(false);
27 }

The documentation for this class was generated from the following files: