InVehicleNetworkShowcase

Package: inet.showcases.tsn.combiningfeatures.invehicle

InVehicleNetworkShowcase

network

(no description)

pcapRecorder[numPcapRecorders] : PcapRecorder

Records PCAP traces of frames sent/received by other modules within the same host.

Source:
pcapRecorder[numPcapRecorders]: PcapRecorder {
    parameters:
        moduleNamePatterns = ".^";
        @display("p=100,100;is=s");
} visualizer : like IIntegratedVisualizer

IIntegratedVisualizer: Interface allows configuring different ~IIntegratedVisualizer submodules from INI files.

Source:
visualizer: <default(firstAvailableOrEmpty("IntegratedCanvasVisualizer"))> like IIntegratedVisualizer if typename != "" {
    parameters:
        @display("p=100,200;is=s");
} configurator : like IL3NetworkConfigurator

Ipv4NetworkConfigurator: Assigns IPv4 addresses and sets up static routing for an IPv4 network.

IL3NetworkConfigurator: Interface for all layer 3 network configurators.

Source:
configurator: <default("Ipv4NetworkConfigurator")> like IL3NetworkConfigurator if typename != "" {
    parameters:
        @display("p=100,300;is=s");
} moduleDump[numModuleDumps] : ModuleDump

Source:
moduleDump[numModuleDumps]: ModuleDump {
    parameters:
        @display("p=100,400;is=s");
} macForwardingTableConfigurator : like INetworkConfigurator

INetworkConfigurator: Interface for all network-wide configurator modules.

Source:
macForwardingTableConfigurator: <default(hasGlobalArp ? "MacForwardingTableConfigurator" : "")> like INetworkConfigurator if typename != "" {
    @display("p=100,400;is=s");
} gateScheduleConfigurator : like IGateScheduleConfigurator

IGateScheduleConfigurator: Interface for gate scheduling configurator modules.

Source:
gateScheduleConfigurator: <default("")> like IGateScheduleConfigurator if typename != "" {
    @display("p=100,500;is=s");
} streamRedundancyConfigurator : like INetworkConfigurator

INetworkConfigurator: Interface for all network-wide configurator modules.

Source:
streamRedundancyConfigurator: <default("")> like INetworkConfigurator if typename != "" {
    @display("p=100,600;is=s");
} failureProtectionConfigurator : like INetworkConfigurator

INetworkConfigurator: Interface for all network-wide configurator modules.

Source:
failureProtectionConfigurator: <default("")> like INetworkConfigurator if typename != "" {
    @display("p=100,700;is=s");
} frontSwitch : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
frontSwitch: <> like IEthernetNetworkNode {
    @display("p=750,350");
} frontLeftSwitch : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
frontLeftSwitch: <> like IEthernetNetworkNode {
    @display("p=900,275");
} frontRightSwitch : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
frontRightSwitch: <> like IEthernetNetworkNode {
    @display("p=900,417");
} rearSwitch : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
rearSwitch: <> like IEthernetNetworkNode {
    @display("p=475,350");
} rearLeftSwitch : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
rearLeftSwitch: <> like IEthernetNetworkNode {
    @display("p=375,300");
} rearRightSwitch : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
rearRightSwitch: <> like IEthernetNetworkNode {
    @display("p=375,400");
} obu : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
obu: <> like IEthernetNetworkNode {
    @display("p=525,275");
} rearDisplay : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
rearDisplay: <> like IEthernetNetworkNode {
    @display("p=525,435");
} hud : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
hud: <> like IEthernetNetworkNode {
    @display("p=700,275");
} steering : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
steering: <> like IEthernetNetworkNode {
    @display("p=775,275");
} engineActuator : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
engineActuator: <> like IEthernetNetworkNode {
    @display("p=750,425");
} lidar : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
lidar: <> like IEthernetNetworkNode {
    @display("p=1000,350");
} rearLeftCamera : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
rearLeftCamera: <> like IEthernetNetworkNode {
    @display("p=275,250");
} frontLeftCamera : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
frontLeftCamera: <> like IEthernetNetworkNode {
    @display("p=1000,250");
} rearRightCamera : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
rearRightCamera: <> like IEthernetNetworkNode {
    @display("p=275,475");
} frontRightCamera : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
frontRightCamera: <> like IEthernetNetworkNode {
    @display("p=1000,475");
} rearLeftWheel : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
rearLeftWheel: <> like IEthernetNetworkNode {
    @display("p=400,200");
} frontLeftWheel : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
frontLeftWheel: <> like IEthernetNetworkNode {
    @display("p=850,200");
} rearRightWheel : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
rearRightWheel: <> like IEthernetNetworkNode {
    @display("p=400,525");
} frontRightWheel : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
frontRightWheel: <> like IEthernetNetworkNode {
    @display("p=850,525");
} masterClock : like IEthernetNetworkNode

IEthernetNetworkNode: Interface for all network nodes that have Ethernet connectivity.

Source:
masterClock: <> like IEthernetNetworkNode if typename != "" {
    @display("p=625,400;i=device/card");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

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

Extends

Name Type Description
TsnNetworkBase network

Serves as a network base module for Time-Sensitive Networking (TSN).

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

recordPcap bool false
numPcapRecorders int recordPcap ? 1 : 0
numModuleDumps int 0
hasGlobalArp bool true
brokenComponent string "none"

Properties

Name Value Description
class NetworkBase
isNetwork
display bgi=background/car;bgb=1280,720

Unassigned submodule parameters

Name Type Default value Description
pcapRecorder.displayStringTextFormat string "rec: %n pks"

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

pcapRecorder.verbose bool true

Whether to log packets on the module output

pcapRecorder.recordEmptyPackets bool true

Specifies if zero length packets are recorded or not

pcapRecorder.enableConvertingPackets bool true

Specifies if converting packets to link type is allowed or not

pcapRecorder.pcapFile string ""

The PCAP file to be written, suggested value: pcapFile = "${resultdir}/${configname}-#${runnumber}" + fullpath() + ".pcap"

pcapRecorder.fileFormat string "pcapng"
pcapRecorder.snaplen int 65535

Maximum number of bytes to record per packet

pcapRecorder.timePrecision int 6

Time precision in recorded file. pcap supports only 6 (usec) or 9 (nanosec), pcapng supports more values (see 'if_tsresol' option in pcapng file format).

pcapRecorder.dumpBadFrames bool true

Enable dump of frames with hasBitError

pcapRecorder.sendingSignalNames string "transmissionEnded"

Space-separated list of outbound packet signals to subscribe to

pcapRecorder.receivingSignalNames string "receptionEnded"

Space-separated list of inbound packet signals to subscribe to

pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

Space-separated list of protocol names as defined in the Protocol class

pcapRecorder.packetFilter object "*"

Which packets are considered, matches all packets by default

pcapRecorder.helpers string ""

Usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

pcapRecorder.alwaysFlush bool false

Flush the pcapFile after each write to ensure that all packets are captured in case of a crash

moduleDump.modulePath string "^"
moduleDump.fileName string ""
moduleDump.time double 0
moduleDump.printClassNames bool false
moduleDump.printProperties bool false
moduleDump.printParamAssignmentLocations bool false
frontSwitch.numEthInterfaces int
frontLeftSwitch.numEthInterfaces int
frontRightSwitch.numEthInterfaces int
rearSwitch.numEthInterfaces int
rearLeftSwitch.numEthInterfaces int
rearRightSwitch.numEthInterfaces int
obu.numEthInterfaces int
rearDisplay.numEthInterfaces int
hud.numEthInterfaces int
steering.numEthInterfaces int
engineActuator.numEthInterfaces int
lidar.numEthInterfaces int
rearLeftCamera.numEthInterfaces int
frontLeftCamera.numEthInterfaces int
rearRightCamera.numEthInterfaces int
frontRightCamera.numEthInterfaces int
rearLeftWheel.numEthInterfaces int
frontLeftWheel.numEthInterfaces int
rearRightWheel.numEthInterfaces int
frontRightWheel.numEthInterfaces int
masterClock.numEthInterfaces int

Source code

network InVehicleNetworkShowcase extends TsnNetworkBase
{
    parameters:
        string brokenComponent @enum("none","link","wheel","camera") = default("none");
        @display("bgi=background/car;bgb=1280,720");
    types:
        channel Eth1G extends inet.node.ethernet.Eth1G
        {
            @display("ls=,3");
        }
    submodules:
        frontSwitch: <> like IEthernetNetworkNode {
            @display("p=750,350");
        }
        frontLeftSwitch: <> like IEthernetNetworkNode {
            @display("p=900,275");
        }
        frontRightSwitch: <> like IEthernetNetworkNode {
            @display("p=900,417");
        }
        rearSwitch: <> like IEthernetNetworkNode {
            @display("p=475,350");
        }
        rearLeftSwitch: <> like IEthernetNetworkNode {
            @display("p=375,300");
        }
        rearRightSwitch: <> like IEthernetNetworkNode {
            @display("p=375,400");
        }
        obu: <> like IEthernetNetworkNode {
            @display("p=525,275");
        }
        rearDisplay: <> like IEthernetNetworkNode {
            @display("p=525,435");
        }
        hud: <> like IEthernetNetworkNode {
            @display("p=700,275");
        }
        steering: <> like IEthernetNetworkNode {
            @display("p=775,275");
        }
        engineActuator: <> like IEthernetNetworkNode {
            @display("p=750,425");
        }
        lidar: <> like IEthernetNetworkNode {
            @display("p=1000,350");
        }
        rearLeftCamera: <> like IEthernetNetworkNode {
            @display("p=275,250");
        }
        frontLeftCamera: <> like IEthernetNetworkNode {
            @display("p=1000,250");
        }
        rearRightCamera: <> like IEthernetNetworkNode {
            @display("p=275,475");
        }
        frontRightCamera: <> like IEthernetNetworkNode {
            @display("p=1000,475");
        }
        rearLeftWheel: <> like IEthernetNetworkNode {
            @display("p=400,200");
        }
        frontLeftWheel: <> like IEthernetNetworkNode {
            @display("p=850,200");
        }
        rearRightWheel: <> like IEthernetNetworkNode {
            @display("p=400,525");
        }
        frontRightWheel: <> like IEthernetNetworkNode {
            @display("p=850,525");
        }
        masterClock: <> like IEthernetNetworkNode if typename != "" {
            @display("p=625,400;i=device/card");
        }
    connections:
        frontSwitch.ethg++ <--> Eth1G <--> hud.ethg++;
        frontSwitch.ethg++ <--> Eth1G { @display("m=m,40,40,40,40"); } <--> rearSwitch.ethg++;
        frontSwitch.ethg++ <--> Eth1G { @display("m=m,60,60,60,60"); } <--> rearSwitch.ethg++;
        frontSwitch.ethg++ <--> Eth1G <--> frontLeftSwitch.ethg++;
        frontSwitch.ethg++ <--> Eth1G <--> frontRightSwitch.ethg++;
        frontSwitch.ethg++ <--> Eth100M <--> lidar.ethg++;
        frontSwitch.ethg++ <--> Eth100M <--> steering.ethg++;
        frontSwitch.ethg++ <--> Eth100M <--> engineActuator.ethg++;
        rearSwitch.ethg++ <--> Eth1G <--> rearLeftSwitch.ethg++;
        rearSwitch.ethg++ <--> Eth1G <--> rearRightSwitch.ethg++;
        rearSwitch.ethg++ <--> Eth1G <--> obu.ethg++;
        rearSwitch.ethg++ <--> Eth100M <--> rearDisplay.ethg++;
        frontLeftSwitch.ethg++ <--> Eth1G <--> frontRightSwitch.ethg++;
        frontLeftSwitch.ethg++ <--> Eth100M <--> frontLeftWheel.ethg++;
        frontLeftSwitch.ethg++ <--> Eth100M <--> frontLeftCamera.ethg++;
        frontRightSwitch.ethg++ <--> Eth100M <--> frontRightWheel.ethg++;
        frontRightSwitch.ethg++ <--> Eth100M <--> frontRightCamera.ethg++;
        rearLeftSwitch.ethg++ <--> Eth1G <--> rearRightSwitch.ethg++;
        rearLeftSwitch.ethg++ <--> Eth100M <--> rearLeftCamera.ethg++;
        rearLeftSwitch.ethg++ <--> Eth100M <--> rearLeftWheel.ethg++;
        rearRightSwitch.ethg++ <--> Eth100M <--> rearRightCamera.ethg++;
        rearRightSwitch.ethg++ <--> Eth100M <--> rearRightWheel.ethg++;
        masterClock.ethg++ <--> Eth100M <--> frontSwitch.ethg++ if exists(masterClock);
}
File: showcases/tsn/combiningfeatures/invehicle/InVehicleNetworkShowcase.ned