RoutingTableVisualizerBase

Package: inet.visualizer.base

RoutingTableVisualizerBase

simple module

C++ definition

Base module for routing table visualizer simple modules. It displays routes in the routing tables of the network. Routes present are not displayed by default, see the module parameters for how to enable the visualization. The actual visualization of routes is done in derived modules.

This module subscribes for routeAdded, routeChanged, routeDeleted, interfaceIpv4ConfigChanged on the module determined by the visualizationSubjectModule parameter.

The format string can contain the following directives:

  • %m mask
  • %g gateway
  • %d destination
  • %e metric
  • %n interface name
  • %i IRoute::info()
  • %s IRoute::str()

<b>See also:</b> ~RoutingTableCanvasVisualizer, ~RoutingTableOsgVisualizer, ~IRoutingTableVisualizer, ~VisualizerBase

Inheritance diagram

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

Known subclasses

Name Type Description
RoutingTableCanvasVisualizer simple module

Visualizes routes in the routing tables on a 2D canvas. It displays an arrow for each route in the routing tables of the network. The arrow points from the node containing the routing table towards the gateway. The arrow automatically follows the movement of mobile nodes.

RoutingTableOsgVisualizer simple module

Visualizes routes in the routing tables on a 3D osg scene. It displays an arrow for each route in the routing tables of the network. The arrow points from the node containing the routing table towards the gateway. The arrow automatically follows the movement of mobile nodes.

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

displayRoutingTables bool false

Displays routing table data, disabled by default

displayRoutesIndividually bool true

Displays routes between the same network nodes individually, enabled by default

displayLabels bool true

Displays labels on arrows, enabled by default

destinationFilter string "*"

Determines the destinations that are considered, matches all destinations by default

nodeFilter string "*"

Determines the nodes that are considered, matches all nodes by default

multicastSourceNodeFilter string "*"

Determines the multicast source nodes that are considered, matches all nodes by default

multicastSourceAddressFilter string "*"

Determines the multicast source addresses that are considered, matches all addresses by default

multicastGroupFilter string "*"

Determines the multicast group addresses that are considered, matches all group addresses by default

lineColor string "black"

Route line color, black by default

lineStyle string "solid"

Route line style (solid, dashed, dotted)

lineWidth double 2

Route line width

lineShift double 16

Line shift to avoid overlapping lines

lineShiftMode string "normal"

Determines how overlapping lines 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 "%d/%m -> %g (%n)"

Determines what route data is displayed

labelFont string ", 8px"

Label font, automatic by default

labelColor string "black"

Label color, black by default

Properties

Name Value Description
class RoutingTableVisualizerBase
display i=block/app

Source code

//
// Base module for routing table visualizer simple modules. It displays
// routes in the routing tables of the network. Routes present are not displayed
// by default, see the module parameters for how to enable the visualization.
// The actual visualization of routes is done in derived modules.
//
// This module subscribes for `routeAdded`, `routeChanged`, `routeDeleted`,
// `interfaceIpv4ConfigChanged` on the module determined by the `visualizationSubjectModule`
// parameter.
//
// The format string can contain the following directives:
//  - %m mask
//  - %g gateway
//  - %d destination
//  - %e metric
//  - %n interface name
//  - %i IRoute::info()
//  - %s IRoute::str()
//
// @see ~RoutingTableCanvasVisualizer, ~RoutingTableOsgVisualizer, ~IRoutingTableVisualizer, ~VisualizerBase
//
simple RoutingTableVisualizerBase extends VisualizerBase
{
    parameters:
        bool displayRoutingTables = default(false); // Displays routing table data, disabled by default
        bool displayRoutesIndividually = default(true); // Displays routes between the same network nodes individually, enabled by default
        bool displayLabels = default(true); // Displays labels on arrows, enabled by default

        string destinationFilter @mutable = default("*"); // Determines the destinations that are considered, matches all destinations by default
        string nodeFilter @mutable = default("*"); // Determines the nodes that are considered, matches all nodes by default
        string multicastSourceNodeFilter @mutable = default("*"); // Determines the multicast source nodes that are considered, matches all nodes by default
        string multicastSourceAddressFilter @mutable = default("*"); // Determines the multicast source addresses that are considered, matches all addresses by default
        string multicastGroupFilter @mutable = default("*"); // Determines the multicast group addresses that are considered, matches all group addresses by default

        string lineColor = default("black"); // Route line color, black by default
        string lineStyle = default("solid"); // Route line style (solid, dashed, dotted)
        double lineWidth = default(2); // Route line width

        double lineShift = default(16); // Line shift to avoid overlapping lines
        string lineShiftMode = default("normal"); // Determines how overlapping lines 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 @mutable = default("%d/%m -> %g (%n)"); // Determines what route data is displayed
        string labelFont = default("<default>, 8px"); // Label font, automatic by default
        string labelColor = default("black"); // Label color, black by default

        @class(RoutingTableVisualizerBase);
}

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