Skip to content

Commit

Permalink
StreamRedundancyConfigurator: Added destination address to stream dec…
Browse files Browse the repository at this point in the history
…oding parameters.

Without the destination, the stream decoding sometimes confused multiple streams with each other.
  • Loading branch information
levy committed Mar 26, 2024
1 parent c499cfd commit 47f6ebf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 47f6ebf

Please sign in to comment.