something wrong with mem check
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -268,8 +268,8 @@ static const uint32_t ADC_REPORT_SET_ID = ADC_REPORT;
|
||||
|
||||
namespace recv_timeout {
|
||||
// Erase memory can require up to 60 seconds for execution
|
||||
static const uint32_t ERASE_MEMORY_TIMEOUT = 60000;
|
||||
static const uint32_t UPDATE_STATUS_REPORT_TIMEOUT = 70000;
|
||||
static const uint32_t ERASE_MEMORY = 60000;
|
||||
static const uint32_t UPDATE_STATUS_REPORT = 70000;
|
||||
} // namespace recv_timeout
|
||||
|
||||
/**
|
||||
|
@ -377,7 +377,7 @@ ReturnValue_t PlocSupvHelper::eraseMemory() {
|
||||
if (result != RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
result = handlePacketTransmission(eraseMemory, supv::recv_timeout::ERASE_MEMORY_TIMEOUT);
|
||||
result = handlePacketTransmission(eraseMemory, supv::recv_timeout::ERASE_MEMORY);
|
||||
if (result != RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
@ -451,8 +451,14 @@ ReturnValue_t PlocSupvHelper::handleExe(uint32_t timeout) {
|
||||
<< std::endl;
|
||||
return result;
|
||||
}
|
||||
|
||||
return exeReportHandling();
|
||||
}
|
||||
|
||||
ReturnValue_t PlocSupvHelper::exeReportHandling() {
|
||||
supv::ExecutionReport exeReport(tmBuf.data(), tmBuf.size());
|
||||
result = checkReceivedTm(exeReport);
|
||||
|
||||
ReturnValue_t result = checkReceivedTm(exeReport);
|
||||
if (result != RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
@ -465,7 +471,7 @@ ReturnValue_t PlocSupvHelper::handleExe(uint32_t timeout) {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return RETURN_OK;
|
||||
return exeReportHandling();
|
||||
}
|
||||
|
||||
ReturnValue_t PlocSupvHelper::handleTmReception(size_t remainingBytes, uint8_t* readBuf,
|
||||
@ -597,18 +603,29 @@ ReturnValue_t PlocSupvHelper::handleCheckMemoryCommand() {
|
||||
}
|
||||
|
||||
result =
|
||||
handleTmReception(static_cast<size_t>(updateStatusReport.getNominalSize()),
|
||||
statusReportBuf.data(), supv::recv_timeout::UPDATE_STATUS_REPORT_TIMEOUT);
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning
|
||||
<< "PlocSupvHelper::handleCheckMemoryCommand: Failed to receive update status report"
|
||||
<< std::endl;
|
||||
return result;
|
||||
}
|
||||
result = updateStatusReport.checkCrc();
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning << "PlocSupvHelper::handleTmReception: CRC check failed" << std::endl;
|
||||
return result;
|
||||
handleTmReception(ccsds::HEADER_LEN, tmBuf.data(), supv::recv_timeout::UPDATE_STATUS_REPORT);
|
||||
SpacePacketReader spReader(tmBuf.data(), tmBuf.size());
|
||||
if (spReader.getApid() == supv::APID_EXE_FAILURE) {
|
||||
size_t remBytes = spReader.getPacketDataLen() + 1;
|
||||
result = handleTmReception(remBytes, tmBuf.data() + ccsds::HEADER_LEN);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::warning << "Reading exe failure report failed" << std::endl;
|
||||
}
|
||||
return exeReportHandling();
|
||||
} else if (spReader.getApid() == supv::APID_UPDATE_STATUS_REPORT) {
|
||||
size_t remBytes = spReader.getPacketDataLen() + 1;
|
||||
result = handleTmReception(remBytes, tmBuf.data() + ccsds::HEADER_LEN);
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning
|
||||
<< "PlocSupvHelper::handleCheckMemoryCommand: Failed to receive update status report"
|
||||
<< std::endl;
|
||||
return result;
|
||||
}
|
||||
result = updateStatusReport.checkCrc();
|
||||
if (result != RETURN_OK) {
|
||||
sif::warning << "PlocSupvHelper::handleTmReception: CRC check failed" << std::endl;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
result = handleExe(CRC_EXECUTION_TIMEOUT);
|
||||
|
@ -250,6 +250,7 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
||||
// finished.
|
||||
ReturnValue_t calcImageCrc();
|
||||
ReturnValue_t handleCheckMemoryCommand();
|
||||
ReturnValue_t exeReportHandling();
|
||||
/**
|
||||
* @brief Return size of file with name filename
|
||||
*
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 214 translations.
|
||||
* @brief Auto-generated event translation file. Contains 215 translations.
|
||||
* @details
|
||||
* Generated on: 2022-08-21 08:37:22
|
||||
* Generated on: 2022-08-22 12:35:41
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -211,6 +211,7 @@ const char *WRITE_MEMORY_FAILED_STRING = "WRITE_MEMORY_FAILED";
|
||||
const char *SUPV_REPLY_SIZE_MISSMATCH_STRING = "SUPV_REPLY_SIZE_MISSMATCH";
|
||||
const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH";
|
||||
const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS";
|
||||
const char *SUPV_MEM_CHECK_STATUS_STRING = "SUPV_MEM_CHECK_STATUS";
|
||||
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||
@ -630,6 +631,8 @@ const char *translateEvents(Event event) {
|
||||
return SUPV_REPLY_CRC_MISSMATCH_STRING;
|
||||
case (13622):
|
||||
return SUPV_UPDATE_PROGRESS_STRING;
|
||||
case (13623):
|
||||
return SUPV_MEM_CHECK_STATUS_STRING;
|
||||
case (13700):
|
||||
return ALLOC_FAILURE_STRING;
|
||||
case (13701):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 133 translations.
|
||||
* Generated on: 2022-08-21 08:37:22
|
||||
* Generated on: 2022-08-22 12:35:41
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
Reference in New Issue
Block a user