[General] network = inet.networks.tsn.TsnLinearNetwork sim-time-limit = 1s description = "Traffic shaping using time-aware shapers" **.displayGateSchedules = true **.gateFilter = "**.eth[1].**" **.gateScheduleVisualizer.height = 16 **.gateScheduleVisualizer.placementHint = "top" # client applications *.client.numApps = 2 *.client.app[*].typename = "UdpSourceApp" *.client.app[0].display-name = "best effort" *.client.app[1].display-name = "video" *.client.app[*].io.destAddress = "server" *.client.app[0].io.destPort = 1000 *.client.app[1].io.destPort = 1001 *.client.app[*].source.packetLength = 1000B - 54B # 54B = 8B (UDP) + 20B (IP) + 14B (ETH MAC) + 4B (ETH FCS) + 8B (ETH PHY) *.client.app[0].source.productionInterval = exponential(200us) # ~40Mbps *.client.app[1].source.productionInterval = exponential(400us) # ~20Mbps # server applications *.server.numApps = 2 *.server.app[*].typename = "UdpSinkApp" *.server.app[0].io.localPort = 1000 *.server.app[1].io.localPort = 1001 # enable outgoing streams *.client.hasOutgoingStreams = true # client stream identification *.client.bridging.streamIdentifier.identifier.mapping = [{stream: "best effort", packetFilter: expr(udp.destPort == 1000)}, {stream: "video", packetFilter: expr(udp.destPort == 1001)}] # client stream encoding *.client.bridging.streamCoder.encoder.mapping = [{stream: "best effort", pcp: 0}, {stream: "video", pcp: 4}] # enable egress traffic shaping *.switch.hasEgressTrafficShaping = true # disable forwarding IEEE 802.1Q C-Tag *.switch.bridging.directionReverser.reverser.excludeEncapsulationProtocols = ["ieee8021qctag"] # time-aware traffic shaping *.switch.eth[*].macLayer.queue.numTrafficClasses = 2 *.switch.eth[*].macLayer.queue.*[0].display-name = "best effort" *.switch.eth[*].macLayer.queue.*[1].display-name = "video" *.switch.eth[*].macLayer.queue.transmissionGate[0].offset = 0ms *.switch.eth[*].macLayer.queue.transmissionGate[0].durations = [4ms, 6ms] # period is 10 *.switch.eth[*].macLayer.queue.transmissionGate[1].offset = 6ms *.switch.eth[*].macLayer.queue.transmissionGate[1].durations = [2ms, 8ms]