Package: inet.mobility.base
MobilityBase
simple moduleAbstract 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
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Known subclasses
| Name | Type | Description |
|---|---|---|
| AttachedMobility | 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. |
| FacingMobility | simple module |
Provides orientation towards the target mobility model as seen from the source mobility model. |
| MovingMobilityBase | simple module |
Abstract base module for mobility models. |
| StaticConcentricMobility | simple module |
Places all hosts on concentric circles |
| StaticGridMobility | 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 separationX, separationY size). Hosts are placed in the middle of each cell. By default, the number of columns and rows follows the aspect ratio of the usable area. By default, stepX and stepY are calculated based on the number of columns and rows. |
| StationaryMobility | simple module |
Mobility module for stationary nodes. |
| SuperpositioningMobility | 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. |
Extends
| Name | Type | Description |
|---|---|---|
| SimpleModule | simple module |
Base module for all INET simple modules. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| displayStringTextFormat | string | "p: %p\nv: %v" |
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 |
| 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 // 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 displayStringTextFormat = default("p: %p\nv: %v"); // 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) }File: src/inet/mobility/base/MobilityBase.ned