From 4ccec03e47ebef809546780929a94b371322bd95 Mon Sep 17 00:00:00 2001 From: Cleanroom Laptop L15 Date: Fri, 25 Mar 2022 09:40:43 +0100 Subject: [PATCH] changed some error messages to warnings --- linux/devices/ploc/PlocMPSoCHandler.cpp | 15 ++++++++------- linux/devices/ploc/PlocMPSoCHandler.h | 4 ++++ tmtc | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/linux/devices/ploc/PlocMPSoCHandler.cpp b/linux/devices/ploc/PlocMPSoCHandler.cpp index d511f5b1..ed592352 100644 --- a/linux/devices/ploc/PlocMPSoCHandler.cpp +++ b/linux/devices/ploc/PlocMPSoCHandler.cpp @@ -448,7 +448,7 @@ ReturnValue_t PlocMPSoCHandler::handleAckReport(const uint8_t* data) { result = verifyPacket(data, mpsoc::SIZE_ACK_REPORT); if (result == MPSoCReturnValuesIF::CRC_FAILURE) { - sif::error << "PlocMPSoCHandler::handleAckReport: CRC failure" << std::endl; + sif::warning << "PlocMPSoCHandler::handleAckReport: CRC failure" << std::endl; nextReplyId = mpsoc::NONE; replyRawReplyIfnotWiretapped(data, mpsoc::SIZE_ACK_REPORT); triggerEvent(MPSOC_HANDLER_CRC_FAILURE); @@ -493,7 +493,7 @@ ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) { result = verifyPacket(data, mpsoc::SIZE_EXE_REPORT); if (result == MPSoCReturnValuesIF::CRC_FAILURE) { - sif::error << "PlocMPSoCHandler::handleExecutionReport: CRC failure" << std::endl; + sif::warning << "PlocMPSoCHandler::handleExecutionReport: CRC failure" << std::endl; nextReplyId = mpsoc::NONE; return result; } @@ -506,11 +506,12 @@ ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) { } case (mpsoc::apid::EXE_FAILURE): { // TODO: Interpretation of status field in execution report - sif::error << "PlocMPSoCHandler::handleExecutionReport: Received execution failure report" + sif::warning << "PlocMPSoCHandler::handleExecutionReport: Received execution failure report" << std::endl; DeviceCommandId_t commandId = getPendingCommand(); if (commandId != DeviceHandlerIF::NO_COMMAND_ID) { - triggerEvent(EXE_FAILURE, commandId); + uint16_t status = getStatus(data); + triggerEvent(EXE_FAILURE, commandId, status); } else { sif::debug << "PlocMPSoCHandler::handleExecutionReport: Unknown command id" << std::endl; } @@ -521,7 +522,7 @@ ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) { break; } default: { - sif::error << "PlocMPSoCHandler::handleExecutionReport: Unknown APID" << std::endl; + sif::warning << "PlocMPSoCHandler::handleExecutionReport: Unknown APID" << std::endl; result = RETURN_FAILED; break; } @@ -534,7 +535,7 @@ ReturnValue_t PlocMPSoCHandler::handleMemoryReadReport(const uint8_t* data) { ReturnValue_t result = RETURN_OK; result = verifyPacket(data, tmMemReadReport.rememberRequestedSize); if (result == MPSoCReturnValuesIF::CRC_FAILURE) { - sif::error << "PlocMPSoCHandler::handleMemoryReadReport: Memory read report has invalid crc" + sif::warning << "PlocMPSoCHandler::handleMemoryReadReport: Memory read report has invalid crc" << std::endl; } uint16_t memLen = @@ -751,6 +752,6 @@ void PlocMPSoCHandler::printStatus(const uint8_t* data) { sif::info << "Verification report status: 0x" << std::hex << status << std::endl; } -void PlocMPSoCHandler::getStatus(const uint8_t* data) { +uint16_t PlocMPSoCHandler::getStatus(const uint8_t* data) { return *(data + STATUS_OFFSET) << 8 | *(data + STATUS_OFFSET + 1); } diff --git a/linux/devices/ploc/PlocMPSoCHandler.h b/linux/devices/ploc/PlocMPSoCHandler.h index 28dd95c9..a8b55772 100644 --- a/linux/devices/ploc/PlocMPSoCHandler.h +++ b/linux/devices/ploc/PlocMPSoCHandler.h @@ -62,8 +62,12 @@ private: //! [EXPORT] : [COMMENT] PLOC crc failure in telemetry packet static const Event MEMORY_READ_RPT_CRC_FAILURE = MAKE_EVENT(1, severity::LOW); //! [EXPORT] : [COMMENT] PLOC receive acknowledgment failure report + //! P1: Command Id which leads the acknowledgment failure report + //! P2: The status field inserted by the MPSoC into the data field static const Event ACK_FAILURE = MAKE_EVENT(2, severity::LOW); //! [EXPORT] : [COMMENT] PLOC receive execution failure report + //! P1: Command Id which leads the execution failure report + //! P2: The status field inserted by the MPSoC into the data field static const Event EXE_FAILURE = MAKE_EVENT(3, severity::LOW); //! [EXPORT] : [COMMENT] PLOC reply has invalid crc static const Event MPSOC_HANDLER_CRC_FAILURE = MAKE_EVENT(4, severity::LOW); diff --git a/tmtc b/tmtc index 63b35da1..6572a5df 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 63b35da15c5f0a20c6f689c7fb029c2712e0935e +Subproject commit 6572a5df6169772b517f2de2f3e4a1ba8f6471f4