MediumVisualizer

Package: inet.visualizer.common

compound module MediumVisualizer

Integrates canvas and osg medium visualizers into a single module.

See also: MediumCanvasVisualizer, MediumOsgVisualizer, MediumVisualizerBase, IMediumVisualizer

Usage diagram

Inheritance diagram

Parameters

Name

Type

Default value

Description

visualizationTargetModule

string

“^”

visualizationSubjectModule

string

“^”

Properties

Name

Value

Description

display

i=block/app

Unassigned submodule parameters

Name

Type

Default value

Description

canvasVisualizer.displayStringTextFormat

string

“”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

canvasVisualizer.visualizationTargetModule

string

“^”

Module path relative to the visualizer which determines where the visualization should appear in the user interface, parent module by default

canvasVisualizer.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

canvasVisualizer.tags

string

“”

Tag added to each visualization for disambiguation in the runtime environment

canvasVisualizer.mediumModule

string

“radioMedium”

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

canvasVisualizer.networkNodeVisualizerModule

string

“^.networkNodeVisualizer”

The network node visualizer module, refers to a sibling submodule by default

canvasVisualizer.nodeFilter

string

“*”

Which nodes are considered, matches all nodes by default

canvasVisualizer.interfaceFilter

string

“*”

Which interfaces are considered, matches all interfaces by default

canvasVisualizer.packetFilter

object

“*”

Which packets are considered, matches all packets by default

canvasVisualizer.displaySignals

bool

false

Display signals propagating through the medium, disabled by default

canvasVisualizer.signalColor

string

“dark”

Signal color is a list of colors or a color group name (e.g., dark, light), a set of dark colors by default

canvasVisualizer.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

canvasVisualizer.signalPropagationAnimationTime

double

1s

Signal propagation animation duration when signalPropagationAnimationSpeed is unspecified

canvasVisualizer.signalPropagationAdditionalTime

double

0s

Additional simulation time to animate signal propagation after leaving the last receiver

canvasVisualizer.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

canvasVisualizer.signalTransmissionAnimationTime

double

1s

Signal transmission animation duration when signalTransmissionAnimationSpeed is unspecified

canvasVisualizer.signalAnimationSpeedChangeTimeMode

string

“realTime”

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

canvasVisualizer.signalAnimationSpeedChangeTime

double

1s

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

canvasVisualizer.displaySignalDepartures

bool

false

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

canvasVisualizer.signalDepartureImage

string

“misc/signal_departure.png”

Image for ongoing signal departures

canvasVisualizer.signalDeparturePlacementHint

string

“topCenter”

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

canvasVisualizer.signalDeparturePlacementPriority

double

1

Determines the order of annotation positioning

canvasVisualizer.displaySignalArrivals

bool

false

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

canvasVisualizer.signalArrivalImage

string

“misc/signal_arrival.png”

Image for ongoing signal arrivals

canvasVisualizer.signalArrivalPlacementHint

string

“topCenter”

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

canvasVisualizer.signalArrivalPlacementPriority

double

-1

Determines the order of annotation positioning

canvasVisualizer.displayCommunicationRanges

bool

false

Display communication ranges as circles around radios, enabled by default

canvasVisualizer.communicationRangeLineColor

string

“blue”

Communication range circle line color, blue by default

canvasVisualizer.communicationRangeLineStyle

string

“solid”

Communication range circle line style, solid by default

canvasVisualizer.communicationRangeLineWidth

double

1

Communication range circle line width, 1 by default

canvasVisualizer.displayInterferenceRanges

bool

false

Display interference ranges as circles around radios, disabled by default

canvasVisualizer.interferenceRangeLineColor

string

“gray”

Interference range circle color, gray by default

canvasVisualizer.interferenceRangeLineStyle

string

“solid”

Interference range circle line style, solid by default

canvasVisualizer.interferenceRangeLineWidth

double

1

Interference range circle line width, 1 by default

canvasVisualizer.autoPowerAxis

bool

true

Enables automatic power axis configuration

canvasVisualizer.signalMinPower

double

inf dBmW

Minimum signal power if the axis is not automatic

canvasVisualizer.signalMaxPower

double

0 dBmW

Maximum signal power if the axis is not automatic

canvasVisualizer.signalMinPowerDensity

double

inf dBmWpMHz

Minimum signal power density if the axis is not automatic

canvasVisualizer.signalMaxPowerDensity

double

-inf dBmWpMHz

Maximum signal power density if the axis is not automatic

canvasVisualizer.autoTimeAxis

bool

true

Enables automatic time axis configuration

canvasVisualizer.signalMinTime

double

0 s

Relative to the current simulation time

canvasVisualizer.signalMaxTime

double

0 s

Relative to the current simulation time

canvasVisualizer.autoFrequencyAxis

bool

true

Enables automatic frequency axis configuration

canvasVisualizer.signalMinFrequency

double

inf Hz

Minimum signal frequency if the axis is not automatic

canvasVisualizer.signalMaxFrequency

double

-inf Hz

Maximum signal frequency if the axis is not automatic

canvasVisualizer.displayMainPowerDensityMap

bool

false

Display a power density map for the transmission medium, can be enabled with dimensional analog models only

canvasVisualizer.mainPowerDensityMapPixmapDensity

double

1

Pixmap relative resolution

canvasVisualizer.mainPowerDensityMapMinX

double

0

Minimum X coordinate

canvasVisualizer.mainPowerDensityMapMaxX

double

nan

Maximum X coordinate, compound module size by default

canvasVisualizer.mainPowerDensityMapMinY

double

0

Minimum Y coordinate

canvasVisualizer.mainPowerDensityMapMaxY

double

nan

Maximum Y coordinate, compound module size by default

canvasVisualizer.mainPowerDensityMapZ

double

0

Z coordinate

canvasVisualizer.mainPowerDensityMapFigureXTickCount

int

3

Number of ticks along the X-axis

canvasVisualizer.mainPowerDensityMapFigureYTickCount

int

3

Number of ticks along the Y-axis

canvasVisualizer.displayPowerDensityMaps

bool

false

Display power density maps at the nodes, can be enabled with dimensional analog models only

canvasVisualizer.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

canvasVisualizer.powerDensityMapPixelMode

string

“mean”

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

canvasVisualizer.powerDensityMapApproximationSize

int

10

Medium power density function approximation along the X and Y axes

canvasVisualizer.powerDensityMapCenterFrequency

double

nan Hz

Center frequency of medium power density sampling or integration

canvasVisualizer.powerDensityMapBandwidth

double

0 Hz

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

canvasVisualizer.powerDensityMapFigureWidth

double

200

Plot figure width in pixels

canvasVisualizer.powerDensityMapFigureHeight

double

120

Plot figure height in pixels

canvasVisualizer.powerDensityMapPixmapWidth

double

powerDensityMapFigureWidth

Pixmap resolution width

canvasVisualizer.powerDensityMapPixmapHeight

double

powerDensityMapFigureHeight

Pixmap resolution height

canvasVisualizer.powerDensityMapZ

double

0

Z coordinate

canvasVisualizer.powerDensityMapFigureXTickCount

int

3

Number of ticks along the X-axis

canvasVisualizer.powerDensityMapFigureYTickCount

int

3

Number of ticks along the Y-axis

canvasVisualizer.displaySpectrums

bool

false

Display power spectral density at the nodes, can be enabled with dimensional analog models only

canvasVisualizer.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

canvasVisualizer.spectrumFigureWidth

double

200

Plot figure width in pixels

canvasVisualizer.spectrumFigureHeight

double

120

Plot figure height in pixels

canvasVisualizer.spectrumFigureXTickCount

int

3

Number of ticks along the X-axis

canvasVisualizer.spectrumFigureYTickCount

int

5

Number of ticks along the Y-axis

canvasVisualizer.spectrumFigureInterpolationSize

double

5

Power spectrum density interpolation distance along the frequency axis

canvasVisualizer.spectrumPlacementHint

string

“bottomCenter”

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

canvasVisualizer.spectrumPlacementPriority

double

-1

Determines the order of annotation positioning

canvasVisualizer.displaySpectrograms

bool

false

Display power density spectrograms at the nodes, can be enabled with dimensional analog models only

canvasVisualizer.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

canvasVisualizer.spectrogramPixelMode

string

“mean”

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

canvasVisualizer.spectrogramFigureWidth

double

200

Plot figure width in pixels

canvasVisualizer.spectrogramFigureHeight

double

120

Plot figure height in pixels

canvasVisualizer.spectrogramPixmapWidth

double

spectrogramFigureWidth

Pixmap resolution width

canvasVisualizer.spectrogramPixmapHeight

double

spectrogramFigureHeight

Pixmap resolution height

canvasVisualizer.spectrogramFigureXTickCount

int

3

Number of ticks along the X-axis

canvasVisualizer.spectrogramFigureYTickCount

int

5

Number of ticks along the Y-axis

canvasVisualizer.spectrogramPlacementHint

string

“bottomCenter”

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

canvasVisualizer.spectrogramPlacementPriority

double

-1

Determines the order of annotation positioning

canvasVisualizer.zIndex

double

0

Determines the drawing order of figures relative to other visualizers

canvasVisualizer.signalShape

string

“ring”

Shape for displaying signals

canvasVisualizer.signalOpacity

double

0.5

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

canvasVisualizer.signalRingCount

int

20

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

canvasVisualizer.signalRingSize

double

50m

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

canvasVisualizer.signalFadingDistance

double

50m

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

canvasVisualizer.signalFadingFactor

double

1.2

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

canvasVisualizer.signalWaveCount

int

20

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

canvasVisualizer.signalWaveLength

double

50m

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

canvasVisualizer.signalWaveWidth

double

10m

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

canvasVisualizer.signalWaveFadingAnimationSpeedFactor

double

1

Value must be in the range [0, 1]

canvasVisualizer.displayCommunicationHeat

bool

false

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

osgVisualizer.displayStringTextFormat

string

“”

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

osgVisualizer.visualizationTargetModule

string

“^”

Module path relative to the visualizer which determines where the visualization should appear in the user interface, parent module by default

osgVisualizer.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

osgVisualizer.tags

string

“”

Tag added to each visualization for disambiguation in the runtime environment

osgVisualizer.mediumModule

string

“radioMedium”

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

osgVisualizer.networkNodeVisualizerModule

string

“^.networkNodeVisualizer”

The network node visualizer module, refers to a sibling submodule by default

osgVisualizer.nodeFilter

string

“*”

Which nodes are considered, matches all nodes by default

osgVisualizer.interfaceFilter

string

“*”

Which interfaces are considered, matches all interfaces by default

osgVisualizer.packetFilter

object

“*”

Which packets are considered, matches all packets by default

osgVisualizer.displaySignals

bool

false

Display signals propagating through the medium, disabled by default

osgVisualizer.signalColor

string

“dark”

Signal color is a list of colors or a color group name (e.g., dark, light), a set of dark colors by default

osgVisualizer.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

osgVisualizer.signalPropagationAnimationTime

double

1s

Signal propagation animation duration when signalPropagationAnimationSpeed is unspecified

osgVisualizer.signalPropagationAdditionalTime

double

0s

Additional simulation time to animate signal propagation after leaving the last receiver

osgVisualizer.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

osgVisualizer.signalTransmissionAnimationTime

double

1s

Signal transmission animation duration when signalTransmissionAnimationSpeed is unspecified

osgVisualizer.signalAnimationSpeedChangeTimeMode

string

“realTime”

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

osgVisualizer.signalAnimationSpeedChangeTime

double

1s

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

osgVisualizer.displaySignalDepartures

bool

false

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

osgVisualizer.signalDepartureImage

string

“misc/signal_departure.png”

Image for ongoing signal departures

osgVisualizer.signalDeparturePlacementHint

string

“topCenter”

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

osgVisualizer.signalDeparturePlacementPriority

double

1

Determines the order of annotation positioning

osgVisualizer.displaySignalArrivals

bool

false

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

osgVisualizer.signalArrivalImage

string

“misc/signal_arrival.png”

Image for ongoing signal arrivals

osgVisualizer.signalArrivalPlacementHint

string

“topCenter”

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

osgVisualizer.signalArrivalPlacementPriority

double

-1

Determines the order of annotation positioning

osgVisualizer.displayCommunicationRanges

bool

false

Display communication ranges as circles around radios, enabled by default

osgVisualizer.communicationRangeLineColor

string

“blue”

Communication range circle line color, blue by default

osgVisualizer.communicationRangeLineStyle

string

“solid”

Communication range circle line style, solid by default

osgVisualizer.communicationRangeLineWidth

double

1

Communication range circle line width, 1 by default

osgVisualizer.displayInterferenceRanges

bool

false

Display interference ranges as circles around radios, disabled by default

osgVisualizer.interferenceRangeLineColor

string

“gray”

Interference range circle color, gray by default

osgVisualizer.interferenceRangeLineStyle

string

“solid”

Interference range circle line style, solid by default

osgVisualizer.interferenceRangeLineWidth

double

1

Interference range circle line width, 1 by default

osgVisualizer.autoPowerAxis

bool

true

Enables automatic power axis configuration

osgVisualizer.signalMinPower

double

inf dBmW

Minimum signal power if the axis is not automatic

osgVisualizer.signalMaxPower

double

0 dBmW

Maximum signal power if the axis is not automatic

osgVisualizer.signalMinPowerDensity

double

inf dBmWpMHz

Minimum signal power density if the axis is not automatic

osgVisualizer.signalMaxPowerDensity

double

-inf dBmWpMHz

Maximum signal power density if the axis is not automatic

osgVisualizer.autoTimeAxis

bool

true

Enables automatic time axis configuration

osgVisualizer.signalMinTime

double

0 s

Relative to the current simulation time

osgVisualizer.signalMaxTime

double

0 s

Relative to the current simulation time

osgVisualizer.autoFrequencyAxis

bool

true

Enables automatic frequency axis configuration

osgVisualizer.signalMinFrequency

double

inf Hz

Minimum signal frequency if the axis is not automatic

osgVisualizer.signalMaxFrequency

double

-inf Hz

Maximum signal frequency if the axis is not automatic

osgVisualizer.displayMainPowerDensityMap

bool

false

Display a power density map for the transmission medium, can be enabled with dimensional analog models only

osgVisualizer.mainPowerDensityMapPixmapDensity

double

1

Pixmap relative resolution

osgVisualizer.mainPowerDensityMapMinX

double

0

Minimum X coordinate

osgVisualizer.mainPowerDensityMapMaxX

double

nan

Maximum X coordinate, compound module size by default

osgVisualizer.mainPowerDensityMapMinY

double

0

Minimum Y coordinate

osgVisualizer.mainPowerDensityMapMaxY

double

nan

Maximum Y coordinate, compound module size by default

osgVisualizer.mainPowerDensityMapZ

double

0

Z coordinate

osgVisualizer.mainPowerDensityMapFigureXTickCount

int

3

Number of ticks along the X-axis

osgVisualizer.mainPowerDensityMapFigureYTickCount

int

3

Number of ticks along the Y-axis

osgVisualizer.displayPowerDensityMaps

bool

false

Display power density maps at the nodes, can be enabled with dimensional analog models only

osgVisualizer.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

osgVisualizer.powerDensityMapPixelMode

string

“mean”

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

osgVisualizer.powerDensityMapApproximationSize

int

10

Medium power density function approximation along the X and Y axes

osgVisualizer.powerDensityMapCenterFrequency

double

nan Hz

Center frequency of medium power density sampling or integration

osgVisualizer.powerDensityMapBandwidth

double

0 Hz

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

osgVisualizer.powerDensityMapFigureWidth

double

200

Plot figure width in pixels

osgVisualizer.powerDensityMapFigureHeight

double

120

Plot figure height in pixels

osgVisualizer.powerDensityMapPixmapWidth

double

powerDensityMapFigureWidth

Pixmap resolution width

osgVisualizer.powerDensityMapPixmapHeight

double

powerDensityMapFigureHeight

Pixmap resolution height

osgVisualizer.powerDensityMapZ

double

0

Z coordinate

osgVisualizer.powerDensityMapFigureXTickCount

int

3

Number of ticks along the X-axis

osgVisualizer.powerDensityMapFigureYTickCount

int

3

Number of ticks along the Y-axis

osgVisualizer.displaySpectrums

bool

false

Display power spectral density at the nodes, can be enabled with dimensional analog models only

osgVisualizer.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

osgVisualizer.spectrumFigureWidth

double

200

Plot figure width in pixels

osgVisualizer.spectrumFigureHeight

double

120

Plot figure height in pixels

osgVisualizer.spectrumFigureXTickCount

int

3

Number of ticks along the X-axis

osgVisualizer.spectrumFigureYTickCount

int

5

Number of ticks along the Y-axis

osgVisualizer.spectrumFigureInterpolationSize

double

5

Power spectrum density interpolation distance along the frequency axis

osgVisualizer.spectrumPlacementHint

string

“bottomCenter”

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

osgVisualizer.spectrumPlacementPriority

double

-1

Determines the order of annotation positioning

osgVisualizer.displaySpectrograms

bool

false

Display power density spectrograms at the nodes, can be enabled with dimensional analog models only

osgVisualizer.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

osgVisualizer.spectrogramPixelMode

string

“mean”

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

osgVisualizer.spectrogramFigureWidth

double

200

Plot figure width in pixels

osgVisualizer.spectrogramFigureHeight

double

120

Plot figure height in pixels

osgVisualizer.spectrogramPixmapWidth

double

spectrogramFigureWidth

Pixmap resolution width

osgVisualizer.spectrogramPixmapHeight

double

spectrogramFigureHeight

Pixmap resolution height

osgVisualizer.spectrogramFigureXTickCount

int

3

Number of ticks along the X-axis

osgVisualizer.spectrogramFigureYTickCount

int

5

Number of ticks along the Y-axis

osgVisualizer.spectrogramPlacementHint

string

“bottomCenter”

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

osgVisualizer.spectrogramPlacementPriority

double

-1

Determines the order of annotation positioning

osgVisualizer.signalShape

string

“ring”

Shape for displaying signals

osgVisualizer.signalPlane

string

“xy”

Plane for 2-dimensional signal shapes

osgVisualizer.signalFadingDistance

double

100m

Distance parameter for exponential opacity decreasing

osgVisualizer.signalFadingFactor

double

1.5

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

osgVisualizer.signalWaveLength

double

100m

Distance between signal waves, value must be in the range (0, +inf)

osgVisualizer.signalWaveAmplitude

double

0.5

Relative opacity amplitude of signal waves, value must be in the range [0, 1]

osgVisualizer.signalWaveFadingAnimationSpeedFactor

double

1.0

Value must be in the range [0, 1]

osgVisualizer.transmissionPlane

string

“camera”

Plane for transmission image

osgVisualizer.receptionPlane

string

“camera”

Plane for reception image

osgVisualizer.communicationRangePlane

string

“xy”

Plane for the transmission range circle

osgVisualizer.interferenceRangePlane

string

“xy”

Plane for the interference range circle

Source code

//
// Integrates canvas and osg medium visualizers into a single module.
//
// @see ~MediumCanvasVisualizer, ~MediumOsgVisualizer, ~MediumVisualizerBase, ~IMediumVisualizer
//
module MediumVisualizer like IMediumVisualizer
{
    parameters:
        @display("i=block/app");
        string visualizationTargetModule = default("^");
        string visualizationSubjectModule = default("^");
        *.visualizationTargetModule = default(absPath(this.visualizationTargetModule));
        *.visualizationSubjectModule = default(absPath(this.visualizationSubjectModule));
    submodules:
        canvasVisualizer: <default(firstAvailableOrEmpty("MediumCanvasVisualizer"))> like IMediumVisualizer if typename != "" {
            parameters:
                @display("p=100,100");
        }
        osgVisualizer: <default(firstAvailableOrEmpty("MediumOsgVisualizer"))> like IMediumVisualizer if typename != "" {
            parameters:
                @display("p=100,200");
        }
}

File: src/inet/visualizer/common/MediumVisualizer.ned