From 09312c200b78c6b441b577911743f75921fef5b3 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 27 May 2015 20:43:48 +0200 Subject: Add and enable TII insertion for testing --- src/SignalMultiplexer.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/SignalMultiplexer.cpp') diff --git a/src/SignalMultiplexer.cpp b/src/SignalMultiplexer.cpp index c5be552..8edcdc2 100644 --- a/src/SignalMultiplexer.cpp +++ b/src/SignalMultiplexer.cpp @@ -46,6 +46,7 @@ SignalMultiplexer::~SignalMultiplexer() // dataIn[0] -> null symbol // dataIn[1] -> MSC symbols +// dataIn[2] -> (optional) TII symbol int SignalMultiplexer::process(std::vector dataIn, Buffer* dataOut) { #ifdef DEBUG @@ -60,10 +61,17 @@ int SignalMultiplexer::process(std::vector dataIn, Buffer* dataOut) fprintf(stderr, ", dataOut: %p, sizeOut: %zu)\n", dataOut, dataOut->getLength()); #endif - assert(dataIn.size() == 2); + assert(dataIn.size() == 2 or dataIn.size() == 3); - *dataOut = *dataIn[0]; - *dataOut += *dataIn[1]; + if (dataIn.size() == 2) { + *dataOut = *dataIn[0]; + *dataOut += *dataIn[1]; + } + else if (dataIn.size() == 3) { + *dataOut = *dataIn[2]; + *dataOut += *dataIn[1]; + } return dataOut->getLength(); } + -- cgit v1.2.3