MobilityBase¶
Package: inet.mobility.base
simple module MobilityBase
Abstract base module for mobility models.
Format directives:
%p position
%v velocity
%s speed
%a acceleration
%P angular position
%V angular velocity
%S angular speed
%A angular acceleration
Expression directives (in curly braces) resolve watched values, e.g. {position}, {velocity}, and:
{geo_position} geographic position (latitude, longitude, altitude; requires a coordinate system)
Inheritance diagram¶
Known subclasses¶
Name |
Type |
Description |
|---|---|---|
simple module |
Abstract base module for mobility models. |
|
simple module |
Provides a mobility that is attached to another mobility at a given offset. The position, velocity, and acceleration are all affected by the respective quantities and the orientation of the mobility where this one is attached. |
|
simple module |
Provides orientation towards the target mobility model as seen from the source mobility model. |
|
compound module |
Combines the trajectory of several other mobility modules using superposition. In other words, the position, velocity, and acceleration are the sum of the respective quantities of all submodules. |
|
simple module |
Places all hosts on concentric circles |
|
simple module |
Places all hosts in a rectangular grid. The usable area (constraint area minus margins on each side) is split into smaller cells (with a |
|
simple module |
Mobility module for stationary nodes. |
Extends¶
Name |
Type |
Description |
|---|---|---|
simple module |
Base module for all INET simple modules. |
Parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
displayStringTextFormat |
string |
“p: {position}\nv: {velocity}” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
subjectModule |
string |
“^” |
The module path that determines the subject module, the motion of which this mobility model describes. The default value is the parent module |
coordinateSystemModule |
string |
“” |
The module path of the geographic coordinate system module; optional, empty disables geographic conversion (and the {geo_position} directive) |
updateDisplayString |
bool |
true |
Enables continuous update of the subject module’s position by modifying its display string |
constraintAreaMinX |
double |
-inf m |
The minimum x position of the constraint area. It is unconstrained by default (negative infinity) |
constraintAreaMinY |
double |
-inf m |
The minimum y position of the constraint area. It is unconstrained by default (negative infinity) |
constraintAreaMinZ |
double |
-inf m |
The minimum z position of the constraint area. It is unconstrained by default (negative infinity) |
constraintAreaMaxX |
double |
inf m |
The maximum x position of the constraint area. It is unconstrained by default (positive infinity) |
constraintAreaMaxY |
double |
inf m |
The maximum y position of the constraint area. It is unconstrained by default (positive infinity) |
constraintAreaMaxZ |
double |
inf m |
The maximum z position of the constraint area. It is unconstrained by default (positive infinity) |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
MobilityBase |
|
display |
i=block/cogwheel |
Signals¶
Name |
Type |
Unit |
Description |
|---|---|---|---|
mobilityStateChanged |
inet::MobilityBase |
It works in inet, but not in the extended module in another namespace |
Source code¶
//
// Abstract base module for mobility models.
//
// Format directives:
// - %p position
// - %v velocity
// - %s speed
// - %a acceleration
// - %P angular position
// - %V angular velocity
// - %S angular speed
// - %A angular acceleration
//
// Expression directives (in curly braces) resolve watched values, e.g. {position}, {velocity}, and:
// - {geo_position} geographic position (latitude, longitude, altitude; requires a coordinate system)
//
simple MobilityBase extends SimpleModule like IMobility
{
parameters:
@class(MobilityBase);
@signal[mobilityStateChanged](type=inet::MobilityBase); // It works in inet, but not in the extended module in another namespace
@display("i=block/cogwheel");
string subjectModule = default("^"); // The module path that determines the subject module, the motion of which this mobility model describes. The default value is the parent module
string coordinateSystemModule = default(""); // The module path of the geographic coordinate system module; optional, empty disables geographic conversion (and the {geo_position} directive)
displayStringTextFormat = default("p: {position}\nv: {velocity}"); // The format string for the mobility module's display string text
bool updateDisplayString = default(true); // Enables continuous update of the subject module's position by modifying its display string
double constraintAreaMinX @unit(m) = default(-inf m); // The minimum x position of the constraint area. It is unconstrained by default (negative infinity)
double constraintAreaMinY @unit(m) = default(-inf m); // The minimum y position of the constraint area. It is unconstrained by default (negative infinity)
double constraintAreaMinZ @unit(m) = default(-inf m); // The minimum z position of the constraint area. It is unconstrained by default (negative infinity)
double constraintAreaMaxX @unit(m) = default(inf m); // The maximum x position of the constraint area. It is unconstrained by default (positive infinity)
double constraintAreaMaxY @unit(m) = default(inf m); // The maximum y position of the constraint area. It is unconstrained by default (positive infinity)
double constraintAreaMaxZ @unit(m) = default(inf m); // The maximum z position of the constraint area. It is unconstrained by default (positive infinity)
}