NodeBase

Package: inet.node.base

NodeBase

compound module

This module contains the most basic infrastructure for network nodes that is not strictly communication protocol related.

See derived modules: StandardHost, WirelessHost, AdhocHost, Router, etc.

status : NodeStatus

Keeps track of the status of network node (up, down, etc.) for other modules, and also displays it...

Source:
status: NodeStatus if hasStatus {
    @display("p=125,80;is=s");
} clock : like IClock

IClock: This module interface is implemented by clock models.

Source:
clock: <default("")> like IClock if typename != "" {
    @display("p=125,320;is=s");
} energyStorage : like IEnergyStorage

IEnergyStorage: The energy storage models describe devices that absorb energy produced by generators, and provide...

Source:
energyStorage: <default("")> like IEnergyStorage if typename != "" {
    @display("p=125,400;is=s");
} energyManagement : like IEnergyManagement

IEnergyManagement: The energy management models monitors an energy storage, estimates its state, and controls the...

Source:
energyManagement: <default("")> like IEnergyManagement if typename != "" {
    @display("p=125,480;is=s");
} energyGenerator : like IEnergyGenerator

IEnergyGenerator: The energy generator models describe the energy generation process of devices over time.

Source:
energyGenerator: <default("")> like IEnergyGenerator if typename != "" {
    @display("p=125,560;is=s");
} mobility : like IMobility

IMobility: The module interface for mobility models.

Source:
mobility: <default("")> like IMobility if typename != "" {
    @display("p=125,160;is=s");
} measurer : like IMeasurer

IMeasurer: This module interface is implemented by all standalone measurement modules.

Source:
measurer: <default("")> like IMeasurer if typename != "" {
    @display("p=125,660;is=s");
}

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 (no description)

Parameters

Name Type Default value Description
hasStatus 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
networkNode
labels node
class NodeBase
display bgb=1256,1125

Unassigned submodule parameters

Name Type Default value Description
status.initialStatus string "UP"

TODO @signal, @statistic

Source code

//
// This module contains the most basic infrastructure for network nodes that is
// not strictly communication protocol related.
//
// See derived modules: ~StandardHost, ~WirelessHost, ~AdhocHost, ~Router, etc.
//
module NodeBase like INetworkNode
{
    parameters:
        @networkNode;
        @labels(node,ethernet-node,wireless-node);
        bool hasStatus = 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 status to have it in the same order as in their positions, changes fingerprints
        mobility: <default("")> like IMobility if typename != "" {
            @display("p=125,160;is=s");
        }
        measurer: <default("")> like IMeasurer if typename != "" {
            @display("p=125,660;is=s");
        }
}

File: src/inet/node/base/NodeBase.ned