InterfaceTableVisualizerBase

Package: inet.visualizer.base

simple module InterfaceTableVisualizerBase

Base module for interface table visualizer simple modules. It displays information of network interfaces at network nodes. Network interfaces are not displayed by default, see module parameters for how to enable the visualization.

This module subscribes to interfaceCreated, interfaceDeleted, interfaceConfigChanged, and interfaceIpv4ConfigChanged on the module determined by the visualizationSubjectModule parameter.

The format string can contain the following directives:

  • %N interface name

  • %m MAC address

  • %4 IPv4 address

  • %6 Ipv6 address

  • %a IPv4 or IPv6 address

  • %l IPv4 or IPv6 netmask length

  • %g generic address

  • %n network address

  • %t up or down state

  • %d the t tag of the interface display string

  • %i the result of the NetworkInterface::info() call

  • %s the result of the NetworkInterface::str() call

  • %\ conditional newline for wired interfaces

  • %/ conditional / for network address

See also: InterfaceTableCanvasVisualizer, InterfaceTableOsgVisualizer, IInterfaceTableVisualizer, VisualizerBase

inet.visualizer.base.InterfaceTableVisualizerBaseInterfaceTableVisualizerBasesimple

Inheritance diagram

Known subclasses

Name

Type

Description

InterfaceTableCanvasVisualizer

simple module

Visualizes interface tables on a 2D canvas. It displays a label for each selected network interface at the owner network node.

InterfaceTableOsgVisualizer

simple module

Visualizes interface tables on a 3D osg scene. It displays a label for each selected network interface at the owner network node.

Extends

Name

Type

Description

VisualizerBase

simple module

Base module for visualizer simple modules. It simply provides the visualization target module for derived 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

visualizationTargetModule

string

“^”

Module path relative to the visualizer which determines where the visualization should appear in the user interface, parent module by default

visualizationSubjectModule

string

“^”

Module path relative to the visualizer which determines what part of the simulation model the visualizer displays in the user interface, parent module by default

tags

string

“”

Tag added to each visualization for disambiguation in the runtime environment

networkNodeVisualizerModule

string

“^.networkNodeVisualizer”

Module path to the network node visualizer module, refers to a sibling submodule by default

displayInterfaceTables

bool

false

Display interface table data, disabled by default

displayWiredInterfacesAtConnections

bool

true

Specifies where wired interfaces are displayed

displayBackground

bool

false

Specifies whether the text should have a background or not

nodeFilter

string

“*”

Which nodes are considered, matches all nodes by default

interfaceFilter

string

“not(lo*)”

Which interfaces are considered, matches all non-local interfaces by default

format

string

“%N %\\%a%/%l”

Determines what interface data is displayed

placementHint

string

“top”

Annotation placement hint, space separated list of any, top, bottom, left, right, topLeft, topCenter, topRight, etc.

placementPriority

double

0

Determines the order of annotation positioning

font

string

“<default>”

Interface text font, automatic by default

textColor

string

“#005030”

Interface text font color

backgroundColor

string

“white”

Interface text background color

opacity

double

1.0

Opacity of the visualization

Properties

Name

Value

Description

class

InterfaceTableVisualizerBase

display

i=block/app

Source code

//
// Base module for interface table visualizer simple modules.
// It displays information of network interfaces at network nodes. Network
// interfaces are not displayed by default, see module parameters for how to
// enable the visualization.
//
// This module subscribes to `interfaceCreated`, `interfaceDeleted`,
// `interfaceConfigChanged`, and `interfaceIpv4ConfigChanged` on the
// module determined by the `visualizationSubjectModule` parameter.
//
// The format string can contain the following directives:
//  - %N interface name
//  - %m MAC address
//  - %4 IPv4 address
//  - %6 Ipv6 address
//  - %a IPv4 or IPv6 address
//  - %l IPv4 or IPv6 netmask length
//  - %g generic address
//  - %n network address
//  - %t up or down state
//  - %d the `t` tag of the interface display string
//  - %i the result of the `NetworkInterface::info()` call
//  - %s the result of the `NetworkInterface::str()` call
//  - %\ conditional newline for wired interfaces
//  - %/ conditional / for network address
//
// @see ~InterfaceTableCanvasVisualizer, ~InterfaceTableOsgVisualizer, ~IInterfaceTableVisualizer, ~VisualizerBase
//
simple InterfaceTableVisualizerBase extends VisualizerBase
{
    parameters:
        string networkNodeVisualizerModule = default("^.networkNodeVisualizer"); // Module path to the network node visualizer module, refers to a sibling submodule by default

        bool displayInterfaceTables = default(false); // Display interface table data, disabled by default
        bool displayWiredInterfacesAtConnections = default(true); // Specifies where wired interfaces are displayed
        bool displayBackground = default(false); // Specifies whether the text should have a background or not

        string nodeFilter @mutable = default("*"); // Which nodes are considered, matches all nodes by default
        string interfaceFilter @mutable = default("not(lo*)"); // Which interfaces are considered, matches all non-local interfaces by default

        string format @mutable = default("%N %\\%a%/%l"); // Determines what interface data is displayed
        string placementHint = default("top"); // Annotation placement hint, space separated list of any, top, bottom, left, right, topLeft, topCenter, topRight, etc.
        double placementPriority = default(0); // Determines the order of annotation positioning

        string font = default("<default>"); // Interface text font, automatic by default
        string textColor = default("#005030"); // Interface text font color
        string backgroundColor = default("white"); // Interface text background color
        double opacity = default(1.0); // Opacity of the visualization

        @class(InterfaceTableVisualizerBase);
}

File: src/inet/visualizer/base/InterfaceTableVisualizerBase.ned