From 763bf2d85bc9524c13cc0ef0a5fbc322b9ca6ec6 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 8 Nov 2022 14:29:41 +0100 Subject: [PATCH] remove flush call, belongs in lower layer --- linux/devices/ploc/PlocSupervisorHandler.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/linux/devices/ploc/PlocSupervisorHandler.cpp b/linux/devices/ploc/PlocSupervisorHandler.cpp index 9f9ac9ea..df0796cc 100644 --- a/linux/devices/ploc/PlocSupervisorHandler.cpp +++ b/linux/devices/ploc/PlocSupervisorHandler.cpp @@ -448,14 +448,6 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d result = DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED; break; } - - if (result == returnvalue::OK) { - /** - * Flushing the receive buffer to make sure there are no data left from a faulty reply. - */ - uartComIf->flushUartRxBuffer(comCookie); - } - return result; } @@ -706,7 +698,10 @@ ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t* start, size_t r case (Apid::MEM_MAN): { if (tmReader.getServiceId() == static_cast(supv::tm::MemManId::UPDATE_STATUS_REPORT)) { - // TODO: I think this will be handled by the uart manager + // TODO: I think this will be handled by the uart manager? + // Actually, this is a bit tricky. Maybe the lower level will have two separate ring + // buffers, one for internally handled packets and one for packets which are handled + // here? } } }