Package: inet.node.tsn
TsnDevice
compound moduleThis module represents a Time-Sensitive Networking (TSN) hardware end device that supports time synchronization, per-stream filtering and policing, scheduling and traffic shaping, frame replication and elimination, frame preemption for Ethernet networks. All TSN features are optional and they can be combined with other Ethernet features.
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 |
---|---|---|
StandardHost | compound module |
IPv4 host with SCTP, TCP, UDP layers and applications. IP forwarding is disabled by default (see forwarding). |
Parameters
Name | Type | Default value | Description |
---|---|---|---|
hasStatus | 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 | |
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 |
Properties
Name | Value | Description |
---|---|---|
networkNode | ||
labels | node | |
class | NodeBase | |
display | i=device/card |
change icon to emphasise 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.initialStatus | string | "UP" |
TODO @signal, @statistic |
pcapRecorder.verbose | bool | true |
whether to log packets on the module output |
pcapRecorder.pcapFile | string | "" |
the PCAP file to be written |
pcapRecorder.fileFormat | string | "pcapng" | |
pcapRecorder.snaplen | int | 65535 |
maximum number of bytes to record per packet |
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 | "packetSentToLower" |
space-separated list of outbound packet signals to subscribe to |
pcapRecorder.receivingSignalNames | string | "packetReceivedFromLower" |
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 |
pcapRecorder.displayStringTextFormat | string | "rec: %n pks" | |
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 |
cb.forwardServiceRegistration | bool | true | |
cb.forwardProtocolRegistration | bool | true | |
bl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
bl.forwardServiceRegistration | bool | true | |
bl.forwardProtocolRegistration | bool | true | |
li.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
li.forwardServiceRegistration | bool | true | |
li.forwardProtocolRegistration | bool | true | |
eth.bitrate | double | ||
nl.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
nl.forwardServiceRegistration | bool | true | |
nl.forwardProtocolRegistration | bool | true | |
tn.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
tn.forwardServiceRegistration | bool | true | |
tn.forwardProtocolRegistration | bool | true | |
at.displayStringTextFormat | string | "processed %p pk (%l)" |
determines the text that is written on top of the submodule |
at.forwardServiceRegistration | bool | true | |
at.forwardProtocolRegistration | bool | true |
Source code
// // This module represents a Time-Sensitive Networking (TSN) hardware end device // that supports time synchronization, per-stream filtering and policing, scheduling // and traffic shaping, frame replication and elimination, frame preemption for // Ethernet networks. All TSN features are optional and they can be combined with // other Ethernet features. // 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 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(hasEgressTrafficShaping ? "Ieee8021qTimeAwareShaper" : (hasFramePreemption ? "" : "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(hasIncomingStreams || hasOutgoingStreams || hasStreamRedundancy || hasIngressTrafficFiltering || hasEgressTrafficFiltering ? "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 numberinf 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 endocing/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 emphasise 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