ploc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Jakob Meier 2022-04-10 18:46:39 +02:00
parent dbe4f70d8e
commit b440fc3df6
27 changed files with 1533 additions and 1817 deletions

View File

@ -167,6 +167,15 @@ void initmission::initTasks() {
}
#endif /* OBSW_ADD_PLOC_MPSOC */
#if OBSW_ADD_PLOC_SUPERVISOR == 1
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
"PLOC_SUPV_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
}
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
#if OBSW_TEST_CCSDS_BRIDGE == 1
PeriodicTaskIF* ptmeTestTask = factory->createPeriodicTask(
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);

View File

@ -29,7 +29,7 @@
#include "linux/devices/ploc/PlocMPSoCHelper.h"
#include "linux/devices/ploc/PlocMemoryDumper.h"
#include "linux/devices/ploc/PlocSupervisorHandler.h"
#include "linux/devices/ploc/PlocUpdater.h"
#include "linux/devices/ploc/PlocSupvHelper.h"
#include "linux/devices/startracker/StarTrackerHandler.h"
#include "linux/devices/startracker/StrHelper.h"
#include "linux/obc/AxiPtmeConfig.h"
@ -205,7 +205,6 @@ void ObjectFactory::produce(void* args) {
createTestComponents(gpioComIF);
#endif /* OBSW_ADD_TEST_CODE == 1 */
new PlocUpdater(objects::PLOC_UPDATER);
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
}
@ -666,6 +665,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF) {
q7s::UART_PLOC_SUPERVSIOR_DEV, UartModes::NON_CANONICAL,
uart::PLOC_SUPERVISOR_BAUD, supv::MAX_PACKET_SIZE * 20);
supervisorCookie->setNoFixedSizeReply();
new PlocSupvHelper(objects::PLOC_SUPERVISOR_HELPER);
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF,
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
pcduSwitches::PDU1_CH6_PLOC_12V);

View File

@ -7,7 +7,7 @@
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
/**
* @brief This class implements often used functions concerning the file system management.
* @brief This class implements often used functions related to the file system management.
*
* @author J. Meier
*/
@ -39,9 +39,9 @@ class FilesystemHelper : public HasReturnvaluesIF {
/**
* @brief Checks if the file exists on the filesystem.
*
* param file File to check
* @param file File to check
*
* @return RETURN_OK if fiel exists, otherwise return error code.
* @return RETURN_OK if file exists, otherwise return error code.
*/
static ReturnValue_t fileExists(std::string file);
};

View File

@ -89,13 +89,21 @@ void initmission::initTasks() {
}
pstTasks.push_back(pst);
#if OBSW_ADD_PLOC_MPSOC == 1
PeriodicTaskIF* mpsocHelperTask = factory->createPeriodicTask(
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
}
pstTasks.push_back(mpsocHelperTask);
#endif /* OBSW_ADD_PLOC_MPSOC == 1*/
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
"PLOC_SUPV_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
if (result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
}
auto taskStarter = [](std::vector<PeriodicTaskIF*>& taskVector, std::string name) {
for (const auto& task : taskVector) {
@ -111,6 +119,10 @@ void initmission::initTasks() {
tmtcDistributor->startTask();
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
supvHelperTask->startTask();
#if OBSW_ADD_PLOC_MPSOC == 1
mpsocHelperTask->startTask();
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
taskStarter(pstTasks, "PST Tasks");
taskStarter(pusTasks, "PUS Tasks");

View File

@ -1,27 +1,29 @@
#include "ObjectFactory.h"
#include <devConf.h>
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/i2c/I2cComIF.h"
#include "fsfw_hal/linux/uart/UartCookie.h"
#include "OBSWConfig.h"
#include "busConf.h"
#include "devConf.h"
#include "devices/addresses.h"
#include "devices/gpioIds.h"
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
#include "fsfw/tmtcpacket/pus/tm.h"
#include "fsfw/tmtcservices/CommandingServiceBase.h"
#include "fsfw/tmtcservices/PusServiceBase.h"
#include "fsfw_hal/linux/i2c/I2cComIF.h"
#include "fsfw_hal/linux/i2c/I2cCookie.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/uart/UartCookie.h"
#include "linux/devices/ploc/PlocMPSoCHandler.h"
#include "linux/devices/ploc/PlocMPSoCHelper.h"
#include "mission/devices/Tmp1075Handler.h"
#include "linux/devices/ploc/PlocSupervisorHandler.h"
#include "linux/devices/ploc/PlocSupvHelper.h"
#include "mission/core/GenericFactory.h"
#include "mission/devices/Tmp1075Handler.h"
#include "mission/utility/TmFunnel.h"
#include "test/gpio/DummyGpioIF.h"
#include "objects/systemObjectList.h"
#include "devices/addresses.h"
#include "devices/gpioIds.h"
#include "test/gpio/DummyGpioIF.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
@ -43,17 +45,18 @@ void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
new UartComIF(objects::UART_COM_IF);
#if OBSW_ADD_PLOC_MPSOC == 1
UartCookie* mpsocUartCookie =
new UartCookie(objects::PLOC_MPSOC_HANDLER, te0720_1cfa::MPSOC_UART, UartModes::NON_CANONICAL,
uart::PLOC_MPSOC_BAUD, mpsoc::MAX_REPLY_SIZE);
mpsocUartCookie->setNoFixedSizeReply();
PlocMPSoCHelper* plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
new UartComIF(objects::UART_COM_IF);
auto dummyGpioIF = new DummyGpioIF();
PlocMPSoCHandler* plocMPSoCHandler =
new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocUartCookie,
plocMpsocHelper, Gpio(gpioIds::ENABLE_MPSOC_UART, dummyGpioIF));
auto mpsocGpioIF = new DummyGpioIF();
PlocMPSoCHandler* plocMPSoCHandler = new PlocMPSoCHandler(
objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocUartCookie, plocMpsocHelper,
Gpio(gpioIds::ENABLE_MPSOC_UART, mpsocGpioIF), objects::PLOC_SUPERVISOR_HANDLER);
plocMPSoCHandler->setStartUpImmediately();
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
@ -130,23 +133,26 @@ void ObjectFactory::produce(void* args) {
#if OBSW_ADD_PLOC_SUPERVISOR == 1
/* Configuration for MIO0 on TE0720-03-1CFA */
UartCookie* plocSupervisorCookie =
UartCookie* supervisorCookie =
new UartCookie(objects::PLOC_SUPERVISOR_HANDLER, std::string("/dev/ttyPS1"),
UartModes::NON_CANONICAL, 115200, PLOC_SPV::MAX_PACKET_SIZE * 20);
plocSupervisorCookie->setNoFixedSizeReply();
PlocSupervisorHandler* plocSupervisor = new PlocSupervisorHandler(
objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF, plocSupervisorCookie);
UartModes::NON_CANONICAL, 115200, supv::MAX_PACKET_SIZE * 20);
supervisorCookie->setNoFixedSizeReply();
auto supvGpioIF = new DummyGpioIF();
auto supvHelper = new PlocSupvHelper(objects::PLOC_SUPERVISOR_HELPER);
auto plocSupervisor = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF,
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, supvGpioIF),
pcduSwitches::PDU1_CH6_PLOC_12V, supvHelper);
plocSupervisor->setStartUpImmediately();
#endif
new I2cComIF(objects::I2C_COM_IF);
new I2cComIF(objects::I2C_COM_IF);
I2cCookie* i2cCookieTmp1075tcs1 =
new I2cCookie(addresses::TMP1075_TCS_1, TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
I2cCookie* i2cCookieTmp1075tcs2 =
new I2cCookie(addresses::TMP1075_TCS_2, TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
I2cCookie* i2cCookieTmp1075tcs1 =
new I2cCookie(addresses::TMP1075_TCS_1, TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
I2cCookie* i2cCookieTmp1075tcs2 =
new I2cCookie(addresses::TMP1075_TCS_2, TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0"));
/* Temperature sensors */
new Tmp1075Handler(objects::TMP1075_HANDLER_1, objects::I2C_COM_IF, i2cCookieTmp1075tcs1);
new Tmp1075Handler(objects::TMP1075_HANDLER_2, objects::I2C_COM_IF, i2cCookieTmp1075tcs2);
/* Temperature sensors */
new Tmp1075Handler(objects::TMP1075_HANDLER_1, objects::I2C_COM_IF, i2cCookieTmp1075tcs1);
new Tmp1075Handler(objects::TMP1075_HANDLER_2, objects::I2C_COM_IF, i2cCookieTmp1075tcs2);
}

View File

@ -16,6 +16,7 @@ enum commonClassIds: uint8_t {
DWLPWRON_CMD, //DWLPWRON
MPSOC_TM, //MPTM
PLOC_SUPERVISOR_HANDLER, //PLSV
PLOC_SUPV_HELPER, //PLSPVhLP
SUS_HANDLER, //SUSS
CCSDS_IP_CORE_BRIDGE, //IPCI
PTME, //PTME
@ -30,9 +31,9 @@ enum commonClassIds: uint8_t {
NVM_PARAM_BASE, //NVMB
FILE_SYSTEM_HELPER, //FSHLP
PLOC_MPSOC_HELPER, // PLMPHLP
PLOC_SUPV_HELPER, // PLSPVHLP
SA_DEPL_HANDLER, //SADPL
MPSOC_RETURN_VALUES_IF, //MPSOCRTVIF
SUPV_RETURN_VALUES_IF, //SPVRTVIF
COMMON_CLASS_ID_END // [EXPORT] : [END]
};

2
fsfw

@ -1 +1 @@
Subproject commit 7df51f72029d7b0f1571a74cd2a71ca74bbaa086
Subproject commit 43917d98c025b446aa0d79d2166b1f031fb288ae

View File

@ -1,181 +1,177 @@
2200;0x0898;STORE_SEND_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2201;0x0899;STORE_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2202;0x089a;STORE_SEND_READ_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2203;0x089b;STORE_READ_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2204;0x089c;UNEXPECTED_MSG;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2205;0x089d;STORING_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2206;0x089e;TM_DUMP_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2207;0x089f;STORE_INIT_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2208;0x08a0;STORE_INIT_EMPTY;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2209;0x08a1;STORE_CONTENT_CORRUPTED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2210;0x08a2;STORE_INITIALIZE;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2211;0x08a3;INIT_DONE;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2212;0x08a4;DUMP_FINISHED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2213;0x08a5;DELETION_FINISHED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2214;0x08a6;DELETION_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2215;0x08a7;AUTO_CATALOGS_SENDING_FAILED;INFO;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
2600;0x0a28;GET_DATA_FAILED;LOW;;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
2601;0x0a29;STORE_DATA_FAILED;LOW;;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
2800;0x0af0;DEVICE_BUILDING_COMMAND_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2801;0x0af1;DEVICE_SENDING_COMMAND_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2802;0x0af2;DEVICE_REQUESTING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2803;0x0af3;DEVICE_READING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2804;0x0af4;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2805;0x0af5;DEVICE_MISSED_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2806;0x0af6;DEVICE_UNKNOWN_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2807;0x0af7;DEVICE_UNREQUESTED_REPLY;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2808;0x0af8;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2809;0x0af9;MONITORING_LIMIT_EXCEEDED;LOW;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2810;0x0afa;MONITORING_AMBIGUOUS;HIGH;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
2811;0x0afb;DEVICE_WANTS_HARD_REBOOT;HIGH;;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
4201;0x1069;FUSE_CURRENT_HIGH;LOW;;fsfw/src/fsfw/power/Fuse.h
4202;0x106a;FUSE_WENT_OFF;LOW;;fsfw/src/fsfw/power/Fuse.h
4204;0x106c;POWER_ABOVE_HIGH_LIMIT;LOW;;fsfw/src/fsfw/power/Fuse.h
4205;0x106d;POWER_BELOW_LOW_LIMIT;LOW;;fsfw/src/fsfw/power/Fuse.h
4300;0x10cc;SWITCH_WENT_OFF;LOW;;fsfw/src/fsfw/power/PowerSwitchIF.h
5000;0x1388;HEATER_ON;INFO;;fsfw/src/fsfw/thermal/Heater.h
5001;0x1389;HEATER_OFF;INFO;;fsfw/src/fsfw/thermal/Heater.h
5002;0x138a;HEATER_TIMEOUT;LOW;;fsfw/src/fsfw/thermal/Heater.h
5003;0x138b;HEATER_STAYED_ON;LOW;;fsfw/src/fsfw/thermal/Heater.h
5004;0x138c;HEATER_STAYED_OFF;LOW;;fsfw/src/fsfw/thermal/Heater.h
5200;0x1450;TEMP_SENSOR_HIGH;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
5201;0x1451;TEMP_SENSOR_LOW;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
5202;0x1452;TEMP_SENSOR_GRADIENT;LOW;;fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h
5901;0x170d;COMPONENT_TEMP_LOW;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
5902;0x170e;COMPONENT_TEMP_HIGH;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
5903;0x170f;COMPONENT_TEMP_OOL_LOW;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
5904;0x1710;COMPONENT_TEMP_OOL_HIGH;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
5905;0x1711;TEMP_NOT_IN_OP_RANGE;LOW;;fsfw/src/fsfw/thermal/ThermalComponentIF.h
7101;0x1bbd;FDIR_CHANGED_STATE;INFO;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
7102;0x1bbe;FDIR_STARTS_RECOVERY;MEDIUM;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
7103;0x1bbf;FDIR_TURNS_OFF_DEVICE;MEDIUM;;fsfw/src/fsfw/fdir/FailureIsolationBase.h
7201;0x1c21;MONITOR_CHANGED_STATE;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
7202;0x1c22;VALUE_BELOW_LOW_LIMIT;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
7203;0x1c23;VALUE_ABOVE_HIGH_LIMIT;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
7204;0x1c24;VALUE_OUT_OF_RANGE;LOW;;fsfw/src/fsfw/monitoring/MonitoringIF.h
7400;0x1ce8;CHANGING_MODE;INFO;;fsfw/src/fsfw/modes/HasModesIF.h
7401;0x1ce9;MODE_INFO;INFO;;fsfw/src/fsfw/modes/HasModesIF.h
7402;0x1cea;FALLBACK_FAILED;HIGH;;fsfw/src/fsfw/modes/HasModesIF.h
7403;0x1ceb;MODE_TRANSITION_FAILED;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
7404;0x1cec;CANT_KEEP_MODE;HIGH;;fsfw/src/fsfw/modes/HasModesIF.h
7405;0x1ced;OBJECT_IN_INVALID_MODE;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
7406;0x1cee;FORCING_MODE;MEDIUM;;fsfw/src/fsfw/modes/HasModesIF.h
7407;0x1cef;MODE_CMD_REJECTED;LOW;;fsfw/src/fsfw/modes/HasModesIF.h
7506;0x1d52;HEALTH_INFO;INFO;;fsfw/src/fsfw/health/HasHealthIF.h
7507;0x1d53;CHILD_CHANGED_HEALTH;INFO;;fsfw/src/fsfw/health/HasHealthIF.h
7508;0x1d54;CHILD_PROBLEMS;LOW;;fsfw/src/fsfw/health/HasHealthIF.h
7509;0x1d55;OVERWRITING_HEALTH;LOW;;fsfw/src/fsfw/health/HasHealthIF.h
7510;0x1d56;TRYING_RECOVERY;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
7511;0x1d57;RECOVERY_STEP;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
7512;0x1d58;RECOVERY_DONE;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
7900;0x1edc;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
7901;0x1edd;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
7903;0x1edf;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
7905;0x1ee1;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
8900;0x22c4;CLOCK_SET;INFO;;fsfw/src/fsfw/pus/Service9TimeManagement.h
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw/src/fsfw/pus/Service9TimeManagement.h
9700;0x25e4;TEST;INFO;;fsfw/src/fsfw/pus/Service17Test.h
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
10800;0x2a30;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
10801;0x2a31;SWITCH_HAS_CHANGED;INFO;Indicated that a swithc state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
10802;0x2a32;SWITCHING_Q7S_DENIED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
10900;0x2a94;GPIO_PULL_HIGH_FAILED;LOW;;mission/devices/HeaterHandler.h
10901;0x2a95;GPIO_PULL_LOW_FAILED;LOW;;mission/devices/HeaterHandler.h
10902;0x2a96;SWITCH_ALREADY_ON;LOW;;mission/devices/HeaterHandler.h
10903;0x2a97;SWITCH_ALREADY_OFF;LOW;;mission/devices/HeaterHandler.h
10904;0x2a98;MAIN_SWITCH_TIMEOUT;LOW;;mission/devices/HeaterHandler.h
11000;0x2af8;MAIN_SWITCH_ON_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
11001;0x2af9;MAIN_SWITCH_OFF_TIMEOUT;LOW;;mission/devices/SolarArrayDeploymentHandler.h
11002;0x2afa;DEPLOYMENT_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
11003;0x2afb;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
11004;0x2afc;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;mission/devices/SolarArrayDeploymentHandler.h
11101;0x2b5d;MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC crc failure in telemetry packet;linux/devices/ploc/PlocMPSoCHandler.h
11102;0x2b5e;ACK_FAILURE;LOW;PLOC receive acknowledgment failure report P1: Command Id which leads the acknowledgment failure report P2: The status field inserted by the MPSoC into the data field;linux/devices/ploc/PlocMPSoCHandler.h
11103;0x2b5f;EXE_FAILURE;LOW;PLOC receive execution failure report P1: Command Id which leads the execution failure report P2: The status field inserted by the MPSoC into the data field;linux/devices/ploc/PlocMPSoCHandler.h
11104;0x2b60;MPSOC_HANDLER_CRC_FAILURE;LOW;PLOC reply has invalid crc;linux/devices/ploc/PlocMPSoCHandler.h
11105;0x2b61;MPSOC_HANDLER_SEQ_CNT_MISMATCH;LOW;Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count;linux/devices/ploc/PlocMPSoCHandler.h
11201;0x2bc1;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11202;0x2bc2;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11203;0x2bc3;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11204;0x2bc4;SELF_TEST_PWM_FAILURE;LOW;Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11205;0x2bc5;SELF_TEST_TC_FAILURE;LOW;Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11206;0x2bc6;SELF_TEST_MTM_RANGE_FAILURE;LOW;Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11207;0x2bc7;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission/devices/IMTQHandler.h
11208;0x2bc8;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;mission/devices/IMTQHandler.h
11301;0x2c25;ERROR_STATE;HIGH;Reaction wheel signals an error state;mission/devices/RwHandler.h
11401;0x2c89;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;linux/devices/startracker/StarTrackerHandler.h
11402;0x2c8a;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;linux/devices/startracker/StarTrackerHandler.h
11501;0x2ced;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/devices/ploc/PlocSupervisorHandler.h
11502;0x2cee;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;linux/devices/ploc/PlocSupervisorHandler.h
11503;0x2cef;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;linux/devices/ploc/PlocSupervisorHandler.h
11504;0x2cf0;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/devices/ploc/PlocSupervisorHandler.h
11600;0x2d50;SANITIZATION_FAILED;LOW;;bsp_q7s/memory/SdCardManager.h
11601;0x2d51;MOUNTED_SD_CARD;INFO;;bsp_q7s/memory/SdCardManager.h
11700;0x2db4;UPDATE_FILE_NOT_EXISTS;LOW;;linux/devices/ploc/PlocUpdater.h
11701;0x2db5;ACTION_COMMANDING_FAILED;LOW;Failed to send command to supervisor handler P1: Return value of CommandActionHelper::commandAction P2: Action ID of command to send;linux/devices/ploc/PlocUpdater.h
11702;0x2db6;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;linux/devices/ploc/PlocUpdater.h
11703;0x2db7;UPDATE_TRANSFER_FAILED;LOW;Supervisor handler failed to transfer an update space packet. P1: Parameter holds the number of update packets already sent (inclusive the failed packet);linux/devices/ploc/PlocUpdater.h
11704;0x2db8;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;linux/devices/ploc/PlocUpdater.h
11705;0x2db9;UPDATE_FINISHED;INFO;MPSoC update successful completed;linux/devices/ploc/PlocUpdater.h
11800;0x2e18;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/devices/ploc/PlocMemoryDumper.h
11801;0x2e19;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/devices/ploc/PlocMemoryDumper.h
11802;0x2e1a;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/devices/ploc/PlocMemoryDumper.h
11901;0x2e7d;INVALID_TC_FRAME;HIGH;;linux/obc/PdecHandler.h
11902;0x2e7e;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/obc/PdecHandler.h
11903;0x2e7f;CARRIER_LOCK;INFO;Carrier lock detected;linux/obc/PdecHandler.h
11904;0x2e80;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/obc/PdecHandler.h
12000;0x2ee0;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
12001;0x2ee1;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
12002;0x2ee2;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
12003;0x2ee3;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;linux/devices/startracker/StrHelper.h
12004;0x2ee4;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;linux/devices/startracker/StrHelper.h
12005;0x2ee5;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;linux/devices/startracker/StrHelper.h
12006;0x2ee6;FLASH_READ_FAILED;LOW;Flash read procedure failed;linux/devices/startracker/StrHelper.h
12007;0x2ee7;FIRMWARE_UPDATE_SUCCESSFUL;LOW;Firmware update was successful;linux/devices/startracker/StrHelper.h
12008;0x2ee8;FIRMWARE_UPDATE_FAILED;LOW;Firmware update failed;linux/devices/startracker/StrHelper.h
12009;0x2ee9;STR_HELPER_READING_REPLY_FAILED;LOW;Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;linux/devices/startracker/StrHelper.h
12010;0x2eea;STR_HELPER_COM_ERROR;LOW;Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;linux/devices/startracker/StrHelper.h
12011;0x2eeb;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;linux/devices/startracker/StrHelper.h
12012;0x2eec;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;linux/devices/startracker/StrHelper.h
12013;0x2eed;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;linux/devices/startracker/StrHelper.h
12014;0x2eee;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;linux/devices/startracker/StrHelper.h
12015;0x2eef;STR_HELPER_SENDING_PACKET_FAILED;LOW;;linux/devices/startracker/StrHelper.h
12016;0x2ef0;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;linux/devices/startracker/StrHelper.h
12100;0x2f44;MPSOC_FLASH_WRITE_FAILED;LOW;Flash write fails;linux/devices/ploc/PlocMPSoCHelper.h
12101;0x2f45;MPSOC_FLASH_WRITE_SUCCESSFUL;LOW;Flash write successful;linux/devices/ploc/PlocMPSoCHelper.h
12102;0x2f46;SENDING_COMMAND_FAILED;LOW;;linux/devices/ploc/PlocMPSoCHelper.h
12103;0x2f47;MPSOC_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
12104;0x2f48;MPSOC_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
12105;0x2f49;MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
12106;0x2f4a;MISSING_EXE;LOW;Did not receive execution report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocMPSoCHelper.h
12107;0x2f4b;ACK_FAILURE_REPORT;LOW;Received acknowledgement failure report P1: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
12108;0x2f4c;EXE_FAILURE_REPORT;LOW;Received execution failure report P1: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
12109;0x2f4d;ACK_INVALID_APID;LOW;Expected acknowledgement report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
12110;0x2f4e;EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
12111;0x2f4f;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux/devices/ploc/PlocMPSoCHelper.h
12200;0x2fa8;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission/devices/PayloadPcduHandler.h
12201;0x2fa9;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12202;0x2faa;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12203;0x2fab;I_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12204;0x2fac;U_X8_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12205;0x2fad;I_X8_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12206;0x2fae;U_TX_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12207;0x2faf;I_TX_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12208;0x2fb0;U_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12209;0x2fb1;I_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12210;0x2fb2;U_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12211;0x2fb3;I_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
12300;0x300c;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/AcsBoardAssembly.h
12301;0x300d;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/AcsBoardAssembly.h
12302;0x300e;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/AcsBoardAssembly.h
12303;0x300f;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/AcsBoardAssembly.h
12400;0x3070;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission/system/SusAssembly.h
12401;0x3071;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission/system/SusAssembly.h
12402;0x3072;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission/system/SusAssembly.h
12403;0x3073;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/SusAssembly.h
12500;0x30d4;CHILDREN_LOST_MODE;MEDIUM;;mission/system/TcsBoardAssembly.h
13600;0x3520;ALLOC_FAILURE;MEDIUM;;bsp_q7s/core/CoreController.h
13601;0x3521;REBOOT_SW;MEDIUM; Software reboot occured. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
13602;0x3522;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
13603;0x3523;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
2200;0x0898;STORE_SEND_WRITE_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2201;0x0899;STORE_WRITE_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2202;0x089a;STORE_SEND_READ_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2203;0x089b;STORE_READ_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2204;0x089c;UNEXPECTED_MSG;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2205;0x089d;STORING_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2206;0x089e;TM_DUMP_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2207;0x089f;STORE_INIT_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2208;0x08a0;STORE_INIT_EMPTY;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2209;0x08a1;STORE_CONTENT_CORRUPTED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2210;0x08a2;STORE_INITIALIZE;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2211;0x08a3;INIT_DONE;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2212;0x08a4;DUMP_FINISHED;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2213;0x08a5;DELETION_FINISHED;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2214;0x08a6;DELETION_FAILED;LOW;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2215;0x08a7;AUTO_CATALOGS_SENDING_FAILED;INFO;;fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2600;0x0a28;GET_DATA_FAILED;LOW;;fsfw\src\fsfw\storagemanager\StorageManagerIF.h
2601;0x0a29;STORE_DATA_FAILED;LOW;;fsfw\src\fsfw\storagemanager\StorageManagerIF.h
2800;0x0af0;DEVICE_BUILDING_COMMAND_FAILED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2801;0x0af1;DEVICE_SENDING_COMMAND_FAILED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2802;0x0af2;DEVICE_REQUESTING_REPLY_FAILED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2803;0x0af3;DEVICE_READING_REPLY_FAILED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2804;0x0af4;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2805;0x0af5;DEVICE_MISSED_REPLY;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2806;0x0af6;DEVICE_UNKNOWN_REPLY;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2807;0x0af7;DEVICE_UNREQUESTED_REPLY;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2808;0x0af8;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2809;0x0af9;MONITORING_LIMIT_EXCEEDED;LOW;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2810;0x0afa;MONITORING_AMBIGUOUS;HIGH;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
2811;0x0afb;DEVICE_WANTS_HARD_REBOOT;HIGH;;fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
4201;0x1069;FUSE_CURRENT_HIGH;LOW;;fsfw\src\fsfw\power\Fuse.h
4202;0x106a;FUSE_WENT_OFF;LOW;;fsfw\src\fsfw\power\Fuse.h
4204;0x106c;POWER_ABOVE_HIGH_LIMIT;LOW;;fsfw\src\fsfw\power\Fuse.h
4205;0x106d;POWER_BELOW_LOW_LIMIT;LOW;;fsfw\src\fsfw\power\Fuse.h
4300;0x10cc;SWITCH_WENT_OFF;LOW;;fsfw\src\fsfw\power\PowerSwitchIF.h
5000;0x1388;HEATER_ON;INFO;;fsfw\src\fsfw\thermal\Heater.h
5001;0x1389;HEATER_OFF;INFO;;fsfw\src\fsfw\thermal\Heater.h
5002;0x138a;HEATER_TIMEOUT;LOW;;fsfw\src\fsfw\thermal\Heater.h
5003;0x138b;HEATER_STAYED_ON;LOW;;fsfw\src\fsfw\thermal\Heater.h
5004;0x138c;HEATER_STAYED_OFF;LOW;;fsfw\src\fsfw\thermal\Heater.h
5200;0x1450;TEMP_SENSOR_HIGH;LOW;;fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
5201;0x1451;TEMP_SENSOR_LOW;LOW;;fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
5202;0x1452;TEMP_SENSOR_GRADIENT;LOW;;fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
5901;0x170d;COMPONENT_TEMP_LOW;LOW;;fsfw\src\fsfw\thermal\ThermalComponentIF.h
5902;0x170e;COMPONENT_TEMP_HIGH;LOW;;fsfw\src\fsfw\thermal\ThermalComponentIF.h
5903;0x170f;COMPONENT_TEMP_OOL_LOW;LOW;;fsfw\src\fsfw\thermal\ThermalComponentIF.h
5904;0x1710;COMPONENT_TEMP_OOL_HIGH;LOW;;fsfw\src\fsfw\thermal\ThermalComponentIF.h
5905;0x1711;TEMP_NOT_IN_OP_RANGE;LOW;;fsfw\src\fsfw\thermal\ThermalComponentIF.h
7101;0x1bbd;FDIR_CHANGED_STATE;INFO;;fsfw\src\fsfw\fdir\FailureIsolationBase.h
7102;0x1bbe;FDIR_STARTS_RECOVERY;MEDIUM;;fsfw\src\fsfw\fdir\FailureIsolationBase.h
7103;0x1bbf;FDIR_TURNS_OFF_DEVICE;MEDIUM;;fsfw\src\fsfw\fdir\FailureIsolationBase.h
7201;0x1c21;MONITOR_CHANGED_STATE;LOW;;fsfw\src\fsfw\monitoring\MonitoringIF.h
7202;0x1c22;VALUE_BELOW_LOW_LIMIT;LOW;;fsfw\src\fsfw\monitoring\MonitoringIF.h
7203;0x1c23;VALUE_ABOVE_HIGH_LIMIT;LOW;;fsfw\src\fsfw\monitoring\MonitoringIF.h
7204;0x1c24;VALUE_OUT_OF_RANGE;LOW;;fsfw\src\fsfw\monitoring\MonitoringIF.h
7400;0x1ce8;CHANGING_MODE;INFO;;fsfw\src\fsfw\modes\HasModesIF.h
7401;0x1ce9;MODE_INFO;INFO;;fsfw\src\fsfw\modes\HasModesIF.h
7402;0x1cea;FALLBACK_FAILED;HIGH;;fsfw\src\fsfw\modes\HasModesIF.h
7403;0x1ceb;MODE_TRANSITION_FAILED;LOW;;fsfw\src\fsfw\modes\HasModesIF.h
7404;0x1cec;CANT_KEEP_MODE;HIGH;;fsfw\src\fsfw\modes\HasModesIF.h
7405;0x1ced;OBJECT_IN_INVALID_MODE;LOW;;fsfw\src\fsfw\modes\HasModesIF.h
7406;0x1cee;FORCING_MODE;MEDIUM;;fsfw\src\fsfw\modes\HasModesIF.h
7407;0x1cef;MODE_CMD_REJECTED;LOW;;fsfw\src\fsfw\modes\HasModesIF.h
7506;0x1d52;HEALTH_INFO;INFO;;fsfw\src\fsfw\health\HasHealthIF.h
7507;0x1d53;CHILD_CHANGED_HEALTH;INFO;;fsfw\src\fsfw\health\HasHealthIF.h
7508;0x1d54;CHILD_PROBLEMS;LOW;;fsfw\src\fsfw\health\HasHealthIF.h
7509;0x1d55;OVERWRITING_HEALTH;LOW;;fsfw\src\fsfw\health\HasHealthIF.h
7510;0x1d56;TRYING_RECOVERY;MEDIUM;;fsfw\src\fsfw\health\HasHealthIF.h
7511;0x1d57;RECOVERY_STEP;MEDIUM;;fsfw\src\fsfw\health\HasHealthIF.h
7512;0x1d58;RECOVERY_DONE;MEDIUM;;fsfw\src\fsfw\health\HasHealthIF.h
7900;0x1edc;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
7901;0x1edd;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
7903;0x1edf;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
7905;0x1ee1;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
8900;0x22c4;CLOCK_SET;INFO;;fsfw\src\fsfw\pus\Service9TimeManagement.h
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw\src\fsfw\pus\Service9TimeManagement.h
9700;0x25e4;TEST;INFO;;fsfw\src\fsfw\pus\Service17Test.h
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw\hal\src\fsfw_hal\devicehandlers\MgmLIS3MDLHandler.h
10800;0x2a30;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission\devices\devicedefinitions\powerDefinitions.h
10801;0x2a31;SWITCH_HAS_CHANGED;INFO;Indicated that a swithc state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission\devices\devicedefinitions\powerDefinitions.h
10802;0x2a32;SWITCHING_Q7S_DENIED;MEDIUM;;mission\devices\devicedefinitions\powerDefinitions.h
10900;0x2a94;GPIO_PULL_HIGH_FAILED;LOW;;mission\devices\HeaterHandler.h
10901;0x2a95;GPIO_PULL_LOW_FAILED;LOW;;mission\devices\HeaterHandler.h
10902;0x2a96;SWITCH_ALREADY_ON;LOW;;mission\devices\HeaterHandler.h
10903;0x2a97;SWITCH_ALREADY_OFF;LOW;;mission\devices\HeaterHandler.h
10904;0x2a98;MAIN_SWITCH_TIMEOUT;LOW;;mission\devices\HeaterHandler.h
11000;0x2af8;MAIN_SWITCH_ON_TIMEOUT;LOW;;mission\devices\SolarArrayDeploymentHandler.h
11001;0x2af9;MAIN_SWITCH_OFF_TIMEOUT;LOW;;mission\devices\SolarArrayDeploymentHandler.h
11002;0x2afa;DEPLOYMENT_FAILED;HIGH;;mission\devices\SolarArrayDeploymentHandler.h
11003;0x2afb;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;mission\devices\SolarArrayDeploymentHandler.h
11004;0x2afc;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;mission\devices\SolarArrayDeploymentHandler.h
11101;0x2b5d;MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC crc failure in telemetry packet;linux\devices\ploc\PlocMPSoCHandler.h
11102;0x2b5e;ACK_FAILURE;LOW;PLOC receive acknowledgment failure report P1: Command Id which leads the acknowledgment failure report P2: The status field inserted by the MPSoC into the data field;linux\devices\ploc\PlocMPSoCHandler.h
11103;0x2b5f;EXE_FAILURE;LOW;PLOC receive execution failure report P1: Command Id which leads the execution failure report P2: The status field inserted by the MPSoC into the data field;linux\devices\ploc\PlocMPSoCHandler.h
11104;0x2b60;MPSOC_HANDLER_CRC_FAILURE;LOW;PLOC reply has invalid crc;linux\devices\ploc\PlocMPSoCHandler.h
11105;0x2b61;MPSOC_HANDLER_SEQ_CNT_MISMATCH;LOW;Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count;linux\devices\ploc\PlocMPSoCHandler.h
11106;0x2b62;MPSOC_SHUTDOWN_FAILED;HIGH;Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor.;linux\devices\ploc\PlocMPSoCHandler.h
11201;0x2bc1;SELF_TEST_I2C_FAILURE;LOW;Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11202;0x2bc2;SELF_TEST_SPI_FAILURE;LOW;Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11203;0x2bc3;SELF_TEST_ADC_FAILURE;LOW;Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11204;0x2bc4;SELF_TEST_PWM_FAILURE;LOW;Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11205;0x2bc5;SELF_TEST_TC_FAILURE;LOW;Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11206;0x2bc6;SELF_TEST_MTM_RANGE_FAILURE;LOW;Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11207;0x2bc7;SELF_TEST_COIL_CURRENT_FAILURE;LOW;Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA;mission\devices\IMTQHandler.h
11208;0x2bc8;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;mission\devices\IMTQHandler.h
11301;0x2c25;ERROR_STATE;HIGH;Reaction wheel signals an error state;mission\devices\RwHandler.h
11401;0x2c89;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;linux\devices\startracker\StarTrackerHandler.h
11402;0x2c8a;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;linux\devices\startracker\StarTrackerHandler.h
11501;0x2ced;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux\devices\ploc\PlocSupervisorHandler.h
11502;0x2cee;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;linux\devices\ploc\PlocSupervisorHandler.h
11503;0x2cef;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;linux\devices\ploc\PlocSupervisorHandler.h
11504;0x2cf0;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux\devices\ploc\PlocSupervisorHandler.h
11505;0x2cf1;SUPV_HELPER_EXECUTING;LOW;Supervisor helper currently executing a command;linux\devices\ploc\PlocSupervisorHandler.h
11600;0x2d50;SANITIZATION_FAILED;LOW;;bsp_q7s\memory\SdCardManager.h
11601;0x2d51;MOUNTED_SD_CARD;INFO;;bsp_q7s\memory\SdCardManager.h
11800;0x2e18;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux\devices\ploc\PlocMemoryDumper.h
11801;0x2e19;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux\devices\ploc\PlocMemoryDumper.h
11802;0x2e1a;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux\devices\ploc\PlocMemoryDumper.h
11901;0x2e7d;INVALID_TC_FRAME;HIGH;;linux\obc\PdecHandler.h
11902;0x2e7e;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux\obc\PdecHandler.h
11903;0x2e7f;CARRIER_LOCK;INFO;Carrier lock detected;linux\obc\PdecHandler.h
11904;0x2e80;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux\obc\PdecHandler.h
12000;0x2ee0;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux\devices\startracker\StrHelper.h
12001;0x2ee1;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux\devices\startracker\StrHelper.h
12002;0x2ee2;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux\devices\startracker\StrHelper.h
12003;0x2ee3;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;linux\devices\startracker\StrHelper.h
12004;0x2ee4;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;linux\devices\startracker\StrHelper.h
12005;0x2ee5;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;linux\devices\startracker\StrHelper.h
12006;0x2ee6;FLASH_READ_FAILED;LOW;Flash read procedure failed;linux\devices\startracker\StrHelper.h
12007;0x2ee7;FIRMWARE_UPDATE_SUCCESSFUL;LOW;Firmware update was successful;linux\devices\startracker\StrHelper.h
12008;0x2ee8;FIRMWARE_UPDATE_FAILED;LOW;Firmware update failed;linux\devices\startracker\StrHelper.h
12009;0x2ee9;STR_HELPER_READING_REPLY_FAILED;LOW;Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;linux\devices\startracker\StrHelper.h
12010;0x2eea;STR_HELPER_COM_ERROR;LOW;Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed;linux\devices\startracker\StrHelper.h
12011;0x2eeb;STR_HELPER_NO_REPLY;LOW;Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent;linux\devices\startracker\StrHelper.h
12012;0x2eec;STR_HELPER_DEC_ERROR;LOW;Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request;linux\devices\startracker\StrHelper.h
12013;0x2eed;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;linux\devices\startracker\StrHelper.h
12014;0x2eee;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;linux\devices\startracker\StrHelper.h
12015;0x2eef;STR_HELPER_SENDING_PACKET_FAILED;LOW;;linux\devices\startracker\StrHelper.h
12016;0x2ef0;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;linux\devices\startracker\StrHelper.h
12100;0x2f44;SUPV_UPDATE_FAILED;LOW;update failed;linux\devices\ploc\PlocSupvHelper.h
12101;0x2f45;SUPV_UPDATE_SUCCESSFUL;LOW;update successful;linux\devices\ploc\PlocSupvHelper.h
12102;0x2f46;TERMINATED_UPDATE_PROCEDURE;LOW;Terminated update procedure by command;linux\devices\ploc\PlocSupvHelper.h
12103;0x2f47;SUPV_SENDING_COMMAND_FAILED;LOW;;linux\devices\ploc\PlocSupvHelper.h
12104;0x2f48;SUPV_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12105;0x2f49;SUPV_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12106;0x2f4a;SUPV_MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux\devices\ploc\PlocSupvHelper.h
12107;0x2f4b;SUPV_MISSING_EXE;LOW;Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12108;0x2f4c;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12109;0x2f4d;SUPV_EXE_FAILURE_REPORT;LOW;Supervisor received execution failure report P1: Internal state of supervisor;linux\devices\ploc\PlocSupvHelper.h
12110;0x2f4e;SUPV_ACK_INVALID_APID;LOW;Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12111;0x2f4f;SUPV_EXE_INVALID_APID;LOW;Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12200;0x2fa8;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission\devices\PayloadPcduHandler.h
12201;0x2fa9;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12202;0x2faa;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12203;0x2fab;I_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12204;0x2fac;U_X8_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12205;0x2fad;I_X8_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12206;0x2fae;U_TX_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12207;0x2faf;I_TX_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12208;0x2fb0;U_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12209;0x2fb1;I_MPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12210;0x2fb2;U_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12211;0x2fb3;I_HPA_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12300;0x300c;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission\system\AcsBoardAssembly.h
12301;0x300d;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission\system\AcsBoardAssembly.h
12302;0x300e;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission\system\AcsBoardAssembly.h
12303;0x300f;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission\system\AcsBoardAssembly.h
12400;0x3070;TRANSITION_OTHER_SIDE_FAILED;HIGH;;mission\system\SusAssembly.h
12401;0x3071;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;;mission\system\SusAssembly.h
12402;0x3072;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;;mission\system\SusAssembly.h
12403;0x3073;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission\system\SusAssembly.h
12500;0x30d4;CHILDREN_LOST_MODE;MEDIUM;;mission\system\TcsBoardAssembly.h
13600;0x3520;ALLOC_FAILURE;MEDIUM;;bsp_q7s\core\CoreController.h
13601;0x3521;REBOOT_SW;MEDIUM; Software reboot occured. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s\core\CoreController.h
13602;0x3522;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s\core\CoreController.h
13603;0x3523;REBOOT_HW;MEDIUM;;bsp_q7s\core\CoreController.h

1 2200 0x0898 STORE_SEND_WRITE_FAILED LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
2 2201 0x0899 STORE_WRITE_FAILED LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
3 2202 0x089a STORE_SEND_READ_FAILED LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
4 2203 0x089b STORE_READ_FAILED LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
5 2204 0x089c UNEXPECTED_MSG LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
6 2205 0x089d STORING_FAILED LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
7 2206 0x089e TM_DUMP_FAILED LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
8 2207 0x089f STORE_INIT_FAILED LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
9 2208 0x08a0 STORE_INIT_EMPTY INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
10 2209 0x08a1 STORE_CONTENT_CORRUPTED LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
11 2210 0x08a2 STORE_INITIALIZE INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
12 2211 0x08a3 INIT_DONE INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
13 2212 0x08a4 DUMP_FINISHED INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
14 2213 0x08a5 DELETION_FINISHED INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
15 2214 0x08a6 DELETION_FAILED LOW fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
16 2215 0x08a7 AUTO_CATALOGS_SENDING_FAILED INFO fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
17 2600 0x0a28 GET_DATA_FAILED LOW fsfw/src/fsfw/storagemanager/StorageManagerIF.h fsfw\src\fsfw\storagemanager\StorageManagerIF.h
18 2601 0x0a29 STORE_DATA_FAILED LOW fsfw/src/fsfw/storagemanager/StorageManagerIF.h fsfw\src\fsfw\storagemanager\StorageManagerIF.h
19 2800 0x0af0 DEVICE_BUILDING_COMMAND_FAILED LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
20 2801 0x0af1 DEVICE_SENDING_COMMAND_FAILED LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
21 2802 0x0af2 DEVICE_REQUESTING_REPLY_FAILED LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
22 2803 0x0af3 DEVICE_READING_REPLY_FAILED LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
23 2804 0x0af4 DEVICE_INTERPRETING_REPLY_FAILED LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
24 2805 0x0af5 DEVICE_MISSED_REPLY LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
25 2806 0x0af6 DEVICE_UNKNOWN_REPLY LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
26 2807 0x0af7 DEVICE_UNREQUESTED_REPLY LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
27 2808 0x0af8 INVALID_DEVICE_COMMAND LOW Indicates a SW bug in child class. fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
28 2809 0x0af9 MONITORING_LIMIT_EXCEEDED LOW fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
29 2810 0x0afa MONITORING_AMBIGUOUS HIGH fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
30 2811 0x0afb DEVICE_WANTS_HARD_REBOOT HIGH fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h fsfw\src\fsfw\devicehandlers\DeviceHandlerIF.h
31 4201 0x1069 FUSE_CURRENT_HIGH LOW fsfw/src/fsfw/power/Fuse.h fsfw\src\fsfw\power\Fuse.h
32 4202 0x106a FUSE_WENT_OFF LOW fsfw/src/fsfw/power/Fuse.h fsfw\src\fsfw\power\Fuse.h
33 4204 0x106c POWER_ABOVE_HIGH_LIMIT LOW fsfw/src/fsfw/power/Fuse.h fsfw\src\fsfw\power\Fuse.h
34 4205 0x106d POWER_BELOW_LOW_LIMIT LOW fsfw/src/fsfw/power/Fuse.h fsfw\src\fsfw\power\Fuse.h
35 4300 0x10cc SWITCH_WENT_OFF LOW fsfw/src/fsfw/power/PowerSwitchIF.h fsfw\src\fsfw\power\PowerSwitchIF.h
36 5000 0x1388 HEATER_ON INFO fsfw/src/fsfw/thermal/Heater.h fsfw\src\fsfw\thermal\Heater.h
37 5001 0x1389 HEATER_OFF INFO fsfw/src/fsfw/thermal/Heater.h fsfw\src\fsfw\thermal\Heater.h
38 5002 0x138a HEATER_TIMEOUT LOW fsfw/src/fsfw/thermal/Heater.h fsfw\src\fsfw\thermal\Heater.h
39 5003 0x138b HEATER_STAYED_ON LOW fsfw/src/fsfw/thermal/Heater.h fsfw\src\fsfw\thermal\Heater.h
40 5004 0x138c HEATER_STAYED_OFF LOW fsfw/src/fsfw/thermal/Heater.h fsfw\src\fsfw\thermal\Heater.h
41 5200 0x1450 TEMP_SENSOR_HIGH LOW fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
42 5201 0x1451 TEMP_SENSOR_LOW LOW fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
43 5202 0x1452 TEMP_SENSOR_GRADIENT LOW fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h fsfw\src\fsfw\thermal\AbstractTemperatureSensor.h
44 5901 0x170d COMPONENT_TEMP_LOW LOW fsfw/src/fsfw/thermal/ThermalComponentIF.h fsfw\src\fsfw\thermal\ThermalComponentIF.h
45 5902 0x170e COMPONENT_TEMP_HIGH LOW fsfw/src/fsfw/thermal/ThermalComponentIF.h fsfw\src\fsfw\thermal\ThermalComponentIF.h
46 5903 0x170f COMPONENT_TEMP_OOL_LOW LOW fsfw/src/fsfw/thermal/ThermalComponentIF.h fsfw\src\fsfw\thermal\ThermalComponentIF.h
47 5904 0x1710 COMPONENT_TEMP_OOL_HIGH LOW fsfw/src/fsfw/thermal/ThermalComponentIF.h fsfw\src\fsfw\thermal\ThermalComponentIF.h
48 5905 0x1711 TEMP_NOT_IN_OP_RANGE LOW fsfw/src/fsfw/thermal/ThermalComponentIF.h fsfw\src\fsfw\thermal\ThermalComponentIF.h
49 7101 0x1bbd FDIR_CHANGED_STATE INFO fsfw/src/fsfw/fdir/FailureIsolationBase.h fsfw\src\fsfw\fdir\FailureIsolationBase.h
50 7102 0x1bbe FDIR_STARTS_RECOVERY MEDIUM fsfw/src/fsfw/fdir/FailureIsolationBase.h fsfw\src\fsfw\fdir\FailureIsolationBase.h
51 7103 0x1bbf FDIR_TURNS_OFF_DEVICE MEDIUM fsfw/src/fsfw/fdir/FailureIsolationBase.h fsfw\src\fsfw\fdir\FailureIsolationBase.h
52 7201 0x1c21 MONITOR_CHANGED_STATE LOW fsfw/src/fsfw/monitoring/MonitoringIF.h fsfw\src\fsfw\monitoring\MonitoringIF.h
53 7202 0x1c22 VALUE_BELOW_LOW_LIMIT LOW fsfw/src/fsfw/monitoring/MonitoringIF.h fsfw\src\fsfw\monitoring\MonitoringIF.h
54 7203 0x1c23 VALUE_ABOVE_HIGH_LIMIT LOW fsfw/src/fsfw/monitoring/MonitoringIF.h fsfw\src\fsfw\monitoring\MonitoringIF.h
55 7204 0x1c24 VALUE_OUT_OF_RANGE LOW fsfw/src/fsfw/monitoring/MonitoringIF.h fsfw\src\fsfw\monitoring\MonitoringIF.h
56 7400 0x1ce8 CHANGING_MODE INFO fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
57 7401 0x1ce9 MODE_INFO INFO fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
58 7402 0x1cea FALLBACK_FAILED HIGH fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
59 7403 0x1ceb MODE_TRANSITION_FAILED LOW fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
60 7404 0x1cec CANT_KEEP_MODE HIGH fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
61 7405 0x1ced OBJECT_IN_INVALID_MODE LOW fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
62 7406 0x1cee FORCING_MODE MEDIUM fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
63 7407 0x1cef MODE_CMD_REJECTED LOW fsfw/src/fsfw/modes/HasModesIF.h fsfw\src\fsfw\modes\HasModesIF.h
64 7506 0x1d52 HEALTH_INFO INFO fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
65 7507 0x1d53 CHILD_CHANGED_HEALTH INFO fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
66 7508 0x1d54 CHILD_PROBLEMS LOW fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
67 7509 0x1d55 OVERWRITING_HEALTH LOW fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
68 7510 0x1d56 TRYING_RECOVERY MEDIUM fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
69 7511 0x1d57 RECOVERY_STEP MEDIUM fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
70 7512 0x1d58 RECOVERY_DONE MEDIUM fsfw/src/fsfw/health/HasHealthIF.h fsfw\src\fsfw\health\HasHealthIF.h
71 7900 0x1edc RF_AVAILABLE INFO A RF available signal was detected. P1: raw RFA state, P2: 0 fsfw/src/fsfw/datalinklayer/DataLinkLayer.h fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
72 7901 0x1edd RF_LOST INFO A previously found RF available signal was lost. P1: raw RFA state, P2: 0 fsfw/src/fsfw/datalinklayer/DataLinkLayer.h fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
73 7902 0x1ede BIT_LOCK INFO A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0 fsfw/src/fsfw/datalinklayer/DataLinkLayer.h fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
74 7903 0x1edf BIT_LOCK_LOST INFO A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0 fsfw/src/fsfw/datalinklayer/DataLinkLayer.h fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
75 7905 0x1ee1 FRAME_PROCESSING_FAILED LOW The CCSDS Board could not interpret a TC fsfw/src/fsfw/datalinklayer/DataLinkLayer.h fsfw\src\fsfw\datalinklayer\DataLinkLayer.h
76 8900 0x22c4 CLOCK_SET INFO fsfw/src/fsfw/pus/Service9TimeManagement.h fsfw\src\fsfw\pus\Service9TimeManagement.h
77 8901 0x22c5 CLOCK_SET_FAILURE LOW fsfw/src/fsfw/pus/Service9TimeManagement.h fsfw\src\fsfw\pus\Service9TimeManagement.h
78 9700 0x25e4 TEST INFO fsfw/src/fsfw/pus/Service17Test.h fsfw\src\fsfw\pus\Service17Test.h
79 10600 0x2968 CHANGE_OF_SETUP_PARAMETER LOW fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h fsfw\hal\src\fsfw_hal\devicehandlers\MgmLIS3MDLHandler.h
80 10800 0x2a30 SWITCH_CMD_SENT INFO Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index mission/devices/devicedefinitions/powerDefinitions.h mission\devices\devicedefinitions\powerDefinitions.h
81 10801 0x2a31 SWITCH_HAS_CHANGED INFO Indicated that a swithc state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index mission/devices/devicedefinitions/powerDefinitions.h mission\devices\devicedefinitions\powerDefinitions.h
82 10802 0x2a32 SWITCHING_Q7S_DENIED MEDIUM mission/devices/devicedefinitions/powerDefinitions.h mission\devices\devicedefinitions\powerDefinitions.h
83 10900 0x2a94 GPIO_PULL_HIGH_FAILED LOW mission/devices/HeaterHandler.h mission\devices\HeaterHandler.h
84 10901 0x2a95 GPIO_PULL_LOW_FAILED LOW mission/devices/HeaterHandler.h mission\devices\HeaterHandler.h
85 10902 0x2a96 SWITCH_ALREADY_ON LOW mission/devices/HeaterHandler.h mission\devices\HeaterHandler.h
86 10903 0x2a97 SWITCH_ALREADY_OFF LOW mission/devices/HeaterHandler.h mission\devices\HeaterHandler.h
87 10904 0x2a98 MAIN_SWITCH_TIMEOUT LOW mission/devices/HeaterHandler.h mission\devices\HeaterHandler.h
88 11000 0x2af8 MAIN_SWITCH_ON_TIMEOUT LOW mission/devices/SolarArrayDeploymentHandler.h mission\devices\SolarArrayDeploymentHandler.h
89 11001 0x2af9 MAIN_SWITCH_OFF_TIMEOUT LOW mission/devices/SolarArrayDeploymentHandler.h mission\devices\SolarArrayDeploymentHandler.h
90 11002 0x2afa DEPLOYMENT_FAILED HIGH mission/devices/SolarArrayDeploymentHandler.h mission\devices\SolarArrayDeploymentHandler.h
91 11003 0x2afb DEPL_SA1_GPIO_SWTICH_ON_FAILED HIGH mission/devices/SolarArrayDeploymentHandler.h mission\devices\SolarArrayDeploymentHandler.h
92 11004 0x2afc DEPL_SA2_GPIO_SWTICH_ON_FAILED HIGH mission/devices/SolarArrayDeploymentHandler.h mission\devices\SolarArrayDeploymentHandler.h
93 11101 0x2b5d MEMORY_READ_RPT_CRC_FAILURE LOW PLOC crc failure in telemetry packet linux/devices/ploc/PlocMPSoCHandler.h linux\devices\ploc\PlocMPSoCHandler.h
94 11102 0x2b5e ACK_FAILURE LOW PLOC receive acknowledgment failure report P1: Command Id which leads the acknowledgment failure report P2: The status field inserted by the MPSoC into the data field linux/devices/ploc/PlocMPSoCHandler.h linux\devices\ploc\PlocMPSoCHandler.h
95 11103 0x2b5f EXE_FAILURE LOW PLOC receive execution failure report P1: Command Id which leads the execution failure report P2: The status field inserted by the MPSoC into the data field linux/devices/ploc/PlocMPSoCHandler.h linux\devices\ploc\PlocMPSoCHandler.h
96 11104 0x2b60 MPSOC_HANDLER_CRC_FAILURE LOW PLOC reply has invalid crc linux/devices/ploc/PlocMPSoCHandler.h linux\devices\ploc\PlocMPSoCHandler.h
97 11105 0x2b61 MPSOC_HANDLER_SEQ_CNT_MISMATCH LOW Packet sequence count in received space packet does not match expected count P1: Expected sequence count P2: Received sequence count linux/devices/ploc/PlocMPSoCHandler.h linux\devices\ploc\PlocMPSoCHandler.h
98 11201 11106 0x2bc1 0x2b62 SELF_TEST_I2C_FAILURE MPSOC_SHUTDOWN_FAILED LOW HIGH Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA Supervisor fails to shutdown MPSoC. Requires to power off the PLOC and thus also to shutdown the supervisor. mission/devices/IMTQHandler.h linux\devices\ploc\PlocMPSoCHandler.h
99 11202 11201 0x2bc2 0x2bc1 SELF_TEST_SPI_FAILURE SELF_TEST_I2C_FAILURE LOW Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA Get self test result returns I2C failure P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/IMTQHandler.h mission\devices\IMTQHandler.h
100 11203 11202 0x2bc3 0x2bc2 SELF_TEST_ADC_FAILURE SELF_TEST_SPI_FAILURE LOW Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA Get self test result returns SPI failure. This concerns the MTM connectivity. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/IMTQHandler.h mission\devices\IMTQHandler.h
101 11204 11203 0x2bc4 0x2bc3 SELF_TEST_PWM_FAILURE SELF_TEST_ADC_FAILURE LOW Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA Get self test result returns failure in measurement of current and temperature. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/IMTQHandler.h mission\devices\IMTQHandler.h
102 11205 11204 0x2bc5 0x2bc4 SELF_TEST_TC_FAILURE SELF_TEST_PWM_FAILURE LOW Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA Get self test result returns PWM failure which concerns the coil actuation. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/IMTQHandler.h mission\devices\IMTQHandler.h
103 11206 11205 0x2bc6 0x2bc5 SELF_TEST_MTM_RANGE_FAILURE SELF_TEST_TC_FAILURE LOW Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA Get self test result returns TC failure (system failure) P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/IMTQHandler.h mission\devices\IMTQHandler.h
104 11207 11206 0x2bc7 0x2bc6 SELF_TEST_COIL_CURRENT_FAILURE SELF_TEST_MTM_RANGE_FAILURE LOW Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA Get self test result returns failure that MTM values were outside of the expected range. P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/IMTQHandler.h mission\devices\IMTQHandler.h
105 11208 11207 0x2bc8 0x2bc7 INVALID_ERROR_BYTE SELF_TEST_COIL_CURRENT_FAILURE LOW Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC. Get self test result returns failure indicating that the coil current was outside of the expected range P1: Indicates on which axis the failure occurred. 0 -> INIT, 1 -> +X, 2 -> -X, 3 -> +Y, 4 -> -Y, 5 -> +Z, 6 -> -Z, 7 -> FINA mission/devices/IMTQHandler.h mission\devices\IMTQHandler.h
106 11301 11208 0x2c25 0x2bc8 ERROR_STATE INVALID_ERROR_BYTE HIGH LOW Reaction wheel signals an error state Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC. mission/devices/RwHandler.h mission\devices\IMTQHandler.h
107 11401 11301 0x2c89 0x2c25 BOOTING_FIRMWARE_FAILED ERROR_STATE LOW HIGH Failed to boot firmware Reaction wheel signals an error state linux/devices/startracker/StarTrackerHandler.h mission\devices\RwHandler.h
108 11402 11401 0x2c8a 0x2c89 BOOTING_BOOTLOADER_FAILED BOOTING_FIRMWARE_FAILED LOW Failed to boot star tracker into bootloader mode Failed to boot firmware linux/devices/startracker/StarTrackerHandler.h linux\devices\startracker\StarTrackerHandler.h
109 11501 11402 0x2ced 0x2c8a SUPV_MEMORY_READ_RPT_CRC_FAILURE BOOTING_BOOTLOADER_FAILED LOW PLOC supervisor crc failure in telemetry packet Failed to boot star tracker into bootloader mode linux/devices/ploc/PlocSupervisorHandler.h linux\devices\startracker\StarTrackerHandler.h
110 11502 11501 0x2cee 0x2ced SUPV_ACK_FAILURE SUPV_MEMORY_READ_RPT_CRC_FAILURE LOW PLOC supervisor received acknowledgment failure report PLOC supervisor crc failure in telemetry packet linux/devices/ploc/PlocSupervisorHandler.h linux\devices\ploc\PlocSupervisorHandler.h
111 11503 11502 0x2cef 0x2cee SUPV_EXE_FAILURE SUPV_ACK_FAILURE LOW PLOC received execution failure report PLOC supervisor received acknowledgment failure report linux/devices/ploc/PlocSupervisorHandler.h linux\devices\ploc\PlocSupervisorHandler.h
112 11504 11503 0x2cf0 0x2cef SUPV_CRC_FAILURE_EVENT SUPV_EXE_FAILURE LOW PLOC supervisor reply has invalid crc PLOC received execution failure report linux/devices/ploc/PlocSupervisorHandler.h linux\devices\ploc\PlocSupervisorHandler.h
113 11600 11504 0x2d50 0x2cf0 SANITIZATION_FAILED SUPV_CRC_FAILURE_EVENT LOW PLOC supervisor reply has invalid crc bsp_q7s/memory/SdCardManager.h linux\devices\ploc\PlocSupervisorHandler.h
114 11601 11505 0x2d51 0x2cf1 MOUNTED_SD_CARD SUPV_HELPER_EXECUTING INFO LOW Supervisor helper currently executing a command bsp_q7s/memory/SdCardManager.h linux\devices\ploc\PlocSupervisorHandler.h
115 11700 11600 0x2db4 0x2d50 UPDATE_FILE_NOT_EXISTS SANITIZATION_FAILED LOW linux/devices/ploc/PlocUpdater.h bsp_q7s\memory\SdCardManager.h
116 11701 11601 0x2db5 0x2d51 ACTION_COMMANDING_FAILED MOUNTED_SD_CARD LOW INFO Failed to send command to supervisor handler P1: Return value of CommandActionHelper::commandAction P2: Action ID of command to send linux/devices/ploc/PlocUpdater.h bsp_q7s\memory\SdCardManager.h
117 11702 11800 0x2db6 0x2e18 UPDATE_AVAILABLE_FAILED SEND_MRAM_DUMP_FAILED LOW Supervisor handler replied action message indicating a command execution failure of the update available command Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command linux/devices/ploc/PlocUpdater.h linux\devices\ploc\PlocMemoryDumper.h
118 11703 11801 0x2db7 0x2e19 UPDATE_TRANSFER_FAILED MRAM_DUMP_FAILED LOW Supervisor handler failed to transfer an update space packet. P1: Parameter holds the number of update packets already sent (inclusive the failed packet) Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command linux/devices/ploc/PlocUpdater.h linux\devices\ploc\PlocMemoryDumper.h
119 11704 11802 0x2db8 0x2e1a UPDATE_VERIFY_FAILED MRAM_DUMP_FINISHED LOW Supervisor failed to execute the update verify command. MRAM dump finished successfully linux/devices/ploc/PlocUpdater.h linux\devices\ploc\PlocMemoryDumper.h
120 11705 11901 0x2db9 0x2e7d UPDATE_FINISHED INVALID_TC_FRAME INFO HIGH MPSoC update successful completed linux/devices/ploc/PlocUpdater.h linux\obc\PdecHandler.h
121 11800 11902 0x2e18 0x2e7e SEND_MRAM_DUMP_FAILED INVALID_FAR LOW HIGH Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command Read invalid FAR from PDEC after startup linux/devices/ploc/PlocMemoryDumper.h linux\obc\PdecHandler.h
122 11801 11903 0x2e19 0x2e7f MRAM_DUMP_FAILED CARRIER_LOCK LOW INFO Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command Carrier lock detected linux/devices/ploc/PlocMemoryDumper.h linux\obc\PdecHandler.h
123 11802 11904 0x2e1a 0x2e80 MRAM_DUMP_FINISHED BIT_LOCK_PDEC LOW INFO MRAM dump finished successfully Bit lock detected (data valid) linux/devices/ploc/PlocMemoryDumper.h linux\obc\PdecHandler.h
124 11901 12000 0x2e7d 0x2ee0 INVALID_TC_FRAME IMAGE_UPLOAD_FAILED HIGH LOW Image upload failed linux/obc/PdecHandler.h linux\devices\startracker\StrHelper.h
125 11902 12001 0x2e7e 0x2ee1 INVALID_FAR IMAGE_DOWNLOAD_FAILED HIGH LOW Read invalid FAR from PDEC after startup Image download failed linux/obc/PdecHandler.h linux\devices\startracker\StrHelper.h
126 11903 12002 0x2e7f 0x2ee2 CARRIER_LOCK IMAGE_UPLOAD_SUCCESSFUL INFO LOW Carrier lock detected Uploading image to star tracker was successfulop linux/obc/PdecHandler.h linux\devices\startracker\StrHelper.h
127 11904 12003 0x2e80 0x2ee3 BIT_LOCK_PDEC IMAGE_DOWNLOAD_SUCCESSFUL INFO LOW Bit lock detected (data valid) Image download was successful linux/obc/PdecHandler.h linux\devices\startracker\StrHelper.h
128 12000 12004 0x2ee0 0x2ee4 IMAGE_UPLOAD_FAILED FLASH_WRITE_SUCCESSFUL LOW Image upload failed Finished flash write procedure successfully linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
129 12001 12005 0x2ee1 0x2ee5 IMAGE_DOWNLOAD_FAILED FLASH_READ_SUCCESSFUL LOW Image download failed Finished flash read procedure successfully linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
130 12002 12006 0x2ee2 0x2ee6 IMAGE_UPLOAD_SUCCESSFUL FLASH_READ_FAILED LOW Uploading image to star tracker was successfulop Flash read procedure failed linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
131 12003 12007 0x2ee3 0x2ee7 IMAGE_DOWNLOAD_SUCCESSFUL FIRMWARE_UPDATE_SUCCESSFUL LOW Image download was successful Firmware update was successful linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
132 12004 12008 0x2ee4 0x2ee8 FLASH_WRITE_SUCCESSFUL FIRMWARE_UPDATE_FAILED LOW Finished flash write procedure successfully Firmware update failed linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
133 12005 12009 0x2ee5 0x2ee9 FLASH_READ_SUCCESSFUL STR_HELPER_READING_REPLY_FAILED LOW Finished flash read procedure successfully Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
134 12006 12010 0x2ee6 0x2eea FLASH_READ_FAILED STR_HELPER_COM_ERROR LOW Flash read procedure failed Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
135 12007 12011 0x2ee7 0x2eeb FIRMWARE_UPDATE_SUCCESSFUL STR_HELPER_NO_REPLY LOW Firmware update was successful Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
136 12008 12012 0x2ee8 0x2eec FIRMWARE_UPDATE_FAILED STR_HELPER_DEC_ERROR LOW Firmware update failed Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
137 12009 12013 0x2ee9 0x2eed STR_HELPER_READING_REPLY_FAILED POSITION_MISMATCH LOW Failed to read communication interface reply data P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed Position mismatch P1: The expected position and thus the position for which the image upload/download failed linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
138 12010 12014 0x2eea 0x2eee STR_HELPER_COM_ERROR STR_HELPER_FILE_NOT_EXISTS LOW Unexpected stop of decoding sequence P1: Return code of failed communication interface read call P1: Upload/download position for which the read call failed Specified file does not exist P1: Internal state of str helper linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
139 12011 12015 0x2eeb 0x2eef STR_HELPER_NO_REPLY STR_HELPER_SENDING_PACKET_FAILED LOW Star tracker did not send replies (maybe device is powered off) P1: Position of upload or download packet for which no reply was sent linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
140 12012 12016 0x2eec 0x2ef0 STR_HELPER_DEC_ERROR STR_HELPER_REQUESTING_MSG_FAILED LOW Error during decoding of received reply occurred P1: Return value of decoding function P2: Position of upload/download packet, or address of flash write/read request linux/devices/startracker/StrHelper.h linux\devices\startracker\StrHelper.h
141 12013 12100 0x2eed 0x2f44 POSITION_MISMATCH SUPV_UPDATE_FAILED LOW Position mismatch P1: The expected position and thus the position for which the image upload/download failed update failed linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocSupvHelper.h
142 12014 12101 0x2eee 0x2f45 STR_HELPER_FILE_NOT_EXISTS SUPV_UPDATE_SUCCESSFUL LOW Specified file does not exist P1: Internal state of str helper update successful linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocSupvHelper.h
143 12015 12102 0x2eef 0x2f46 STR_HELPER_SENDING_PACKET_FAILED TERMINATED_UPDATE_PROCEDURE LOW Terminated update procedure by command linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocSupvHelper.h
144 12016 12103 0x2ef0 0x2f47 STR_HELPER_REQUESTING_MSG_FAILED SUPV_SENDING_COMMAND_FAILED LOW linux/devices/startracker/StrHelper.h linux\devices\ploc\PlocSupvHelper.h
145 12100 12104 0x2f44 0x2f48 MPSOC_FLASH_WRITE_FAILED SUPV_HELPER_REQUESTING_REPLY_FAILED LOW Flash write fails Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper linux/devices/ploc/PlocMPSoCHelper.h linux\devices\ploc\PlocSupvHelper.h
146 12101 12105 0x2f45 0x2f49 MPSOC_FLASH_WRITE_SUCCESSFUL SUPV_HELPER_READING_REPLY_FAILED LOW Flash write successful Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper linux/devices/ploc/PlocMPSoCHelper.h linux\devices\ploc\PlocSupvHelper.h
147 12102 12106 0x2f46 0x2f4a SENDING_COMMAND_FAILED SUPV_MISSING_ACK LOW Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper linux/devices/ploc/PlocMPSoCHelper.h linux\devices\ploc\PlocSupvHelper.h
148 12103 12107 0x2f47 0x2f4b MPSOC_HELPER_REQUESTING_REPLY_FAILED SUPV_MISSING_EXE LOW Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of MPSoC helper Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper linux/devices/ploc/PlocMPSoCHelper.h linux\devices\ploc\PlocSupvHelper.h
149 12104 12108 0x2f48 0x2f4c MPSOC_HELPER_READING_REPLY_FAILED SUPV_ACK_FAILURE_REPORT LOW Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of MPSoC helper Supervisor received acknowledgment failure report P1: Internal state of supervisor helper linux/devices/ploc/PlocMPSoCHelper.h linux\devices\ploc\PlocSupvHelper.h
150 12105 12109 0x2f49 0x2f4d MISSING_ACK SUPV_EXE_FAILURE_REPORT LOW Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper Supervisor received execution failure report P1: Internal state of supervisor linux/devices/ploc/PlocMPSoCHelper.h linux\devices\ploc\PlocSupvHelper.h
151 12106 12110 0x2f4a 0x2f4e MISSING_EXE SUPV_ACK_INVALID_APID LOW Did not receive execution report P1: Number of bytes missing P2: Internal state of MPSoC helper Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper linux/devices/ploc/PlocMPSoCHelper.h linux\devices\ploc\PlocSupvHelper.h
152 12107 12111 0x2f4b 0x2f4f ACK_FAILURE_REPORT SUPV_EXE_INVALID_APID LOW Received acknowledgement failure report P1: Internal state of MPSoC Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper linux/devices/ploc/PlocMPSoCHelper.h linux\devices\ploc\PlocSupvHelper.h
153 12108 12200 0x2f4c 0x2fa8 EXE_FAILURE_REPORT TRANSITION_BACK_TO_OFF LOW MEDIUM Received execution failure report P1: Internal state of MPSoC Could not transition properly and went back to ALL OFF linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
154 12109 12201 0x2f4d 0x2fa9 ACK_INVALID_APID NEG_V_OUT_OF_BOUNDS LOW MEDIUM Expected acknowledgement report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
155 12110 12202 0x2f4e 0x2faa EXE_INVALID_APID U_DRO_OUT_OF_BOUNDS LOW MEDIUM Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
156 12111 12203 0x2f4f 0x2fab MPSOC_HELPER_SEQ_CNT_MISMATCH I_DRO_OUT_OF_BOUNDS LOW MEDIUM Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count P1: 0 -> too low, 1 -> too high P2: Float value linux/devices/ploc/PlocMPSoCHelper.h mission\devices\PayloadPcduHandler.h
157 12200 12204 0x2fa8 0x2fac TRANSITION_BACK_TO_OFF U_X8_OUT_OF_BOUNDS MEDIUM Could not transition properly and went back to ALL OFF P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\devices\PayloadPcduHandler.h
158 12201 12205 0x2fa9 0x2fad NEG_V_OUT_OF_BOUNDS I_X8_OUT_OF_BOUNDS MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\devices\PayloadPcduHandler.h
159 12202 12206 0x2faa 0x2fae U_DRO_OUT_OF_BOUNDS U_TX_OUT_OF_BOUNDS MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\devices\PayloadPcduHandler.h
160 12203 12207 0x2fab 0x2faf I_DRO_OUT_OF_BOUNDS I_TX_OUT_OF_BOUNDS MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\devices\PayloadPcduHandler.h
161 12204 12208 0x2fac 0x2fb0 U_X8_OUT_OF_BOUNDS U_MPA_OUT_OF_BOUNDS MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\devices\PayloadPcduHandler.h
162 12205 12209 0x2fad 0x2fb1 I_X8_OUT_OF_BOUNDS I_MPA_OUT_OF_BOUNDS MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\devices\PayloadPcduHandler.h
163 12206 12210 0x2fae 0x2fb2 U_TX_OUT_OF_BOUNDS U_HPA_OUT_OF_BOUNDS MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\devices\PayloadPcduHandler.h
164 12207 12211 0x2faf 0x2fb3 I_TX_OUT_OF_BOUNDS I_HPA_OUT_OF_BOUNDS MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\devices\PayloadPcduHandler.h
165 12208 12300 0x2fb0 0x300c U_MPA_OUT_OF_BOUNDS TRANSITION_OTHER_SIDE_FAILED MEDIUM HIGH P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\system\AcsBoardAssembly.h
166 12209 12301 0x2fb1 0x300d I_MPA_OUT_OF_BOUNDS NOT_ENOUGH_DEVICES_DUAL_MODE MEDIUM HIGH P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\system\AcsBoardAssembly.h
167 12210 12302 0x2fb2 0x300e U_HPA_OUT_OF_BOUNDS POWER_STATE_MACHINE_TIMEOUT MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission/devices/PayloadPcduHandler.h mission\system\AcsBoardAssembly.h
168 12211 12303 0x2fb3 0x300f I_HPA_OUT_OF_BOUNDS SIDE_SWITCH_TRANSITION_NOT_ALLOWED MEDIUM LOW P1: 0 -> too low, 1 -> too high P2: Float value Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination mission/devices/PayloadPcduHandler.h mission\system\AcsBoardAssembly.h
169 12300 12400 0x300c 0x3070 TRANSITION_OTHER_SIDE_FAILED HIGH mission/system/AcsBoardAssembly.h mission\system\SusAssembly.h
170 12301 12401 0x300d 0x3071 NOT_ENOUGH_DEVICES_DUAL_MODE HIGH mission/system/AcsBoardAssembly.h mission\system\SusAssembly.h
171 12302 12402 0x300e 0x3072 POWER_STATE_MACHINE_TIMEOUT MEDIUM mission/system/AcsBoardAssembly.h mission\system\SusAssembly.h
172 12303 12403 0x300f 0x3073 SIDE_SWITCH_TRANSITION_NOT_ALLOWED LOW Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination mission/system/AcsBoardAssembly.h mission\system\SusAssembly.h
173 12400 12500 0x3070 0x30d4 TRANSITION_OTHER_SIDE_FAILED CHILDREN_LOST_MODE HIGH MEDIUM mission/system/SusAssembly.h mission\system\TcsBoardAssembly.h
174 12401 13600 0x3071 0x3520 NOT_ENOUGH_DEVICES_DUAL_MODE ALLOC_FAILURE HIGH MEDIUM mission/system/SusAssembly.h bsp_q7s\core\CoreController.h
175 12402 13601 0x3072 0x3521 POWER_STATE_MACHINE_TIMEOUT REBOOT_SW MEDIUM Software reboot occured. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy mission/system/SusAssembly.h bsp_q7s\core\CoreController.h
176 12403 13602 0x3073 0x3522 SIDE_SWITCH_TRANSITION_NOT_ALLOWED REBOOT_MECHANISM_TRIGGERED LOW MEDIUM Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots mission/system/SusAssembly.h bsp_q7s\core\CoreController.h
177 12500 13603 0x30d4 0x3523 CHILDREN_LOST_MODE REBOOT_HW MEDIUM mission/system/TcsBoardAssembly.h bsp_q7s\core\CoreController.h
13600 0x3520 ALLOC_FAILURE MEDIUM bsp_q7s/core/CoreController.h
13601 0x3521 REBOOT_SW MEDIUM Software reboot occured. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy bsp_q7s/core/CoreController.h
13602 0x3522 REBOOT_MECHANISM_TRIGGERED MEDIUM The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots bsp_q7s/core/CoreController.h
13603 0x3523 REBOOT_HW MEDIUM bsp_q7s/core/CoreController.h

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 181 translations.
* @brief Auto-generated event translation file. Contains 177 translations.
* @details
* Generated on: 2022-03-28 12:48:26
* Generated on: 2022-04-10 13:17:48
*/
#include "translateEvents.h"
@ -102,6 +102,7 @@ const char *ACK_FAILURE_STRING = "ACK_FAILURE";
const char *EXE_FAILURE_STRING = "EXE_FAILURE";
const char *MPSOC_HANDLER_CRC_FAILURE_STRING = "MPSOC_HANDLER_CRC_FAILURE";
const char *MPSOC_HANDLER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HANDLER_SEQ_CNT_MISMATCH";
const char *MPSOC_SHUTDOWN_FAILED_STRING = "MPSOC_SHUTDOWN_FAILED";
const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE";
const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE";
const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE";
@ -117,14 +118,9 @@ const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
const char *SUPV_HELPER_EXECUTING_STRING = "SUPV_HELPER_EXECUTING";
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
const char *UPDATE_AVAILABLE_FAILED_STRING = "UPDATE_AVAILABLE_FAILED";
const char *UPDATE_TRANSFER_FAILED_STRING = "UPDATE_TRANSFER_FAILED";
const char *UPDATE_VERIFY_FAILED_STRING = "UPDATE_VERIFY_FAILED";
const char *UPDATE_FINISHED_STRING = "UPDATE_FINISHED";
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
const char *MRAM_DUMP_FAILED_STRING = "MRAM_DUMP_FAILED";
const char *MRAM_DUMP_FINISHED_STRING = "MRAM_DUMP_FINISHED";
@ -149,18 +145,18 @@ const char *POSITION_MISMATCH_STRING = "POSITION_MISMATCH";
const char *STR_HELPER_FILE_NOT_EXISTS_STRING = "STR_HELPER_FILE_NOT_EXISTS";
const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET_FAILED";
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
const char *MPSOC_FLASH_WRITE_FAILED_STRING = "MPSOC_FLASH_WRITE_FAILED";
const char *MPSOC_FLASH_WRITE_SUCCESSFUL_STRING = "MPSOC_FLASH_WRITE_SUCCESSFUL";
const char *SENDING_COMMAND_FAILED_STRING = "SENDING_COMMAND_FAILED";
const char *MPSOC_HELPER_REQUESTING_REPLY_FAILED_STRING = "MPSOC_HELPER_REQUESTING_REPLY_FAILED";
const char *MPSOC_HELPER_READING_REPLY_FAILED_STRING = "MPSOC_HELPER_READING_REPLY_FAILED";
const char *MISSING_ACK_STRING = "MISSING_ACK";
const char *MISSING_EXE_STRING = "MISSING_EXE";
const char *ACK_FAILURE_REPORT_STRING = "ACK_FAILURE_REPORT";
const char *EXE_FAILURE_REPORT_STRING = "EXE_FAILURE_REPORT";
const char *ACK_INVALID_APID_STRING = "ACK_INVALID_APID";
const char *EXE_INVALID_APID_STRING = "EXE_INVALID_APID";
const char *MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HELPER_SEQ_CNT_MISMATCH";
const char *SUPV_UPDATE_FAILED_STRING = "SUPV_UPDATE_FAILED";
const char *SUPV_UPDATE_SUCCESSFUL_STRING = "SUPV_UPDATE_SUCCESSFUL";
const char *TERMINATED_UPDATE_PROCEDURE_STRING = "TERMINATED_UPDATE_PROCEDURE";
const char *SUPV_SENDING_COMMAND_FAILED_STRING = "SUPV_SENDING_COMMAND_FAILED";
const char *SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING = "SUPV_HELPER_REQUESTING_REPLY_FAILED";
const char *SUPV_HELPER_READING_REPLY_FAILED_STRING = "SUPV_HELPER_READING_REPLY_FAILED";
const char *SUPV_MISSING_ACK_STRING = "SUPV_MISSING_ACK";
const char *SUPV_MISSING_EXE_STRING = "SUPV_MISSING_EXE";
const char *SUPV_ACK_FAILURE_REPORT_STRING = "SUPV_ACK_FAILURE_REPORT";
const char *SUPV_EXE_FAILURE_REPORT_STRING = "SUPV_EXE_FAILURE_REPORT";
const char *SUPV_ACK_INVALID_APID_STRING = "SUPV_ACK_INVALID_APID";
const char *SUPV_EXE_INVALID_APID_STRING = "SUPV_EXE_INVALID_APID";
const char *TRANSITION_BACK_TO_OFF_STRING = "TRANSITION_BACK_TO_OFF";
const char *NEG_V_OUT_OF_BOUNDS_STRING = "NEG_V_OUT_OF_BOUNDS";
const char *U_DRO_OUT_OF_BOUNDS_STRING = "U_DRO_OUT_OF_BOUNDS";
@ -379,6 +375,8 @@ const char *translateEvents(Event event) {
return MPSOC_HANDLER_CRC_FAILURE_STRING;
case (11105):
return MPSOC_HANDLER_SEQ_CNT_MISMATCH_STRING;
case (11106):
return MPSOC_SHUTDOWN_FAILED_STRING;
case (11201):
return SELF_TEST_I2C_FAILURE_STRING;
case (11202):
@ -409,22 +407,12 @@ const char *translateEvents(Event event) {
return SUPV_EXE_FAILURE_STRING;
case (11504):
return SUPV_CRC_FAILURE_EVENT_STRING;
case (11505):
return SUPV_HELPER_EXECUTING_STRING;
case (11600):
return SANITIZATION_FAILED_STRING;
case (11601):
return MOUNTED_SD_CARD_STRING;
case (11700):
return UPDATE_FILE_NOT_EXISTS_STRING;
case (11701):
return ACTION_COMMANDING_FAILED_STRING;
case (11702):
return UPDATE_AVAILABLE_FAILED_STRING;
case (11703):
return UPDATE_TRANSFER_FAILED_STRING;
case (11704):
return UPDATE_VERIFY_FAILED_STRING;
case (11705):
return UPDATE_FINISHED_STRING;
case (11800):
return SEND_MRAM_DUMP_FAILED_STRING;
case (11801):
@ -474,29 +462,29 @@ const char *translateEvents(Event event) {
case (12016):
return STR_HELPER_REQUESTING_MSG_FAILED_STRING;
case (12100):
return MPSOC_FLASH_WRITE_FAILED_STRING;
return SUPV_UPDATE_FAILED_STRING;
case (12101):
return MPSOC_FLASH_WRITE_SUCCESSFUL_STRING;
return SUPV_UPDATE_SUCCESSFUL_STRING;
case (12102):
return SENDING_COMMAND_FAILED_STRING;
return TERMINATED_UPDATE_PROCEDURE_STRING;
case (12103):
return MPSOC_HELPER_REQUESTING_REPLY_FAILED_STRING;
return SUPV_SENDING_COMMAND_FAILED_STRING;
case (12104):
return MPSOC_HELPER_READING_REPLY_FAILED_STRING;
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
case (12105):
return MISSING_ACK_STRING;
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
case (12106):
return MISSING_EXE_STRING;
return SUPV_MISSING_ACK_STRING;
case (12107):
return ACK_FAILURE_REPORT_STRING;
return SUPV_MISSING_EXE_STRING;
case (12108):
return EXE_FAILURE_REPORT_STRING;
return SUPV_ACK_FAILURE_REPORT_STRING;
case (12109):
return ACK_INVALID_APID_STRING;
return SUPV_EXE_FAILURE_REPORT_STRING;
case (12110):
return EXE_INVALID_APID_STRING;
return SUPV_ACK_INVALID_APID_STRING;
case (12111):
return MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING;
return SUPV_EXE_INVALID_APID_STRING;
case (12200):
return TRANSITION_BACK_TO_OFF_STRING;
case (12201):

@ -1 +1 @@
Subproject commit a3ea5dd2e7223c52e4f494e170850609b7b3a572
Subproject commit 5ad9fb94af3312d29863527106396395f7b808a5

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 117 translations.
* Generated on: 2022-03-28 12:48:33
* Generated on: 2022-04-10 13:17:55
*/
#include "translateObjects.h"

View File

@ -567,6 +567,9 @@ class TcReplayWriteSeq : public TcBase {
}
};
/**
* @brief Helps to extract the fields of the flash write command from the PUS packet.
*/
class FlashWritePusCmd : public MPSoCReturnValuesIF {
public:
FlashWritePusCmd(){};

View File

@ -7,6 +7,7 @@
#include <fsfw/serialize/SerializeAdapter.h>
#include <fsfw/timemanager/Clock.h>
#include <fsfw/tmtcpacket/SpacePacket.h>
#include "linux/devices/devicedefinitions/SupvReturnValuesIF.h"
namespace supv {
@ -24,7 +25,6 @@ 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;
/** Notifies the supervisor that a new update is available for the MPSoC */
static const DeviceCommandId_t UPDATE_AVAILABLE = 12;
static const DeviceCommandId_t WATCHDOGS_ENABLE = 13;
static const DeviceCommandId_t WATCHDOGS_CONFIG_TIMEOUT = 14;
static const DeviceCommandId_t ENABLE_LATCHUP_ALERT = 15;
@ -51,15 +51,15 @@ static const DeviceCommandId_t READ_GPIO = 35;
static const DeviceCommandId_t RESTART_SUPERVISOR = 36;
static const DeviceCommandId_t FACTORY_RESET_CLEAR_ALL = 37;
static const DeviceCommandId_t REQUEST_LOGGING_DATA = 38;
static const DeviceCommandId_t UPDATE_IMAGE_DATA = 39;
static const DeviceCommandId_t FACTORY_RESET_CLEAR_MIRROR = 40;
static const DeviceCommandId_t FACTORY_RESET_CLEAR_CIRCULAR = 41;
static const DeviceCommandId_t UPDATE_VERIFY = 42;
static const DeviceCommandId_t CONSECUTIVE_MRAM_DUMP = 43;
static const DeviceCommandId_t PREPARE_UPDATE = 44;
static const DeviceCommandId_t START_MPSOC_QUIET = 45;
static const DeviceCommandId_t SET_SHUTDOWN_TIMEOUT = 46;
static const DeviceCommandId_t FACTORY_FLASH = 47;
static const DeviceCommandId_t PERFORM_UPDATE = 48;
static const DeviceCommandId_t TERMINATE_SUPV_HELPER = 49;
/** Reply IDs */
static const DeviceCommandId_t ACK_REPORT = 50;
@ -70,7 +70,7 @@ static const DeviceCommandId_t LATCHUP_REPORT = 54;
static const uint16_t SIZE_ACK_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_LATCHUP_STATUS_REPORT = 31;
@ -108,9 +108,9 @@ static const uint16_t APID_PREPARE_UPDATE = 0xA9;
static const uint16_t APID_START_MPSOC_QUIET = 0xAA;
static const uint16_t APID_SET_SHUTDOWN_TIMEOUT = 0xAB;
static const uint16_t APID_FACTORY_FLASH = 0xAC;
static const uint16_t APID_UPDATE_AVAILABLE = 0xB0;
static const uint16_t APID_UPDATE_IMAGE_DATA = 0xB1;
static const uint16_t APID_UPDATE_VERIFY = 0xB2;
static const uint16_t APID_ERASE_MEMORY = 0xB0;
static const uint16_t APID_WRITE_MEMORY = 0xB1;
static const uint16_t APID_CHECK_MEMORY = 0xB2;
static const uint16_t APID_WTD_ENABLE = 0xC0;
static const uint16_t APID_WTD_CONFIG_TIMEOUT = 0xC1;
static const uint16_t APID_SET_TIME_REF = 0xC2;
@ -221,9 +221,9 @@ static const uint32_t BOOT_REPORT_SET_ID = BOOT_STATUS_REPORT;
static const uint32_t LATCHUP_RPT_ID = LATCHUP_REPORT;
/**
* @brief With this class a space packet can be created which does not contain any data.
* @brief This class creates a space packet containing only the header data and the CRC.
*/
class EmptyPacket : public SpacePacket {
class ApidOnlyPacket : public SpacePacket {
public:
/**
* @brief Constructor
@ -232,7 +232,7 @@ class EmptyPacket : public SpacePacket {
*
* @note Sequence count of empty packet is always 1.
*/
EmptyPacket(uint16_t apid) : SpacePacket(LENGTH_EMPTY_TC - 1, true, apid, 1) { calcCrc(); }
ApidOnlyPacket(uint16_t apid) : SpacePacket(LENGTH_EMPTY_TC - 1, true, apid, 1) { calcCrc(); }
private:
/**
@ -324,39 +324,39 @@ class SetTimeRef : public SpacePacket {
void initPacket(Clock::TimeOfDay_t* time) {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
uint8_t* dataFieldPtr = this->localData.fields.buffer;
uint16_t milliseconds = static_cast<uint16_t>(time->usecond / 1000) | SYNC;
SerializeAdapter::serialize<uint16_t>(&milliseconds, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint16_t>(&milliseconds, &dataFieldPtr, &serializedSize,
sizeof(milliseconds), SerializeIF::Endianness::BIG);
uint8_t second = static_cast<uint8_t>(time->second);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&second, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint8_t>(&second, &dataFieldPtr, &serializedSize,
sizeof(time->second), SerializeIF::Endianness::BIG);
uint8_t minute = static_cast<uint8_t>(time->minute);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&minute, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint8_t>(&minute, &dataFieldPtr, &serializedSize,
sizeof(time->minute), SerializeIF::Endianness::BIG);
uint8_t hour = static_cast<uint8_t>(time->hour);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&hour, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint8_t>(&hour, &dataFieldPtr, &serializedSize,
sizeof(time->hour), SerializeIF::Endianness::BIG);
uint8_t day = static_cast<uint8_t>(time->day);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&day, &data_field_ptr, &serializedSize, sizeof(time->day),
SerializeAdapter::serialize<uint8_t>(&day, &dataFieldPtr, &serializedSize, sizeof(time->day),
SerializeIF::Endianness::BIG);
uint8_t month = static_cast<uint8_t>(time->month);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&month, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint8_t>(&month, &dataFieldPtr, &serializedSize,
sizeof(time->month), SerializeIF::Endianness::BIG);
uint8_t year = static_cast<uint8_t>(time->year - 1900);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&year, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint8_t>(&year, &dataFieldPtr, &serializedSize,
sizeof(time->year), SerializeIF::Endianness::BIG);
serializedSize = 0;
/* Calculate crc */
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
sizeof(CCSDSPrimaryHeader) + DATA_FIELD_LENGTH - 2);
SerializeAdapter::serialize<uint16_t>(&crc, &data_field_ptr, &serializedSize, sizeof(crc),
SerializeAdapter::serialize<uint16_t>(&crc, &dataFieldPtr, &serializedSize, sizeof(crc),
SerializeIF::Endianness::BIG);
}
};
@ -384,15 +384,15 @@ class SetBootTimeout : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint32_t>(&timeout, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint32_t>(&timeout, &dataFieldPtr, &serializedSize,
sizeof(timeout), SerializeIF::Endianness::BIG);
/* Calculate crc */
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
sizeof(CCSDSPrimaryHeader) + DATA_FIELD_LENGTH - 2);
/* Add crc to packet data field of space packet */
serializedSize = 0;
SerializeAdapter::serialize<uint16_t>(&crc, &data_field_ptr, &serializedSize, sizeof(crc),
SerializeAdapter::serialize<uint16_t>(&crc, &dataFieldPtr, &serializedSize, sizeof(crc),
SerializeIF::Endianness::BIG);
}
};
@ -420,81 +420,17 @@ class SetRestartTries : public SpacePacket {
static const uint16_t DATA_FIELD_LENGTH = 3;
void initPacket() {
uint8_t* data_field_ptr = this->localData.fields.buffer;
*data_field_ptr = restartTries;
uint8_t* dataFieldPtr = this->localData.fields.buffer;
*dataFieldPtr = restartTries;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
sizeof(CCSDSPrimaryHeader) + DATA_FIELD_LENGTH - 2);
size_t serializedSize = 0;
uint8_t* crcPtr = data_field_ptr + 1;
uint8_t* crcPtr = dataFieldPtr + 1;
SerializeAdapter::serialize<uint16_t>(&crc, &crcPtr, &serializedSize, sizeof(crc),
SerializeIF::Endianness::BIG);
}
};
/**
* @brief This class packages the command to notify the supervisor that a new update for the
* MPSoC is available.
*/
class UpdateAvailable : public SpacePacket {
public:
/**
* @brief Constructor
*
* @param imageSelect
* @param imagePartition
* @param imageSize
* @param imageCrc
* @param numberOfPackets
*/
UpdateAvailable(uint8_t imageSelect, uint8_t imagePartition, uint32_t imageSize,
uint32_t imageCrc, uint32_t numberOfPackets)
: SpacePacket(DATA_FIELD_LENGTH - 1, true, APID_UPDATE_AVAILABLE, DEFAULT_SEQUENCE_COUNT),
imageSelect(imageSelect),
imagePartition(imagePartition),
imageSize(imageSize),
imageCrc(imageCrc),
numberOfPackets(numberOfPackets) {
initPacket();
}
private:
static const uint16_t DATA_FIELD_LENGTH = 16;
static const uint16_t DEFAULT_SEQUENCE_COUNT = 1;
static const uint16_t CRC_OFFSET = DATA_FIELD_LENGTH - 2;
uint8_t imageSelect = 0;
uint8_t imagePartition = 0;
uint32_t imageSize = 0;
uint32_t imageCrc = 0;
uint32_t numberOfPackets = 0;
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&imageSelect, &data_field_ptr, &serializedSize,
sizeof(imageSelect), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&imagePartition, &data_field_ptr, &serializedSize,
sizeof(imagePartition), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&imageSize, &data_field_ptr, &serializedSize,
sizeof(imageSize), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&imageCrc, &data_field_ptr, &serializedSize,
sizeof(imageCrc), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&numberOfPackets, &data_field_ptr, &serializedSize,
sizeof(numberOfPackets), SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
sizeof(CCSDSPrimaryHeader) + DATA_FIELD_LENGTH - 2);
uint8_t* crcPos = this->localData.fields.buffer + CRC_OFFSET;
SerializeAdapter::serialize<uint16_t>(&crc, &crcPos, &serializedSize, sizeof(crc),
SerializeIF::Endianness::BIG);
}
};
/**
* @brief With this class the space packet can be generated to disable to periodic transmission
* of housekeeping data. Normally, this will be disabled by default. However, adding this
@ -516,12 +452,12 @@ class DisablePeriodicHkTransmission : public SpacePacket {
static const uint16_t DATA_FIELD_LENGTH = 3;
void initPacket() {
uint8_t* data_field_ptr = this->localData.fields.buffer;
*data_field_ptr = disableHk;
uint8_t* dataFieldPtr = this->localData.fields.buffer;
*dataFieldPtr = disableHk;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
sizeof(CCSDSPrimaryHeader) + DATA_FIELD_LENGTH - 2);
size_t serializedSize = 0;
uint8_t* crcPtr = data_field_ptr + 1;
uint8_t* crcPtr = dataFieldPtr + 1;
SerializeAdapter::serialize<uint16_t>(&crc, &crcPtr, &serializedSize, sizeof(crc),
SerializeIF::Endianness::BIG);
}
@ -559,14 +495,14 @@ class WatchdogsEnable : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&watchdogPs, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&watchdogPs, &dataFieldPtr, &serializedSize,
sizeof(watchdogPs), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&watchdogPl, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint8_t>(&watchdogPl, &dataFieldPtr, &serializedSize,
sizeof(watchdogPl), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&watchdogInt, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint8_t>(&watchdogInt, &dataFieldPtr, &serializedSize,
sizeof(watchdogInt), SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -607,11 +543,11 @@ class WatchdogsConfigTimeout : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&watchdog, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&watchdog, &dataFieldPtr, &serializedSize,
sizeof(watchdog), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&timeout, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint32_t>(&timeout, &dataFieldPtr, &serializedSize,
sizeof(timeout), SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -657,8 +593,8 @@ class LatchupAlert : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&latchupId, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&latchupId, &dataFieldPtr, &serializedSize,
sizeof(latchupId), SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -699,11 +635,11 @@ class AutoCalibrateAlert : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&latchupId, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&latchupId, &dataFieldPtr, &serializedSize,
sizeof(latchupId), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&mg, &data_field_ptr, &serializedSize, sizeof(mg),
SerializeAdapter::serialize<uint32_t>(&mg, &dataFieldPtr, &serializedSize, sizeof(mg),
SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -741,11 +677,11 @@ class SetAlertlimit : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&latchupId, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&latchupId, &dataFieldPtr, &serializedSize,
sizeof(latchupId), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&dutycycle, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint32_t>(&dutycycle, &dataFieldPtr, &serializedSize,
sizeof(dutycycle), SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -785,14 +721,14 @@ class SetAlertIrqFilter : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&latchupId, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&latchupId, &dataFieldPtr, &serializedSize,
sizeof(latchupId), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&tp, &data_field_ptr, &serializedSize, sizeof(tp),
SerializeAdapter::serialize<uint8_t>(&tp, &dataFieldPtr, &serializedSize, sizeof(tp),
SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&div, &data_field_ptr, &serializedSize, sizeof(div),
SerializeAdapter::serialize<uint8_t>(&div, &dataFieldPtr, &serializedSize, sizeof(div),
SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -829,8 +765,8 @@ class SetAdcSweepPeriod : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint32_t>(&sweepPeriod, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint32_t>(&sweepPeriod, &dataFieldPtr, &serializedSize,
sizeof(sweepPeriod), SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -868,8 +804,8 @@ class SetAdcEnabledChannels : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint16_t>(&ch, &data_field_ptr, &serializedSize, sizeof(ch),
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint16_t>(&ch, &dataFieldPtr, &serializedSize, sizeof(ch),
SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -911,11 +847,11 @@ class SetAdcWindowAndStride : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint16_t>(&windowSize, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint16_t>(&windowSize, &dataFieldPtr, &serializedSize,
sizeof(windowSize), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint16_t>(&stridingStepSize, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint16_t>(&stridingStepSize, &dataFieldPtr, &serializedSize,
sizeof(stridingStepSize), SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -952,8 +888,8 @@ class SetAdcThreshold : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint32_t>(&threshold, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint32_t>(&threshold, &dataFieldPtr, &serializedSize,
sizeof(threshold), SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -990,8 +926,8 @@ class SelectNvm : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&mem, &data_field_ptr, &serializedSize, sizeof(mem),
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&mem, &dataFieldPtr, &serializedSize, sizeof(mem),
SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -1031,11 +967,11 @@ class EnableNvms : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&n01, &data_field_ptr, &serializedSize, sizeof(n01),
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&n01, &dataFieldPtr, &serializedSize, sizeof(n01),
SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&n3, &data_field_ptr, &serializedSize, sizeof(n3),
SerializeAdapter::serialize<uint8_t>(&n3, &dataFieldPtr, &serializedSize, sizeof(n3),
SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -1072,8 +1008,8 @@ class RunAutoEmTests : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&test, &data_field_ptr, &serializedSize, sizeof(test),
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&test, &dataFieldPtr, &serializedSize, sizeof(test),
SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -1111,8 +1047,8 @@ class PrintCpuStats : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&en, &data_field_ptr, &serializedSize, sizeof(en),
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&en, &dataFieldPtr, &serializedSize, sizeof(en),
SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -1150,8 +1086,8 @@ class SetDbgVerbosity : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&vb, &data_field_ptr, &serializedSize, sizeof(vb),
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&vb, &dataFieldPtr, &serializedSize, sizeof(vb),
SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -1209,8 +1145,8 @@ class MramCmd : public SpacePacket {
concatBuffer[3] = static_cast<uint8_t>(stop >> 16);
concatBuffer[4] = static_cast<uint8_t>(stop >> 8);
concatBuffer[5] = static_cast<uint8_t>(stop);
uint8_t* data_field_ptr = this->localData.fields.buffer;
std::memcpy(data_field_ptr, concatBuffer, sizeof(concatBuffer));
uint8_t* dataFieldPtr = this->localData.fields.buffer;
std::memcpy(dataFieldPtr, concatBuffer, sizeof(concatBuffer));
size_t serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
sizeof(CCSDSPrimaryHeader) + DATA_FIELD_LENGTH - 2);
@ -1253,14 +1189,14 @@ class SetGpio : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&port, &data_field_ptr, &serializedSize, sizeof(port),
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&port, &dataFieldPtr, &serializedSize, sizeof(port),
SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&pin, &data_field_ptr, &serializedSize, sizeof(pin),
SerializeAdapter::serialize<uint8_t>(&pin, &dataFieldPtr, &serializedSize, sizeof(pin),
SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&val, &data_field_ptr, &serializedSize, sizeof(val),
SerializeAdapter::serialize<uint8_t>(&val, &dataFieldPtr, &serializedSize, sizeof(val),
SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -1301,11 +1237,11 @@ class ReadGpio : public SpacePacket {
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&port, &data_field_ptr, &serializedSize, sizeof(port),
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&port, &dataFieldPtr, &serializedSize, sizeof(port),
SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&pin, &data_field_ptr, &serializedSize, sizeof(pin),
SerializeAdapter::serialize<uint8_t>(&pin, &dataFieldPtr, &serializedSize, sizeof(pin),
SerializeIF::Endianness::BIG);
serializedSize = 0;
uint16_t crc = CRC::crc16ccitt(this->localData.byteStream,
@ -1346,16 +1282,16 @@ class FactoryReset : public SpacePacket {
Op op = Op::CLEAR_ALL;
void initPacket() {
uint8_t* data_field_ptr = this->localData.fields.buffer;
uint8_t* dataFieldPtr = this->localData.fields.buffer;
switch (op) {
case Op::MIRROR_ENTRIES:
*data_field_ptr = 1;
*dataFieldPtr = 1;
packetLen = 2;
crcOffset = 1;
break;
case Op::CIRCULAR_ENTRIES:
*data_field_ptr = 2;
*dataFieldPtr = 2;
packetLen = 2;
crcOffset = 1;
break;
@ -1374,7 +1310,6 @@ class FactoryReset : public SpacePacket {
class SetShutdownTimeout : public SpacePacket {
public:
SetShutdownTimeout(uint32_t timeout)
: SpacePacket(0, true, APID_SET_SHUTDOWN_TIMEOUT, DEFAULT_SEQUENCE_COUNT), timeout(timeout) {
initPacket();
@ -1388,9 +1323,9 @@ class SetShutdownTimeout : public SpacePacket {
uint8_t crcOffset = 0;
void initPacket() {
uint8_t* data_field_ptr = this->localData.fields.buffer;
uint8_t* dataFieldPtr = this->localData.fields.buffer;
size_t serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&timeout, data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint32_t>(&timeout, dataFieldPtr, &serializedSize,
sizeof(timeout), SerializeIF::Endianness::BIG);
this->setPacketDataLength(PACKET_LEN);
serializedSize = 0;
@ -1426,110 +1361,141 @@ class SupvTcSpacePacket : public SpacePacket {
};
/**
* @brief This class can be used to package the update available or update verify command.
* @brief Command to request CRC over memory region of the supervisor.
*/
class UpdateInfo : public SupvTcSpacePacket {
class CheckMemory : public SupvTcSpacePacket {
public:
/**
* @brief Constructor
*
* @param apid Packet can be used to generate the update available and the update verify
* packet. Thus the APID must be specified here.
* @param image The image to update on a NVM (A - 0, B - 1)
* @param partition The partition to update. uboot - 1, bitstream - 2, linux - 3,
* application - 4
* @param imageSize The size of the update image
* param numPackets The number of space packets required to transfer all data.
* @param memoryId
* @param startAddress Start address of CRC calculation
* @param length Length in bytes of memory region
*/
UpdateInfo(uint16_t apid, uint8_t image, uint8_t partition, uint32_t imageSize, uint32_t imageCrc,
uint32_t numPackets)
: SupvTcSpacePacket(PAYLOAD_LENGTH, apid),
image(image),
partition(partition),
imageSize(imageSize),
imageCrc(imageCrc),
numPackets(numPackets) {
CheckMemory(uint8_t memoryId, uint32_t startAddress, uint32_t length)
: SupvTcSpacePacket(PAYLOAD_LENGTH, APID_CHECK_MEMORY),
memoryId(memoryId),
startAddress(startAddress),
length(length) {
initPacket();
makeCrc();
}
private:
static const uint16_t PAYLOAD_LENGTH = 14; // length without CRC field
static const uint16_t PAYLOAD_LENGTH = 10; // length without CRC field
uint8_t image = 0;
uint8_t partition = 0;
uint32_t imageSize = 0;
uint32_t imageCrc = 0;
uint32_t numPackets = 0;
uint8_t memoryId = 0;
uint8_t n = 1;
uint32_t startAddress = 0;
uint32_t length = 0;
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&image, &data_field_ptr, &serializedSize, sizeof(image),
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&memoryId, &dataFieldPtr, &serializedSize, sizeof(memoryId),
SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&partition, &data_field_ptr, &serializedSize,
sizeof(partition), SerializeIF::Endianness::BIG);
SerializeAdapter::serialize<uint8_t>(&n, &dataFieldPtr, &serializedSize, sizeof(n),
SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&imageSize, &data_field_ptr, &serializedSize,
sizeof(imageSize), SerializeIF::Endianness::BIG);
SerializeAdapter::serialize<uint32_t>(&startAddress, &dataFieldPtr, &serializedSize,
sizeof(startAddress), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&imageCrc, &data_field_ptr, &serializedSize,
sizeof(imageCrc), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&numPackets, &data_field_ptr, &serializedSize,
sizeof(numPackets), SerializeIF::Endianness::BIG);
SerializeAdapter::serialize<uint32_t>(&length, &dataFieldPtr, &serializedSize,
sizeof(length), SerializeIF::Endianness::BIG);
}
};
/**
* @brief This class packages the space packet transporting a part of an MPSoC update.
*/
class UpdatePacket : public SupvTcSpacePacket {
class WriteMemory : public SupvTcSpacePacket {
public:
/**
* @brief Constrcutor
*
* @param updateData Pointer to buffer containing update data
*/
UpdatePacket(uint8_t memoryId, uint32_t startAddress, uint16_t length, uint8_t* updateData)
: SupvTcSpacePacket(META_DATA_LENGTH + length, apid),
/**
* @brief Constructor
*
* @param seqFlags Sequence flags
* @param sequenceCount Sequence count (first update packet expects 1 as sequence count)
* @param updateData Pointer to buffer containing update data
*/
WriteMemory(SequenceFlags seqFlags, uint16_t sequenceCount, uint8_t memoryId,
uint32_t startAddress, uint16_t length, uint8_t* updateData)
: SupvTcSpacePacket(META_DATA_LENGTH + length, APID_WRITE_MEMORY),
memoryId(memoryId),
startAddress(startAddress),
length(length) {
if (this->length > CHUNK_MAX) {
sif::error << "WriteMemory::WriteMemory: Invalid length" << std::endl;
}
initPacket(updateData);
this->setSequenceFlags(static_cast<uint8_t>(seqFlags));
this->setPacketSequenceCount(sequenceCount);
makeCrc();
}
static const uint16_t MAX_UPDATE_DATA = 1010;
// Although the space packet has space left for 1010 bytes of data to supervisor can only process
// update packets with maximum 512 bytes of update data.
static const uint16_t CHUNK_MAX = 512;
private:
static const uint16_t META_DATA_LENGTH = 8;
uint8_t memoryId =0;
uint8_t memoryId = 0;
uint8_t n = 1;
uint32_t startAddress = 0;
uint16_t length = 0;
void initPacket(uint8_t* updateData) {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&memoryId, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&memoryId, &dataFieldPtr, &serializedSize,
sizeof(memoryId), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&n, &data_field_ptr, &serializedSize,
sizeof(n), SerializeIF::Endianness::BIG);
SerializeAdapter::serialize<uint8_t>(&n, &dataFieldPtr, &serializedSize, sizeof(n),
SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&startAddress, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint32_t>(&startAddress, &dataFieldPtr, &serializedSize,
sizeof(startAddress), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint16_t>(&length, &data_field_ptr, &serializedSize,
sizeof(length), SerializeIF::Endianness::BIG);
std::memcpy(data_field_ptr, updateData, length);
SerializeAdapter::serialize<uint16_t>(&length, &dataFieldPtr, &serializedSize, sizeof(length),
SerializeIF::Endianness::BIG);
std::memcpy(dataFieldPtr, updateData, length);
if (length % 2 != 0) {
this->setPacketDataLength(this->getFullSize() + 1);
// The data field must be two bytes aligned. Thus, in case the number of bytes to write is odd
// a value of zero is added here
*(dataFieldPtr + length + 1) = 0;
}
}
};
/**
* @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<uint8_t>(sid.objectId, PoolIds::ACTIVE_NVM, this);
/** States of the boot partition pins */
lp_var_t<uint8_t> bp0State = lp_var_t<uint8_t>(sid.objectId, PoolIds::BP0_STATE, this);
lp_var_t<uint8_t> bp1State = lp_var_t<uint8_t>(sid.objectId, PoolIds::BP1_STATE, this);
lp_var_t<uint8_t> bp2State = lp_var_t<uint8_t>(sid.objectId, PoolIds::BP2_STATE, this);
lp_var_t<uint8_t> bootState = lp_var_t<uint8_t>(sid.objectId, PoolIds::BOOT_STATE, this);
lp_var_t<uint8_t> bootCycles = lp_var_t<uint8_t>(sid.objectId, PoolIds::BOOT_CYCLES, this);
};
/**
* @brief This dataset stores the housekeeping data of the supervisor.
*/
@ -1587,7 +1553,7 @@ class LatchupStatusReport : public StaticLocalDataSet<LATCHUP_RPT_SET_ENTRIES> {
/**
* @brief Class for handling tm replies of the supervisor.
*/
class TmPacket : public SpacePacket, public MPSoCReturnValuesIF {
class TmPacket : public SpacePacket {
public:
/**
* @brief Constructor creates idle packet and sets length field to maximum allowed size.
@ -1600,7 +1566,7 @@ class TmPacket : public SpacePacket, public MPSoCReturnValuesIF {
uint16_t recalculatedCrc =
CRC::crc16ccitt(this->localData.byteStream, this->getFullSize() - CRC_SIZE);
if (recalculatedCrc != receivedCrc) {
return CRC_FAILURE;
return SupvReturnValuesIF::CRC_FAILURE;
}
return HasReturnvaluesIF::RETURN_OK;
}
@ -1611,9 +1577,8 @@ class TmPacket : public SpacePacket, public MPSoCReturnValuesIF {
*/
class EraseMemory : public SupvTcSpacePacket {
public:
EraseMemory(uint8_t memoryId, uint32_t startAddress, uint32_t length)
: SupvTcSpacePacket(PAYLOAD_LENGTH, apid),
EraseMemory(uint8_t memoryId, uint32_t startAddress, uint32_t length)
: SupvTcSpacePacket(PAYLOAD_LENGTH, APID_ERASE_MEMORY),
memoryId(memoryId),
startAddress(startAddress),
length(length) {
@ -1624,25 +1589,85 @@ class EraseMemory : public SupvTcSpacePacket {
private:
static const uint16_t PAYLOAD_LENGTH = 10; // length without CRC field
uint8_t memoryId =0;
uint8_t memoryId = 0;
uint8_t n = 1;
uint32_t startAddress = 0;
uint32_t length = 0;
void initPacket() {
size_t serializedSize = 0;
uint8_t* data_field_ptr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&memoryId, &data_field_ptr, &serializedSize,
uint8_t* dataFieldPtr = this->localData.fields.buffer;
SerializeAdapter::serialize<uint8_t>(&memoryId, &dataFieldPtr, &serializedSize,
sizeof(memoryId), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint8_t>(&n, &data_field_ptr, &serializedSize,
sizeof(n), SerializeIF::Endianness::BIG);
SerializeAdapter::serialize<uint8_t>(&n, &dataFieldPtr, &serializedSize, sizeof(n),
SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&startAddress, &data_field_ptr, &serializedSize,
SerializeAdapter::serialize<uint32_t>(&startAddress, &dataFieldPtr, &serializedSize,
sizeof(startAddress), SerializeIF::Endianness::BIG);
serializedSize = 0;
SerializeAdapter::serialize<uint32_t>(&length, &data_field_ptr, &serializedSize,
sizeof(length), SerializeIF::Endianness::BIG);
SerializeAdapter::serialize<uint32_t>(&length, &dataFieldPtr, &serializedSize, sizeof(length),
SerializeIF::Endianness::BIG);
}
};
class UpdateStatusReport : public TmPacket {
public:
UpdateStatusReport() : TmPacket() {}
ReturnValue_t parseDataField() {
ReturnValue_t result = lengthCheck();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
uint8_t* dataFieldPtr = this->localData.fields.buffer;
size_t size = sizeof(memoryId);
SerializeAdapter::deSerialize(&memoryId, dataFieldPtr, &size, SerializeIF::Endianness::BIG);
dataFieldPtr += size;
size = sizeof(n);
SerializeAdapter::deSerialize(&n, dataFieldPtr, &size, SerializeIF::Endianness::BIG);
dataFieldPtr += size;
size = sizeof(startAddress);
SerializeAdapter::deSerialize(&startAddress, dataFieldPtr, &size, SerializeIF::Endianness::BIG);
dataFieldPtr += size;
size = sizeof(length);
SerializeAdapter::deSerialize(&length, dataFieldPtr, &size, SerializeIF::Endianness::BIG);
dataFieldPtr += size;
size = sizeof(crc);
SerializeAdapter::deSerialize(&crc, dataFieldPtr, &size, SerializeIF::Endianness::BIG);
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t verifycrc(uint16_t goodCrc) const {
if (crc != goodCrc) {
return SupvReturnValuesIF::UPDATE_CRC_FAILURE;
}
return HasReturnvaluesIF::RETURN_OK;
}
uint16_t getCrc() const {
return crc;
}
uint16_t getNominalSize() const {
return FULL_SIZE;
}
private:
// Nominal size of the space packet
static const uint16_t FULL_SIZE = 20; // header, data field and crc
uint8_t memoryId = 0;
uint8_t n = 0;
uint32_t startAddress = 0;
uint32_t length = 0;
uint16_t crc = 0;
ReturnValue_t lengthCheck() {
if (this->getFullSize() != FULL_SIZE) {
return SupvReturnValuesIF::UPDATE_STATUS_REPORT_INVALID_LENGTH;
}
return HasReturnvaluesIF::RETURN_OK;
}
};
} // namespace supv

View File

@ -1,7 +1,7 @@
target_sources(${OBSW_NAME} PRIVATE
PlocSupervisorHandler.cpp
PlocUpdater.cpp
PlocMemoryDumper.cpp
PlocMPSoCHandler.cpp
PlocMPSoCHelper.cpp
PlocSupvHelper.cpp
)

View File

@ -204,7 +204,7 @@ ReturnValue_t PlocMPSoCHelper::sendCommand(mpsoc::TcBase& tc) {
result = uartComIF->sendMessage(comCookie, tc.getWholeData(), tc.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocMPSoCHelper::sendCommand: Failed to send command" << std::endl;
triggerEvent(SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
triggerEvent(MPSOC_SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
return result;
}
return result;
@ -227,11 +227,11 @@ ReturnValue_t PlocMPSoCHelper::handleAck() {
void PlocMPSoCHelper::handleAckApidFailure(uint16_t apid) {
if (apid == mpsoc::apid::ACK_FAILURE) {
triggerEvent(ACK_FAILURE_REPORT, static_cast<uint32_t>(internalState));
triggerEvent(MPSOC_ACK_FAILURE_REPORT, static_cast<uint32_t>(internalState));
sif::warning << "PlocMPSoCHelper::handleAckApidFailure: Received acknowledgement failure "
<< "report" << std::endl;
} else {
triggerEvent(ACK_INVALID_APID, apid, static_cast<uint32_t>(internalState));
triggerEvent(MPSOC_ACK_INVALID_APID, apid, static_cast<uint32_t>(internalState));
sif::warning << "PlocMPSoCHelper::handleAckApidFailure: Expected acknowledgement report "
<< "but received space packet with apid " << std::hex << apid << std::endl;
}
@ -254,11 +254,11 @@ ReturnValue_t PlocMPSoCHelper::handleExe() {
void PlocMPSoCHelper::handleExeApidFailure(uint16_t apid) {
if (apid == mpsoc::apid::EXE_FAILURE) {
triggerEvent(EXE_FAILURE_REPORT, static_cast<uint32_t>(internalState));
triggerEvent(MPSOC_EXE_FAILURE_REPORT, static_cast<uint32_t>(internalState));
sif::warning << "PlocMPSoCHelper::handleExeApidFailure: Received execution failure "
<< "report" << std::endl;
} else {
triggerEvent(EXE_INVALID_APID, apid, static_cast<uint32_t>(internalState));
triggerEvent(MPSOC_EXE_INVALID_APID, apid, static_cast<uint32_t>(internalState));
sif::warning << "PlocMPSoCHelper::handleExeApidFailure: Expected execution report "
<< "but received space packet with apid " << std::hex << apid << std::endl;
}
@ -281,7 +281,7 @@ ReturnValue_t PlocMPSoCHelper::handleTmReception(mpsoc::TmPacket* tmPacket, size
}
if (remainingBytes != 0) {
sif::warning << "PlocMPSoCHelper::handleTmReception: Failed to receive reply" << std::endl;
triggerEvent(MISSING_EXE, remainingBytes, static_cast<uint32_t>(internalState));
triggerEvent(MPSOC_MISSING_EXE, remainingBytes, static_cast<uint32_t>(internalState));
return RETURN_FAILED;
}
result = tmPacket->checkCrc();

View File

@ -29,10 +29,10 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF, public H
//! [EXPORT] : [COMMENT] Flash write successful
static const Event MPSOC_FLASH_WRITE_SUCCESSFUL = MAKE_EVENT(1, severity::LOW);
//! [EXPORT] : [COMMENT] Communication interface returned failure when trying to send the command
//! ot the PLOC
//! to the MPSoC
//! P1: Return value returned by the communication interface sendMessage function
//! P2: Internal state of MPSoC helper
static const Event SENDING_COMMAND_FAILED = MAKE_EVENT(2, severity::LOW);
static const Event MPSOC_SENDING_COMMAND_FAILED = MAKE_EVENT(2, severity::LOW);
//! [EXPORT] : [COMMENT] Request receive message of communication interface failed
//! P1: Return value returned by the communication interface requestReceiveMessage function
//! P2: Internal state of MPSoC helper
@ -41,28 +41,28 @@ class PlocMPSoCHelper : public SystemObject, public ExecutableObjectIF, public H
//! P1: Return value returned by the communication interface readingReceivedMessage function
//! P2: Internal state of MPSoC helper
static const Event MPSOC_HELPER_READING_REPLY_FAILED = MAKE_EVENT(4, severity::LOW);
//! [EXPORT] : [COMMENT] Did not receive acknowledgement report
//! [EXPORT] : [COMMENT] Did not receive acknowledgment report
//! P1: Number of bytes missing
//! P2: Internal state of MPSoC helper
static const Event MISSING_ACK = MAKE_EVENT(5, severity::LOW);
static const Event MPSOC_MISSING_ACK = MAKE_EVENT(5, severity::LOW);
//! [EXPORT] : [COMMENT] Did not receive execution report
//! P1: Number of bytes missing
//! P2: Internal state of MPSoC helper
static const Event MISSING_EXE = MAKE_EVENT(6, severity::LOW);
//! [EXPORT] : [COMMENT] Received acknowledgement failure report
static const Event MPSOC_MISSING_EXE = MAKE_EVENT(6, severity::LOW);
//! [EXPORT] : [COMMENT] Received acknowledgment failure report
//! P1: Internal state of MPSoC
static const Event ACK_FAILURE_REPORT = MAKE_EVENT(7, severity::LOW);
static const Event MPSOC_ACK_FAILURE_REPORT = MAKE_EVENT(7, severity::LOW);
//! [EXPORT] : [COMMENT] Received execution failure report
//! P1: Internal state of MPSoC
static const Event EXE_FAILURE_REPORT = MAKE_EVENT(8, severity::LOW);
//! [EXPORT] : [COMMENT] Expected acknowledgement report but received space packet with other apid
static const Event MPSOC_EXE_FAILURE_REPORT = MAKE_EVENT(8, severity::LOW);
//! [EXPORT] : [COMMENT] Expected acknowledgment report but received space packet with other apid
//! P1: Apid of received space packet
//! P2: Internal state of MPSoC
static const Event ACK_INVALID_APID = MAKE_EVENT(9, severity::LOW);
static const Event MPSOC_ACK_INVALID_APID = MAKE_EVENT(9, severity::LOW);
//! [EXPORT] : [COMMENT] Expected execution report but received space packet with other apid
//! P1: Apid of received space packet
//! P2: Internal state of MPSoC
static const Event EXE_INVALID_APID = MAKE_EVENT(10, severity::LOW);
static const Event MPSOC_EXE_INVALID_APID = MAKE_EVENT(10, severity::LOW);
//! [EXPORT] : [COMMENT] Received sequence count does not match expected sequence count
//! P1: Expected sequence count
//! P2: Received sequence count

View File

@ -1,28 +1,32 @@
#include "PlocSupervisorHandler.h"
#include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/globalfunctions/CRC.h>
#include <fsfw/timemanager/Clock.h>
#include <filesystem>
#include <fstream>
#include <sstream>
#include <string>
#include "OBSWConfig.h"
#include "eive/definitions.h"
#include "fsfw/datapool/PoolReadGuard.h"
#include "fsfw/globalfunctions/CRC.h"
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/timemanager/Clock.h"
PlocSupervisorHandler::PlocSupervisorHandler(object_id_t objectId, object_id_t uartComIFid,
CookieIF* comCookie, Gpio uartIsolatorSwitch,
power::Switch_t powerSwitch)
power::Switch_t powerSwitch,
PlocSupvHelper* supvHelper)
: DeviceHandlerBase(objectId, uartComIFid, comCookie),
uartIsolatorSwitch(uartIsolatorSwitch),
hkset(this),
bootStatusReport(this),
latchupStatusReport(this),
powerSwitch(powerSwitch) {
powerSwitch(powerSwitch),
supvHelper(supvHelper) {
if (comCookie == NULL) {
sif::error << "PlocSupervisorHandler: Invalid com cookie" << std::endl;
}
eventQueue = QueueFactory::instance()->createMessageQueue(EventMessage::EVENT_MESSAGE_SIZE * 5);
}
PlocSupervisorHandler::~PlocSupervisorHandler() {}
@ -38,12 +42,85 @@ ReturnValue_t PlocSupervisorHandler::initialize() {
sif::warning << "PlocSupervisorHandler::initialize: Invalid uart com if" << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED;
}
#ifdef TE0720_1CFA
#ifndef TE0720_1CFA
sdcMan = SdCardManager::instance();
#endif /* BOARD_TE0720 == 0 */
#endif /* TE0720_1CFA */
if (supvHelper == nullptr) {
sif::warning << "PlocSupervisorHandler::initialize: Invalid supervisor helper" << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED;
}
result = supvHelper->setComIF(uartComIf);
if (result != RETURN_OK) {
return ObjectManagerIF::CHILD_INIT_FAILED;
}
supvHelper->setComCookie(comCookie);
result = eventSubscription();
if (result != RETURN_OK) {
return result;
}
return result;
}
void PlocSupervisorHandler::performOperationHook() {
EventMessage event;
for (ReturnValue_t result = eventQueue->receiveMessage(&event); result == RETURN_OK;
result = eventQueue->receiveMessage(&event)) {
switch (event.getMessageId()) {
case EventMessage::EVENT_MESSAGE:
handleEvent(&event);
break;
default:
sif::debug << "PlocMPSoCHandler::performOperationHook: Did not subscribe to this event"
<< " message" << std::endl;
break;
}
}
}
ReturnValue_t PlocSupervisorHandler::executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) {
ReturnValue_t result = RETURN_OK;
switch (actionId) {
case supv::TERMINATE_SUPV_HELPER: {
supvHelper->stopProcess();
break;
}
default:
break;
}
if (plocSupvHelperExecuting) {
return SupvReturnValuesIF::SUPV_HELPER_EXECUTING;
}
switch (actionId) {
case supv::PERFORM_UPDATE: {
if (size > config::MAX_PATH_SIZE + config::MAX_FILENAME_SIZE) {
return SupvReturnValuesIF::FILENAME_TOO_LONG;
}
std::string file = "";
uint8_t memoryId = 0;
uint32_t startAddress = 0;
result = extractUpdateCommand(data, size, &file, &memoryId, &startAddress);
if (result != RETURN_OK) {
return result;
}
result = supvHelper->startUpdate(file, memoryId, startAddress);
if (result != RETURN_OK) {
return result;
}
plocSupvHelperExecuting = true;
return EXECUTION_FINISHED;
}
default:
break;
}
return DeviceHandlerBase::executeAction(actionId, commandedBy, data, size);
}
void PlocSupervisorHandler::doStartUp() {
setMode(_MODE_TO_ON);
uartIsolatorSwitch.pullHigh();
@ -249,16 +326,6 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d
result = RETURN_OK;
break;
}
case (supv::UPDATE_AVAILABLE):
case (supv::UPDATE_IMAGE_DATA):
case (supv::UPDATE_VERIFY):
// Simply forward data from PLOC Updater to supervisor
std::memcpy(commandBuffer, commandData, commandDataLen);
rawPacket = commandBuffer;
rawPacketLen = commandDataLen;
nextReplyId = supv::ACK_REPORT;
result = RETURN_OK;
break;
case (supv::PREPARE_UPDATE): {
prepareEmptyCmd(supv::APID_PREPARE_UPDATE);
result = RETURN_OK;
@ -308,9 +375,6 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
this->insertInCommandMap(supv::SET_TIME_REF);
this->insertInCommandMap(supv::DISABLE_PERIOIC_HK_TRANSMISSION);
this->insertInCommandMap(supv::GET_BOOT_STATUS_REPORT);
this->insertInCommandMap(supv::UPDATE_AVAILABLE);
this->insertInCommandMap(supv::UPDATE_VERIFY);
this->insertInCommandMap(supv::UPDATE_IMAGE_DATA);
this->insertInCommandMap(supv::WATCHDOGS_ENABLE);
this->insertInCommandMap(supv::WATCHDOGS_CONFIG_TIMEOUT);
this->insertInCommandMap(supv::ENABLE_LATCHUP_ALERT);
@ -398,7 +462,7 @@ ReturnValue_t PlocSupervisorHandler::scanForReply(const uint8_t* start, size_t r
default: {
sif::debug << "PlocSupervisorHandler::scanForReply: Reply has invalid apid" << std::endl;
*foundLen = remainingSize;
return INVALID_APID;
return SupvReturnValuesIF::INVALID_APID;
}
}
@ -501,6 +565,19 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
return HasReturnvaluesIF::RETURN_OK;
}
void PlocSupervisorHandler::handleEvent(EventMessage* eventMessage) {
object_id_t objectId = eventMessage->getReporter();
switch (objectId) {
case objects::PLOC_SUPERVISOR_HELPER: {
plocSupvHelperExecuting = false;
break;
}
default:
sif::debug << "PlocMPSoCHandler::handleEvent: Did not subscribe to this event" << std::endl;
break;
}
}
ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::iterator command,
uint8_t expectedReplies,
bool useAlternateId,
@ -568,9 +645,6 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite
case supv::SET_MAX_RESTART_TRIES:
case supv::RESET_MPSOC:
case supv::SET_TIME_REF:
case supv::UPDATE_AVAILABLE:
case supv::UPDATE_IMAGE_DATA:
case supv::UPDATE_VERIFY:
case supv::WATCHDOGS_ENABLE:
case supv::WATCHDOGS_CONFIG_TIMEOUT:
case supv::ENABLE_LATCHUP_ALERT:
@ -634,7 +708,7 @@ ReturnValue_t PlocSupervisorHandler::verifyPacket(const uint8_t* start, size_t f
uint16_t receivedCrc = *(start + foundLen - 2) << 8 | *(start + foundLen - 1);
uint16_t recalculatedCrc = CRC::crc16ccitt(start, foundLen - 2);
if (receivedCrc != recalculatedCrc) {
return CRC_FAILURE;
return SupvReturnValuesIF::CRC_FAILURE;
}
return RETURN_OK;
}
@ -643,12 +717,12 @@ ReturnValue_t PlocSupervisorHandler::handleAckReport(const uint8_t* data) {
ReturnValue_t result = RETURN_OK;
result = verifyPacket(data, supv::SIZE_ACK_REPORT);
if (result == CRC_FAILURE) {
if (result == SupvReturnValuesIF::CRC_FAILURE) {
sif::error << "PlocSupervisorHandler::handleAckReport: CRC failure" << std::endl;
nextReplyId = supv::NONE;
replyRawReplyIfnotWiretapped(data, supv::SIZE_ACK_REPORT);
triggerEvent(SUPV_CRC_FAILURE_EVENT);
sendFailureReport(supv::ACK_REPORT, CRC_FAILURE);
sendFailureReport(supv::ACK_REPORT, SupvReturnValuesIF::CRC_FAILURE);
disableAllReplies();
return RETURN_OK;
}
@ -664,7 +738,7 @@ ReturnValue_t PlocSupervisorHandler::handleAckReport(const uint8_t* data) {
if (commandId != DeviceHandlerIF::NO_COMMAND_ID) {
triggerEvent(SUPV_ACK_FAILURE, commandId);
}
sendFailureReport(supv::ACK_REPORT, RECEIVED_ACK_FAILURE);
sendFailureReport(supv::ACK_REPORT, SupvReturnValuesIF::RECEIVED_ACK_FAILURE);
disableAllReplies();
nextReplyId = supv::NONE;
result = IGNORE_REPLY_DATA;
@ -689,7 +763,7 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data)
ReturnValue_t result = RETURN_OK;
result = verifyPacket(data, supv::SIZE_EXE_REPORT);
if (result == CRC_FAILURE) {
if (result == SupvReturnValuesIF::CRC_FAILURE) {
sif::error << "PlocSupervisorHandler::handleExecutionReport: CRC failure" << std::endl;
nextReplyId = supv::NONE;
return result;
@ -715,7 +789,7 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionReport(const uint8_t* data)
}
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, SupvReturnValuesIF::RECEIVED_EXE_FAILURE);
disableExeReportReply();
result = IGNORE_REPLY_DATA;
break;
@ -737,7 +811,7 @@ ReturnValue_t PlocSupervisorHandler::handleHkReport(const uint8_t* data) {
result = verifyPacket(data, supv::SIZE_HK_REPORT);
if (result == CRC_FAILURE) {
if (result == SupvReturnValuesIF::CRC_FAILURE) {
sif::error << "PlocSupervisorHandler::handleHkReport: Hk report has invalid crc" << std::endl;
}
@ -811,7 +885,7 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
result = verifyPacket(data, supv::SIZE_BOOT_STATUS_REPORT);
if (result == CRC_FAILURE) {
if (result == SupvReturnValuesIF::CRC_FAILURE) {
sif::error << "PlocSupervisorHandler::handleBootStatusReport: Boot status report has invalid"
" crc"
<< std::endl;
@ -850,8 +924,8 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
<< static_cast<unsigned int>(bootStatusReport.resetCounter.value) << std::endl;
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BootAfterMs: "
<< bootStatusReport.bootAfterMs << " ms" << std::endl;
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BootTimeoutMs: "
<< std::dec << bootStatusReport.bootTimeoutMs << " ms" << std::endl;
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BootTimeoutMs: " << std::dec
<< bootStatusReport.bootTimeoutMs << " ms" << std::endl;
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Active NVM: "
<< static_cast<unsigned int>(bootStatusReport.activeNvm.value) << std::endl;
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BP0: "
@ -861,9 +935,9 @@ ReturnValue_t PlocSupervisorHandler::handleBootStatusReport(const uint8_t* data)
sif::info << "PlocSupervisorHandler::handleBootStatusReport: BP2: "
<< static_cast<unsigned int>(bootStatusReport.bp2State.value) << std::endl;
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Boot state: "
<< static_cast<unsigned int>(bootStatusReport.bootState.value) << std::endl;
<< static_cast<unsigned int>(bootStatusReport.bootState.value) << std::endl;
sif::info << "PlocSupervisorHandler::handleBootStatusReport: Boot cycles: "
<< static_cast<unsigned int>(bootStatusReport.bootCycles.value) << std::endl;
<< static_cast<unsigned int>(bootStatusReport.bootCycles.value) << std::endl;
#endif
return result;
@ -874,7 +948,7 @@ ReturnValue_t PlocSupervisorHandler::handleLatchupStatusReport(const uint8_t* da
result = verifyPacket(data, supv::SIZE_LATCHUP_STATUS_REPORT);
if (result == CRC_FAILURE) {
if (result == SupvReturnValuesIF::CRC_FAILURE) {
sif::error << "PlocSupervisorHandler::handleLatchupStatusReport: Latchup status report has "
<< "invalid crc" << std::endl;
return result;
@ -1034,7 +1108,7 @@ void PlocSupervisorHandler::handleDeviceTM(const uint8_t* data, size_t dataSize,
}
void PlocSupervisorHandler::prepareEmptyCmd(uint16_t apid) {
supv::EmptyPacket packet(apid);
supv::ApidOnlyPacket packet(apid);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
}
@ -1050,7 +1124,7 @@ ReturnValue_t PlocSupervisorHandler::prepareSetTimeRefCmd() {
if (result != RETURN_OK) {
sif::warning << "PlocSupervisorHandler::prepareSetTimeRefCmd: Failed to get current time"
<< std::endl;
return GET_TIME_FAILURE;
return SupvReturnValuesIF::GET_TIME_FAILURE;
}
supv::SetTimeRef packet(&time);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
@ -1091,12 +1165,12 @@ ReturnValue_t PlocSupervisorHandler::prepareWatchdogsConfigTimeoutCmd(const uint
uint8_t watchdog = *(commandData + offset);
offset += 1;
if (watchdog > 2) {
return INVALID_WATCHDOG;
return SupvReturnValuesIF::INVALID_WATCHDOG;
}
uint32_t timeout = *(commandData + offset) << 24 | *(commandData + offset + 1) << 16 |
*(commandData + offset + 2) << 8 | *(commandData + offset + 3);
if (timeout < 1000 || timeout > 360000) {
return INVALID_WATCHDOG_TIMEOUT;
return SupvReturnValuesIF::INVALID_WATCHDOG_TIMEOUT;
}
supv::WatchdogsConfigTimeout packet(watchdog, timeout);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
@ -1108,7 +1182,7 @@ ReturnValue_t PlocSupervisorHandler::prepareLatchupConfigCmd(const uint8_t* comm
ReturnValue_t result = RETURN_OK;
uint8_t latchupId = *commandData;
if (latchupId > 6) {
return INVALID_LATCHUP_ID;
return SupvReturnValuesIF::INVALID_LATCHUP_ID;
}
switch (deviceCommand) {
case (supv::ENABLE_LATCHUP_ALERT): {
@ -1138,7 +1212,7 @@ ReturnValue_t PlocSupervisorHandler::prepareAutoCalibrateAlertCmd(const uint8_t*
uint32_t mg = *(commandData + offset) << 24 | *(commandData + offset + 1) << 16 |
*(commandData + offset + 2) << 8 | *(commandData + offset + 3);
if (latchupId > 6) {
return INVALID_LATCHUP_ID;
return SupvReturnValuesIF::INVALID_LATCHUP_ID;
}
supv::AutoCalibrateAlert packet(latchupId, mg);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
@ -1150,7 +1224,7 @@ ReturnValue_t PlocSupervisorHandler::prepareSetAlertIrqFilterCmd(const uint8_t*
uint8_t tp = *(commandData + 1);
uint8_t div = *(commandData + 2);
if (latchupId > 6) {
return INVALID_LATCHUP_ID;
return SupvReturnValuesIF::INVALID_LATCHUP_ID;
}
supv::SetAlertIrqFilter packet(latchupId, tp, div);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
@ -1164,7 +1238,7 @@ ReturnValue_t PlocSupervisorHandler::prepareSetAlertLimitCmd(const uint8_t* comm
uint32_t dutycycle = *(commandData + offset) << 24 | *(commandData + offset + 1) << 16 |
*(commandData + offset + 2) << 8 | *(commandData + offset + 3);
if (latchupId > 6) {
return INVALID_LATCHUP_ID;
return SupvReturnValuesIF::INVALID_LATCHUP_ID;
}
supv::SetAlertlimit packet(latchupId, dutycycle);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
@ -1175,7 +1249,7 @@ ReturnValue_t PlocSupervisorHandler::prepareSetAdcSweetPeriodCmd(const uint8_t*
uint32_t sweepPeriod = *(commandData) << 24 | *(commandData + 1) << 16 | *(commandData + 2) << 8 |
*(commandData + 3);
if (sweepPeriod < 21) {
return SWEEP_PERIOD_TOO_SMALL;
return SupvReturnValuesIF::SWEEP_PERIOD_TOO_SMALL;
}
supv::SetAdcSweepPeriod packet(sweepPeriod);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
@ -1220,7 +1294,7 @@ void PlocSupervisorHandler::prepareSelectNvmCmd(const uint8_t* commandData) {
ReturnValue_t PlocSupervisorHandler::prepareRunAutoEmTest(const uint8_t* commandData) {
uint8_t test = *commandData;
if (test != 1 && test != 2) {
return INVALID_TEST_PARAM;
return SupvReturnValuesIF::INVALID_TEST_PARAM;
}
supv::RunAutoEmTests packet(test);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
@ -1234,7 +1308,7 @@ ReturnValue_t PlocSupervisorHandler::prepareWipeMramCmd(const uint8_t* commandDa
SerializeAdapter::deSerialize(&start, &commandData, &size, SerializeIF::Endianness::BIG);
SerializeAdapter::deSerialize(&stop, &commandData, &size, SerializeIF::Endianness::BIG);
if ((stop - start) <= 0) {
return INVALID_MRAM_ADDRESSES;
return SupvReturnValuesIF::INVALID_MRAM_ADDRESSES;
}
supv::MramCmd packet(start, stop, supv::MramCmd::MramAction::WIPE);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
@ -1250,7 +1324,7 @@ ReturnValue_t PlocSupervisorHandler::prepareDumpMramCmd(const uint8_t* commandDa
supv::MramCmd packet(start, stop, supv::MramCmd::MramAction::DUMP);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
if ((stop - start) <= 0) {
return INVALID_MRAM_ADDRESSES;
return SupvReturnValuesIF::INVALID_MRAM_ADDRESSES;
}
expectedMramDumpPackets = (stop - start) / supv::MAX_DATA_CAPACITY;
if ((stop - start) % supv::MAX_DATA_CAPACITY) {
@ -1393,7 +1467,7 @@ ReturnValue_t PlocSupervisorHandler::parseMramPackets(const uint8_t* packet, siz
*foundLen = remainingSize;
disableAllReplies();
bufferTop = 0;
return MRAM_PACKET_PARSING_FAILURE;
return SupvReturnValuesIF::MRAM_PACKET_PARSING_FAILURE;
}
}
@ -1477,7 +1551,7 @@ void PlocSupervisorHandler::increaseExpectedMramReplies(DeviceCommandId_t id) {
ReturnValue_t PlocSupervisorHandler::checkMramPacketApid() {
uint16_t apid = (spacePacketBuffer[0] << 8 | spacePacketBuffer[1]) & supv::APID_MASK;
if (apid != supv::APID_MRAM_DUMP_TM) {
return NO_MRAM_PACKET;
return SupvReturnValuesIF::NO_MRAM_PACKET;
}
return APERIODIC_REPLY;
}
@ -1498,7 +1572,7 @@ ReturnValue_t PlocSupervisorHandler::handleMramDumpFile(DeviceCommandId_t id) {
if (not std::filesystem::exists(activeMramFile)) {
sif::warning << "PlocSupervisorHandler::handleMramDumpFile: MRAM file does not exist"
<< std::endl;
return MRAM_FILE_NOT_EXISTS;
return SupvReturnValuesIF::MRAM_FILE_NOT_EXISTS;
}
std::ofstream file(activeMramFile, std::ios_base::app | std::ios_base::out);
file.write(reinterpret_cast<const char*>(spacePacketBuffer + supv::SPACE_PACKET_HEADER_LENGTH),
@ -1525,7 +1599,7 @@ ReturnValue_t PlocSupervisorHandler::createMramDumpFile() {
std::string filename = "mram-dump--" + timeStamp + ".bin";
#ifdef TE0720_1CFA
#ifndef TE0720_1CFA
std::string currentMountPrefix = sdcMan->getCurrentMountPrefix();
#else
std::string currentMountPrefix("/mnt/sd0");
@ -1535,7 +1609,7 @@ ReturnValue_t PlocSupervisorHandler::createMramDumpFile() {
if (not std::filesystem::exists(std::string(currentMountPrefix + "/" + plocFilePath))) {
sif::warning << "PlocSupervisorHandler::createMramDumpFile: Ploc path does not exist"
<< std::endl;
return PATH_DOES_NOT_EXIST;
return SupvReturnValuesIF::PATH_DOES_NOT_EXIST;
}
activeMramFile = currentMountPrefix + "/" + plocFilePath + "/" + filename;
// Create new file
@ -1551,10 +1625,67 @@ ReturnValue_t PlocSupervisorHandler::getTimeStampString(std::string& timeStamp)
if (result != RETURN_OK) {
sif::warning << "PlocSupervisorHandler::createMramDumpFile: Failed to get current time"
<< std::endl;
return GET_TIME_FAILURE;
return SupvReturnValuesIF::GET_TIME_FAILURE;
}
timeStamp = std::to_string(time.year) + "-" + std::to_string(time.month) + "-" +
std::to_string(time.day) + "--" + std::to_string(time.hour) + "-" +
std::to_string(time.minute) + "-" + std::to_string(time.second);
return RETURN_OK;
}
ReturnValue_t PlocSupervisorHandler::extractUpdateCommand(const uint8_t* commandData, size_t size,
std::string* file, uint8_t* memoryId,
uint32_t* startAddress) {
ReturnValue_t result = RETURN_OK;
if (size > (config::MAX_FILENAME_SIZE + config::MAX_PATH_SIZE + sizeof(*memoryId)) +
sizeof(*startAddress)) {
sif::warning << "PlocSupervisorHandler::extractUpdateCommand: Data size too big" << std::endl;
return SupvReturnValuesIF::INVALID_LENGTH;
}
*file = std::string(reinterpret_cast<const char*>(commandData));
if (file->size() > (config::MAX_FILENAME_SIZE + config::MAX_PATH_SIZE)) {
sif::warning << "PlocSupervisorHandler::extractUpdateCommand: Filename too long" << std::endl;
return SupvReturnValuesIF::FILENAME_TOO_LONG;
}
*memoryId = *(commandData + file->size() + SIZE_NULL_TERMINATOR);
const uint8_t* startAddressPtr =
commandData + file->size() + SIZE_NULL_TERMINATOR + sizeof(*memoryId);
size_t remainingSize = 4;
result = SerializeAdapter::deSerialize(startAddress, startAddressPtr, &remainingSize,
SerializeIF::Endianness::BIG);
if (result != RETURN_OK) {
sif::warning
<< "PlocSupervisorHandler::extractUpdateCommand: Failed to deserialize start address"
<< std::endl;
return result;
}
return RETURN_OK;
}
ReturnValue_t PlocSupervisorHandler::eventSubscription() {
ReturnValue_t result = RETURN_OK;
EventManagerIF* manager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
if (manager == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PlocSupervisorHandler::eventSubscritpion: Invalid event manager" << std::endl;
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
;
}
result = manager->registerListener(eventQueue->getId());
if (result != RETURN_OK) {
return result;
}
result = manager->subscribeToEventRange(
eventQueue->getId(), event::getEventId(PlocSupvHelper::SUPV_UPDATE_FAILED),
event::getEventId(PlocSupvHelper::TERMINATED_UPDATE_PROCEDURE));
if (result != RETURN_OK) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "PlocSupervisorHandler::eventSubscritpion: Failed to subscribe to events from "
" ploc supervisor helper"
<< std::endl;
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
}
return result;
}

View File

@ -9,12 +9,14 @@
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
#include "linux/devices/devicedefinitions/SupvReturnValuesIF.h"
#include "PlocSupvHelper.h"
/**
* @brief This is the device handler for the supervisor of the PLOC which is programmed by
* Thales.
*
* @details The PLOC uses the space packet protocol for communication. To each command the PLOC
* @details The PLOC uses the space packet protocol for communication. On each command the PLOC
* answers with at least one acknowledgment and one execution report.
* Flight manual:
* https://egit.irs.uni-stuttgart.de/redmine/projects/eive-flight-manual/wiki/PLOC_Commands
@ -25,10 +27,14 @@
class PlocSupervisorHandler : public DeviceHandlerBase {
public:
PlocSupervisorHandler(object_id_t objectId, object_id_t uartComIFid, CookieIF* comCookie,
Gpio uartIsolatorSwitch, power::Switch_t powerSwitch);
Gpio uartIsolatorSwitch, power::Switch_t powerSwitch,
PlocSupvHelper* supvHelper);
virtual ~PlocSupervisorHandler();
virtual ReturnValue_t initialize() override;
void performOperationHook() override;
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) override;
protected:
void doStartUp() override;
@ -51,45 +57,6 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
size_t getNextReplyLength(DeviceCommandId_t deviceCommand) override;
private:
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_SUPERVISOR_HANDLER;
//! [EXPORT] : [COMMENT] Space Packet received from PLOC supervisor has invalid CRC
static const ReturnValue_t CRC_FAILURE = MAKE_RETURN_CODE(0xA0);
//! [EXPORT] : [COMMENT] Received ACK failure reply from PLOC supervisor
static const ReturnValue_t RECEIVED_ACK_FAILURE = MAKE_RETURN_CODE(0xA1);
//! [EXPORT] : [COMMENT] Received execution failure reply from PLOC supervisor
static const ReturnValue_t RECEIVED_EXE_FAILURE = MAKE_RETURN_CODE(0xA2);
//! [EXPORT] : [COMMENT] Received space packet with invalid APID from PLOC supervisor
static const ReturnValue_t INVALID_APID = MAKE_RETURN_CODE(0xA3);
//! [EXPORT] : [COMMENT] Failed to read current system time
static const ReturnValue_t GET_TIME_FAILURE = MAKE_RETURN_CODE(0xA4);
//! [EXPORT] : [COMMENT] Received command with invalid watchdog parameter. Valid watchdogs are 0
//! for PS, 1 for PL and 2 for INT
static const ReturnValue_t INVALID_WATCHDOG = MAKE_RETURN_CODE(0xA5);
//! [EXPORT] : [COMMENT] Received watchdog timeout config command with invalid timeout. Valid
//! timeouts must be in the range between 1000 and 360000 ms.
static const ReturnValue_t INVALID_WATCHDOG_TIMEOUT = MAKE_RETURN_CODE(0xA6);
//! [EXPORT] : [COMMENT] Received latchup config command with invalid latchup ID
static const ReturnValue_t INVALID_LATCHUP_ID = MAKE_RETURN_CODE(0xA7);
//! [EXPORT] : [COMMENT] Received set adc sweep period command with invalid sweep period. Must be
//! larger than 21.
static const ReturnValue_t SWEEP_PERIOD_TOO_SMALL = MAKE_RETURN_CODE(0xA8);
//! [EXPORT] : [COMMENT] Receive auto EM test command with invalid test param. Valid params are 1
//! and 2.
static const ReturnValue_t INVALID_TEST_PARAM = MAKE_RETURN_CODE(0xA9);
//! [EXPORT] : [COMMENT] Returned when scanning for MRAM dump packets failed.
static const ReturnValue_t MRAM_PACKET_PARSING_FAILURE = MAKE_RETURN_CODE(0xAA);
//! [EXPORT] : [COMMENT] Returned when the start and stop addresses of the MRAM dump or MRAM wipe
//! commands are invalid (e.g. start address bigger than stop address)
static const ReturnValue_t INVALID_MRAM_ADDRESSES = MAKE_RETURN_CODE(0xAB);
//! [EXPORT] : [COMMENT] Expect reception of an MRAM dump packet but received space packet with
//! other apid.
static const ReturnValue_t NO_MRAM_PACKET = MAKE_RETURN_CODE(0xAC);
//! [EXPORT] : [COMMENT] Path to PLOC directory on SD card does not exist
static const ReturnValue_t PATH_DOES_NOT_EXIST = MAKE_RETURN_CODE(0xAD);
//! [EXPORT] : [COMMENT] MRAM dump file does not exists. The file should actually already have
//! been created with the reception of the first dump packet.
static const ReturnValue_t MRAM_FILE_NOT_EXISTS = MAKE_RETURN_CODE(0xAE);
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_SUPERVISOR_HANDLER;
@ -101,10 +68,13 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
static const Event SUPV_EXE_FAILURE = MAKE_EVENT(3, severity::LOW);
//! [EXPORT] : [COMMENT] PLOC supervisor reply has invalid crc
static const Event SUPV_CRC_FAILURE_EVENT = MAKE_EVENT(4, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor helper currently executing a command
static const Event SUPV_HELPER_EXECUTING = MAKE_EVENT(5, severity::LOW);
static const uint16_t APID_MASK = 0x7FF;
static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF;
static const uint8_t EXE_STATUS_OFFSET = 10;
static const uint8_t SIZE_NULL_TERMINATOR = 1;
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE];
@ -125,6 +95,9 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
const power::Switch_t powerSwitch = power::NO_SWITCH;
PlocSupvHelper* supvHelper = nullptr;
MessageQueueIF* eventQueue = nullptr;
/** Number of expected replies following the MRAM dump command */
uint32_t expectedMramDumpPackets = 0;
uint32_t receivedMramDumpPackets = 0;
@ -136,17 +109,25 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
/** This buffer is used to concatenate space packets received in two different read steps */
uint8_t spacePacketBuffer[supv::MAX_PACKET_SIZE];
#ifdef TE0720_1CFA
#ifndef TE0720_1CFA
SdCardManager* sdcMan = nullptr;
#endif /* BOARD_TE0720 == 0 */
/** Path to PLOC specific files on SD card */
// Path to PLOC specific files on SD card
std::string plocFilePath = "ploc";
std::string activeMramFile;
/** Setting this variable to true will enable direct downlink of MRAM packets */
// Setting this variable to true will enable direct downlink of MRAM packets
bool downlinkMramDump = false;
// Supervisor helper class currently executing a command
bool plocSupvHelperExecuting = false;
/**
* @brief Handles event messages received from the supervisor helper
*/
void handleEvent(EventMessage* eventMessage);
ReturnValue_t getSwitches(const uint8_t** switches, uint8_t* numberOfSwitches);
/**
@ -351,6 +332,10 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
ReturnValue_t getTimeStampString(std::string& timeStamp);
void prepareSetShutdownTimeoutCmd(const uint8_t* commandData);
ReturnValue_t extractUpdateCommand(const uint8_t* commandData, size_t size, std::string* file,
uint8_t* memoryId, uint32_t* startAddress);
ReturnValue_t eventSubscription();
};
#endif /* MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_ */

View File

@ -8,6 +8,8 @@
#include "bsp_q7s/memory/FilesystemHelper.h"
#endif
#include "bsp_q7s/memory/FilesystemHelper.h"
#include "fsfw/globalfunctions/CRC.h"
#include "mission/utility/Timestamp.h"
PlocSupvHelper::PlocSupvHelper(object_id_t objectId) : SystemObject(objectId) {}
@ -51,12 +53,12 @@ ReturnValue_t PlocSupvHelper::performOperation(uint8_t operationCode) {
}
}
ReturnValue_t PlocSupvHelper::setComIF(DeviceCommunicationIF* communicationInterface_) {
uartComIF = dynamic_cast<UartComIF*>(communicationInterface_);
if (uartComIF == nullptr) {
sif::warning << "PlocSupvHelper::initialize: Invalid uart com if" << std::endl;
ReturnValue_t PlocSupvHelper::setComIF(UartComIF* uartComIF_) {
if (uartComIF_ == nullptr) {
sif::warning << "PlocSupvHelper::initialize: Provided invalid uart com if" << std::endl;
return RETURN_FAILED;
}
uartComIF = uartComIF_;
return RETURN_OK;
}
@ -68,14 +70,34 @@ ReturnValue_t PlocSupvHelper::startUpdate(std::string file, uint8_t memoryId,
#ifdef XIPHOS_Q7S
result = FilesystemHelper::checkPath(file);
if (result != RETURN_OK) {
sif::warning << "PlocSupvHelper::startUpdate: File " << file << " does not exists" << std::endl;
sif::warning << "PlocSupvHelper::startUpdate: File " << file << " does not exist" << std::endl;
return result;
}
result = FileSytemHelper::fileExists(file);
if (result != RETURN_OK) {
sif::warning << "PlocSupvHelper::startUpdate: The file " << file << " does not exist"
<< std::endl;
reurn result;
}
#endif
#ifdef TE0720_1CFA
if (not std::filesystem::exists(file)) {
sif::warning << "PlocSupvHelper::startUpdate: The file " << file << " does not exist"
<< std::endl;
return RETURN_FAILED;
}
#endif
update.file = file;
update.length = getFileSize(update.file);
update.memoryId = memoryId;
update.startAddress = startAddress;
result = calcImageCrc();
if (result != RETURN_OK) {
return result;
}
internalState = InternalState::UPDATE;
uartComIF->flushUartTxAndRxBuf(comCookie);
semaphore.release();
return result;
}
@ -83,48 +105,73 @@ void PlocSupvHelper::stopProcess() { terminate = true; }
ReturnValue_t PlocSupvHelper::performUpdate() {
ReturnValue_t result = RETURN_OK;
result = prepareUpdate();
if (result != RETURN_OK) {
return result;
}
result = eraseMemory();
if (result != RETURN_OK) {
return result;
}
uint8_t tempData[supv::UpdatePacket::MAX_UPDATE_DATA];
uint8_t tempData[supv::WriteMemory::CHUNK_MAX];
std::ifstream file(update.file, std::ifstream::binary);
// Set position of next character to end of file input stream
file.seekg(0, file.end);
// tellg returns position of character in input stream
size_t remainingSize = file.tellg();
size_t dataLength = 0;
size_t bytesRead = 0;
size_t remainingSize = update.length;
uint16_t dataLength = 0;
size_t bytesWritten = 0;
uint16_t sequenceCount = 1;
supv::SequenceFlags seqFlags = supv::SequenceFlags::FIRST_PKT;
while (remainingSize > 0) {
update.startAddress = bytesRead;
if (terminate) {
return RETURN_OK;
return PROCESS_TERMINATED;
}
if (remainingSize > supv::UpdatePacket::MAX_UPDATE_DATA) {
dataLength = supv::UpdatePacket::MAX_UPDATE_DATA;
if (remainingSize > supv::WriteMemory::CHUNK_MAX) {
dataLength = supv::WriteMemory::CHUNK_MAX;
} else {
dataLength = remainingSize;
}
if (file.is_open()) {
file.seekg(bytesRead, file.beg);
file.seekg(bytesWritten, file.beg);
file.read(reinterpret_cast<char*>(tempData), dataLength);
bytesRead += dataLength;
remainingSize -= dataLength;
} else {
return FILE_CLOSED_ACCIDENTALLY;
}
supv::UpdatePacket tc(update.memoryId, update.startAddress, tempData);
result = handlePacketTransmission(tc);
if (bytesWritten == 0) {
seqFlags = supv::SequenceFlags::FIRST_PKT;
} else if (remainingSize == 0) {
seqFlags = supv::SequenceFlags::LAST_PKT;
} else {
seqFlags = supv::SequenceFlags::CONTINUED_PKT;
}
supv::WriteMemory packet(seqFlags, sequenceCount++, update.memoryId,
update.startAddress + bytesWritten, dataLength, tempData);
result = handlePacketTransmission(packet);
if (result != RETURN_OK) {
return result;
}
bytesWritten += dataLength;
}
result = handleCheckMemoryCommand();
if (result != RETURN_OK) {
return result;
}
return result;
}
ReturnValue_t PlocSupvHelper::prepareUpdate() {
ReturnValue_t result = RETURN_OK;
supv::ApidOnlyPacket packet(supv::APID_PREPARE_UPDATE);
result = handlePacketTransmission(packet);
if (result != RETURN_OK) {
return result;
}
return RETURN_OK;
}
ReturnValue_t PlocSupvHelper::eraseMemory() {
ReturnValue_t result = RETURN_OK;
supv::EraseMemory eraseMemory(memoryId, startAddress, length);
supv::EraseMemory eraseMemory(update.memoryId, update.startAddress, update.length);
result = handlePacketTransmission(eraseMemory);
if (result != RETURN_OK) {
return result;
@ -132,24 +179,9 @@ ReturnValue_t PlocSupvHelper::eraseMemory() {
return RETURN_OK;
}
ReturnValue_t PlocSupvHelper::flashfclose() {
ReturnValue_t PlocSupvHelper::handlePacketTransmission(SpacePacket& packet) {
ReturnValue_t result = RETURN_OK;
(*sequenceCount)++;
supv::FlashFclose flashFclose(*sequenceCount);
result = flashFclose.createPacket(flashWrite.mpsocFile);
if (result != RETURN_OK) {
return result;
}
result = handlePacketTransmission(flashFclose);
if (result != RETURN_OK) {
return result;
}
return RETURN_OK;
}
ReturnValue_t PlocSupvHelper::handlePacketTransmission(SpacePacket& tc) {
ReturnValue_t result = RETURN_OK;
result = sendCommand(tc);
result = sendCommand(packet);
if (result != RETURN_OK) {
return result;
}
@ -164,12 +196,12 @@ ReturnValue_t PlocSupvHelper::handlePacketTransmission(SpacePacket& tc) {
return RETURN_OK;
}
ReturnValue_t PlocSupvHelper::sendCommand(supv::TcBase& tc) {
ReturnValue_t PlocSupvHelper::sendCommand(SpacePacket& packet) {
ReturnValue_t result = RETURN_OK;
result = uartComIF->sendMessage(comCookie, tc.getWholeData(), tc.getFullSize());
result = uartComIF->sendMessage(comCookie, packet.getWholeData(), packet.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocSupvHelper::sendCommand: Failed to send command" << std::endl;
triggerEvent(SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
triggerEvent(SUPV_SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
return result;
}
return result;
@ -180,6 +212,8 @@ ReturnValue_t PlocSupvHelper::handleAck() {
supv::TmPacket tmPacket;
result = handleTmReception(&tmPacket, supv::SIZE_ACK_REPORT);
if (result != RETURN_OK) {
sif::warning << "PlocSupvHelper::handleAck: Error in reception of acknowledgment report"
<< std::endl;
return result;
}
uint16_t apid = tmPacket.getAPID();
@ -192,11 +226,11 @@ ReturnValue_t PlocSupvHelper::handleAck() {
void PlocSupvHelper::handleAckApidFailure(uint16_t apid) {
if (apid == supv::APID_ACK_FAILURE) {
triggerEvent(ACK_FAILURE_REPORT, static_cast<uint32_t>(internalState));
triggerEvent(SUPV_ACK_FAILURE_REPORT, static_cast<uint32_t>(internalState));
sif::warning << "PlocSupvHelper::handleAckApidFailure: Received acknowledgement failure "
<< "report" << std::endl;
} else {
triggerEvent(ACK_INVALID_APID, apid, static_cast<uint32_t>(internalState));
triggerEvent(SUPV_ACK_INVALID_APID, apid, static_cast<uint32_t>(internalState));
sif::warning << "PlocSupvHelper::handleAckApidFailure: Expected acknowledgement report "
<< "but received space packet with apid " << std::hex << apid << std::endl;
}
@ -207,10 +241,12 @@ ReturnValue_t PlocSupvHelper::handleExe() {
supv::TmPacket tmPacket;
result = handleTmReception(&tmPacket, supv::SIZE_EXE_REPORT);
if (result != RETURN_OK) {
sif::warning << "PlocSupvHelper::handleExe: Error in reception of execution report"
<< std::endl;
return result;
}
uint16_t apid = tmPacket.getAPID();
if (apid != supv::apid::EXE_SUCCESS) {
if (apid != supv::APID_EXE_SUCCESS) {
handleExeApidFailure(apid);
return RETURN_FAILED;
}
@ -218,7 +254,7 @@ ReturnValue_t PlocSupvHelper::handleExe() {
}
void PlocSupvHelper::handleExeApidFailure(uint16_t apid) {
if (apid == supv::apid::EXE_FAILURE) {
if (apid == supv::APID_EXE_FAILURE) {
triggerEvent(SUPV_EXE_FAILURE_REPORT, static_cast<uint32_t>(internalState));
sif::warning << "PlocSupvHelper::handleExeApidFailure: Received execution failure "
<< "report" << std::endl;
@ -246,7 +282,7 @@ ReturnValue_t PlocSupvHelper::handleTmReception(supv::TmPacket* tmPacket, size_t
}
if (remainingBytes != 0) {
sif::warning << "PlocSupvHelper::handleTmReception: Failed to receive reply" << std::endl;
triggerEvent(MISSING_EXE, remainingBytes, static_cast<uint32_t>(internalState));
triggerEvent(SUPV_MISSING_EXE, remainingBytes, static_cast<uint32_t>(internalState));
return RETURN_FAILED;
}
result = tmPacket->checkCrc();
@ -254,12 +290,6 @@ ReturnValue_t PlocSupvHelper::handleTmReception(supv::TmPacket* tmPacket, size_t
sif::warning << "PlocSupvHelper::handleTmReception: CRC check failed" << std::endl;
return result;
}
(*sequenceCount)++;
uint16_t recvSeqCnt = tmPacket->getPacketSequenceCount();
if (recvSeqCnt != *sequenceCount) {
triggerEvent(MPSOC_HELPER_SEQ_CNT_MISMATCH, *sequenceCount, recvSeqCnt);
*sequenceCount = recvSeqCnt;
}
return result;
}
@ -269,14 +299,14 @@ ReturnValue_t PlocSupvHelper::receive(uint8_t* data, size_t* readBytes, size_t r
result = uartComIF->requestReceiveMessage(comCookie, requestBytes);
if (result != RETURN_OK) {
sif::warning << "PlocSupvHelper::receive: Failed to request reply" << std::endl;
triggerEvent(MPSOC_HELPER_REQUESTING_REPLY_FAILED, result,
triggerEvent(SUPV_HELPER_REQUESTING_REPLY_FAILED, result,
static_cast<uint32_t>(static_cast<uint32_t>(internalState)));
return RETURN_FAILED;
}
result = uartComIF->readReceivedMessage(comCookie, &buffer, readBytes);
if (result != RETURN_OK) {
sif::warning << "PlocSupvHelper::receive: Failed to read received message" << std::endl;
triggerEvent(MPSOC_HELPER_READING_REPLY_FAILED, result, static_cast<uint32_t>(internalState));
triggerEvent(SUPV_HELPER_READING_REPLY_FAILED, result, static_cast<uint32_t>(internalState));
return RETURN_FAILED;
}
if (*readBytes > 0) {
@ -284,3 +314,68 @@ ReturnValue_t PlocSupvHelper::receive(uint8_t* data, size_t* readBytes, size_t r
}
return result;
}
ReturnValue_t PlocSupvHelper::calcImageCrc() {
ReturnValue_t result = RETURN_OK;
#ifdef XIPHOS_Q7S
result = FilesystemHelper::checkPath(update.file);
#endif
if (result != RETURN_OK) {
sif::warning << "PlocSupvHelper::calcImageCrc: File " << update.file << " does not exist"
<< std::endl;
return result;
}
std::ifstream file(update.file, std::ifstream::binary);
uint16_t remainder = CRC16_INIT;
uint8_t input;
for (uint32_t byteCount = 0; byteCount < update.length; byteCount++) {
file.seekg(byteCount, file.beg);
file.read(reinterpret_cast<char*>(&input), 1);
remainder = CRC::crc16ccitt(&input, sizeof(input), remainder);
}
file.close();
update.crc = remainder;
return result;
}
ReturnValue_t PlocSupvHelper::handleCheckMemoryCommand() {
ReturnValue_t result = RETURN_OK;
// Verification of update write procedure
supv::CheckMemory packet(update.memoryId, update.startAddress, update.length);
result = sendCommand(packet);
if (result != RETURN_OK) {
return result;
}
result = handleAck();
if (result != RETURN_OK) {
return result;
}
supv::UpdateStatusReport updateStatusReport;
result = handleTmReception(&updateStatusReport,
static_cast<size_t>(updateStatusReport.getNominalSize()));
if (result != RETURN_OK) {
return result;
}
result = handleExe();
if (result != RETURN_OK) {
return result;
}
result = updateStatusReport.parseDataField();
if (result != RETURN_OK) {
return result;
}
result = updateStatusReport.verifycrc(update.crc);
if (result != RETURN_OK) {
sif::warning << "PlocSupvHelper::performUpdate: CRC failure. Expected CRC 0x" << std::hex
<< update.crc << " but received CRC 0x" << updateStatusReport.getCrc()
<< std::endl;
return result;
}
return result;
}
uint32_t PlocSupvHelper::getFileSize(std::string filename) {
std::ifstream file(filename, std::ifstream::binary);
file.seekg(0, file.end);
return file.tellg();
}

View File

@ -9,7 +9,7 @@
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw_hal/linux/uart/UartComIF.h"
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
#ifdef XIPHOS_Q7S
#include "bsp_q7s/memory/SdCardManager.h"
#endif
@ -27,41 +27,43 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
static const Event SUPV_UPDATE_FAILED = MAKE_EVENT(0, severity::LOW);
//! [EXPORT] : [COMMENT] update successful
static const Event SUPV_UPDATE_SUCCESSFUL = MAKE_EVENT(1, severity::LOW);
//! [EXPORT] : [COMMENT] Terminated update procedure by command
static const Event TERMINATED_UPDATE_PROCEDURE = MAKE_EVENT(2, severity::LOW);
//! [EXPORT] : [COMMENT] Communication interface returned failure when trying to send the command
//! ot the PLOC
//! to the supervisor
//! P1: Return value returned by the communication interface sendMessage function
//! P2: Internal state of MPSoC helper
static const Event SENDING_COMMAND_FAILED = MAKE_EVENT(2, severity::LOW);
//! P2: Internal state of supervisor helper
static const Event SUPV_SENDING_COMMAND_FAILED = MAKE_EVENT(3, severity::LOW);
//! [EXPORT] : [COMMENT] Request receive message of communication interface failed
//! P1: Return value returned by the communication interface requestReceiveMessage function
//! P2: Internal state of MPSoC helper
static const Event MPSOC_HELPER_REQUESTING_REPLY_FAILED = MAKE_EVENT(3, severity::LOW);
//! P2: Internal state of supervisor helper
static const Event SUPV_HELPER_REQUESTING_REPLY_FAILED = MAKE_EVENT(4, severity::LOW);
//! [EXPORT] : [COMMENT] Reading receive message of communication interface failed
//! P1: Return value returned by the communication interface readingReceivedMessage function
//! P2: Internal state of MPSoC helper
static const Event MPSOC_HELPER_READING_REPLY_FAILED = MAKE_EVENT(4, severity::LOW);
//! P2: Internal state of supervisor helper
static const Event SUPV_HELPER_READING_REPLY_FAILED = MAKE_EVENT(5, severity::LOW);
//! [EXPORT] : [COMMENT] Did not receive acknowledgement report
//! P1: Number of bytes missing
//! P2: Internal state of MPSoC helper
static const Event SUPV_MISSING_ACK = MAKE_EVENT(5, severity::LOW);
static const Event SUPV_MISSING_ACK = MAKE_EVENT(6, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor did not receive execution report
//! P1: Number of bytes missing
//! P2: Internal state of supervisor helper
static const Event SUPV_MISSING_EXE = MAKE_EVENT(6, severity::LOW);
static const Event SUPV_MISSING_EXE = MAKE_EVENT(7, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor received acknowledgment failure report
//! P1: Internal state of supervisor helper
static const Event SUPV_ACK_FAILURE_REPORT = MAKE_EVENT(7, severity::LOW);
static const Event SUPV_ACK_FAILURE_REPORT = MAKE_EVENT(8, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor received execution failure report
//! P1: Internal state of supervisor
static const Event SUPV_EXE_FAILURE_REPORT = MAKE_EVENT(8, severity::LOW);
static const Event SUPV_EXE_FAILURE_REPORT = MAKE_EVENT(9, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor expected acknowledgment report but received space packet with other apid
//! P1: Apid of received space packet
//! P2: Internal state of supervisor helper
static const Event SUPV_ACK_INVALID_APID = MAKE_EVENT(9, severity::LOW);
static const Event SUPV_ACK_INVALID_APID = MAKE_EVENT(10, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor helper expected execution report but received space packet with other apid
//! P1: Apid of received space packet
//! P2: Internal state of supervisor helper
static const Event SUPV_EXE_INVALID_APID = MAKE_EVENT(10, severity::LOW);
static const Event SUPV_EXE_INVALID_APID = MAKE_EVENT(11, severity::LOW);
PlocSupvHelper(object_id_t objectId);
virtual ~PlocSupvHelper();
@ -69,7 +71,7 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
ReturnValue_t initialize() override;
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
ReturnValue_t setComIF(DeviceCommunicationIF* communicationInterface_);
ReturnValue_t setComIF(UartComIF* uartComfIF_);
void setComCookie(CookieIF* comCookie_);
/**
@ -93,16 +95,21 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
//! [EXPORT] : [COMMENT] File accidentally close
static const ReturnValue_t FILE_CLOSED_ACCIDENTALLY = MAKE_RETURN_CODE(0xA0);
static const ReturnValue_t PROCESS_TERMINATED = MAKE_RETURN_CODE(0xA1);
// Maximum number of times the communication interface retries polling data from the reply
// buffer
static const int RETRIES = 10000;
static const uint16_t CRC16_INIT = 0xFFFF;
struct Update {
uint8_t memoryId;
uint32_t startAddress;
// Absolute name of file containing update data
std::string file;
// Size of update
uint32_t length;
uint32_t crc;
};
struct Update update;
@ -127,15 +134,41 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF, public Ha
CookieIF* comCookie = nullptr;
ReturnValue_t performUpdate();
ReturnValue_t handlePacketTransmission(SpacePacket& tc);
ReturnValue_t sendCommand(SpacePacket& tc);
ReturnValue_t handlePacketTransmission(SpacePacket& packet);
ReturnValue_t sendCommand(SpacePacket& packet);
/**
* @brief Function which reads form the communication interface
*
* @param data Pointer to buffer where read data will be written to
* @param raedBytes Actual number of bytes read
* @param requestBytes Number of bytes to read
*/
ReturnValue_t receive(uint8_t* data, size_t* readBytes, size_t requestBytes);
ReturnValue_t handleAck();
ReturnValue_t handleExe();
void handleAckApidFailure(uint16_t apid);
void handleExeApidFailure(uint16_t apid);
ReturnValue_t handleTmReception(SpacePacket* tmPacket, size_t remainingBytes);
/**
* @brief Handles reading of TM packets from the communication interface
*
* @param tmPacket Pointer to space packet where received data will be written to
* @param reaminingBytes Number of bytes to read in the space packet
*/
ReturnValue_t handleTmReception(supv::TmPacket* tmPacket, size_t remainingBytes);
ReturnValue_t prepareUpdate();
ReturnValue_t eraseMemory();
// Calculates CRC over image. Will be used for verification after update writing has
// finished.
ReturnValue_t calcImageCrc();
ReturnValue_t handleCheckMemoryCommand();
/**
* @brief Return size of file with name filename
*
* @param filename
*
* @return The size of the file
*/
uint32_t getFileSize(std::string filename);
};
#endif /* BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_ */

View File

@ -1,385 +0,0 @@
#include "PlocUpdater.h"
#include <filesystem>
#include <fstream>
#include <string>
#include "fsfw/ipc/QueueFactory.h"
PlocUpdater::PlocUpdater(object_id_t objectId)
: SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) {
auto mqArgs = MqArgs(this->getObjectId());
commandQueue = QueueFactory::instance()->createMessageQueue(
QUEUE_SIZE, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
}
PlocUpdater::~PlocUpdater() {}
ReturnValue_t PlocUpdater::initialize() {
#ifdef XIPHOS_Q7S
sdcMan = SdCardManager::instance();
#endif
ReturnValue_t result = SystemObject::initialize();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = commandActionHelper.initialize();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = actionHelper.initialize(commandQueue);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t PlocUpdater::performOperation(uint8_t operationCode) {
readCommandQueue();
doStateMachine();
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t PlocUpdater::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size) {
ReturnValue_t result = RETURN_FAILED;
if (state != State::IDLE) {
return IS_BUSY;
}
if (size > MAX_PLOC_UPDATE_PATH) {
return NAME_TOO_LONG;
}
switch (actionId) {
case UPDATE_A_UBOOT:
image = Image::A;
partition = Partition::UBOOT;
break;
case UPDATE_A_BITSTREAM:
image = Image::A;
partition = Partition::BITSTREAM;
break;
case UPDATE_A_LINUX:
image = Image::A;
partition = Partition::LINUX_OS;
break;
case UPDATE_A_APP_SW:
image = Image::A;
partition = Partition::APP_SW;
break;
case UPDATE_B_UBOOT:
image = Image::B;
partition = Partition::UBOOT;
break;
case UPDATE_B_BITSTREAM:
image = Image::B;
partition = Partition::BITSTREAM;
break;
case UPDATE_B_LINUX:
image = Image::B;
partition = Partition::LINUX_OS;
break;
case UPDATE_B_APP_SW:
image = Image::B;
partition = Partition::APP_SW;
break;
default:
return INVALID_ACTION_ID;
}
result = getImageLocation(data, size);
if (result != RETURN_OK) {
return result;
}
state = State::UPDATE_AVAILABLE;
return EXECUTION_FINISHED;
}
MessageQueueId_t PlocUpdater::getCommandQueue() const { return commandQueue->getId(); }
MessageQueueIF* PlocUpdater::getCommandQueuePtr() { return commandQueue; }
void PlocUpdater::readCommandQueue() {
CommandMessage message;
ReturnValue_t result;
for (result = commandQueue->receiveMessage(&message); result == HasReturnvaluesIF::RETURN_OK;
result = commandQueue->receiveMessage(&message)) {
if (result != RETURN_OK) {
continue;
}
result = actionHelper.handleActionMessage(&message);
if (result == HasReturnvaluesIF::RETURN_OK) {
continue;
}
result = commandActionHelper.handleReply(&message);
if (result == HasReturnvaluesIF::RETURN_OK) {
continue;
}
}
}
void PlocUpdater::doStateMachine() {
switch (state) {
case State::IDLE:
break;
case State::UPDATE_AVAILABLE:
commandUpdateAvailable();
break;
case State::UPDATE_TRANSFER:
commandUpdatePacket();
break;
case State::UPDATE_VERIFY:
commandUpdateVerify();
break;
case State::COMMAND_EXECUTING:
break;
default:
break;
}
}
ReturnValue_t PlocUpdater::checkNameLength(size_t size) {
if (size > MAX_PLOC_UPDATE_PATH) {
return NAME_TOO_LONG;
}
return RETURN_OK;
}
ReturnValue_t PlocUpdater::getImageLocation(const uint8_t* data, size_t size) {
ReturnValue_t result = checkNameLength(size);
if (result != RETURN_OK) {
return result;
}
#ifdef XIPHOS_Q7S
// Check if file is stored on SD card and if associated SD card is mounted
if (std::string(reinterpret_cast<const char*>(data), SD_PREFIX_LENGTH) ==
std::string(SdCardManager::SD_0_MOUNT_POINT)) {
if (!sdcMan->isSdCardMounted(sd::SLOT_0)) {
sif::warning << "PlocUpdater::getImageLocation: SD card 0 not mounted" << std::endl;
return SD_NOT_MOUNTED;
}
} else if (std::string(reinterpret_cast<const char*>(data), SD_PREFIX_LENGTH) ==
std::string(SdCardManager::SD_1_MOUNT_POINT)) {
if (!sdcMan->isSdCardMounted(sd::SLOT_0)) {
sif::warning << "PlocUpdater::getImageLocation: SD card 1 not mounted" << std::endl;
return SD_NOT_MOUNTED;
}
} else {
// update image not stored on SD card
}
#endif /* BOARD_TE0720 == 0 */
updateFile = std::string(reinterpret_cast<const char*>(data), size);
// Check if file exists
if (not std::filesystem::exists(updateFile)) {
return FILE_NOT_EXISTS;
}
return RETURN_OK;
}
void PlocUpdater::stepSuccessfulReceived(ActionId_t actionId, uint8_t step) {}
void PlocUpdater::stepFailedReceived(ActionId_t actionId, uint8_t step, ReturnValue_t returnCode) {}
void PlocUpdater::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) {}
void PlocUpdater::completionSuccessfulReceived(ActionId_t actionId) {
switch (pendingCommand) {
case (supv::UPDATE_AVAILABLE):
state = State::UPDATE_TRANSFER;
break;
case (supv::UPDATE_IMAGE_DATA):
if (remainingPackets == 0) {
packetsSent = 0; // Reset packets sent variable for next update sequence
state = State::UPDATE_VERIFY;
} else {
state = State::UPDATE_TRANSFER;
}
break;
case (supv::UPDATE_VERIFY):
triggerEvent(UPDATE_FINISHED);
state = State::IDLE;
pendingCommand = supv::NONE;
break;
default:
state = State::IDLE;
break;
}
}
void PlocUpdater::completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) {
switch (pendingCommand) {
case (supv::UPDATE_AVAILABLE): {
triggerEvent(UPDATE_AVAILABLE_FAILED);
break;
}
case (supv::UPDATE_IMAGE_DATA): {
triggerEvent(UPDATE_TRANSFER_FAILED, packetsSent);
break;
}
case (supv::UPDATE_VERIFY): {
triggerEvent(UPDATE_VERIFY_FAILED);
break;
}
default:
break;
}
state = State::IDLE;
}
void PlocUpdater::commandUpdateAvailable() {
ReturnValue_t result = RETURN_OK;
if (not std::filesystem::exists(updateFile)) {
triggerEvent(UPDATE_FILE_NOT_EXISTS, static_cast<uint8_t>(state));
state = State::IDLE;
return;
}
std::ifstream file(updateFile, std::ifstream::binary);
file.seekg(0, file.end);
imageSize = static_cast<size_t>(file.tellg());
file.close();
numOfUpdatePackets = imageSize / MAX_SP_DATA;
if (imageSize % MAX_SP_DATA) {
numOfUpdatePackets++;
}
remainingPackets = numOfUpdatePackets;
packetsSent = 0;
calcImageCrc();
supv::UpdateInfo packet(supv::APID_UPDATE_AVAILABLE, static_cast<uint8_t>(image),
static_cast<uint8_t>(partition), imageSize, imageCrc, numOfUpdatePackets);
result =
commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER, supv::UPDATE_AVAILABLE,
packet.getWholeData(), packet.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocUpdater::commandUpdateAvailable: Failed to send update available"
<< " packet to supervisor handler" << std::endl;
triggerEvent(ACTION_COMMANDING_FAILED, result, supv::UPDATE_AVAILABLE);
state = State::IDLE;
pendingCommand = supv::NONE;
return;
}
pendingCommand = supv::UPDATE_AVAILABLE;
state = State::COMMAND_EXECUTING;
return;
}
void PlocUpdater::commandUpdatePacket() {
ReturnValue_t result = RETURN_OK;
uint16_t payloadLength = 0;
if (not std::filesystem::exists(updateFile)) {
triggerEvent(UPDATE_FILE_NOT_EXISTS, static_cast<uint8_t>(state), packetsSent);
state = State::IDLE;
return;
}
std::ifstream file(updateFile, std::ifstream::binary);
file.seekg(packetsSent * MAX_SP_DATA, file.beg);
if (remainingPackets == 1) {
payloadLength = imageSize - static_cast<uint16_t>(file.tellg());
} else {
payloadLength = MAX_SP_DATA;
}
supv::UpdatePacket packet(payloadLength);
file.read(reinterpret_cast<char*>(packet.getDataFieldPointer()), payloadLength);
file.close();
// sequence count of first packet is 1
packet.setPacketSequenceCount((packetsSent + 1) & supv::SEQUENCE_COUNT_MASK);
if (numOfUpdatePackets > 1) {
adjustSequenceFlags(packet);
}
packet.makeCrc();
result =
commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER, supv::UPDATE_IMAGE_DATA,
packet.getWholeData(), packet.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocUpdater::commandUpdateAvailable: Failed to send update"
<< " packet to supervisor handler" << std::endl;
triggerEvent(ACTION_COMMANDING_FAILED, result, supv::UPDATE_IMAGE_DATA);
state = State::IDLE;
pendingCommand = supv::NONE;
return;
}
remainingPackets--;
packetsSent++;
pendingCommand = supv::UPDATE_IMAGE_DATA;
state = State::COMMAND_EXECUTING;
}
void PlocUpdater::commandUpdateVerify() {
ReturnValue_t result = RETURN_OK;
supv::UpdateInfo packet(supv::APID_UPDATE_VERIFY, static_cast<uint8_t>(image),
static_cast<uint8_t>(partition), imageSize, imageCrc, numOfUpdatePackets);
result = commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER, supv::UPDATE_VERIFY,
packet.getWholeData(), packet.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocUpdater::commandUpdateAvailable: Failed to send update available"
<< " packet to supervisor handler" << std::endl;
triggerEvent(ACTION_COMMANDING_FAILED, result, supv::UPDATE_VERIFY);
state = State::IDLE;
pendingCommand = supv::NONE;
return;
}
state = State::COMMAND_EXECUTING;
pendingCommand = supv::UPDATE_VERIFY;
return;
}
void PlocUpdater::calcImageCrc() {
std::ifstream file(updateFile, std::ifstream::binary);
file.seekg(0, file.end);
uint32_t count;
uint32_t bit;
uint32_t remainder = INITIAL_REMAINDER_32;
char input;
for (count = 0; count < imageSize; count++) {
file.seekg(count, file.beg);
file.read(&input, 1);
remainder ^= (input << 16);
for (bit = 8; bit > 0; --bit) {
if (remainder & TOPBIT_32) {
remainder = (remainder << 1) ^ POLYNOMIAL_32;
} else {
remainder = (remainder << 1);
}
}
}
file.close();
imageCrc = (remainder ^ FINAL_XOR_VALUE_32);
}
void PlocUpdater::adjustSequenceFlags(supv::UpdatePacket& packet) {
if (packetsSent == 0) {
packet.setSequenceFlags(static_cast<uint8_t>(supv::SequenceFlags::FIRST_PKT));
} else if (remainingPackets == 1) {
packet.setSequenceFlags(static_cast<uint8_t>(supv::SequenceFlags::LAST_PKT));
} else {
packet.setSequenceFlags(static_cast<uint8_t>(supv::SequenceFlags::CONTINUED_PKT));
}
}

View File

@ -1,174 +0,0 @@
#ifndef MISSION_DEVICES_PLOCUPDATER_H_
#define MISSION_DEVICES_PLOCUPDATER_H_
#include <linux/devices/devicedefinitions/PlocSupervisorDefinitions.h>
#include "OBSWConfig.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "eive/definitions.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/CommandsActionsIF.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/tmtcpacket/SpacePacket.h"
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
#include "linux/fsfwconfig/objects/systemObjectList.h"
/**
* @brief An object of this class can be used to perform the software updates of the PLOC. The
* software update will be read from one of the SD cards, split into multiple space
* packets and sent to the PlocSupervisorHandler.
*
* @details The MPSoC has two boot memories (NVM0 and NVM1) where each stores two images (Partition
* A and Partition B)
*
* @author J. Meier
*/
class PlocUpdater : public SystemObject,
public HasActionsIF,
public ExecutableObjectIF,
public HasReturnvaluesIF,
public CommandsActionsIF {
public:
static const ActionId_t UPDATE_A_UBOOT = 0;
static const ActionId_t UPDATE_A_BITSTREAM = 1;
static const ActionId_t UPDATE_A_LINUX = 2;
static const ActionId_t UPDATE_A_APP_SW = 3;
static const ActionId_t UPDATE_B_UBOOT = 4;
static const ActionId_t UPDATE_B_BITSTREAM = 5;
static const ActionId_t UPDATE_B_LINUX = 6;
static const ActionId_t UPDATE_B_APP_SW = 7;
PlocUpdater(object_id_t objectId);
virtual ~PlocUpdater();
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size);
MessageQueueId_t getCommandQueue() const;
ReturnValue_t initialize() override;
MessageQueueIF* getCommandQueuePtr() override;
void stepSuccessfulReceived(ActionId_t actionId, uint8_t step) override;
void stepFailedReceived(ActionId_t actionId, uint8_t step, ReturnValue_t returnCode) override;
void dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) override;
void completionSuccessfulReceived(ActionId_t actionId) override;
void completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) override;
private:
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_UPDATER;
//! [EXPORT] : [COMMENT] Updater is already performing an update
static const ReturnValue_t UPDATER_BUSY = MAKE_RETURN_CODE(0xA0);
//! [EXPORT] : [COMMENT] Received update command with invalid path string (too long).
static const ReturnValue_t NAME_TOO_LONG = MAKE_RETURN_CODE(0xA1);
//! [EXPORT] : [COMMENT] Received command to initiate update but SD card with update image not
//! mounted.
static const ReturnValue_t SD_NOT_MOUNTED = MAKE_RETURN_CODE(0xA2);
//! [EXPORT] : [COMMENT] Update file received with update command does not exist.
static const ReturnValue_t FILE_NOT_EXISTS = MAKE_RETURN_CODE(0xA3);
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_UPDATER;
//! [EXPORT] : [COMMENT] Try to read update file but the file does not exist.
//! P1: Indicates in which state the file read fails
//! P2: During the update transfer the second parameter gives information about the number of
//! already sent packets
static const Event UPDATE_FILE_NOT_EXISTS = MAKE_EVENT(0, severity::LOW);
//! [EXPORT] : [COMMENT] Failed to send command to supervisor handler
//! P1: Return value of CommandActionHelper::commandAction
//! P2: Action ID of command to send
static const Event ACTION_COMMANDING_FAILED = MAKE_EVENT(1, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor handler replied action message indicating a command execution
//! failure of the update available command
static const Event UPDATE_AVAILABLE_FAILED = MAKE_EVENT(2, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor handler failed to transfer an update space packet.
//! P1: Parameter holds the number of update packets already sent (inclusive the failed packet)
static const Event UPDATE_TRANSFER_FAILED = MAKE_EVENT(3, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor failed to execute the update verify command.
static const Event UPDATE_VERIFY_FAILED = MAKE_EVENT(4, severity::LOW);
//! [EXPORT] : [COMMENT] MPSoC update successful completed
static const Event UPDATE_FINISHED = MAKE_EVENT(5, severity::INFO);
static const uint32_t QUEUE_SIZE = config::PLOC_UPDATER_QUEUE_SIZE;
static const size_t MAX_PLOC_UPDATE_PATH = 50;
static const size_t SD_PREFIX_LENGTH = 8;
// Maximum size of update payload data per space packet (max size of space packet is 1024 bytes)
static const size_t MAX_SP_DATA = 1016;
static const uint32_t TOPBIT_32 = (1 << 31);
static const uint32_t POLYNOMIAL_32 = 0x04C11DB7;
static const uint32_t INITIAL_REMAINDER_32 = 0xFFFFFFFF;
static const uint32_t FINAL_XOR_VALUE_32 = 0xFFFFFFFF;
MessageQueueIF* commandQueue = nullptr;
#ifdef XIPHOS_Q7S
SdCardManager* sdcMan = nullptr;
#endif
CommandActionHelper commandActionHelper;
ActionHelper actionHelper;
enum class State : uint8_t {
IDLE,
UPDATE_AVAILABLE,
UPDATE_TRANSFER,
UPDATE_VERIFY,
COMMAND_EXECUTING
};
State state = State::IDLE;
ActionId_t pendingCommand = supv::NONE;
enum class Image : uint8_t { NONE, A, B };
Image image = Image::NONE;
enum class Partition : uint8_t { NONE, UBOOT, BITSTREAM, LINUX_OS, APP_SW };
Partition partition = Partition::NONE;
uint32_t packetsSent = 0;
uint32_t remainingPackets = 0;
// Number of packets required to transfer the update image
uint32_t numOfUpdatePackets = 0;
std::string updateFile;
uint32_t imageSize = 0;
uint32_t imageCrc = 0;
void readCommandQueue();
void doStateMachine();
/**
* @brief Extracts the path and name of the update image from the service 8 command data.
*/
ReturnValue_t getImageLocation(const uint8_t* data, size_t size);
ReturnValue_t checkNameLength(size_t size);
/**
* @brief Prepares and sends update available command to PLOC supervisor handler.
*/
void commandUpdateAvailable();
/**
* @brief Prepares and sends and update packet to the PLOC supervisor handler.
*/
void commandUpdatePacket();
/**
* @brief Prepares and sends the update verification packet to the PLOC supervisor handler.
*/
void commandUpdateVerify();
void calcImageCrc();
void adjustSequenceFlags(supv::UpdatePacket& packet);
};
#endif /* MISSION_DEVICES_PLOCUPDATER_H_ */

View File

@ -77,7 +77,7 @@ debugging. */
#define OBSW_ADD_MGT 0
#define OBSW_ADD_BPX_BATTERY_HANDLER 0
#define OBSW_ADD_STAR_TRACKER 0
#define OBSW_ADD_PLOC_SUPERVISOR 0
#define OBSW_ADD_PLOC_SUPERVISOR 1
#define OBSW_ADD_PLOC_MPSOC 1
#define OBSW_ADD_SUN_SENSORS 0
#define OBSW_ADD_ACS_BOARD 1

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 181 translations.
* @brief Auto-generated event translation file. Contains 177 translations.
* @details
* Generated on: 2022-03-28 12:48:26
* Generated on: 2022-04-10 13:17:48
*/
#include "translateEvents.h"
@ -102,6 +102,7 @@ const char *ACK_FAILURE_STRING = "ACK_FAILURE";
const char *EXE_FAILURE_STRING = "EXE_FAILURE";
const char *MPSOC_HANDLER_CRC_FAILURE_STRING = "MPSOC_HANDLER_CRC_FAILURE";
const char *MPSOC_HANDLER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HANDLER_SEQ_CNT_MISMATCH";
const char *MPSOC_SHUTDOWN_FAILED_STRING = "MPSOC_SHUTDOWN_FAILED";
const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE";
const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE";
const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE";
@ -117,14 +118,9 @@ const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
const char *SUPV_HELPER_EXECUTING_STRING = "SUPV_HELPER_EXECUTING";
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
const char *UPDATE_FILE_NOT_EXISTS_STRING = "UPDATE_FILE_NOT_EXISTS";
const char *ACTION_COMMANDING_FAILED_STRING = "ACTION_COMMANDING_FAILED";
const char *UPDATE_AVAILABLE_FAILED_STRING = "UPDATE_AVAILABLE_FAILED";
const char *UPDATE_TRANSFER_FAILED_STRING = "UPDATE_TRANSFER_FAILED";
const char *UPDATE_VERIFY_FAILED_STRING = "UPDATE_VERIFY_FAILED";
const char *UPDATE_FINISHED_STRING = "UPDATE_FINISHED";
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
const char *MRAM_DUMP_FAILED_STRING = "MRAM_DUMP_FAILED";
const char *MRAM_DUMP_FINISHED_STRING = "MRAM_DUMP_FINISHED";
@ -149,18 +145,18 @@ const char *POSITION_MISMATCH_STRING = "POSITION_MISMATCH";
const char *STR_HELPER_FILE_NOT_EXISTS_STRING = "STR_HELPER_FILE_NOT_EXISTS";
const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET_FAILED";
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
const char *MPSOC_FLASH_WRITE_FAILED_STRING = "MPSOC_FLASH_WRITE_FAILED";
const char *MPSOC_FLASH_WRITE_SUCCESSFUL_STRING = "MPSOC_FLASH_WRITE_SUCCESSFUL";
const char *SENDING_COMMAND_FAILED_STRING = "SENDING_COMMAND_FAILED";
const char *MPSOC_HELPER_REQUESTING_REPLY_FAILED_STRING = "MPSOC_HELPER_REQUESTING_REPLY_FAILED";
const char *MPSOC_HELPER_READING_REPLY_FAILED_STRING = "MPSOC_HELPER_READING_REPLY_FAILED";
const char *MISSING_ACK_STRING = "MISSING_ACK";
const char *MISSING_EXE_STRING = "MISSING_EXE";
const char *ACK_FAILURE_REPORT_STRING = "ACK_FAILURE_REPORT";
const char *EXE_FAILURE_REPORT_STRING = "EXE_FAILURE_REPORT";
const char *ACK_INVALID_APID_STRING = "ACK_INVALID_APID";
const char *EXE_INVALID_APID_STRING = "EXE_INVALID_APID";
const char *MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HELPER_SEQ_CNT_MISMATCH";
const char *SUPV_UPDATE_FAILED_STRING = "SUPV_UPDATE_FAILED";
const char *SUPV_UPDATE_SUCCESSFUL_STRING = "SUPV_UPDATE_SUCCESSFUL";
const char *TERMINATED_UPDATE_PROCEDURE_STRING = "TERMINATED_UPDATE_PROCEDURE";
const char *SUPV_SENDING_COMMAND_FAILED_STRING = "SUPV_SENDING_COMMAND_FAILED";
const char *SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING = "SUPV_HELPER_REQUESTING_REPLY_FAILED";
const char *SUPV_HELPER_READING_REPLY_FAILED_STRING = "SUPV_HELPER_READING_REPLY_FAILED";
const char *SUPV_MISSING_ACK_STRING = "SUPV_MISSING_ACK";
const char *SUPV_MISSING_EXE_STRING = "SUPV_MISSING_EXE";
const char *SUPV_ACK_FAILURE_REPORT_STRING = "SUPV_ACK_FAILURE_REPORT";
const char *SUPV_EXE_FAILURE_REPORT_STRING = "SUPV_EXE_FAILURE_REPORT";
const char *SUPV_ACK_INVALID_APID_STRING = "SUPV_ACK_INVALID_APID";
const char *SUPV_EXE_INVALID_APID_STRING = "SUPV_EXE_INVALID_APID";
const char *TRANSITION_BACK_TO_OFF_STRING = "TRANSITION_BACK_TO_OFF";
const char *NEG_V_OUT_OF_BOUNDS_STRING = "NEG_V_OUT_OF_BOUNDS";
const char *U_DRO_OUT_OF_BOUNDS_STRING = "U_DRO_OUT_OF_BOUNDS";
@ -379,6 +375,8 @@ const char *translateEvents(Event event) {
return MPSOC_HANDLER_CRC_FAILURE_STRING;
case (11105):
return MPSOC_HANDLER_SEQ_CNT_MISMATCH_STRING;
case (11106):
return MPSOC_SHUTDOWN_FAILED_STRING;
case (11201):
return SELF_TEST_I2C_FAILURE_STRING;
case (11202):
@ -409,22 +407,12 @@ const char *translateEvents(Event event) {
return SUPV_EXE_FAILURE_STRING;
case (11504):
return SUPV_CRC_FAILURE_EVENT_STRING;
case (11505):
return SUPV_HELPER_EXECUTING_STRING;
case (11600):
return SANITIZATION_FAILED_STRING;
case (11601):
return MOUNTED_SD_CARD_STRING;
case (11700):
return UPDATE_FILE_NOT_EXISTS_STRING;
case (11701):
return ACTION_COMMANDING_FAILED_STRING;
case (11702):
return UPDATE_AVAILABLE_FAILED_STRING;
case (11703):
return UPDATE_TRANSFER_FAILED_STRING;
case (11704):
return UPDATE_VERIFY_FAILED_STRING;
case (11705):
return UPDATE_FINISHED_STRING;
case (11800):
return SEND_MRAM_DUMP_FAILED_STRING;
case (11801):
@ -474,29 +462,29 @@ const char *translateEvents(Event event) {
case (12016):
return STR_HELPER_REQUESTING_MSG_FAILED_STRING;
case (12100):
return MPSOC_FLASH_WRITE_FAILED_STRING;
return SUPV_UPDATE_FAILED_STRING;
case (12101):
return MPSOC_FLASH_WRITE_SUCCESSFUL_STRING;
return SUPV_UPDATE_SUCCESSFUL_STRING;
case (12102):
return SENDING_COMMAND_FAILED_STRING;
return TERMINATED_UPDATE_PROCEDURE_STRING;
case (12103):
return MPSOC_HELPER_REQUESTING_REPLY_FAILED_STRING;
return SUPV_SENDING_COMMAND_FAILED_STRING;
case (12104):
return MPSOC_HELPER_READING_REPLY_FAILED_STRING;
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
case (12105):
return MISSING_ACK_STRING;
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
case (12106):
return MISSING_EXE_STRING;
return SUPV_MISSING_ACK_STRING;
case (12107):
return ACK_FAILURE_REPORT_STRING;
return SUPV_MISSING_EXE_STRING;
case (12108):
return EXE_FAILURE_REPORT_STRING;
return SUPV_ACK_FAILURE_REPORT_STRING;
case (12109):
return ACK_INVALID_APID_STRING;
return SUPV_EXE_FAILURE_REPORT_STRING;
case (12110):
return EXE_INVALID_APID_STRING;
return SUPV_ACK_INVALID_APID_STRING;
case (12111):
return MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING;
return SUPV_EXE_INVALID_APID_STRING;
case (12200):
return TRANSITION_BACK_TO_OFF_STRING;
case (12201):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 117 translations.
* Generated on: 2022-03-28 12:48:33
* Generated on: 2022-04-10 13:17:55
*/
#include "translateObjects.h"

2
tmtc

@ -1 +1 @@
Subproject commit d8cff25c4a5383e918c0a10b36ff455616fb6e8b
Subproject commit ec8526314d662dc86ec9cd1d952911037d275b4e