From 47f6ebf1eaed85b52aa3edd0a828058f315b4eb0 Mon Sep 17 00:00:00 2001 From: Levente Meszaros Date: Tue, 26 Mar 2024 10:37:02 +0100 Subject: [PATCH] StreamRedundancyConfigurator: Added destination address to stream decoding parameters. Without the destination, the stream decoding sometimes confused multiple streams with each other. --- .../configurator/common/StreamRedundancyConfigurator.cc | 2 ++ .../configurator/common/StreamRedundancyConfigurator.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/inet/linklayer/configurator/common/StreamRedundancyConfigurator.cc b/src/inet/linklayer/configurator/common/StreamRedundancyConfigurator.cc index 8fe12711a684..8753c8f96a03 100644 --- a/src/inet/linklayer/configurator/common/StreamRedundancyConfigurator.cc +++ b/src/inet/linklayer/configurator/common/StreamRedundancyConfigurator.cc @@ -224,6 +224,7 @@ void StreamRedundancyConfigurator::computeStreamPolicyConfigurations(cValueMap * streamDecoding.name = inputStreamName; streamDecoding.networkInterface = linkIn->destinationInterface->networkInterface; streamDecoding.vlanId = vlanId; + streamDecoding.destination = destinationAddress; if (streamDecoding.vlanId > maxVlanId) throw cRuntimeError("Cannot assign VLAN ID in the available range"); node->streamDecodings.push_back(streamDecoding); @@ -300,6 +301,7 @@ void StreamRedundancyConfigurator::configureStreams(Node *node) value->set("interface", streamDecoding.networkInterface->getInterfaceName()); value->set("vlan", streamDecoding.vlanId); value->set("stream", streamDecoding.name.c_str()); + value->set("destination", streamDecoding.destination.c_str()); parameterValue->add(value); } EV_INFO << "Configuring stream decoding" << EV_FIELD(networkNode) << EV_FIELD(streamDecoder) << EV_FIELD(parameterValue) << EV_ENDL; diff --git a/src/inet/linklayer/configurator/common/StreamRedundancyConfigurator.h b/src/inet/linklayer/configurator/common/StreamRedundancyConfigurator.h index ebd76888e9b7..381b69b53950 100644 --- a/src/inet/linklayer/configurator/common/StreamRedundancyConfigurator.h +++ b/src/inet/linklayer/configurator/common/StreamRedundancyConfigurator.h @@ -28,6 +28,7 @@ class INET_API StreamRedundancyConfigurator : public NetworkConfiguratorBase NetworkInterface *networkInterface = nullptr; int vlanId = -1; std::string name; + std::string destination; }; class INET_API StreamMerging