diff --git a/linux/payload/PlocMpsocHandler.cpp b/linux/payload/PlocMpsocHandler.cpp index a07c7871..89e9a248 100644 --- a/linux/payload/PlocMpsocHandler.cpp +++ b/linux/payload/PlocMpsocHandler.cpp @@ -13,7 +13,7 @@ PlocMpsocHandler::PlocMpsocHandler(object_id_t objectId, object_id_t uartComIFid Gpio uartIsolatorSwitch, object_id_t supervisorHandler) : DeviceHandlerBase(objectId, uartComIFid, comCookie), hkReport(this), - plocMPSoCHelper(plocMPSoCHelper), + specialComHelper(plocMPSoCHelper), uartIsolatorSwitch(uartIsolatorSwitch), supervisorHandler(supervisorHandler), commandActionHelper(this) { @@ -65,12 +65,12 @@ ReturnValue_t PlocMpsocHandler::initialize() { return ObjectManagerIF::CHILD_INIT_FAILED; } - result = plocMPSoCHelper->setComIF(communicationInterface); + result = specialComHelper->setComIF(communicationInterface); if (result != returnvalue::OK) { return ObjectManagerIF::CHILD_INIT_FAILED; } - plocMPSoCHelper->setComCookie(comCookie); - plocMPSoCHelper->setSequenceCount(&sequenceCount); + specialComHelper->setComCookie(comCookie); + specialComHelper->setSequenceCount(&sequenceCount); result = commandActionHelper.initialize(); if (result != returnvalue::OK) { return ObjectManagerIF::CHILD_INIT_FAILED; @@ -136,9 +136,9 @@ ReturnValue_t PlocMpsocHandler::executeAction(ActionId_t actionId, MessageQueueI if (result != returnvalue::OK) { return result; } - plocMPSoCHelper->setSequenceCount(&sequenceCount); - result = plocMPSoCHelper->startFlashWrite(flashWritePusCmd.getObcFile(), - flashWritePusCmd.getMPSoCFile()); + specialComHelper->setSequenceCount(&sequenceCount); + result = specialComHelper->startFlashWrite(flashWritePusCmd.getObcFile(), + flashWritePusCmd.getMPSoCFile()); if (result != returnvalue::OK) { return result; } @@ -151,12 +151,10 @@ ReturnValue_t PlocMpsocHandler::executeAction(ActionId_t actionId, MessageQueueI if (result != returnvalue::OK) { return result; } - sif::debug << "starting flash read" << std::endl; - sif::debug << "sequence count: " << sequenceCount.get() << std::endl; - plocMPSoCHelper->setSequenceCount(&sequenceCount); - result = plocMPSoCHelper->startFlashRead(flashReadPusCmd.getObcFile(), - flashReadPusCmd.getMPSoCFile(), - flashReadPusCmd.getReadSize()); + specialComHelper->setSequenceCount(&sequenceCount); + result = specialComHelper->startFlashRead(flashReadPusCmd.getObcFile(), + flashReadPusCmd.getMPSoCFile(), + flashReadPusCmd.getReadSize()); if (result != returnvalue::OK) { return result; } @@ -790,10 +788,9 @@ ReturnValue_t PlocMpsocHandler::handleAckReport(const uint8_t* data) { switch (apid) { case mpsoc::apid::ACK_FAILURE: { - sif::debug << "PlocMPSoCHandler::handleAckReport: Received Ack failure report" << std::endl; DeviceCommandId_t commandId = getPendingCommand(); uint16_t status = mpsoc::getStatusFromRawData(data); - sif::warning << "Verification report status: " << mpsoc::getStatusString(status) << std::endl; + sif::warning << "MPSoC ACK Failure: " << mpsoc::getStatusString(status) << std::endl; if (commandId != DeviceHandlerIF::NO_COMMAND_ID) { triggerEvent(ACK_FAILURE, commandId, status); } @@ -835,15 +832,12 @@ ReturnValue_t PlocMpsocHandler::handleExecutionReport(const uint8_t* data) { break; } case (mpsoc::apid::EXE_FAILURE): { - // TODO: Interpretation of status field in execution report - sif::warning << "PlocMPSoCHandler::handleExecutionReport: Received execution failure report" - << std::endl; DeviceCommandId_t commandId = getPendingCommand(); if (commandId == DeviceHandlerIF::NO_COMMAND_ID) { sif::debug << "PlocMPSoCHandler::handleExecutionReport: Unknown command id" << std::endl; } uint16_t status = mpsoc::getStatusFromRawData(data); - sif::warning << "Verification report status: " << mpsoc::getStatusString(status) << std::endl; + sif::warning << "MPSoC EXE Failure: " << mpsoc::getStatusString(status) << std::endl; triggerEvent(EXE_FAILURE, commandId, status); sendFailureReport(mpsoc::EXE_REPORT, MPSoCReturnValuesIF::RECEIVED_EXE_FAILURE); result = IGNORE_REPLY_DATA; diff --git a/linux/payload/PlocMpsocHandler.h b/linux/payload/PlocMpsocHandler.h index a42075d8..ea62e484 100644 --- a/linux/payload/PlocMpsocHandler.h +++ b/linux/payload/PlocMpsocHandler.h @@ -162,7 +162,7 @@ class PlocMpsocHandler : public DeviceHandlerBase, public CommandsActionsIF { SerialComIF* uartComIf = nullptr; - PlocMpsocSpecialComHelper* plocMPSoCHelper = nullptr; + PlocMpsocSpecialComHelper* specialComHelper = nullptr; Gpio uartIsolatorSwitch; object_id_t supervisorHandler = 0; CommandActionHelper commandActionHelper;