ExternalApp

Package: inet.applications.external

compound module ExternalApp

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

See also: ExternalProcess, ExternalEnvironment

Usage diagram

Inheritance 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