TsnDevice

Package: inet.node.tsn

TsnDevice

compound module

An end device with Time-Sensitive Networking (TSN) capabilities. It extends the StandardHost with various TSN features defined in the IEEE 802.1 standards suite for deterministic, low-latency communication over Ethernet networks.

This module represents a hardware end device (such as a sensor, controller, or actuator) that participates in a TSN network. It supports a comprehensive set of TSN features, all of which are optional and can be enabled or disabled individually. The device can be configured with time synchronization, traffic filtering and shaping, stream redundancy, and frame preemption capabilities.

Key features:

  • IEEE 802.1AS time synchronization as a slave node
  • IEEE 802.1Qci per-stream filtering and policing for both ingress and egress traffic
  • IEEE 802.1Q traffic shaping
  • IEEE 802.1CB frame replication and elimination for seamless redundancy
  • IEEE 802.1Qbu frame preemption for reduced latency of critical traffic
  • Cut-through switching support for minimal latency

<b>See also:</b> ~TsnSwitch, ~TsnClock

status : NodeStatus

Keeps track of the status of the network node (up, down, etc.) for other modules, and also displays...

Source:
status: NodeStatus if hasStatus {
    @display("p=125,80;is=s");
} clock : like IClock

IClock: Interface for clock models.

Source:
clock: <default("")> like IClock if typename != "" {
    @display("p=125,320;is=s");
} energyStorage : like IEnergyStorage

IEnergyStorage: The energy storage models describe devices that absorb energy produced by generators, and provide...

Source:
energyStorage: <default("")> like IEnergyStorage if typename != "" {
    @display("p=125,400;is=s");
} energyManagement : like IEnergyManagement

IEnergyManagement: The energy management models monitor an energy storage, estimate its state, and control the...

Source:
energyManagement: <default("")> like IEnergyManagement if typename != "" {
    @display("p=125,480;is=s");
} energyGenerator : like IEnergyGenerator

IEnergyGenerator: The energy generator models describe the energy generation process of devices over time.

Source:
energyGenerator: <default("")> like IEnergyGenerator if typename != "" {
    @display("p=125,560;is=s");
} mobility : like IMobility

IMobility: The module interface for mobility models.

Source:
mobility: <default("")> like IMobility if typename != "" {
    @display("p=125,160;is=s");
} measurer : like IMeasurer

IMeasurer: Interface for all standalone measurement modules.

Source:
measurer: <default("")> like IMeasurer if typename != "" {
    @display("p=125,640;is=s");
} environment : ExternalEnvironment

Executes a setup command on the host OS during initialization and another teardown command during...

Source:
environment: ExternalEnvironment if hasEnvironment {
    @display("p=125,800;is=s");
} pcapRecorder[numPcapRecorders] : PcapRecorder

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

Source:
pcapRecorder[numPcapRecorders]: PcapRecorder {
    @display("p=125,720;is=s");
} interfaceTable : InterfaceTable

Keeps the table of network interfaces.

Source:
interfaceTable: InterfaceTable {
    @display("p=125,240;is=s");
} llc : like IIeee8022Llc

Source:
llc: <default("")> like IIeee8022Llc if typename != "" {
    @display("p=375,525");
} cb : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
cb: MessageDispatcher {
    @display("p=750,600;b=1000,5");
} bridging : like IProtocolLayer

IProtocolLayer: Interface for all protocol layer modules that connect to a higher and to a lower protocol layer,...

Source:
bridging: <default("")> like IProtocolLayer if typename != "" {
    @display("p=750,675");
} bl : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
bl: MessageDispatcher {
    @display("p=750,750;b=1000,5");
} ethernet : like IEthernetLayer

IEthernetLayer: Module interface for Ethernet protocol layer implementations.

Source:
ethernet: <default(sizeof(ethg) > 0 ? "EthernetEncapsulation" : "")> like IEthernetLayer if typename != "" {
    @display("p=375,825");
} ieee8021q : like IIeee8021qLayer

Source:
ieee8021q: <default("")> like IIeee8021qLayer if typename != "" {
    @display("p=525,825");
} ieee8021r : like IIeee8021rLayer

Source:
ieee8021r: <default("")> like IIeee8021rLayer if typename != "" {
    @display("p=675,825");
} li : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
li: MessageDispatcher {
    @display("p=750,900;b=1000,5,,,,1");
} lo[numLoInterfaces] : like ILoopbackInterface

LoopbackInterface: Implements a loopback network interface.

ILoopbackInterface: Interface for loopback network interfaces.

Source:
lo[numLoInterfaces]: <default("LoopbackInterface")> like ILoopbackInterface {
    @display("p=750,975,row,150");
} wlan[numWlanInterfaces] : like IWirelessInterface

Ieee80211Interface: Implements an IEEE 802.11 network interface.

IWirelessInterface: Interface for wireless network interfaces.

Source:
wlan[numWlanInterfaces]: <default("Ieee80211Interface")> like IWirelessInterface {
    @display("p=375,1000,row,150;q=queue");
} ppp[sizeof(pppg)] : like IPppInterface

PppInterface: Implements a PPP network interface.

IPppInterface: Interface for PPP network interfaces.

Source:
ppp[sizeof(pppg)]: <default("PppInterface")> like IPppInterface {
    @display("p=300,975,row,150;q=txQueue");
} eth[sizeof(ethg)] : like IEthernetInterface

EthernetInterface: Represents an Ethernet network interface.

IEthernetInterface: Interface for Ethernet network interfaces.

Source:
eth[sizeof(ethg)]: <default("EthernetInterface")> like IEthernetInterface {
    @display("p=900,975,row,150;q=txQueue");
} tun[numTunInterfaces] : like ITunnelInterface

TunInterface: Implements a (simulated) TUN network interface.

ITunnelInterface: Interface for tunnel network interfaces.

Source:
tun[numTunInterfaces]: <default("TunInterface")> like ITunnelInterface {
    @display("p=975,1000,row,150;q=txQueue");
} virt[numVirtInterfaces] : like IVirtualInterface

VirtualInterface: Implements a virtual network interface.

IVirtualInterface: Interface for virtual network interfaces.

Source:
virt[numVirtInterfaces]: <default("VirtualInterface")> like IVirtualInterface {
    @display("p=975,1000,row,150;q=txQueue");
} ipv4 : like INetworkLayer

Ipv4NetworkLayer: Network layer of an IPv4 node.

Source:
ipv4: <default("Ipv4NetworkLayer")> like INetworkLayer if hasIpv4 {
    @display("p=375,375;q=queue");
} ipv6 : like INetworkLayer

Ipv6NetworkLayer: Represents an IPv6 network layer (L3).

Source:
ipv6: <default("Ipv6NetworkLayer")> like INetworkLayer if hasIpv6 {
    @display("p=525,375;q=queue");
} generic : like INetworkLayer

Source:
generic: <default("")> like INetworkLayer if hasGn {
    @display("p=675,375;q=queue");
} nl : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
nl: MessageDispatcher {
    @display("p=750,450;b=1000,5,,,,1");
} udp : like IUdp

IUdp: UDP protocol interface.

Source:
udp: <default(firstAvailableOrEmpty("Udp"))> like IUdp if hasUdp {
    @display("p=375,225");
} tcp : like ITcp

ITcp: Interface for TCP protocol implementations.

Source:
tcp: <default(firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc"))> like ITcp if hasTcp {
    @display("p=525,225");
} sctp : like ISctp

ISctp: Interface for SCTP protocol.

Source:
sctp: <default(firstAvailableOrEmpty("Sctp"))> like ISctp if hasSctp {
    @display("p=675,225");
} quic : like IQuic

IQuic: QUIC protocol interface.

Source:
quic: <default(firstAvailableOrEmpty("Quic"))> like IQuic if hasQuic {
    @display("p=825,226");
} tn : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
tn: MessageDispatcher {
    @display("p=750,300;b=1000,5,,,,1");
} app[numApps] : like IApp

IApp: Generic application interface.

Source:
app[numApps]: <> like IApp {
    @display("p=375,75,row,150");
} at : MessageDispatcher

Facilitates the interconnection of applications, protocols, and network interfaces, dispatching...

Source:
at: MessageDispatcher {
    @display("p=750,150;b=1000,5,,,,1");
} gptp : like IApp

Gptp: Implements the generalized Precision Time Protocol (gPTP) as defined in the IEEE 802.1AS-2020...

IApp: Generic application interface.

Source:
gptp: <default("Gptp")> like IApp if hasTimeSynchronization {
    gptpNodeType = default("SLAVE_NODE");
    slavePort = default("eth0");
    masterPorts = default([]);
    @display("p=700,75");
}

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.

Used in

Name Type Description
AsynchronousShaperValidation network (no description)
AsynchronousShaperValidation network (no description)
AutomaticFailureProtectionShowcase network (no description)
AutomaticFailureProtectionShowcase network (no description)
AutomaticMultipathConfigurationShowcase network (no description)
CreditBasedShaperValidation network (no description)
CutthroughSwitchingShowcase network (no description)
FrameReplicationValidation network (no description)
FrerAndTasShowcase network (no description)
GptpAndTasShowcase network (no description)
ManualConfigurationShowcase network (no description)
OneMasterClockGptpShowcase network (no description)
TimeAwareShapingShowcaseNetwork network (no description)
TwoMasterClocksRingGptpShowcase network (no description)
TwoMasterClocksTreeGptpShowcase network (no description)

Extends

Name Type Description
StandardHost compound module

A comprehensive model of an IPv4/IPv6 host that provides a complete network stack with configurable application, transport, network, and link layers. It supports multiple network interfaces, protocols, and applications that can be customized through parameters.

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

hasStatus bool false
hasEnvironment bool false
osgModel string ""

3D model for OSG visualization, no 3D model by default

osgModelColor string ""

Tint color, no colorization by default

canvasImage string ""

Image for canvas visualization, no image by default

canvasImageColor string ""

Tint color, no colorization by default

recordPcap bool false
numPcapRecorders int recordPcap ? 1 : 0
numLoInterfaces int 1
numWlanInterfaces int 0
numEthInterfaces int 0

Minimum number of Ethernet interfaces

numPppInterfaces int 0

Minimum number of PPP interfaces

numTunInterfaces int 0
numVirtInterfaces int 0
fcsMode string "declared"
hasIpv4 bool true
hasIpv6 bool false
hasGn bool false
forwarding bool false
multicastForwarding bool false
hasUdp bool firstAvailableOrEmpty("Udp") != ""
hasTcp bool firstAvailableOrEmpty("Tcp", "TcpLwip", "TcpNsc") != ""
hasSctp bool false
hasQuic bool false
numApps int 0
hasTimeSynchronization bool false

Enable IEEE 802.1 AS time synchronization

hasIngressTrafficFiltering bool false

Enable IEEE 802.1 Qci ingress per-stream filtering

hasEgressTrafficFiltering bool false

Enable IEEE 802.1 Qci egress per-stream filtering

hasEgressTrafficShaping bool false

Enable IEEE 802.1 egress traffic shaping (credit based shaping, time-aware shaping, asynchronous shaping)

hasStreamRedundancy bool false

Enable IEEE 802.1 CB frame replication and elimination

hasIncomingStreams bool false

Enable IEEE 802.1 stream decoding

hasOutgoingStreams bool false

Enable IEEE 802.1 stream identification and stream encoding

hasFramePreemption bool false

Enable IEEE 802.1 Qbu frame preemption

hasCutthroughSwitching bool false

Enable cut-through switching support

hasBridging bool hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy || hasIngressTrafficFiltering || hasEgressTrafficFiltering

Properties

Name Value Description
class NodeBase
networkNode
labels node
display i=device/card

Change icon to emphasize hardware device

Gates

Name Direction Size Description
radioIn [ ] input numWlanInterfaces
pppg [ ] inout numPppInterfaces
ethg [ ] inout numEthInterfaces

Unassigned submodule parameters

Name Type Default value Description
status.displayStringTextFormat string ""

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

status.initialStatus string "UP"

TODO @signal, @statistic

environment.displayStringTextFormat string ""

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

environment.initStage int 0

Initialization stage for the setup command

environment.globalNamespace bool false

Create new network namespaces under /var/run/netns/ (Linux only)

environment.namespace string ""

Name of the host OS network namespace (optional) (Linux only)

environment.setupCommand string ""

A host OS system command

environment.teardownCommand string ""

A host OS system command

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.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

Space-separated list of sibling module names to listen on

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

interfaceTable.displayStringTextFormat string ""

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

interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

cb.displayStringTextFormat string "processed %p pk (%l)"

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

cb.interfaceTableModule string

Module path to the ~InterfaceTable module

cb.forwardServiceRegistration bool true
cb.forwardProtocolRegistration bool true
cb.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

cb.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

cb.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

bl.displayStringTextFormat string "processed %p pk (%l)"

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

bl.interfaceTableModule string

Module path to the ~InterfaceTable module

bl.forwardServiceRegistration bool true
bl.forwardProtocolRegistration bool true
bl.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

bl.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

bl.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

li.displayStringTextFormat string "processed %p pk (%l)"

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

li.interfaceTableModule string

Module path to the ~InterfaceTable module

li.forwardServiceRegistration bool true
li.forwardProtocolRegistration bool true
li.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

li.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

li.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

eth.bitrate double
nl.displayStringTextFormat string "processed %p pk (%l)"

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

nl.interfaceTableModule string

Module path to the ~InterfaceTable module

nl.forwardServiceRegistration bool true
nl.forwardProtocolRegistration bool true
nl.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

nl.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

nl.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

tn.displayStringTextFormat string "processed %p pk (%l)"

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

tn.interfaceTableModule string

Module path to the ~InterfaceTable module

tn.forwardServiceRegistration bool true
tn.forwardProtocolRegistration bool true
tn.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

tn.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

tn.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

at.displayStringTextFormat string "processed %p pk (%l)"

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

at.interfaceTableModule string

Module path to the ~InterfaceTable module

at.forwardServiceRegistration bool true
at.forwardProtocolRegistration bool true
at.interfaceMapping object {}

Maps network interface names to connected submodule names (e.g. {"eth0": "bridging"}), overrides automatically learned dispatching; * overrides all learned network interfaces, ? overrides default

at.serviceMapping object {}

Maps protocols to connected submodule names (e.g. {"ethernetmac": "bridging"}), overrides automatically learned dispatching; * overrides all learned services, ? overrides default

at.protocolMapping object {}

Maps protocols to connected submodule names (e.g. {"ipv4": "bridging"}), overrides automatically learned dispatching; * overrides all learned protocols, ? overrides default

Source code

//
// An end device with Time-Sensitive Networking (TSN) capabilities. It extends
// the StandardHost with various TSN features defined in the IEEE 802.1
// standards suite for deterministic, low-latency communication over Ethernet
// networks.
//
// This module represents a hardware end device (such as a sensor, controller, or actuator)
// that participates in a TSN network. It supports a comprehensive set of TSN features,
// all of which are optional and can be enabled or disabled individually. The device can
// be configured with time synchronization, traffic filtering and shaping, stream redundancy,
// and frame preemption capabilities.
//
// Key features:
// - IEEE 802.1AS time synchronization as a slave node
// - IEEE 802.1Qci per-stream filtering and policing for both ingress and egress traffic
// - IEEE 802.1Q traffic shaping
// - IEEE 802.1CB frame replication and elimination for seamless redundancy
// - IEEE 802.1Qbu frame preemption for reduced latency of critical traffic
// - Cut-through switching support for minimal latency
//
// @see ~TsnSwitch, ~TsnClock
//
module TsnDevice extends StandardHost
{
    parameters:
        bool hasTimeSynchronization = default(false); // Enable IEEE 802.1 AS time synchronization
        bool hasIngressTrafficFiltering = default(false); // Enable IEEE 802.1 Qci ingress per-stream filtering
        bool hasEgressTrafficFiltering = default(false); // Enable IEEE 802.1 Qci egress per-stream filtering
        bool hasEgressTrafficShaping = default(false); // Enable IEEE 802.1 egress traffic shaping (credit based shaping, time-aware shaping, asynchronous shaping)
        bool hasStreamRedundancy = default(false); // Enable IEEE 802.1 CB frame replication and elimination
        bool hasIncomingStreams = default(false); // Enable IEEE 802.1 stream decoding
        bool hasOutgoingStreams = default(false); // Enable IEEE 802.1 stream identification and stream encoding
        bool hasFramePreemption = default(false); // Enable IEEE 802.1 Qbu frame preemption
        bool hasCutthroughSwitching = default(false); // Enable cut-through switching support
        bool hasBridging = default(hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy || hasIngressTrafficFiltering || hasEgressTrafficFiltering);
        clock.typename = default(hasTimeSynchronization ? "SettableClock" : ""); // Enable explicit local clock model
        ethernet.typename = default("EthernetLayer"); // Use Ethernet protocol layer outside of network interfaces
        eth[*].typename = default("LayeredEthernetInterface"); // Switch to modular Ethernet interface
        eth[*].macLayer.typename = default(hasFramePreemption ? "EthernetPreemptingMacLayer" : "EthernetMacLayer");
        eth[*].macLayer.queue.typename = default(hasFramePreemption ? "" : (hasEgressTrafficShaping ? "Ieee8021qTimeAwareShaper" : "PacketQueue")); // Use priority queue having multiple subqueues controlled by separate gates
        eth[*].phyLayer.typename = default(hasCutthroughSwitching ? "EthernetStreamingPhyLayer" : (hasFramePreemption ? "EthernetPreemptingPhyLayer" : "EthernetPhyLayer")); // Use packet streaming when cut-through switching is enabled
        bridging.typename = default(hasBridging ? "BridgingLayer" : ""); // Switch to modular bridging
        bridging.interfaceRelay.typename = default(""); // Disable frame relaying
        bridging.streamIdentifier.typename = default(hasOutgoingStreams || hasStreamRedundancy ? "StreamIdentifierLayer" : ""); // Enable stream identification when stream redundancy is enabled
        bridging.streamIdentifier.identifier.hasSequenceNumbering = default(hasStreamRedundancy); // Enable sequence numbering if stream redundancy is enabled
        bridging.streamRelay.typename = default(hasStreamRedundancy ? "StreamRelayLayer" : ""); // Enable stream merging and stream splitting when stream redundancy is enabled
        bridging.streamFilter.typename = default(hasIngressTrafficFiltering || hasEgressTrafficFiltering ? "StreamFilterLayer" : ""); // Enable stream filtering when ingress or egress per-stream filtering is enabled
        bridging.streamFilter.ingress.typename = default(hasIngressTrafficFiltering ? "SimpleIeee8021qFilter" : ""); // Use IEEE 802.1 Qci ingress filter when ingress per-stream filtering is enabled
        bridging.streamFilter.egress.typename = default(hasEgressTrafficFiltering ? "SimpleIeee8021qFilter" : ""); // Use IEEE 802.1 Qci egress filter when egress per-stream filtering is enabled
        bridging.streamCoder.typename = default(hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy ? "StreamCoderLayer" : ""); // Enable stream encoding/decoding when stream redundancy is enabled
        ieee8021r.typename = default(hasStreamRedundancy ? "Ieee8021rProtocol" : "");
        ieee8021q.typename = default(hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy ? "Ieee8021qProtocol" : "");
        @display("i=device/card"); // Change icon to emphasize hardware device
    submodules:
        gptp: <default("Gptp")> like IApp if hasTimeSynchronization {
            gptpNodeType = default("SLAVE_NODE");
            slavePort = default("eth0");
            masterPorts = default([]);
            @display("p=700,75");
        }
    connections:
        if hasTimeSynchronization {
            gptp.socketOut --> at.in++;
            at.out++ --> gptp.socketIn;
        }
}
File: src/inet/node/tsn/TsnDevice.ned