Refactor TMTC Stack, improve test framework #655
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user