memory check always based on file now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2022-08-22 13:50:24 +02:00
parent b3bb029c47
commit 663b65f159
6 changed files with 127 additions and 59 deletions

View File

@ -94,7 +94,8 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
static constexpr Event SUPV_UPDATE_PROGRESS = MAKE_EVENT(22, severity::INFO);
//! Status of memory check command
//! P1: Returncode, 0 for success, other value with returncode for failure
static constexpr Event SUPV_MEM_CHECK_STATUS = MAKE_EVENT(23, severity::INFO);
static constexpr Event SUPV_MEM_CHECK_OK = MAKE_EVENT(23, severity::INFO);
static constexpr Event SUPV_MEM_CHECK_FAIL = MAKE_EVENT(24, severity::INFO);
PlocSupvHelper(object_id_t objectId);
virtual ~PlocSupvHelper();
@ -118,7 +119,10 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
size_t startBytesWritten, uint16_t initSeqCount);
ReturnValue_t startUpdate(std::string file, uint8_t memoryId, uint32_t startAddress);
ReturnValue_t performMemCheck(uint8_t memoryId, uint32_t startAddress, size_t sizeToCheck);
ReturnValue_t performMemCheck(uint8_t memoryId, uint32_t startAddress, size_t sizeToCheck,
bool checkCrc);
ReturnValue_t performMemCheck(std::string file, uint8_t memoryId, uint32_t startAddress);
/**
* @brief This initiate the continuation of a failed update.
*/
@ -165,6 +169,7 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
// Size of update
uint32_t length;
uint32_t crc;
bool crcShouldBeChecked = false;
// size_t remainingSize;
size_t bytesWritten;
uint32_t packetNum;
@ -211,6 +216,8 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
// Remembers APID to know at which command a procedure failed
uint16_t rememberApid = 0;
void executeFullCheckMemoryCommand();
ReturnValue_t performUpdate();
ReturnValue_t continueUpdate();
ReturnValue_t updateOperation();