MediumCanvasVisualizer

Package: inet.visualizer.canvas.physicallayer

MediumCanvasVisualizer

simple module

This module visualizes a medium on a 2D canvas. It displays communication ranges and interference ranges as circles around network nodes. It displays an image at network nodes which are currently transmitting, and a different image at other network nodes whcih are currently receiving. It also displays radio signals as a 2D ring or a 3D sphere as they propagate through the medium.

See also: MediumCanvasVisualizer, MediumVisualizer, MediumVisualizerBase, IMediumVisualizer

Inheritance diagram

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

Extends

Name Type Description
MediumVisualizerBase simple module

This is a base module for medium visualizer simple modules. It keeps track of ongoing signal departures, ongoing signal arrivals, and propagating signals.

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

mediumModule string "radioMedium"

the medium module that is displayed, refers to a top level submodule by default

networkNodeVisualizerModule string "^.networkNodeVisualizer"

the network node visualizer module, refers to a sibling submodule 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

displaySignals bool false

display signals propagating through the medium, disabled by default

signalColor string "dark"

signal color is a list of colors, a set of dark colors by default

signalPropagationAnimationSpeed double nan

animation speed while the very beginning or end of a signal is propagating on the medium, value must be in the range (0, +inf) or NaN, the latter means automatic setting

signalPropagationAnimationTime double 1s

signal propagation animation duration when signalPropagationAnimationSpeed is unspecified

signalPropagationAdditionalTime double 0s

additional simulation time to animate signal propagation after leaving last receiver

signalTransmissionAnimationSpeed double nan

animation speed while a signal is being transmitted on the medium, value must be in the range (0, +inf) or NaN, the latter means automatic setting

signalTransmissionAnimationTime double 1s

signal transmission animation duration when signalTransmissionAnimationSpeed is unspecified

signalAnimationSpeedChangeTimeMode string "realTime"

specifies the time mode for animation speed changes between propagation and transmission animation

signalAnimationSpeedChangeTime double 1s

animation speed changes smoothly from propagationAnimationSpeed to transmissionAnimationSpeed in the specified real time

displaySignalDepartures bool false

display an image where a signal departure is currently in progress, disabled by default

signalDepartureImage string "misc/signal_departure.png"

image for ongoing signal departures

signalDeparturePlacementHint string "topCenter"

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

signalDeparturePlacementPriority double 1

determines the order of annotation positioning

displaySignalArrivals bool false

display an image where a signal arrival is currently in progress, disabled by default

signalArrivalImage string "misc/signal_arrival.png"

image for ongoing signal arrivals

signalArrivalPlacementHint string "topCenter"

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

signalArrivalPlacementPriority double -1

determines the order of annotation positioning

displayCommunicationRanges bool false

display communication ranges as circles around radios, enabled by default

communicationRangeLineColor string "blue"

communication range circle line color, blue by default

communicationRangeLineStyle string "solid"

communication range circle line style, solid by default

communicationRangeLineWidth double 1

communication range circle line width, 1 by default

displayInterferenceRanges bool false

display interference ranges as circles around radios, disabled by default

interferenceRangeLineColor string "gray"

interference range circle color, gray by default

interferenceRangeLineStyle string "solid"

interference range circle line style, solid by default

interferenceRangeLineWidth double 1

interference range circle line width, 1 by default

autoPowerAxis bool true

parameters shared between power density maps, spectrums and spectrograms

signalMinPower double inf dBmW

minimum signal power if axis is not automatic

signalMaxPower double 0 dBmW

maximum signal power if axis is not automatic

signalMinPowerDensity double inf dBmWpMHz

minimum signal power density if axis is not automatic

signalMaxPowerDensity double -inf dBmWpMHz

maxium signal power density if axis is not automatic

autoTimeAxis bool true

enables automatic time axis configuration

signalMinTime double 0 s

relative to current simulation time

signalMaxTime double 0 s

relative to current simulation time

autoFrequencyAxis bool true

enables automatic frequency axis configuration

signalMinFrequency double inf Hz

minimum signal frequency if axis is not automatic

signalMaxFrequency double -inf Hz

maximum signal frequency if axis is not automatic

displayMainPowerDensityMap bool false

parameters for main power density map

mainPowerDensityMapPixmapDensity double 1

pixmap relative resolution

mainPowerDensityMapMinX double 0

minimum X coordinate

mainPowerDensityMapMaxX double nan

maximum X coordinate, compound module size by default

mainPowerDensityMapMinY double 0

minimum Y coordinate

mainPowerDensityMapMaxY double nan

maximum Y coordinate, compound module size by default

mainPowerDensityMapZ double 0

Z coordinate

mainPowerDensityMapFigureXTickCount int 3

number of ticks along the X axis

mainPowerDensityMapFigureYTickCount int 3

number of ticks along the Y axis

displayPowerDensityMaps bool false

parameters for power density maps

powerDensityMapMode string "auto"

total means total transmission medium, signal means transmitted or received signal, auto means total or signal and noise if transmission or reception is in progress

powerDensityMapPixelMode string "mean"

specifices the method used to determine the color of each pixel, sample method is the least accurate but the fastest (sample < partition < mean)

powerDensityMapApproximationSize int 10

medium power density function approximation along X and Y axes

powerDensityMapCenterFrequency double nan Hz

center frequency of medium power density sampling or integration

powerDensityMapBandwidth double 0 Hz

bandwidth of medium power density integration, 0 means sampling, inf means total integrated power

powerDensityMapFigureWidth double 200

plot figure width in pixels

powerDensityMapFigureHeight double 120

plot figure height in pixels

powerDensityMapPixmapWidth double powerDensityMapFigureWidth

pixmap resolution width

powerDensityMapPixmapHeight double powerDensityMapFigureHeight

pixmap resolution height

powerDensityMapZ double 0

Z coordinate

powerDensityMapFigureXTickCount int 3

number of ticks along the X axis

powerDensityMapFigureYTickCount int 3

number of ticks along the Y axis

displaySpectrums bool false

parameters for spectrum figures

spectrumMode string "auto"

total means total transmission medium, signal means transmitted or received signal, auto means total or signal and noise if transmission or reception is in progress

spectrumFigureWidth double 200

plot figure width in pixels

spectrumFigureHeight double 120

plot figure height in pixels

spectrumFigureXTickCount int 3

number of ticks along the X axis

spectrumFigureYTickCount int 5

number of ticks along the Y axis

spectrumFigureInterpolationSize double 5

power spectrum density interpolation distance along the frequency axis

spectrumPlacementHint string "bottomCenter"

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

spectrumPlacementPriority double -1

determines the order of annotation positioning

displaySpectrograms bool false

parameters for spectrogram figures

spectrogramMode string "auto"

total means total transmission medium, signal means transmitted or received signal, auto means total or signal and noise if transmission or reception is in progress

spectrogramPixelMode string "mean"

specifices the method used to determine the color of each pixel, sample method is the least accurate but the fastest (sample < partition < mean)

spectrogramFigureWidth double 200

plot figure width in pixels

spectrogramFigureHeight double 120

plot figure height in pixels

spectrogramPixmapWidth double spectrogramFigureWidth

pixmap resolution width

spectrogramPixmapHeight double spectrogramFigureHeight

pixmap resolution height

spectrogramFigureXTickCount int 3

number of ticks along the X axis

spectrogramFigureYTickCount int 5

number of ticks along the Y axis

spectrogramPlacementHint string "bottomCenter"

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

spectrogramPlacementPriority double -1

determines the order of annotation positioning

zIndex double 0

determines the drawing order of figures relative to other visualizers

signalShape string "ring"

shape for displaying signals

signalOpacity double 0.5

signal opacity, value must be in the range [0, 1]

signalRingCount int 20

number of stationary rings around the transmitter, value must be in the range [0, +inf)

signalRingSize double 50m

width of stationary rings, value must be in the range (0, +inf)

signalFadingDistance double 50m

distance parameter for exponential opacity decreasing, value must be in the range (0, +inf)

signalFadingFactor double 1.2

factor parameter for exponential opacity decreasing, value must be in the range (1, +inf)

signalWaveCount int 20

number of moving circles representing waves around the transmitter, value must be in the range [0, +inf)

signalWaveLength double 50m

distance between moving circles representing waves, value must be in the range (0, +inf)

signalWaveWidth double 10m

width of moving circles representing waves, value must be in the range (0, +inf)

signalWaveFadingAnimationSpeedFactor double 1

value must be in the range [0, 1]

displayCommunicationHeat bool false

when enabled the radio medium displays recent successful receptions as a heat map overlay

Properties

Name Value Description
class MediumCanvasVisualizer
display i=block/app

Source code

//
// This module visualizes a medium on a 2D canvas. It displays communication
// ranges and interference ranges as circles around network nodes. It displays
// an image at network nodes which are currently transmitting, and a different
// image at other network nodes whcih are currently receiving. It also displays
// radio signals as a 2D ring or a 3D sphere as they propagate through the
// medium.
//
// @see ~MediumCanvasVisualizer, ~MediumVisualizer, ~MediumVisualizerBase, ~IMediumVisualizer
//
simple MediumCanvasVisualizer extends MediumVisualizerBase like IMediumVisualizer
{
    parameters:
        double zIndex = default(0); // determines the drawing order of figures relative to other visualizers

        string signalShape @enum("ring","sphere") = default("ring"); // shape for displaying signals
        double signalOpacity = default(0.5); // signal opacity, value must be in the range [0, 1]
        int signalRingCount = default(20); // number of stationary rings around the transmitter, value must be in the range [0, +inf)
        double signalRingSize @unit(m) = default(50m); // width of stationary rings, value must be in the range (0, +inf)
        double signalFadingDistance @unit(m) = default(50m); // distance parameter for exponential opacity decreasing, value must be in the range (0, +inf)
        double signalFadingFactor = default(1.2); // factor parameter for exponential opacity decreasing, value must be in the range (1, +inf)
        int signalWaveCount = default(20); // number of moving circles representing waves around the transmitter, value must be in the range [0, +inf)
        double signalWaveLength @unit(m) = default(50m); // distance between moving circles representing waves, value must be in the range (0, +inf)
        double signalWaveWidth @unit(m) = default(10m); // width of moving circles representing waves, value must be in the range (0, +inf)
        double signalWaveFadingAnimationSpeedFactor = default(1); // value must be in the range [0, 1]

        bool displayCommunicationHeat = default(false); // when enabled the radio medium displays recent successful receptions as a heat map overlay

        @class(MediumCanvasVisualizer);
}

File: src/inet/visualizer/canvas/physicallayer/MediumCanvasVisualizer.ned