Refactor TMTC Stack, improve test framework #655

Merged
mohr merged 150 commits from mueller/refactor-tmtc-stack into development 2022-09-12 14:31:23 +02:00
2 changed files with 15 additions and 4 deletions
Showing only changes of commit f03b7cd660 - Show all commits

View File

@ -49,6 +49,17 @@ ReturnValue_t Service1TelecommandVerification::performOperation(uint8_t operatio
ReturnValue_t Service1TelecommandVerification::sendVerificationReport(
PusVerificationMessage* message) {
ReturnValue_t result;
uint8_t reportId = message->getReportId();
if(reportId == 0 or reportId > 8) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Service1TelecommandVerification::sendVerificationReport: Invalid report ID " <<
static_cast<int>(reportId) << " detected" << std::endl;
#else
sif::printError("Service1TelecommandVerification::sendVerificationReport: Invalid report ID "
"%d detected\n", reportId);
#endif
return HasReturnvaluesIF::RETURN_FAILED;
}
if (message->getReportId() % 2 == 0) {
result = generateFailureReport(message);
} else {

View File

@ -457,8 +457,8 @@ void CommandingServiceBase::prepareVerificationFailureWithFullInfo(uint8_t repor
}
void CommandingServiceBase::prepareVerificationSuccessWithFullInfo(
uint8_t reportId, CommandingServiceBase::CommandInfo::TcInfo& tcInfo) {
failParams.reportId = reportId;
failParams.tcPacketId = tcInfo.tcPacketId;
failParams.tcPsc = tcInfo.tcSequenceControl;
failParams.ackFlags = tcInfo.ackFlags;
successParams.reportId = reportId;
successParams.tcPacketId = tcInfo.tcPacketId;
successParams.tcPsc = tcInfo.tcSequenceControl;
successParams.ackFlags = tcInfo.ackFlags;
}