Merge branch 'mueller/refactor-tmtc-stack' into mueller/cfdp-routers

This commit is contained in:
Robin Müller 2022-08-18 11:21:16 +02:00
commit 3b33b429e6
2 changed files with 3 additions and 7 deletions

View File

@ -102,14 +102,13 @@ ReturnValue_t PusDistributor::callbackAfterSending(ReturnValue_t queueStatus) {
tcStatus = queueStatus;
}
if (tcStatus != RETURN_OK) {
verifyChannel->sendFailureReport(
VerifFailureParams(tcverif::ACCEPTANCE_FAILURE, reader, tcStatus));
verifyChannel->sendFailureReport({tcverif::ACCEPTANCE_FAILURE, reader, tcStatus});
// A failed packet is deleted immediately after reporting,
// otherwise it will block memory.
store->deleteData(currentMessage.getStorageId());
return RETURN_FAILED;
} else {
verifyChannel->sendSuccessReport(VerifSuccessParams(tcverif::ACCEPTANCE_SUCCESS, reader));
verifyChannel->sendSuccessReport({tcverif::ACCEPTANCE_SUCCESS, reader});
return RETURN_OK;
}
}

View File

@ -33,10 +33,7 @@ class VerificationReporter : public SystemObject, public VerificationReporterIF
void setReceiver(AcceptsVerifyMessageIF& receiver);
// TODO: The API is a little bit bloated. It might be better to group all the parameters
// into a dedicated struct
ReturnValue_t sendSuccessReport(VerifSuccessParams params) override;
ReturnValue_t sendFailureReport(VerifFailureParams params) override;
static object_id_t DEFAULT_REPORTER;
@ -44,7 +41,7 @@ class VerificationReporter : public SystemObject, public VerificationReporterIF
ReturnValue_t initialize() override;
private:
MessageQueueId_t acknowledgeQueue;
MessageQueueId_t acknowledgeQueue = MessageQueueIF::NO_QUEUE;
};
#endif /* FSFW_TMTCSERVICES_VERIFICATIONREPORTER_H_ */