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

#include <StationaryMobilityBase.h>

Inheritance diagram for inet::StationaryMobilityBase:
inet::MobilityBase inet::IMobility inet::StaticConcentricMobility inet::StaticGridMobility inet::StaticLinearMobility inet::StationaryMobility

Public Member Functions

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...
 
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 double getMaxSpeed () const override
 Returns the maximum possible speed at any future time. More...
 
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 void handleSelfMessage (cMessage *message) override
 Called upon arrival of a self messages, subclasses must override. More...
 
- Protected Member Functions inherited from inet::MobilityBase
 MobilityBase ()
 
virtual int getId () const override
 
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 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)
 

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 * 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
 

Member Function Documentation

◆ getConstraintAreaMax()

virtual const Coord& inet::StationaryMobilityBase::getConstraintAreaMax ( ) const
inlineoverridevirtual

Returns the maximum position along each axes for.

Reimplemented from inet::MobilityBase.

31 { return lastPosition; }

◆ getConstraintAreaMin()

virtual const Coord& inet::StationaryMobilityBase::getConstraintAreaMin ( ) const
inlineoverridevirtual

Returns the minimum position along each axes for.

Reimplemented from inet::MobilityBase.

32 { return lastPosition; }

◆ getCurrentAcceleration()

virtual const Coord& inet::StationaryMobilityBase::getCurrentAcceleration ( )
inlineoverridevirtual

Returns the acceleration at the current simulation time.

Implements inet::IMobility.

27 { return Coord::ZERO; }

◆ getCurrentAngularAcceleration()

virtual const Quaternion& inet::StationaryMobilityBase::getCurrentAngularAcceleration ( )
inlineoverridevirtual

Returns the angular acceleration at the current simulation time.

Implements inet::IMobility.

23 { return Quaternion::IDENTITY; }

◆ getCurrentAngularPosition()

virtual const Quaternion& inet::StationaryMobilityBase::getCurrentAngularPosition ( )
inlineoverridevirtual

Returns the angular position at the current simulation time.

Implements inet::IMobility.

21 { return lastOrientation; }

◆ getCurrentAngularVelocity()

virtual const Quaternion& inet::StationaryMobilityBase::getCurrentAngularVelocity ( )
inlineoverridevirtual

Returns the angular velocity at the current simulation time.

Implements inet::IMobility.

22 { return Quaternion::IDENTITY; }

◆ getCurrentPosition()

virtual const Coord& inet::StationaryMobilityBase::getCurrentPosition ( )
inlineoverridevirtual

Returns the position at the current simulation time.

Implements inet::IMobility.

25 { return lastPosition; }

◆ getCurrentVelocity()

virtual const Coord& inet::StationaryMobilityBase::getCurrentVelocity ( )
inlineoverridevirtual

Returns the velocity at the current simulation time.

Implements inet::IMobility.

26 { return Coord::ZERO; }

◆ getMaxSpeed()

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

Returns the maximum possible speed at any future time.

Reimplemented from inet::MobilityBase.

29 { return 0; }

◆ handleSelfMessage()

virtual void inet::StationaryMobilityBase::handleSelfMessage ( cMessage *  msg)
inlineoverrideprotectedvirtual

Called upon arrival of a self messages, subclasses must override.

Implements inet::MobilityBase.

18 { throw cRuntimeError("Invalid operation"); }

The documentation for this class was generated from the following file:
inet::MobilityBase::lastPosition
Coord lastPosition
The last position that was reported.
Definition: MobilityBase.h:73
inet::Coord::ZERO
static const Coord ZERO
Definition: Coord.h:27
inet::MobilityBase::lastOrientation
Quaternion lastOrientation
The last orientation that was reported.
Definition: MobilityBase.h:76
inet::Quaternion::IDENTITY
static Quaternion IDENTITY
Definition: Quaternion.h:20