RoutingTableVisualizerBase

Package: inet.visualizer.base

RoutingTableVisualizerBase

simple module

This is a 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 NF_ROUTE_ADDED, NF_ROUTE_CHANGED, NF_ROUTE_DELETED, NF_INTERFACE_IPv4CONFIG_CHANGED on the module determined by the subscriptionModule parameter.

The format string can contain the following directives:

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

See also: 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

This 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

This 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

This is a base module for visualizer simple modules. It simply provides the visualization target module for derived modules.

Parameters

Name Type Default value Description
visualizerTargetModule string ""

module path relative to the visualizer where the visualization should appear in the user interface, root module by default

tags string ""

tag added to each visualization for disambiguation in the runtime environment

subscriptionModule string ""

module where the visualizer subscribes for routing table signals, root module by default

displayRoutingTables bool false

display routing table data, disabled by default

displayRoutesIndividually bool true

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

displayLabels bool true

display labels on arrows, enabled by default

destinationFilter string "*"

which destinations are considered, matches all destinations by default

nodeFilter string "*"

which nodes are considered, matches all nodes 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_s

Source code

//
// This is a 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 NF_ROUTE_ADDED, NF_ROUTE_CHANGED, NF_ROUTE_DELETED,
// NF_INTERFACE_IPv4CONFIG_CHANGED on the module determined by the subscriptionModule
// parameter.
//
// The format string can contain the following directives:
//  - %m mask
//  - %g gateway
//  - %d destination
//  - %n interface name
//  - %i IRoute::info()
//  - %s IRoute::str()
//
// @see ~RoutingTableCanvasVisualizer, ~RoutingTableOsgVisualizer, ~IRoutingTableVisualizer, ~VisualizerBase
//
simple RoutingTableVisualizerBase extends VisualizerBase
{
    parameters:
        string subscriptionModule = default("<root>"); // module where the visualizer subscribes for routing table signals, root module by default

        bool displayRoutingTables = default(false); // display routing table data, disabled by default
        bool displayRoutesIndividually = default(true); // display routes between the same network nodes individually, enabled by default
        bool displayLabels = default(true); // display labels on arrows, enabled by default

        string destinationFilter @mutable = default("*"); // which destinations are considered, matches all destinations by default
        string nodeFilter @mutable = default("*"); // which nodes are considered, matches all nodes 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