fixes identified during tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
9837a1b62c
commit
3f6a534db5
@ -6,6 +6,7 @@
|
|||||||
#include "simple/simple.h"
|
#include "simple/simple.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -70,7 +70,8 @@ static const DeviceCommandId_t LATCHUP_REPORT = 54;
|
|||||||
|
|
||||||
static const uint16_t SIZE_ACK_REPORT = 14;
|
static const uint16_t SIZE_ACK_REPORT = 14;
|
||||||
static const uint16_t SIZE_EXE_REPORT = 14;
|
static const uint16_t SIZE_EXE_REPORT = 14;
|
||||||
static const uint16_t SIZE_HK_REPORT = 52;
|
//static const uint16_t SIZE_HK_REPORT = 52;
|
||||||
|
static const uint16_t SIZE_HK_REPORT = 56;
|
||||||
static const uint16_t SIZE_BOOT_STATUS_REPORT = 24;
|
static const uint16_t SIZE_BOOT_STATUS_REPORT = 24;
|
||||||
static const uint16_t SIZE_LATCHUP_STATUS_REPORT = 31;
|
static const uint16_t SIZE_LATCHUP_STATUS_REPORT = 31;
|
||||||
|
|
||||||
@ -212,7 +213,7 @@ enum PoolIds : lp_id_t {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const uint8_t HK_SET_ENTRIES = 13;
|
static const uint8_t HK_SET_ENTRIES = 13;
|
||||||
static const uint8_t BOOT_REPORT_SET_ENTRIES = 8;
|
static const uint8_t BOOT_REPORT_SET_ENTRIES = 10;
|
||||||
static const uint8_t LATCHUP_RPT_SET_ENTRIES = 16;
|
static const uint8_t LATCHUP_RPT_SET_ENTRIES = 16;
|
||||||
|
|
||||||
static const uint32_t HK_SET_ID = HK_REPORT;
|
static const uint32_t HK_SET_ID = HK_REPORT;
|
||||||
@ -347,7 +348,7 @@ class SetTimeRef : public SpacePacket {
|
|||||||
serializedSize = 0;
|
serializedSize = 0;
|
||||||
SerializeAdapter::serialize<uint8_t>(&month, &data_field_ptr, &serializedSize,
|
SerializeAdapter::serialize<uint8_t>(&month, &data_field_ptr, &serializedSize,
|
||||||
sizeof(time->month), SerializeIF::Endianness::BIG);
|
sizeof(time->month), SerializeIF::Endianness::BIG);
|
||||||
uint8_t year = static_cast<uint8_t>(time->year);
|
uint8_t year = static_cast<uint8_t>(time->year - 1900);
|
||||||
serializedSize = 0;
|
serializedSize = 0;
|
||||||
SerializeAdapter::serialize<uint8_t>(&year, &data_field_ptr, &serializedSize,
|
SerializeAdapter::serialize<uint8_t>(&year, &data_field_ptr, &serializedSize,
|
||||||
sizeof(time->year), SerializeIF::Endianness::BIG);
|
sizeof(time->year), SerializeIF::Endianness::BIG);
|
||||||
|
@ -344,7 +344,7 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
|
|||||||
this->insertInCommandAndReplyMap(supv::FIRST_MRAM_DUMP, 3);
|
this->insertInCommandAndReplyMap(supv::FIRST_MRAM_DUMP, 3);
|
||||||
this->insertInCommandAndReplyMap(supv::CONSECUTIVE_MRAM_DUMP, 3);
|
this->insertInCommandAndReplyMap(supv::CONSECUTIVE_MRAM_DUMP, 3);
|
||||||
this->insertInReplyMap(supv::ACK_REPORT, 3, nullptr, supv::SIZE_ACK_REPORT);
|
this->insertInReplyMap(supv::ACK_REPORT, 3, nullptr, supv::SIZE_ACK_REPORT);
|
||||||
this->insertInReplyMap(supv::EXE_REPORT, 3, nullptr, supv::SIZE_EXE_REPORT);
|
this->insertInReplyMap(supv::EXE_REPORT, 120, nullptr, supv::SIZE_EXE_REPORT);
|
||||||
this->insertInReplyMap(supv::HK_REPORT, 3, &hkset, supv::SIZE_HK_REPORT);
|
this->insertInReplyMap(supv::HK_REPORT, 3, &hkset, supv::SIZE_HK_REPORT);
|
||||||
this->insertInReplyMap(supv::BOOT_STATUS_REPORT, 3, &bootStatusReport,
|
this->insertInReplyMap(supv::BOOT_STATUS_REPORT, 3, &bootStatusReport,
|
||||||
supv::SIZE_BOOT_STATUS_REPORT);
|
supv::SIZE_BOOT_STATUS_REPORT);
|
||||||
@ -713,6 +713,8 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data)
|
|||||||
sif::debug << "PlocSupervisorHandler::handleExecutionReport: Unknown command id"
|
sif::debug << "PlocSupervisorHandler::handleExecutionReport: Unknown command id"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
uint16_t status = *(data + EXE_STATUS_OFFSET) << 8 | *(data + EXE_STATUS_OFFSET + 1);
|
||||||
|
sif::info << "Execution status: 0x" << std::hex << status << std::endl;
|
||||||
sendFailureReport(supv::EXE_REPORT, RECEIVED_EXE_FAILURE);
|
sendFailureReport(supv::EXE_REPORT, RECEIVED_EXE_FAILURE);
|
||||||
disableExeReportReply();
|
disableExeReportReply();
|
||||||
result = IGNORE_REPLY_DATA;
|
result = IGNORE_REPLY_DATA;
|
||||||
@ -794,7 +796,7 @@ ReturnValue_t PlocSupervisorHandler::handleHkReport(const uint8_t* data) {
|
|||||||
<< static_cast<unsigned int>(hkset.nvm0_1_state.value) << std::endl;
|
<< static_cast<unsigned int>(hkset.nvm0_1_state.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleHkReport: nvm3_state: "
|
sif::info << "PlocSupervisorHandler::handleHkReport: nvm3_state: "
|
||||||
<< static_cast<unsigned int>(hkset.nvm3_state.value) << std::endl;
|
<< static_cast<unsigned int>(hkset.nvm3_state.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleHkReport: missoin_io_state: "
|
sif::info << "PlocSupervisorHandler::handleHkReport: mission_io_state: "
|
||||||
<< static_cast<unsigned int>(hkset.missionIoState.value) << std::endl;
|
<< static_cast<unsigned int>(hkset.missionIoState.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleHkReport: fmc_state: "
|
sif::info << "PlocSupervisorHandler::handleHkReport: fmc_state: "
|
||||||
<< static_cast<unsigned int>(hkset.fmcState.value) << std::endl;
|
<< static_cast<unsigned int>(hkset.fmcState.value) << std::endl;
|
||||||
@ -849,7 +851,7 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
|
|||||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BootAfterMs: "
|
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BootAfterMs: "
|
||||||
<< bootStatusReport.bootAfterMs << " ms" << std::endl;
|
<< bootStatusReport.bootAfterMs << " ms" << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BootTimeoutMs: "
|
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BootTimeoutMs: "
|
||||||
<< bootStatusReport.bootTimeoutMs << " ms" << std::endl;
|
<< std::dec << bootStatusReport.bootTimeoutMs << " ms" << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Active NVM: "
|
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Active NVM: "
|
||||||
<< static_cast<unsigned int>(bootStatusReport.activeNvm.value) << std::endl;
|
<< static_cast<unsigned int>(bootStatusReport.activeNvm.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BP0: "
|
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BP0: "
|
||||||
@ -858,6 +860,10 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
|
|||||||
<< static_cast<unsigned int>(bootStatusReport.bp1State.value) << std::endl;
|
<< static_cast<unsigned int>(bootStatusReport.bp1State.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BP2: "
|
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BP2: "
|
||||||
<< static_cast<unsigned int>(bootStatusReport.bp2State.value) << std::endl;
|
<< static_cast<unsigned int>(bootStatusReport.bp2State.value) << std::endl;
|
||||||
|
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Boot state: "
|
||||||
|
<< static_cast<unsigned int>(bootStatusReport.bootState.value) << std::endl;
|
||||||
|
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Boot cycles: "
|
||||||
|
<< static_cast<unsigned int>(bootStatusReport.bootCycles.value) << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -891,7 +897,7 @@ ReturnValue_t PlocSupervisorHandler::handleLatchupStatusReport(const uint8_t* da
|
|||||||
offset += 2;
|
offset += 2;
|
||||||
latchupStatusReport.cnt6 = *(data + offset) << 8 | *(data + offset + 1);
|
latchupStatusReport.cnt6 = *(data + offset) << 8 | *(data + offset + 1);
|
||||||
offset += 2;
|
offset += 2;
|
||||||
latchupStatusReport.timeMsec = *(data + offset) << 8 | *(data + offset + 1);
|
latchupStatusReport.timeMsec = (*(data + offset) << 8 | *(data + offset + 1)) & 0x7FFF;
|
||||||
offset += 2;
|
offset += 2;
|
||||||
latchupStatusReport.timeSec = *(data + offset);
|
latchupStatusReport.timeSec = *(data + offset);
|
||||||
offset += 1;
|
offset += 1;
|
||||||
@ -925,19 +931,19 @@ ReturnValue_t PlocSupervisorHandler::handleLatchupStatusReport(const uint8_t* da
|
|||||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: CNT6: "
|
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: CNT6: "
|
||||||
<< latchupStatusReport.cnt6 << std::endl;
|
<< latchupStatusReport.cnt6 << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Sec: "
|
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Sec: "
|
||||||
<< latchupStatusReport.timeSec << std::endl;
|
<< static_cast<unsigned int>(latchupStatusReport.timeSec.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Min: "
|
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Min: "
|
||||||
<< latchupStatusReport.timeMin << std::endl;
|
<< static_cast<unsigned int>(latchupStatusReport.timeMin.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Hour: "
|
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Hour: "
|
||||||
<< latchupStatusReport.timeHour << std::endl;
|
<< static_cast<unsigned int>(latchupStatusReport.timeHour.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Day: "
|
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Day: "
|
||||||
<< latchupStatusReport.timeDay << std::endl;
|
<< static_cast<unsigned int>(latchupStatusReport.timeDay.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Mon: "
|
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Mon: "
|
||||||
<< latchupStatusReport.timeMon << std::endl;
|
<< static_cast<unsigned int>(latchupStatusReport.timeMon.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Year: "
|
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Year: "
|
||||||
<< latchupStatusReport.timeYear << std::endl;
|
<< static_cast<unsigned int>(latchupStatusReport.timeYear.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Msec: "
|
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: Msec: "
|
||||||
<< latchupStatusReport.timeMsec << std::endl;
|
<< static_cast<unsigned int>(latchupStatusReport.timeMsec.value) << std::endl;
|
||||||
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: isSet: 0x" << std::hex
|
sif::info << "PlocSupervisorHandler::handleLatchupStatusReport: isSet: 0x" << std::hex
|
||||||
<< latchupStatusReport.timeMsec << std::dec << std::endl;
|
<< latchupStatusReport.timeMsec << std::dec << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
@ -104,6 +104,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
|
|
||||||
static const uint16_t APID_MASK = 0x7FF;
|
static const uint16_t APID_MASK = 0x7FF;
|
||||||
static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF;
|
static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF;
|
||||||
|
static const uint8_t EXE_STATUS_OFFSET = 10;
|
||||||
|
|
||||||
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE];
|
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user