get boot status report wip
This commit is contained in:
@ -20,15 +20,18 @@ static const DeviceCommandId_t SET_MAX_RESTART_TRIES = 7;
|
||||
static const DeviceCommandId_t RESET_MPSOC = 8;
|
||||
static const DeviceCommandId_t SET_TIME_REF = 9;
|
||||
static const DeviceCommandId_t DISABLE_PERIOIC_HK_TRANSMISSION = 10;
|
||||
static const DeviceCommandId_t GET_BOOT_STATUS_REPORT = 11;
|
||||
|
||||
/** Reply IDs */
|
||||
static const DeviceCommandId_t ACK_REPORT = 50;
|
||||
static const DeviceCommandId_t EXE_REPORT = 51;
|
||||
static const DeviceCommandId_t HK_REPORT = 52;
|
||||
static const DeviceCommandId_t BOOT_STATUS_REPORT = 5<EFBFBD>;
|
||||
|
||||
static const uint16_t SIZE_ACK_REPORT = 14;
|
||||
static const uint16_t SIZE_EXE_REPORT = 14;
|
||||
static const uint16_t SIZE_HK_REPORT = 48;
|
||||
static const uint16_t SIZE_BOOT_STATUS_REPORT = 22;
|
||||
|
||||
/**
|
||||
* SpacePacket apids of telemetry packets
|
||||
@ -100,12 +103,22 @@ enum PoolIds
|
||||
TEMP_SUP,
|
||||
UPTIME,
|
||||
CPULOAD,
|
||||
AVAILABLEHEAP
|
||||
AVAILABLEHEAP,
|
||||
BOOT_SIGNAL,
|
||||
RESET_COUNTER,
|
||||
BOOT_AFTER_MS,
|
||||
BOOT_TIMEOUT_MS,
|
||||
ACTIVE_NVM,
|
||||
BP0_STATE,
|
||||
BP1_STATE,
|
||||
BP2_STATE
|
||||
};
|
||||
|
||||
static const uint8_t HK_SET_ENTRIES = 13;
|
||||
static const uint8_t BOOT_REPORT_SET_ENTRIES = 8;
|
||||
|
||||
static const uint32_t HK_SET_ID = HK_REPORT;
|
||||
static const uint32_t BOOT_REPORT_SET_ID = APID_BOOT_STATUS_REPORT;
|
||||
|
||||
/**
|
||||
* @brief With this class a space packet can be created which does not contain any data.
|
||||
@ -363,7 +376,7 @@ private:
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief This dataset to store the housekeeping data of the supervisor.
|
||||
* @brief This dataset stores the housekeeping data of the supervisor.
|
||||
*/
|
||||
class HkSet: public StaticLocalDataSet<HK_SET_ENTRIES> {
|
||||
public:
|
||||
@ -376,21 +389,49 @@ public:
|
||||
StaticLocalDataSet(sid_t(objectId, HK_SET_ID)) {
|
||||
}
|
||||
|
||||
lp_var_t<uint32_t> numTms = lp_var_t<uint32_t>(sid.objectId, PoolIds::NUM_TMS, this);
|
||||
lp_var_t<uint32_t> tempPs = lp_var_t<uint32_t>(sid.objectId, PoolIds::TEMP_PS, this);
|
||||
lp_var_t<uint32_t> tempPl = lp_var_t<uint32_t>(sid.objectId, PoolIds::TEMP_PS, this);
|
||||
lp_var_t<uint32_t> tempSup = lp_var_t<uint32_t>(sid.objectId, PoolIds::TEMP_SUP, this);
|
||||
lp_var_t<uint32_t> uptime = lp_var_t<uint32_t>(sid.objectId, PoolIds::UPTIME, this);
|
||||
lp_var_t<uint32_t> cpuLoad = lp_var_t<uint32_t>(sid.objectId, PoolIds::CPULOAD, this);
|
||||
lp_var_t<uint32_t> availableHeap = lp_var_t<uint32_t>(sid.objectId, PoolIds::AVAILABLEHEAP,
|
||||
this);
|
||||
lp_var_t<uint32_t> numTcs = lp_var_t<uint32_t>(sid.objectId, PoolIds::NUM_TCS, this);
|
||||
lp_var_t<uint32_t> numTms = lp_var_t<uint32_t>(sid.objectId, PoolIds::NUM_TMS, this);
|
||||
lp_var_t<uint32_t> socState = lp_var_t<uint32_t>(sid.objectId, PoolIds::SOC_STATE, this);
|
||||
lp_var_t<uint8_t> nvm0_1_state = lp_var_t<uint8_t>(sid.objectId, PoolIds::NVM0_1_STATE, this);
|
||||
lp_var_t<uint8_t> nvm3_state = lp_var_t<uint8_t>(sid.objectId, PoolIds::NVM3_STATE, this);
|
||||
lp_var_t<uint8_t> missionIoState = lp_var_t<uint8_t>(sid.objectId, PoolIds::MISSION_IO_STATE,
|
||||
this);
|
||||
lp_var_t<uint8_t> fmcState = lp_var_t<uint8_t>(sid.objectId, PoolIds::FMC_STATE, this);
|
||||
lp_var_t<uint32_t> numTcs = lp_var_t<uint32_t>(sid.objectId, PoolIds::NUM_TCS, this);
|
||||
lp_var_t<uint32_t> tempSup = lp_var_t<uint32_t>(sid.objectId, PoolIds::TEMP_SUP, this);
|
||||
lp_var_t<uint32_t> uptime = lp_var_t<uint32_t>(sid.objectId, PoolIds::UPTIME, this);
|
||||
lp_var_t<uint32_t> cpuLoad = lp_var_t<uint32_t>(sid.objectId, PoolIds::CPULOAD, this);
|
||||
lp_var_t<uint32_t> availableHeap = lp_var_t<uint32_t>(sid.objectId, PoolIds::AVAILABLEHEAP,
|
||||
this);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief This dataset stores the boot status report of the supervisor.
|
||||
*/
|
||||
class BootStatusReport: public StaticLocalDataSet<BOOT_REPORT_SET_ENTRIES> {
|
||||
public:
|
||||
|
||||
BootStatusReport(HasLocalDataPoolIF* owner) :
|
||||
StaticLocalDataSet(owner, BOOT_REPORT_SET_ID) {
|
||||
}
|
||||
|
||||
BootStatusReport(object_id_t objectId) :
|
||||
StaticLocalDataSet(sid_t(objectId, BOOT_REPORT_SET_ID)) {
|
||||
}
|
||||
|
||||
/** Information about boot status of MPSoC */
|
||||
lp_var_t<uint8_t> bootSignal = lp_var_t<uint8_t>(sid.objectId, PoolIds::BOOT_SIGNAL, this);
|
||||
lp_var_t<uint8_t> resetCounter = lp_var_t<uint8_t>(sid.objectId, PoolIds::RESET_COUNTER, this);
|
||||
/** Time the MPSoC needs for last boot */
|
||||
lp_var_t<uint32_t> bootAfterMs = lp_var_t<uint32_t>(sid.objectId, PoolIds::BOOT_AFTER_MS, this);
|
||||
/** The currently set boot timeout */
|
||||
lp_var_t<uint32_t> bootTimeoutMs = lp_var_t<uint32_t>(sid.objectId, PoolIds::BOOT_TIMEOUT_MS, this);
|
||||
lp_var_t<uint8_t> activeNvm = lp_var_t<uint32_t>(sid.objectId, PoolIds::ACTIVE_NVM, this);
|
||||
/** States of the boot partition pins */
|
||||
lp_var_t<uint8_t> bp0State = lp_var_t<uint32_t>(sid.objectId, PoolIds::BP0_STATE, this);
|
||||
lp_var_t<uint8_t> bp1State = lp_var_t<uint32_t>(sid.objectId, PoolIds::BP1_STATE, this);
|
||||
lp_var_t<uint8_t> bp2State = lp_var_t<uint32_t>(sid.objectId, PoolIds::BP2_STATE, this);
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user