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
|
||||
*
|
||||
|
Reference in New Issue
Block a user