Package: inet.node.base
NodeBase
compound moduleThe fundamental infrastructure for all network nodes focusing on non-communication aspects of network nodes.
It provides among others:
- Node(1,2) lifecycle management through NodeStatus
- Optional local clock for modeling clock skew
- Optional modules for with energy storage, management, and generation
- Support for node mobility
NodeBase is not intended to be used directly in simulations but rather serves as a base module for more specialized node types that add communication capabilities.
<b>See also:</b> ~StandardHost, ~WirelessHost, ~AdhocHost, ~Router(1,2)
Usage diagram
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
Known subclasses
| Name | Type | Description |
|---|---|---|
| LinkLayerNodeBase | compound module |
An extension of the basic node infrastructure with link layer functionality. Provides support for various network interfaces and link layer protocols, forming the foundation for network connectivity. |
Extends
| Name | Type | Description |
|---|---|---|
| Module | compound module |
Base module for all INET compound modules. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| hasStatus | bool | false | |
| hasEnvironment | bool | false | |
| osgModel | string | "" |
3D model for OSG visualization, no 3D model by default |
| osgModelColor | string | "" |
Tint color, no colorization by default |
| canvasImage | string | "" |
Image for canvas visualization, no image by default |
| canvasImageColor | string | "" |
Tint color, no colorization by default |
Properties
| Name | Value | Description |
|---|---|---|
| class | NodeBase | |
| networkNode | ||
| labels | node | |
| display | bgb=1256,1125 |
Unassigned submodule parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| status.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| status.initialStatus | string | "UP" |
TODO @signal, @statistic |
| environment.displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| environment.initStage | int | 0 |
Initialization stage for the setup command |
| environment.globalNamespace | bool | false |
Create new network namespaces under /var/run/netns/ (Linux only) |
| environment.namespace | string | "" |
Name of the host OS network namespace (optional) (Linux only) |
| environment.setupCommand | string | "" |
A host OS system command |
| environment.teardownCommand | string | "" |
A host OS system command |
Source code
// // The fundamental infrastructure for all network nodes focusing on non-communication // aspects of network nodes. // // It provides among others: // - Node lifecycle management through NodeStatus // - Optional local clock for modeling clock skew // - Optional modules for with energy storage, management, and generation // - Support for node mobility // // NodeBase is not intended to be used directly in simulations but rather serves // as a base module for more specialized node types that add communication capabilities. // // @see ~StandardHost, ~WirelessHost, ~AdhocHost, ~Router // module NodeBase extends Module like INetworkNode { parameters: @networkNode; @labels(node,ethernet-node,wireless-node); bool hasStatus = default(false); bool hasEnvironment = default(false); string osgModel = default(""); // 3D model for OSG visualization, no 3D model by default string osgModelColor = default(""); // Tint color, no colorization by default string canvasImage = default(""); // Image for canvas visualization, no image by default string canvasImageColor = default(""); // Tint color, no colorization by default mobility.subjectModule = default("^"); *.mobilityModule = default(exists(mobility) ? absPath(".mobility") : ""); *.energySourceModule = default(exists(energyStorage) ? absPath(".energyStorage") : ""); *.energyGeneratorModule = default(exists(energyGenerator) ? absPath(".energyGenerator") : ""); *.clockModule = default(exists(clock) ? absPath(".clock") : ""); @class(NodeBase); @display("bgb=1256,1125"); submodules: status: NodeStatus if hasStatus { @display("p=125,80;is=s"); } clock: <default("")> like IClock if typename != "" { @display("p=125,320;is=s"); } energyStorage: <default("")> like IEnergyStorage if typename != "" { @display("p=125,400;is=s"); } energyManagement: <default("")> like IEnergyManagement if typename != "" { @display("p=125,480;is=s"); } energyGenerator: <default("")> like IEnergyGenerator if typename != "" { @display("p=125,560;is=s"); } // TODO move mobility right after the status to have it in the same order as their positions, it changes fingerprints mobility: <default("")> like IMobility if typename != "" { @display("p=125,160;is=s"); } measurer: <default("")> like IMeasurer if typename != "" { @display("p=125,640;is=s"); } environment: ExternalEnvironment if hasEnvironment { @display("p=125,800;is=s"); } }File: src/inet/node/base/NodeBase.ned