generic TM checker
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
7e3517d309
commit
458929957d
@ -375,9 +375,8 @@ ReturnValue_t PlocSupvHelper::handleAck() {
|
||||
return result;
|
||||
}
|
||||
supv::AcknowledgmentReport ackReport(tmBuf.data(), tmBuf.size());
|
||||
result = ackReport.checkCrc();
|
||||
result = checkReceivedTm(ackReport);
|
||||
if(result != RETURN_OK) {
|
||||
triggerEvent(SUPV_REPLY_CRC_MISSMATCH, rememberApid);
|
||||
return result;
|
||||
}
|
||||
result = ackReport.checkApid();
|
||||
@ -403,9 +402,8 @@ ReturnValue_t PlocSupvHelper::handleExe(uint32_t timeout) {
|
||||
return result;
|
||||
}
|
||||
supv::ExecutionReport exeReport(tmBuf.data(), tmBuf.size());
|
||||
result = exeReport.checkCrc();
|
||||
result = checkReceivedTm(exeReport);
|
||||
if(result != RETURN_OK) {
|
||||
triggerEvent(SUPV_REPLY_CRC_MISSMATCH, rememberApid);
|
||||
return result;
|
||||
}
|
||||
result = exeReport.checkApid();
|
||||
@ -444,6 +442,20 @@ ReturnValue_t PlocSupvHelper::handleTmReception(size_t remainingBytes, uint32_t
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocSupvHelper::checkReceivedTm(ploc::SpTmReader& reader) {
|
||||
ReturnValue_t result = reader.checkSize();
|
||||
if (result != RETURN_OK) {
|
||||
triggerEvent(SUPV_REPLY_SIZE_MISSMATCH, rememberApid);
|
||||
return result;
|
||||
}
|
||||
result = reader.checkCrc();
|
||||
if (result != RETURN_OK) {
|
||||
triggerEvent(SUPV_REPLY_CRC_MISSMATCH, rememberApid);
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PlocSupvHelper::receive(uint8_t* data, size_t* readBytes, size_t requestBytes) {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
uint8_t* buffer = nullptr;
|
||||
|
@ -86,7 +86,8 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
||||
//! [EXPORT] : [COMMENT] Update procedure failed when sending packet with number P1
|
||||
//! P1: Packet number for which the memory write command fails
|
||||
static const Event WRITE_MEMORY_FAILED = MAKE_EVENT(19, severity::LOW);
|
||||
static const Event SUPV_REPLY_CRC_MISSMATCH = MAKE_EVENT(20, severity::LOW);
|
||||
static const Event SUPV_REPLY_SIZE_MISSMATCH = MAKE_EVENT(20, severity::LOW);
|
||||
static const Event SUPV_REPLY_CRC_MISSMATCH = MAKE_EVENT(21, severity::LOW);
|
||||
|
||||
PlocSupvHelper(object_id_t objectId);
|
||||
virtual ~PlocSupvHelper();
|
||||
@ -225,6 +226,8 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
||||
* failure report.
|
||||
*/
|
||||
ReturnValue_t handleTmReception(size_t remainingBytes, uint32_t timeout = 70000);
|
||||
ReturnValue_t checkReceivedTm(ploc::SpTmReader& reader);
|
||||
|
||||
ReturnValue_t selectMemory();
|
||||
ReturnValue_t prepareUpdate();
|
||||
ReturnValue_t eraseMemory();
|
||||
|
Loading…
Reference in New Issue
Block a user