LinkVisualizerBase

Package: inet.visualizer.base

simple module LinkVisualizerBase

Base module for link visualizer simple modules. It keeps track of active links in a network. A link between two network nodes is considered active if a packet has been sent recently between the corresponding layers. Active links are not displayed by default, see the module parameters for how to enable the visualization. The actual visualization of active links is done in derived modules.

This module subscribes to signals at the provided subscription module. When determining active links, it only considers packets matched by the provided filters. The filters use the format of cMatchExpression with the packet name as the default attribute.

The format string can contain the following directives:

  • %n packet name

  • %c packet class

See also: PhysicalLinkVisualizerBase, DataLinkVisualizerBase, VisualizerBase

inet.visualizer.base.LinkVisualizerBaseLinkVisualizerBasesimple

Inheritance diagram

Known subclasses

Name

Type

Description

DataLinkVisualizerBase

simple module

Base module for data link layer link visualizer simple modules. It keeps track of active links in a network. A link between two network nodes is considered active if a packet is sent recently between their link layers. Active links are not displayed by default, see the module parameters for how to enable the visualization. The actual visualization of active links is done in derived modules.

PhysicalLinkVisualizerBase

simple module

Base module for physical layer link visualizer simple modules. It keeps track of active links in a network. A link between two network nodes is considered active if a packet is sent recently between their physical layers. Active links are not displayed by default, see the module parameters for how to enable the visualization. The actual visualization of active links is done in derived modules.

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

displayLinks

bool

false

Display arrows for active links, disabled by default

activityLevel

string

“service”

Determines what level of activity is displayed, service level by default

nodeFilter

string

“*”

Which nodes are considered, matches all nodes by default

interfaceFilter

string

“*”

Which interfaces are considered, matches all interfaces by default

packetFilter

object

“*”

Which packets are considered, matches all packets by default

lineColor

string

“black”

Link arrow color, black by default

lineStyle

string

“solid”

Link arrow style (solid, dashed, dotted)

lineWidth

double

3

Link arrow width

lineShift

double

16

Line shift to avoid overlapping arrows

lineShiftMode

string

“normal”

Determines how overlapping arrows are shifted, possible values are: none, normal, x, y, z; optional prefix + or -

lineContactSpacing

double

3

Spacing between arrow end and submodule icon

lineContactMode

string

“rectangular”

Determines how arrows are clipped at the submodules

labelFormat

string

“%n”

Determines what link data is displayed

labelFont

string

“<default>, 8px”

Label font, automatic by default

labelColor

string

“black”

Label color, black by default

fadeOutMode

string

“realTime”

Specifies how inactive links fade out

fadeOutTime

double

1s

How quickly inactive links fade away, 1 second by default

fadeOutAnimationSpeed

double

0

Animation speed while there are active links, value must be in the range (0, +inf)

holdAnimationTime

double

0s

Hold simulation (no progress) for the specified amount of animation time when the link is activated

Properties

Name

Value

Description

class

LinkVisualizerBase

display

i=block/app

Source code

//
// Base module for link visualizer simple modules. It keeps track of
// active links in a network. A link between two network nodes is considered
// active if a packet has been sent recently between the corresponding layers. Active
// links are not displayed by default, see the module parameters for how to
// enable the visualization. The actual visualization of active links is done
// in derived modules.
//
// This module subscribes to signals at the provided subscription module. When
// determining active links, it only considers packets matched by the provided
// filters. The filters use the format of `cMatchExpression` with the packet name
// as the default attribute.
//
// The format string can contain the following directives:
//  - %n packet name
//  - %c packet class
//
// @see ~PhysicalLinkVisualizerBase, ~DataLinkVisualizerBase, ~VisualizerBase
//
simple LinkVisualizerBase extends VisualizerBase
{
    parameters:
        bool displayLinks = default(false); // Display arrows for active links, disabled by default
        string activityLevel @enum("service", "peer", "protocol") = default("service"); // Determines what level of activity is displayed, service level by default

        string nodeFilter @mutable = default("*"); // Which nodes are considered, matches all nodes by default
        string interfaceFilter @mutable = default("*"); // Which interfaces are considered, matches all interfaces by default
        object packetFilter @mutable = default("*"); // Which packets are considered, matches all packets by default

        string lineColor = default("black"); // Link arrow color, black by default
        string lineStyle = default("solid"); // Link arrow style (solid, dashed, dotted)
        double lineWidth = default(3); // Link arrow width

        double lineShift = default(16); // Line shift to avoid overlapping arrows
        string lineShiftMode = default("normal"); // Determines how overlapping arrows are shifted, possible values are: none, normal, x, y, z; optional prefix + or -

        double lineContactSpacing = default(3); // Spacing between arrow end and submodule icon
        string lineContactMode @enum("circular", "rectangular") = default("rectangular"); // Determines how arrows are clipped at the submodules

        string labelFormat = default("%n"); // Determines what link data is displayed
        string labelFont = default("<default>, 8px"); // Label font, automatic by default
        string labelColor = default("black"); // Label color, black by default

        string fadeOutMode @enum("realTime", "animationTime", "simulationTime") = default("realTime"); // Specifies how inactive links fade out
        double fadeOutTime @unit(s) = default(1s); // How quickly inactive links fade away, 1 second by default
        double fadeOutAnimationSpeed = default(0); // Animation speed while there are active links, value must be in the range (0, +inf)

        double holdAnimationTime @unit(s) = default(0s); // Hold simulation (no progress) for the specified amount of animation time when the link is activated

        @class(LinkVisualizerBase);
}

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