ExternalApp

Package: inet.applications.external

ExternalApp

compound module

Provides an external application that uses a host OS external process.

<b>See also:</b> ~ExternalProcess, ~ExternalEnvironment

environment : ExternalEnvironment

Executes a setup command on the host OS during initialization and another teardown command during...

Source:
environment: ExternalEnvironment {
    parameters:
        @display("p=150,150");
} process : ExternalProcess

Launches an external OS process in the background, using the command line given in the 'command'...

Source:
process: ExternalProcess {
    parameters:
        @display("p=150,300");
}

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.

Parameters

Name Type Default value Description
namespace string ""

Name of the host OS network namespace (optional)

Properties

Name Value Description
display i=block/app

Gates

Name Direction Size Description
socketIn input
socketOut output

Unassigned submodule parameters

Name Type Default value Description
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

process.displayStringTextFormat string ""

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

process.namespace string ""

Name of the OS network namespace (optional)

process.command string

Executable with arguments (e.g. "ping google.com"); not a shell command as it will be passed to execvp

process.onExit string "ignore"

Determines what happens when the process exits

process.startTime double 0s
process.relaunchDelay double 0s
process.printStdout bool false

Print STDOUT to the simulation's STDOUT

process.printStderr bool true

Print STDERR to the simulation's STDERR

Source code

//
// Provides an external application that uses a host OS external process.
//
// @see ~ExternalProcess, ~ExternalEnvironment
//
module ExternalApp like IApp
{
    parameters:
        string namespace = default(""); // Name of the host OS network namespace (optional)
        *.namespace = default(this.namespace);
        @display("i=block/app");
    gates:
        input socketIn @loose;
        output socketOut @loose;
    submodules:
        environment: ExternalEnvironment {
            parameters:
                @display("p=150,150");
        }
        process: ExternalProcess {
            parameters:
                @display("p=150,300");
        }
    connections allowunconnected:
}

File: src/inet/applications/external/ExternalApp.ned