event with packet number for which mpsoc update failed
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:
parent
569754bdad
commit
bb397a58de
@ -11,6 +11,7 @@
|
||||
|
||||
#include "fsfw/globalfunctions/CRC.h"
|
||||
#include "fsfw/timemanager/Countdown.h"
|
||||
#include "fsfw/tasks/TaskFactory.h"
|
||||
#include "mission/utility/Filenaming.h"
|
||||
#include "mission/utility/ProgressPrinter.h"
|
||||
#include "mission/utility/Timestamp.h"
|
||||
@ -158,6 +159,7 @@ ReturnValue_t PlocSupvHelper::performUpdate() {
|
||||
uint16_t dataLength = 0;
|
||||
size_t bytesWritten = 0;
|
||||
uint16_t sequenceCount = 1;
|
||||
uint32_t packetNum = 1;
|
||||
supv::SequenceFlags seqFlags = supv::SequenceFlags::FIRST_PKT;
|
||||
while (remainingSize > 0) {
|
||||
if (terminate) {
|
||||
@ -193,8 +195,10 @@ ReturnValue_t PlocSupvHelper::performUpdate() {
|
||||
update.startAddress + bytesWritten, dataLength, tempData);
|
||||
result = handlePacketTransmission(packet);
|
||||
if (result != RETURN_OK) {
|
||||
triggerEvent(WRITE_MEMORY_FAILED, packetNum);
|
||||
return result;
|
||||
}
|
||||
packetNum += 1;
|
||||
bytesWritten += dataLength;
|
||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||
progressPrinter.print(bytesWritten);
|
||||
@ -373,6 +377,9 @@ ReturnValue_t PlocSupvHelper::receive(uint8_t* data, size_t* readBytes, size_t r
|
||||
if (*readBytes > 0) {
|
||||
std::memcpy(data, buffer, *readBytes);
|
||||
}
|
||||
else {
|
||||
TaskFactory::delayTask(40);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,9 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
||||
//! P1: Return value
|
||||
//! P2: Apid of command for which the reception of the execution report failed
|
||||
static const Event EXE_RECEPTION_FAILURE = MAKE_EVENT(16, severity::LOW);
|
||||
//! [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(17, severity::LOW);
|
||||
|
||||
PlocSupvHelper(object_id_t objectId);
|
||||
virtual ~PlocSupvHelper();
|
||||
@ -178,7 +181,7 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
|
||||
ReturnValue_t performUpdate();
|
||||
ReturnValue_t performEventBufferRequest();
|
||||
ReturnValue_t handlePacketTransmission(SpacePacket& packet,
|
||||
uint32_t timeoutExecutionReport = 1000);
|
||||
uint32_t timeoutExecutionReport = 2000);
|
||||
ReturnValue_t sendCommand(SpacePacket& packet);
|
||||
/**
|
||||
* @brief Function which reads form the communication interface
|
||||
|
Loading…
Reference in New Issue
Block a user