PLOC SUPV Update to newer firmware #316

Merged
muellerr merged 99 commits from mueller/tas_ploc_supv_update into develop 2022-11-18 14:27:13 +01:00
3 changed files with 58 additions and 12 deletions
Showing only changes of commit 00dd2e99a8 - Show all commits

View File

@ -1296,7 +1296,7 @@ class VerificationReport {
if (not readerBase.crcIsOk()) {
return result::CRC_FAILURE;
}
if (readerBase.getApid() != Apid::TMTC_MAN) {
if (readerBase.getModuleApid() != Apid::TMTC_MAN) {
return result::INVALID_APID;
}
if (readerBase.getBufSize() < MIN_TMTC_LEN + PAYLOAD_LEN or
@ -1477,7 +1477,7 @@ class VerificationReport {
break;
}
default: {
codeHandled = true;
codeHandled = false;
break;
}
}
@ -1525,7 +1525,7 @@ class VerificationReport {
break;
}
default: {
codeHandled = true;
codeHandled = false;
break;
}
}
@ -1565,7 +1565,51 @@ class VerificationReport {
break;
}
default: {
codeHandled = true;
codeHandled = false;
break;
}
}
} else if (statusCode >= 0x600) {
TmtcManStatusCode code = static_cast<TmtcManStatusCode>(statusCode);
switch (code) {
case TmtcManStatusCode::BUF_FULL: {
sif::warning << prefix << "TMTC MAN: Buffer full" << std::endl;
break;
}
case TmtcManStatusCode::WRONG_APID: {
sif::warning << prefix << "TMTC MAN: Wrong APID" << std::endl;
break;
}
case TmtcManStatusCode::WRONG_SERVICE_ID: {
sif::warning << prefix << "TMTC MAN: Wrong Service ID" << std::endl;
break;
}
case TmtcManStatusCode::TC_DELIVERY_ACCEPTED: {
sif::warning << prefix << "TMTC MAN: TC accepted" << std::endl;
break;
}
case TmtcManStatusCode::TC_DELIVERY_REJECTED: {
sif::warning << prefix << "TMTC MAN: TC rejected" << std::endl;
break;
}
case TmtcManStatusCode::TC_PACKET_LEN_INCORRECT: {
sif::warning << prefix << "TMTC MAN: TC packet lenght incorrect" << std::endl;
break;
}
case TmtcManStatusCode::BAD_CRC: {
sif::warning << prefix << "TMTC MAN: Bad CRC" << std::endl;
break;
}
case TmtcManStatusCode::BAD_DEST: {
sif::warning << prefix << "TMTC MAN: Bad destination" << std::endl;
break;
}
case TmtcManStatusCode::BAD_SP_HEADER: {
sif::warning << prefix << "TMTC MAN: Bad SP header" << std::endl;
break;
}
default: {
codeHandled = false;
break;
}
}

View File

@ -839,7 +839,7 @@ ReturnValue_t PlocSupervisorHandler::handleAckReport(const uint8_t* data) {
using namespace supv;
ReturnValue_t result = returnvalue::OK;
if (tmReader.checkCrc() != returnvalue::OK) {
if (not tmReader.verifyCrc()) {
sif::error << "PlocSupervisorHandler::handleAckReport: CRC failure" << std::endl;
nextReplyId = supv::NONE;
replyRawReplyIfnotWiretapped(data, supv::SIZE_ACK_REPORT);
@ -878,7 +878,7 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data)
using namespace supv;
ReturnValue_t result = returnvalue::OK;
if (tmReader.checkCrc() != OK) {
if (not tmReader.verifyCrc()) {
nextReplyId = supv::NONE;
return result::CRC_FAILURE;
}

View File

@ -632,9 +632,10 @@ int PlocSupvUartManager::handleAckReception(supv::TcBase& tc, uint8_t serviceId,
return 1;
} else if (serviceId == static_cast<uint8_t>(supv::tm::TmtcId::NAK)) {
ackReport.printStatusInformation();
triggerEvent(SUPV_ACK_FAILURE_REPORT,
buildApidServiceParam1(ackReport.getRefModuleApid(), ackReport.getRefServiceId()),
ackReport.getStatusCode());
triggerEvent(
SUPV_ACK_FAILURE_REPORT,
buildApidServiceParam1(ackReport.getRefModuleApid(), ackReport.getRefServiceId()),
ackReport.getStatusCode());
return -1;
}
// Should never happen
@ -663,9 +664,10 @@ int PlocSupvUartManager::handleExeAckReception(supv::TcBase& tc, uint8_t service
return 1;
} else if (serviceId == static_cast<uint8_t>(supv::tm::TmtcId::EXEC_NAK)) {
exeReport.printStatusInformation();
triggerEvent(SUPV_EXE_FAILURE_REPORT,
buildApidServiceParam1(exeReport.getRefModuleApid(), exeReport.getRefServiceId()),
exeReport.getStatusCode());
triggerEvent(
SUPV_EXE_FAILURE_REPORT,
buildApidServiceParam1(exeReport.getRefModuleApid(), exeReport.getRefServiceId()),
exeReport.getStatusCode());
return -1;
}
// Should never happen