on and normal mode finally work
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
This commit is contained in:
@ -556,15 +556,6 @@ class TmBase : public ploc::SpTmReader {
|
||||
}
|
||||
}
|
||||
|
||||
bool verifyCrc() {
|
||||
if (checkCrc() == returnvalue::OK) {
|
||||
crcOk = true;
|
||||
}
|
||||
return crcOk;
|
||||
}
|
||||
|
||||
bool crcIsOk() const { return crcOk; }
|
||||
|
||||
uint8_t getServiceId() const { return getPacketData()[TIMESTAMP_LEN]; }
|
||||
|
||||
uint16_t getModuleApid() const { return getApid() & APID_MODULE_MASK; }
|
||||
@ -576,9 +567,6 @@ class TmBase : public ploc::SpTmReader {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool crcOk = false;
|
||||
};
|
||||
|
||||
class NoPayloadPacket : public TcBase {
|
||||
@ -786,8 +774,6 @@ class SetRestartTries : public TcBase {
|
||||
}
|
||||
|
||||
private:
|
||||
uint8_t restartTries = 0;
|
||||
|
||||
void initPacket(uint8_t restartTries) { payloadStart[0] = restartTries; }
|
||||
};
|
||||
|
||||
@ -848,8 +834,6 @@ class LatchupAlert : public TcBase {
|
||||
}
|
||||
|
||||
private:
|
||||
uint8_t latchupId = 0;
|
||||
|
||||
void initPacket(uint8_t latchupId) { payloadStart[0] = latchupId; }
|
||||
};
|
||||
|
||||
@ -879,9 +863,6 @@ class SetAlertlimit : public TcBase {
|
||||
}
|
||||
|
||||
private:
|
||||
uint8_t latchupId = 0;
|
||||
uint32_t dutycycle = 0;
|
||||
|
||||
ReturnValue_t initPacket(uint8_t latchupId, uint32_t dutycycle) {
|
||||
payloadStart[0] = latchupId;
|
||||
size_t serLen = 0;
|
||||
@ -1312,8 +1293,8 @@ class VerificationReport {
|
||||
|
||||
virtual ~VerificationReport() = default;
|
||||
|
||||
virtual ReturnValue_t parse() {
|
||||
if (not readerBase.crcIsOk()) {
|
||||
virtual ReturnValue_t parse(bool checkCrc) {
|
||||
if (checkCrc and readerBase.checkCrc() != returnvalue::OK) {
|
||||
return result::CRC_FAILURE;
|
||||
}
|
||||
if (readerBase.getModuleApid() != Apid::TMTC_MAN) {
|
||||
@ -1330,27 +1311,27 @@ class VerificationReport {
|
||||
ReturnValue_t result = SerializeAdapter::deSerialize(&refApid, &payloadStart, &remLen,
|
||||
SerializeIF::Endianness::BIG);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::debug << "VerificationReport: Failed to deserialize reference APID field" << std::endl;
|
||||
sif::warning << "VerificationReport: Failed to deserialize reference APID field" << std::endl;
|
||||
return result;
|
||||
}
|
||||
result = SerializeAdapter::deSerialize(&refServiceId, &payloadStart, &remLen,
|
||||
SerializeIF::Endianness::BIG);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::debug << "VerificationReport: Failed to deserialize reference Service ID field"
|
||||
<< std::endl;
|
||||
sif::warning << "VerificationReport: Failed to deserialize reference Service ID field"
|
||||
<< std::endl;
|
||||
return result;
|
||||
}
|
||||
result = SerializeAdapter::deSerialize(&refSeqCount, &payloadStart, &remLen,
|
||||
SerializeIF::Endianness::BIG);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::debug << "VerificationReport: Failed to deserialize reference sequence count field"
|
||||
<< std::endl;
|
||||
sif::warning << "VerificationReport: Failed to deserialize reference sequence count field"
|
||||
<< std::endl;
|
||||
return result;
|
||||
}
|
||||
result = SerializeAdapter::deSerialize(&statusCode, &payloadStart, &remLen,
|
||||
SerializeIF::Endianness::BIG);
|
||||
if (result != returnvalue::OK) {
|
||||
sif::debug << "VerificationReport: Failed to deserialize status code field" << std::endl;
|
||||
sif::warning << "VerificationReport: Failed to deserialize status code field" << std::endl;
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
@ -1367,7 +1348,7 @@ class VerificationReport {
|
||||
|
||||
uint32_t getStatusCode() const { return statusCode; }
|
||||
|
||||
virtual void printStatusInformation(const char* prefix) {
|
||||
virtual void printStatusInformation(const char* prefix) const {
|
||||
bool codeHandled = true;
|
||||
if (statusCode < 0x100) {
|
||||
GeneralStatusCode code = static_cast<GeneralStatusCode>(getStatusCode());
|
||||
@ -1654,15 +1635,15 @@ class AcknowledgmentReport : public VerificationReport {
|
||||
public:
|
||||
AcknowledgmentReport(TmBase& readerBase) : VerificationReport(readerBase) {}
|
||||
|
||||
virtual ReturnValue_t parse() override {
|
||||
ReturnValue_t parse(bool checkCrc) override {
|
||||
if (readerBase.getServiceId() != static_cast<uint8_t>(tm::TmtcId::ACK) and
|
||||
readerBase.getServiceId() != static_cast<uint8_t>(tm::TmtcId::NAK)) {
|
||||
return result::INVALID_SERVICE_ID;
|
||||
}
|
||||
return VerificationReport::parse();
|
||||
return VerificationReport::parse(checkCrc);
|
||||
}
|
||||
|
||||
void printStatusInformation() {
|
||||
void printStatusInformationAck() {
|
||||
VerificationReport::printStatusInformation(STATUS_PRINTOUT_PREFIX);
|
||||
}
|
||||
|
||||
@ -1676,15 +1657,15 @@ class ExecutionReport : public VerificationReport {
|
||||
|
||||
TmBase& getReader() { return readerBase; }
|
||||
|
||||
ReturnValue_t parse() override {
|
||||
ReturnValue_t parse(bool checkCrc) override {
|
||||
if (readerBase.getServiceId() != static_cast<uint8_t>(tm::TmtcId::EXEC_ACK) and
|
||||
readerBase.getServiceId() != static_cast<uint8_t>(tm::TmtcId::EXEC_NAK)) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return VerificationReport::parse();
|
||||
return VerificationReport::parse(checkCrc);
|
||||
}
|
||||
|
||||
void printStatusInformation() {
|
||||
void printStatusInformationExe() {
|
||||
VerificationReport::printStatusInformation(STATUS_PRINTOUT_PREFIX);
|
||||
}
|
||||
|
||||
@ -1696,8 +1677,8 @@ class UpdateStatusReport {
|
||||
public:
|
||||
UpdateStatusReport(TmBase& tmReader) : tmReader(tmReader) {}
|
||||
|
||||
ReturnValue_t parse() {
|
||||
if (not tmReader.crcIsOk()) {
|
||||
ReturnValue_t parse(bool checkCrc) {
|
||||
if (checkCrc and tmReader.checkCrc() != returnvalue::OK) {
|
||||
return result::CRC_FAILURE;
|
||||
}
|
||||
if (tmReader.getModuleApid() != Apid::MEM_MAN) {
|
||||
|
Reference in New Issue
Block a user