PhysicalLinkVisualizerBase

Package: inet.visualizer.base

PhysicalLinkVisualizerBase

simple module

This is a base module for physical layer link visualizer simple modules. It keeps track of active links in a network. A link between two network node 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.

This module subscribes for packetReceivedFromUpper and packetSentToUpper on the module determined by the visualizationSubjectModule parameter. If the visualizer receives a packetReceivedFromUpper from a physical layer module, then it stores the corresponding packet id. If later on the visualizer receives a packetSentToUpper from another physical layer module with the same packet id, then it adds an active link between the source and the destination nodes. After a certain amount of time the link becomes inactive unless it is reinforced by another packet.

See also: PhysicalLinkCanvasVisualizer, PhysicalLinkOsgVisualizer, IPhysicalLinkVisualizer, VisualizerBase

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Known subclasses

Name Type Description
PhysicalLinkCanvasVisualizer simple module

This module visualizes physical layer links on a 2D canvas. It displays an arrow for each active link in the network. See the documentation of the base module for what constitutes an active link. The arrow points from the source towards the destination. If a link is used in both directions then there are separate arrows for them. Each arrow fades out over time as the link becomes inactive unless it is reinforced by another packet. The arrow automatically follows the movement of mobile nodes.

PhysicalLinkOsgVisualizer simple module

This module visualizes physical layer links on a 3D osg scene. It displays an arrow for each active link in the network. See the documentation of the base module for what constitutes an active link. The arrow points from the source towards the destination. If a link is used in both directions then there are separate arrows for them. Each arrow fades out over time as the link becomes inactive unless it is reinforced by another packet. The arrow automatically follows the movement of mobile nodes.

Extends

Name Type Description
LinkVisualizerBase simple module

This is a base module for link visualizer simple modules. It keeps track of active links in a network. A link between two network node is considered active if a packet is 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.

Parameters

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

link arrow color, black by default

lineStyle string "dotted"

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 ", 8px"

label font, automatic by default

labelColor string "olive"

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 PhysicalLinkVisualizerBase
display i=block/app

Source code

//
// This is a base module for physical layer link visualizer simple modules. It
// keeps track of active links in a network. A link between two network node 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.
//
// This module subscribes for packetReceivedFromUpper and packetSentToUpper on
// the module determined by the visualizationSubjectModule parameter. If the visualizer
// receives a packetReceivedFromUpper from a physical layer module, then it
// stores the corresponding packet id. If later on the visualizer receives a
// packetSentToUpper from another physical layer module with the same packet
// id, then it adds an active link between the source and the destination nodes.
// After a certain amount of time the link becomes inactive unless it is
// reinforced by another packet.
//
// @see ~PhysicalLinkCanvasVisualizer, ~PhysicalLinkOsgVisualizer, ~IPhysicalLinkVisualizer, ~VisualizerBase
//
simple PhysicalLinkVisualizerBase extends LinkVisualizerBase
{
    parameters:
        lineColor = default("olive");
        lineStyle = default("dotted");
        labelColor = default("olive");
        @class(PhysicalLinkVisualizerBase);
}

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