diff --git a/bsp_egse/ObjectFactory.cpp b/bsp_egse/ObjectFactory.cpp index 7ccec79c..09d305ec 100644 --- a/bsp_egse/ObjectFactory.cpp +++ b/bsp_egse/ObjectFactory.cpp @@ -41,7 +41,7 @@ void ObjectFactory::produce(void* args) { UartCookie* starTrackerCookie = new UartCookie(objects::STAR_TRACKER, egse::STAR_TRACKER_UART, UartModes::NON_CANONICAL, - uart::STAR_TRACKER_BAUD, StarTracker::MAX_FRAME_SIZE * 2 + 2); + uart::STAR_TRACKER_BAUD, startracker::MAX_FRAME_SIZE * 2 + 2); new UartComIF(objects::UART_COM_IF); starTrackerCookie->setNoFixedSizeReply(); StrHelper* strHelper = new StrHelper(objects::STR_HELPER); diff --git a/fsfw b/fsfw index 3c06d2db..c20bf31d 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 3c06d2dbbb0d79608e003a8a3c89ae90cc71f409 +Subproject commit c20bf31d5d9f7ed18d15f2a3211a14f28242eeb6 diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index b3d874ab..ad90e3d5 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -1,140 +1,137 @@ -2200;STORE_SEND_WRITE_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2201;STORE_WRITE_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2202;STORE_SEND_READ_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2203;STORE_READ_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2204;UNEXPECTED_MSG;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2205;STORING_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2206;TM_DUMP_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2207;STORE_INIT_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2208;STORE_INIT_EMPTY;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2209;STORE_CONTENT_CORRUPTED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2210;STORE_INITIALIZE;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2211;INIT_DONE;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2212;DUMP_FINISHED;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2213;DELETION_FINISHED;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2214;DELETION_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2215;AUTO_CATALOGS_SENDING_FAILED;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h -2600;GET_DATA_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h -2601;STORE_DATA_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h -2800;DEVICE_BUILDING_COMMAND_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2801;DEVICE_SENDING_COMMAND_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2802;DEVICE_REQUESTING_REPLY_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2803;DEVICE_READING_REPLY_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2804;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2805;DEVICE_MISSED_REPLY;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2806;DEVICE_UNKNOWN_REPLY;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2807;DEVICE_UNREQUESTED_REPLY;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2808;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2809;MONITORING_LIMIT_EXCEEDED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2810;MONITORING_AMBIGUOUS;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -2811;DEVICE_WANTS_HARD_REBOOT;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h -4201;FUSE_CURRENT_HIGH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/Fuse.h -4202;FUSE_WENT_OFF;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/Fuse.h -4204;POWER_ABOVE_HIGH_LIMIT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/Fuse.h -4205;POWER_BELOW_LOW_LIMIT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/Fuse.h -4300;SWITCH_WENT_OFF;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/power/PowerSwitchIF.h -5000;HEATER_ON;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h -5001;HEATER_OFF;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h -5002;HEATER_TIMEOUT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h -5003;HEATER_STAYED_ON;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h -5004;HEATER_STAYED_OFF;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/Heater.h -5200;TEMP_SENSOR_HIGH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h -5201;TEMP_SENSOR_LOW;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h -5202;TEMP_SENSOR_GRADIENT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h -5901;COMPONENT_TEMP_LOW;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h -5902;COMPONENT_TEMP_HIGH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h -5903;COMPONENT_TEMP_OOL_LOW;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h -5904;COMPONENT_TEMP_OOL_HIGH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h -5905;TEMP_NOT_IN_OP_RANGE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h -7101;FDIR_CHANGED_STATE;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h -7102;FDIR_STARTS_RECOVERY;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h -7103;FDIR_TURNS_OFF_DEVICE;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h -7201;MONITOR_CHANGED_STATE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h -7202;VALUE_BELOW_LOW_LIMIT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h -7203;VALUE_ABOVE_HIGH_LIMIT;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h -7204;VALUE_OUT_OF_RANGE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h -7400;CHANGING_MODE;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h -7401;MODE_INFO;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h -7402;FALLBACK_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h -7403;MODE_TRANSITION_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h -7404;CANT_KEEP_MODE;HIGH;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h -7405;OBJECT_IN_INVALID_MODE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h -7406;FORCING_MODE;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h -7407;MODE_CMD_REJECTED;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/modes/HasModesIF.h -7506;HEALTH_INFO;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h -7507;CHILD_CHANGED_HEALTH;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h -7508;CHILD_PROBLEMS;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h -7509;OVERWRITING_HEALTH;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h -7510;TRYING_RECOVERY;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h -7511;RECOVERY_STEP;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h -7512;RECOVERY_DONE;MEDIUM;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/health/HasHealthIF.h -7900;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h -7901;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h -7902;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h -7903;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h -7905;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h -8900;CLOCK_SET;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h -8901;CLOCK_SET_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h -9700;TEST;INFO;;/home/rmueller/EIVE/eive-obsw/fsfw/src/fsfw/pus/Service17Test.h -10600;CHANGE_OF_SETUP_PARAMETER;LOW;;/home/rmueller/EIVE/eive-obsw/fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h -10900;GPIO_PULL_HIGH_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h -10901;GPIO_PULL_LOW_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h -10902;SWITCH_ALREADY_ON;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h -10903;SWITCH_ALREADY_OFF;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h -10904;MAIN_SWITCH_TIMEOUT;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/HeaterHandler.h -11000;MAIN_SWITCH_ON_TIMEOUT;LOW;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h -11001;MAIN_SWITCH_OFF_TIMEOUT;LOW;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h -11002;DEPLOYMENT_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h -11003;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h -11004;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/devices/SolarArrayDeploymentHandler.h -11101;MEMORY_READ_RPT_CRC_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h -11102;ACK_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h -11103;EXE_FAILURE;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h -11104;CRC_FAILURE_EVENT;LOW;;/home/rmueller/EIVE/eive-obsw/mission/devices/PlocMPSoCHandler.h -11201;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;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11202;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;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11203;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;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11204;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;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11205;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;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11206;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;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11207;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;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;/home/rmueller/EIVE/eive-obsw/mission/devices/IMTQHandler.h -11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;/home/rmueller/EIVE/eive-obsw/mission/devices/RwHandler.h -11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h -11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h -11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h -11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocSupervisorHandler.h -11600;SANITIZATION_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/memory/SdCardManager.h -11700;UPDATE_FILE_NOT_EXISTS;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h -11701;ACTION_COMMANDING_FAILED;LOW;Failed to send command to supervisor handler P1: Return value of CommandActionHelper::commandAction P2: Action ID of command to send;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h -11702;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h -11703;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);/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h -11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h -11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocUpdater.h -11800;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;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h -11801;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h -11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/PlocMemoryDumper.h -11901;INVALID_TC_FRAME;HIGH;;/home/rmueller/EIVE/eive-obsw/linux/obc/PdecHandler.h -11902;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;/home/rmueller/EIVE/eive-obsw/linux/obc/PdecHandler.h -11903;CARRIER_LOCK;INFO;Carrier lock detected;/home/rmueller/EIVE/eive-obsw/linux/obc/PdecHandler.h -11904;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);/home/rmueller/EIVE/eive-obsw/linux/obc/PdecHandler.h -12000;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12001;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12002;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12003;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12004;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12005;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12006;FLASH_WRITE_FAILED;LOW;Flash write procedure failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12007;FLASH_READ_FAILED;LOW;Flash read procedure failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12008;FPGA_DOWNLOAD_SUCCESSFUL;LOW;Download of FPGA image successful;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12009;FPGA_DOWNLOAD_FAILED;LOW;Download of FPGA image failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12010;FPGA_UPLOAD_SUCCESSFUL;LOW;Upload of FPGA image successful;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12011;FPGA_UPLOAD_FAILED;LOW;Upload of FPGA image failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12012;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;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12013;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;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12014;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;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12015;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;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12016;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12017;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12018;STR_HELPER_SENDING_PACKET_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h -12019;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;/home/rmueller/EIVE/eive-obsw/bsp_q7s/devices/startracker/StrHelper.h +2200;STORE_SEND_WRITE_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2201;STORE_WRITE_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2202;STORE_SEND_READ_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2203;STORE_READ_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2204;UNEXPECTED_MSG;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2205;STORING_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2206;TM_DUMP_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2207;STORE_INIT_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2208;STORE_INIT_EMPTY;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2209;STORE_CONTENT_CORRUPTED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2210;STORE_INITIALIZE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2211;INIT_DONE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2212;DUMP_FINISHED;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2213;DELETION_FINISHED;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2214;DELETION_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2215;AUTO_CATALOGS_SENDING_FAILED;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h +2600;GET_DATA_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h +2601;STORE_DATA_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/storagemanager/StorageManagerIF.h +2800;DEVICE_BUILDING_COMMAND_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2801;DEVICE_SENDING_COMMAND_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2802;DEVICE_REQUESTING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2803;DEVICE_READING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2804;DEVICE_INTERPRETING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2805;DEVICE_MISSED_REPLY;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2806;DEVICE_UNKNOWN_REPLY;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2807;DEVICE_UNREQUESTED_REPLY;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2808;INVALID_DEVICE_COMMAND;LOW;Indicates a SW bug in child class.;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2809;MONITORING_LIMIT_EXCEEDED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2810;MONITORING_AMBIGUOUS;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +2811;DEVICE_WANTS_HARD_REBOOT;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h +4201;FUSE_CURRENT_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h +4202;FUSE_WENT_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h +4204;POWER_ABOVE_HIGH_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h +4205;POWER_BELOW_LOW_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/Fuse.h +4300;SWITCH_WENT_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/power/PowerSwitchIF.h +5000;HEATER_ON;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h +5001;HEATER_OFF;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h +5002;HEATER_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h +5003;HEATER_STAYED_ON;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h +5004;HEATER_STAYED_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/Heater.h +5200;TEMP_SENSOR_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h +5201;TEMP_SENSOR_LOW;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h +5202;TEMP_SENSOR_GRADIENT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/AbstractTemperatureSensor.h +5901;COMPONENT_TEMP_LOW;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +5902;COMPONENT_TEMP_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +5903;COMPONENT_TEMP_OOL_LOW;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +5904;COMPONENT_TEMP_OOL_HIGH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +5905;TEMP_NOT_IN_OP_RANGE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/thermal/ThermalComponentIF.h +7101;FDIR_CHANGED_STATE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h +7102;FDIR_STARTS_RECOVERY;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h +7103;FDIR_TURNS_OFF_DEVICE;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/fdir/FailureIsolationBase.h +7201;MONITOR_CHANGED_STATE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h +7202;VALUE_BELOW_LOW_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h +7203;VALUE_ABOVE_HIGH_LIMIT;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h +7204;VALUE_OUT_OF_RANGE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/monitoring/MonitoringIF.h +7400;CHANGING_MODE;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h +7401;MODE_INFO;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h +7402;FALLBACK_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h +7403;MODE_TRANSITION_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h +7404;CANT_KEEP_MODE;HIGH;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h +7405;OBJECT_IN_INVALID_MODE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h +7406;FORCING_MODE;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h +7407;MODE_CMD_REJECTED;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/modes/HasModesIF.h +7506;HEALTH_INFO;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h +7507;CHILD_CHANGED_HEALTH;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h +7508;CHILD_PROBLEMS;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h +7509;OVERWRITING_HEALTH;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h +7510;TRYING_RECOVERY;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h +7511;RECOVERY_STEP;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h +7512;RECOVERY_DONE;MEDIUM;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/health/HasHealthIF.h +7900;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +7901;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +7902;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +7903;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +7905;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/datalinklayer/DataLinkLayer.h +8900;CLOCK_SET;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h +8901;CLOCK_SET_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/pus/Service9TimeManagement.h +9700;TEST;INFO;;C:\Users\jakob\eive-software\eive_obsw/fsfw/src/fsfw/pus/Service17Test.h +10600;CHANGE_OF_SETUP_PARAMETER;LOW;;C:\Users\jakob\eive-software\eive_obsw/fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h +10900;GPIO_PULL_HIGH_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h +10901;GPIO_PULL_LOW_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h +10902;SWITCH_ALREADY_ON;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h +10903;SWITCH_ALREADY_OFF;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h +10904;MAIN_SWITCH_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/HeaterHandler.h +11000;MAIN_SWITCH_ON_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/SolarArrayDeploymentHandler.h +11001;MAIN_SWITCH_OFF_TIMEOUT;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/SolarArrayDeploymentHandler.h +11002;DEPLOYMENT_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/SolarArrayDeploymentHandler.h +11003;DEPL_SA1_GPIO_SWTICH_ON_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/SolarArrayDeploymentHandler.h +11004;DEPL_SA2_GPIO_SWTICH_ON_FAILED;HIGH;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/SolarArrayDeploymentHandler.h +11101;MEMORY_READ_RPT_CRC_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h +11102;ACK_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h +11103;EXE_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h +11104;CRC_FAILURE_EVENT;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/PlocMPSoCHandler.h +11201;SELF_TEST_I2C_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h +11202;SELF_TEST_SPI_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h +11203;SELF_TEST_ADC_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h +11204;SELF_TEST_PWM_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h +11205;SELF_TEST_TC_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h +11206;SELF_TEST_MTM_RANGE_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h +11207;SELF_TEST_COIL_CURRENT_FAILURE;LOW;;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h +11208;INVALID_ERROR_BYTE;LOW;Received invalid error byte. This indicates an error of the communication link between IMTQ and OBC.;C:\Users\jakob\eive-software\eive_obsw/mission/devices/IMTQHandler.h +11301;ERROR_STATE;HIGH;Reaction wheel signals an error state;C:\Users\jakob\eive-software\eive_obsw/mission/devices/RwHandler.h +11501;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h +11502;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h +11503;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h +11504;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocSupervisorHandler.h +11600;SANITIZATION_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/memory/SdCardManager.h +11700;UPDATE_FILE_NOT_EXISTS;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h +11701;ACTION_COMMANDING_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h +11702;UPDATE_AVAILABLE_FAILED;LOW;Supervisor handler replied action message indicating a command execution failure of the update available command;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h +11703;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);C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h +11704;UPDATE_VERIFY_FAILED;LOW;Supervisor failed to execute the update verify command.;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h +11705;UPDATE_FINISHED;INFO;MPSoC update successful completed;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocUpdater.h +11800;SEND_MRAM_DUMP_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h +11801;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h +11802;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;C:\Users\jakob\eive-software\eive_obsw/bsp_q7s/devices/PlocMemoryDumper.h +11901;INVALID_TC_FRAME;HIGH;;C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h +11902;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h +11903;CARRIER_LOCK;INFO;Carrier lock detected;C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h +11904;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);C:\Users\jakob\eive-software\eive_obsw/linux/obc/PdecHandler.h +12000;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12001;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12002;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12003;IMAGE_DOWNLOAD_SUCCESSFUL;LOW;Image download was successful;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12004;FLASH_WRITE_SUCCESSFUL;LOW;Finished flash write procedure successfully;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12005;FLASH_READ_SUCCESSFUL;LOW;Finished flash read procedure successfully;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12006;FLASH_READ_FAILED;LOW;Flash read procedure failed;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12007;FIRMWARE_UPDATE_SUCCESSFUL;LOW;Firmware update was successful;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12008;FIRMWARE_UPDATE_FAILED;LOW;Firmware update failed;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12009;STR_HELPER_READING_REPLY_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12010;STR_HELPER_COM_ERROR;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12011;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;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12012;STR_HELPER_DEC_ERROR;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12013;POSITION_MISMATCH;LOW;Position mismatch P1: The expected position and thus the position for which the image upload/download failed;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12014;STR_HELPER_FILE_NOT_EXISTS;LOW;Specified file does not exist P1: Internal state of str helper;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12015;STR_HELPER_SENDING_PACKET_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h +12016;STR_HELPER_REQUESTING_MSG_FAILED;LOW;;C:\Users\jakob\eive-software\eive_obsw/linux/devices/startracker/StrHelper.h diff --git a/generators/bsp_q7s_objects.csv b/generators/bsp_q7s_objects.csv index c686ec40..2700c222 100644 --- a/generators/bsp_q7s_objects.csv +++ b/generators/bsp_q7s_objects.csv @@ -101,6 +101,7 @@ 0x53ffffff;FSFW_OBJECTS_END 0x54000010;SPI_TEST 0x54000020;UART_TEST +0x54000030;I2C_TEST 0x5400AFFE;DUMMY_HANDLER 0x5400CAFE;DUMMY_INTERFACE 0x54123456;LIBGPIOD_TEST diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 9e6a5f61..117e264f 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 140 translations. + * @brief Auto-generated event translation file. Contains 137 translations. * @details - * Generated on: 2022-02-03 17:30:40 + * Generated on: 2022-02-13 15:31:27 */ #include "translateEvents.h" @@ -131,12 +131,9 @@ const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL"; const char *IMAGE_DOWNLOAD_SUCCESSFUL_STRING = "IMAGE_DOWNLOAD_SUCCESSFUL"; const char *FLASH_WRITE_SUCCESSFUL_STRING = "FLASH_WRITE_SUCCESSFUL"; const char *FLASH_READ_SUCCESSFUL_STRING = "FLASH_READ_SUCCESSFUL"; -const char *FLASH_WRITE_FAILED_STRING = "FLASH_WRITE_FAILED"; const char *FLASH_READ_FAILED_STRING = "FLASH_READ_FAILED"; -const char *FPGA_DOWNLOAD_SUCCESSFUL_STRING = "FPGA_DOWNLOAD_SUCCESSFUL"; -const char *FPGA_DOWNLOAD_FAILED_STRING = "FPGA_DOWNLOAD_FAILED"; -const char *FPGA_UPLOAD_SUCCESSFUL_STRING = "FPGA_UPLOAD_SUCCESSFUL"; -const char *FPGA_UPLOAD_FAILED_STRING = "FPGA_UPLOAD_FAILED"; +const char *FIRMWARE_UPDATE_SUCCESSFUL_STRING = "FIRMWARE_UPDATE_SUCCESSFUL"; +const char *FIRMWARE_UPDATE_FAILED_STRING = "FIRMWARE_UPDATE_FAILED"; const char *STR_HELPER_READING_REPLY_FAILED_STRING = "STR_HELPER_READING_REPLY_FAILED"; const char *STR_HELPER_COM_ERROR_STRING = "STR_HELPER_COM_ERROR"; const char *STR_HELPER_NO_REPLY_STRING = "STR_HELPER_NO_REPLY"; @@ -147,289 +144,283 @@ const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED"; const char * translateEvents(Event event) { - switch( (event & 0xffff) ) { - case(2200): - return STORE_SEND_WRITE_FAILED_STRING; - case(2201): - return STORE_WRITE_FAILED_STRING; - case(2202): - return STORE_SEND_READ_FAILED_STRING; - case(2203): - return STORE_READ_FAILED_STRING; - case(2204): - return UNEXPECTED_MSG_STRING; - case(2205): - return STORING_FAILED_STRING; - case(2206): - return TM_DUMP_FAILED_STRING; - case(2207): - return STORE_INIT_FAILED_STRING; - case(2208): - return STORE_INIT_EMPTY_STRING; - case(2209): - return STORE_CONTENT_CORRUPTED_STRING; - case(2210): - return STORE_INITIALIZE_STRING; - case(2211): - return INIT_DONE_STRING; - case(2212): - return DUMP_FINISHED_STRING; - case(2213): - return DELETION_FINISHED_STRING; - case(2214): - return DELETION_FAILED_STRING; - case(2215): - return AUTO_CATALOGS_SENDING_FAILED_STRING; - case(2600): - return GET_DATA_FAILED_STRING; - case(2601): - return STORE_DATA_FAILED_STRING; - case(2800): - return DEVICE_BUILDING_COMMAND_FAILED_STRING; - case(2801): - return DEVICE_SENDING_COMMAND_FAILED_STRING; - case(2802): - return DEVICE_REQUESTING_REPLY_FAILED_STRING; - case(2803): - return DEVICE_READING_REPLY_FAILED_STRING; - case(2804): - return DEVICE_INTERPRETING_REPLY_FAILED_STRING; - case(2805): - return DEVICE_MISSED_REPLY_STRING; - case(2806): - return DEVICE_UNKNOWN_REPLY_STRING; - case(2807): - return DEVICE_UNREQUESTED_REPLY_STRING; - case(2808): - return INVALID_DEVICE_COMMAND_STRING; - case(2809): - return MONITORING_LIMIT_EXCEEDED_STRING; - case(2810): - return MONITORING_AMBIGUOUS_STRING; - case(2811): - return DEVICE_WANTS_HARD_REBOOT_STRING; - case(4201): - return FUSE_CURRENT_HIGH_STRING; - case(4202): - return FUSE_WENT_OFF_STRING; - case(4204): - return POWER_ABOVE_HIGH_LIMIT_STRING; - case(4205): - return POWER_BELOW_LOW_LIMIT_STRING; - case(4300): - return SWITCH_WENT_OFF_STRING; - case(5000): - return HEATER_ON_STRING; - case(5001): - return HEATER_OFF_STRING; - case(5002): - return HEATER_TIMEOUT_STRING; - case(5003): - return HEATER_STAYED_ON_STRING; - case(5004): - return HEATER_STAYED_OFF_STRING; - case(5200): - return TEMP_SENSOR_HIGH_STRING; - case(5201): - return TEMP_SENSOR_LOW_STRING; - case(5202): - return TEMP_SENSOR_GRADIENT_STRING; - case(5901): - return COMPONENT_TEMP_LOW_STRING; - case(5902): - return COMPONENT_TEMP_HIGH_STRING; - case(5903): - return COMPONENT_TEMP_OOL_LOW_STRING; - case(5904): - return COMPONENT_TEMP_OOL_HIGH_STRING; - case(5905): - return TEMP_NOT_IN_OP_RANGE_STRING; - case(7101): - return FDIR_CHANGED_STATE_STRING; - case(7102): - return FDIR_STARTS_RECOVERY_STRING; - case(7103): - return FDIR_TURNS_OFF_DEVICE_STRING; - case(7201): - return MONITOR_CHANGED_STATE_STRING; - case(7202): - return VALUE_BELOW_LOW_LIMIT_STRING; - case(7203): - return VALUE_ABOVE_HIGH_LIMIT_STRING; - case(7204): - return VALUE_OUT_OF_RANGE_STRING; - case(7400): - return CHANGING_MODE_STRING; - case(7401): - return MODE_INFO_STRING; - case(7402): - return FALLBACK_FAILED_STRING; - case(7403): - return MODE_TRANSITION_FAILED_STRING; - case(7404): - return CANT_KEEP_MODE_STRING; - case(7405): - return OBJECT_IN_INVALID_MODE_STRING; - case(7406): - return FORCING_MODE_STRING; - case(7407): - return MODE_CMD_REJECTED_STRING; - case(7506): - return HEALTH_INFO_STRING; - case(7507): - return CHILD_CHANGED_HEALTH_STRING; - case(7508): - return CHILD_PROBLEMS_STRING; - case(7509): - return OVERWRITING_HEALTH_STRING; - case(7510): - return TRYING_RECOVERY_STRING; - case(7511): - return RECOVERY_STEP_STRING; - case(7512): - return RECOVERY_DONE_STRING; - case(7900): - return RF_AVAILABLE_STRING; - case(7901): - return RF_LOST_STRING; - case(7902): - return BIT_LOCK_STRING; - case(7903): - return BIT_LOCK_LOST_STRING; - case(7905): - return FRAME_PROCESSING_FAILED_STRING; - case(8900): - return CLOCK_SET_STRING; - case(8901): - return CLOCK_SET_FAILURE_STRING; - case(9700): - return TEST_STRING; - case(10600): - return CHANGE_OF_SETUP_PARAMETER_STRING; - case(10900): - return GPIO_PULL_HIGH_FAILED_STRING; - case(10901): - return GPIO_PULL_LOW_FAILED_STRING; - case(10902): - return SWITCH_ALREADY_ON_STRING; - case(10903): - return SWITCH_ALREADY_OFF_STRING; - case(10904): - return MAIN_SWITCH_TIMEOUT_STRING; - case(11000): - return MAIN_SWITCH_ON_TIMEOUT_STRING; - case(11001): - return MAIN_SWITCH_OFF_TIMEOUT_STRING; - case(11002): - return DEPLOYMENT_FAILED_STRING; - case(11003): - return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; - case(11004): - return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; - case(11101): - return MEMORY_READ_RPT_CRC_FAILURE_STRING; - case(11102): - return ACK_FAILURE_STRING; - case(11103): - return EXE_FAILURE_STRING; - case(11104): - return CRC_FAILURE_EVENT_STRING; - case(11201): - return SELF_TEST_I2C_FAILURE_STRING; - case(11202): - return SELF_TEST_SPI_FAILURE_STRING; - case(11203): - return SELF_TEST_ADC_FAILURE_STRING; - case(11204): - return SELF_TEST_PWM_FAILURE_STRING; - case(11205): - return SELF_TEST_TC_FAILURE_STRING; - case(11206): - return SELF_TEST_MTM_RANGE_FAILURE_STRING; - case(11207): - return SELF_TEST_COIL_CURRENT_FAILURE_STRING; - case(11208): - return INVALID_ERROR_BYTE_STRING; - case(11301): - return ERROR_STATE_STRING; - case(11501): - return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; - case(11502): - return SUPV_ACK_FAILURE_STRING; - case(11503): - return SUPV_EXE_FAILURE_STRING; - case(11504): - return SUPV_CRC_FAILURE_EVENT_STRING; - case(11600): - return SANITIZATION_FAILED_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): - return MRAM_DUMP_FAILED_STRING; - case(11802): - return MRAM_DUMP_FINISHED_STRING; - case(11901): - return INVALID_TC_FRAME_STRING; - case(11902): - return INVALID_FAR_STRING; - case(11903): - return CARRIER_LOCK_STRING; - case(11904): - return BIT_LOCK_PDEC_STRING; - case(12000): - return IMAGE_UPLOAD_FAILED_STRING; - case(12001): - return IMAGE_DOWNLOAD_FAILED_STRING; - case(12002): - return IMAGE_UPLOAD_SUCCESSFUL_STRING; - case(12003): - return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; - case(12004): - return FLASH_WRITE_SUCCESSFUL_STRING; - case(12005): - return FLASH_READ_SUCCESSFUL_STRING; - case(12006): - return FLASH_WRITE_FAILED_STRING; - case(12007): - return FLASH_READ_FAILED_STRING; - case(12008): - return FPGA_DOWNLOAD_SUCCESSFUL_STRING; - case(12009): - return FPGA_DOWNLOAD_FAILED_STRING; - case(12010): - return FPGA_UPLOAD_SUCCESSFUL_STRING; - case(12011): - return FPGA_UPLOAD_FAILED_STRING; - case(12012): - return STR_HELPER_READING_REPLY_FAILED_STRING; - case(12013): - return STR_HELPER_COM_ERROR_STRING; - case(12014): - return STR_HELPER_NO_REPLY_STRING; - case(12015): - return STR_HELPER_DEC_ERROR_STRING; - case(12016): - return POSITION_MISMATCH_STRING; - case(12017): - return STR_HELPER_FILE_NOT_EXISTS_STRING; - case(12018): - return STR_HELPER_SENDING_PACKET_FAILED_STRING; - case(12019): - return STR_HELPER_REQUESTING_MSG_FAILED_STRING; - default: - return "UNKNOWN_EVENT"; - } - return 0; + switch( (event & 0xffff) ) { + case(2200): + return STORE_SEND_WRITE_FAILED_STRING; + case(2201): + return STORE_WRITE_FAILED_STRING; + case(2202): + return STORE_SEND_READ_FAILED_STRING; + case(2203): + return STORE_READ_FAILED_STRING; + case(2204): + return UNEXPECTED_MSG_STRING; + case(2205): + return STORING_FAILED_STRING; + case(2206): + return TM_DUMP_FAILED_STRING; + case(2207): + return STORE_INIT_FAILED_STRING; + case(2208): + return STORE_INIT_EMPTY_STRING; + case(2209): + return STORE_CONTENT_CORRUPTED_STRING; + case(2210): + return STORE_INITIALIZE_STRING; + case(2211): + return INIT_DONE_STRING; + case(2212): + return DUMP_FINISHED_STRING; + case(2213): + return DELETION_FINISHED_STRING; + case(2214): + return DELETION_FAILED_STRING; + case(2215): + return AUTO_CATALOGS_SENDING_FAILED_STRING; + case(2600): + return GET_DATA_FAILED_STRING; + case(2601): + return STORE_DATA_FAILED_STRING; + case(2800): + return DEVICE_BUILDING_COMMAND_FAILED_STRING; + case(2801): + return DEVICE_SENDING_COMMAND_FAILED_STRING; + case(2802): + return DEVICE_REQUESTING_REPLY_FAILED_STRING; + case(2803): + return DEVICE_READING_REPLY_FAILED_STRING; + case(2804): + return DEVICE_INTERPRETING_REPLY_FAILED_STRING; + case(2805): + return DEVICE_MISSED_REPLY_STRING; + case(2806): + return DEVICE_UNKNOWN_REPLY_STRING; + case(2807): + return DEVICE_UNREQUESTED_REPLY_STRING; + case(2808): + return INVALID_DEVICE_COMMAND_STRING; + case(2809): + return MONITORING_LIMIT_EXCEEDED_STRING; + case(2810): + return MONITORING_AMBIGUOUS_STRING; + case(2811): + return DEVICE_WANTS_HARD_REBOOT_STRING; + case(4201): + return FUSE_CURRENT_HIGH_STRING; + case(4202): + return FUSE_WENT_OFF_STRING; + case(4204): + return POWER_ABOVE_HIGH_LIMIT_STRING; + case(4205): + return POWER_BELOW_LOW_LIMIT_STRING; + case(4300): + return SWITCH_WENT_OFF_STRING; + case(5000): + return HEATER_ON_STRING; + case(5001): + return HEATER_OFF_STRING; + case(5002): + return HEATER_TIMEOUT_STRING; + case(5003): + return HEATER_STAYED_ON_STRING; + case(5004): + return HEATER_STAYED_OFF_STRING; + case(5200): + return TEMP_SENSOR_HIGH_STRING; + case(5201): + return TEMP_SENSOR_LOW_STRING; + case(5202): + return TEMP_SENSOR_GRADIENT_STRING; + case(5901): + return COMPONENT_TEMP_LOW_STRING; + case(5902): + return COMPONENT_TEMP_HIGH_STRING; + case(5903): + return COMPONENT_TEMP_OOL_LOW_STRING; + case(5904): + return COMPONENT_TEMP_OOL_HIGH_STRING; + case(5905): + return TEMP_NOT_IN_OP_RANGE_STRING; + case(7101): + return FDIR_CHANGED_STATE_STRING; + case(7102): + return FDIR_STARTS_RECOVERY_STRING; + case(7103): + return FDIR_TURNS_OFF_DEVICE_STRING; + case(7201): + return MONITOR_CHANGED_STATE_STRING; + case(7202): + return VALUE_BELOW_LOW_LIMIT_STRING; + case(7203): + return VALUE_ABOVE_HIGH_LIMIT_STRING; + case(7204): + return VALUE_OUT_OF_RANGE_STRING; + case(7400): + return CHANGING_MODE_STRING; + case(7401): + return MODE_INFO_STRING; + case(7402): + return FALLBACK_FAILED_STRING; + case(7403): + return MODE_TRANSITION_FAILED_STRING; + case(7404): + return CANT_KEEP_MODE_STRING; + case(7405): + return OBJECT_IN_INVALID_MODE_STRING; + case(7406): + return FORCING_MODE_STRING; + case(7407): + return MODE_CMD_REJECTED_STRING; + case(7506): + return HEALTH_INFO_STRING; + case(7507): + return CHILD_CHANGED_HEALTH_STRING; + case(7508): + return CHILD_PROBLEMS_STRING; + case(7509): + return OVERWRITING_HEALTH_STRING; + case(7510): + return TRYING_RECOVERY_STRING; + case(7511): + return RECOVERY_STEP_STRING; + case(7512): + return RECOVERY_DONE_STRING; + case(7900): + return RF_AVAILABLE_STRING; + case(7901): + return RF_LOST_STRING; + case(7902): + return BIT_LOCK_STRING; + case(7903): + return BIT_LOCK_LOST_STRING; + case(7905): + return FRAME_PROCESSING_FAILED_STRING; + case(8900): + return CLOCK_SET_STRING; + case(8901): + return CLOCK_SET_FAILURE_STRING; + case(9700): + return TEST_STRING; + case(10600): + return CHANGE_OF_SETUP_PARAMETER_STRING; + case(10900): + return GPIO_PULL_HIGH_FAILED_STRING; + case(10901): + return GPIO_PULL_LOW_FAILED_STRING; + case(10902): + return SWITCH_ALREADY_ON_STRING; + case(10903): + return SWITCH_ALREADY_OFF_STRING; + case(10904): + return MAIN_SWITCH_TIMEOUT_STRING; + case(11000): + return MAIN_SWITCH_ON_TIMEOUT_STRING; + case(11001): + return MAIN_SWITCH_OFF_TIMEOUT_STRING; + case(11002): + return DEPLOYMENT_FAILED_STRING; + case(11003): + return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; + case(11004): + return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; + case(11101): + return MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11102): + return ACK_FAILURE_STRING; + case(11103): + return EXE_FAILURE_STRING; + case(11104): + return CRC_FAILURE_EVENT_STRING; + case(11201): + return SELF_TEST_I2C_FAILURE_STRING; + case(11202): + return SELF_TEST_SPI_FAILURE_STRING; + case(11203): + return SELF_TEST_ADC_FAILURE_STRING; + case(11204): + return SELF_TEST_PWM_FAILURE_STRING; + case(11205): + return SELF_TEST_TC_FAILURE_STRING; + case(11206): + return SELF_TEST_MTM_RANGE_FAILURE_STRING; + case(11207): + return SELF_TEST_COIL_CURRENT_FAILURE_STRING; + case(11208): + return INVALID_ERROR_BYTE_STRING; + case(11301): + return ERROR_STATE_STRING; + case(11501): + return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11502): + return SUPV_ACK_FAILURE_STRING; + case(11503): + return SUPV_EXE_FAILURE_STRING; + case(11504): + return SUPV_CRC_FAILURE_EVENT_STRING; + case(11600): + return SANITIZATION_FAILED_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): + return MRAM_DUMP_FAILED_STRING; + case(11802): + return MRAM_DUMP_FINISHED_STRING; + case(11901): + return INVALID_TC_FRAME_STRING; + case(11902): + return INVALID_FAR_STRING; + case(11903): + return CARRIER_LOCK_STRING; + case(11904): + return BIT_LOCK_PDEC_STRING; + case(12000): + return IMAGE_UPLOAD_FAILED_STRING; + case(12001): + return IMAGE_DOWNLOAD_FAILED_STRING; + case(12002): + return IMAGE_UPLOAD_SUCCESSFUL_STRING; + case(12003): + return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; + case(12004): + return FLASH_WRITE_SUCCESSFUL_STRING; + case(12005): + return FLASH_READ_SUCCESSFUL_STRING; + case(12006): + return FLASH_READ_FAILED_STRING; + case(12007): + return FIRMWARE_UPDATE_SUCCESSFUL_STRING; + case(12008): + return FIRMWARE_UPDATE_FAILED_STRING; + case(12009): + return STR_HELPER_READING_REPLY_FAILED_STRING; + case(12010): + return STR_HELPER_COM_ERROR_STRING; + case(12011): + return STR_HELPER_NO_REPLY_STRING; + case(12012): + return STR_HELPER_DEC_ERROR_STRING; + case(12013): + return POSITION_MISMATCH_STRING; + case(12014): + return STR_HELPER_FILE_NOT_EXISTS_STRING; + case(12015): + return STR_HELPER_SENDING_PACKET_FAILED_STRING; + case(12016): + return STR_HELPER_REQUESTING_MSG_FAILED_STRING; + default: + return "UNKNOWN_EVENT"; + } + return 0; } diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 44b74490..2400e1d8 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -1,8 +1,8 @@ /** * @brief Auto-generated object translation file. * @details - * Contains 110 translations. - * Generated on: 2022-02-03 12:01:36 + * Contains 111 translations. + * Generated on: 2022-02-13 15:31:32 */ #include "translateObjects.h" @@ -109,6 +109,7 @@ const char *TIME_STAMPER_STRING = "TIME_STAMPER"; const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END"; const char *SPI_TEST_STRING = "SPI_TEST"; const char *UART_TEST_STRING = "UART_TEST"; +const char *I2C_TEST_STRING = "I2C_TEST"; const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER"; const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE"; const char *LIBGPIOD_TEST_STRING = "LIBGPIOD_TEST"; @@ -325,6 +326,8 @@ const char* translateObject(object_id_t object) { return SPI_TEST_STRING; case 0x54000020: return UART_TEST_STRING; + case 0x54000030: + return I2C_TEST_STRING; case 0x5400AFFE: return DUMMY_HANDLER_STRING; case 0x5400CAFE: diff --git a/linux/devices/devicedefinitions/StarTrackerDefinitions.h b/linux/devices/devicedefinitions/StarTrackerDefinitions.h index ba077e5f..f501f096 100644 --- a/linux/devices/devicedefinitions/StarTrackerDefinitions.h +++ b/linux/devices/devicedefinitions/StarTrackerDefinitions.h @@ -1,5 +1,5 @@ -#ifndef LINUX_DEVICES_DEVICEDEFINITIONS_DEFINITIONS_H_ -#define LINUX_DEVICES_DEVICEDEFINITIONS_DEFINITIONS_H_ +#ifndef LINUX_DEVICES_DEVICEDEFINITIONS_STARTRACKER_DEFINITIONS_H_ +#define LINUX_DEVICES_DEVICEDEFINITIONS_STARTRACKER_DEFINITIONS_H_ #include #include @@ -372,7 +372,6 @@ static const DeviceCommandId_t VALIDATION = 48; static const DeviceCommandId_t ALGO = 49; static const DeviceCommandId_t CHECKSUM = 50; static const DeviceCommandId_t READ = 51; -static const DeviceCommandId_t WRITE = 52; static const DeviceCommandId_t DOWNLOAD_MATCHED_STAR = 53; static const DeviceCommandId_t STOP_IMAGE_LOADER = 55; static const DeviceCommandId_t RESET_ERROR = 56; @@ -382,10 +381,6 @@ static const DeviceCommandId_t SET_READ_FILENAME = 59; static const DeviceCommandId_t SET_TIME = 60; static const DeviceCommandId_t DOWNLOAD_DBIMAGE = 61; static const DeviceCommandId_t DOWNLOAD_BLOBPIXEL = 62; -static const DeviceCommandId_t DOWNLOAD_FPGA_IMAGE = 63; -static const DeviceCommandId_t CHANGE_FPGA_DOWNLOAD_FILE = 64; -static const DeviceCommandId_t UPLOAD_FPGA_IMAGE = 65; -static const DeviceCommandId_t FPGA_ACTION = 66; static const DeviceCommandId_t REQ_CAMERA = 67; static const DeviceCommandId_t REQ_LIMITS = 68; static const DeviceCommandId_t REQ_LOG_LEVEL = 69; @@ -403,6 +398,7 @@ static const DeviceCommandId_t REQ_DEBUG_CAMERA = 80; static const DeviceCommandId_t LOGLEVEL = 81; static const DeviceCommandId_t LOGSUBSCRIPTION = 82; static const DeviceCommandId_t DEBUG_CAMERA = 83; +static const DeviceCommandId_t FIRMWARE_UPDATE = 84; static const DeviceCommandId_t NONE = 0xFFFFFFFF; static const uint32_t VERSION_SET_ID = REQ_VERSION; @@ -502,7 +498,6 @@ static const uint8_t UPLOAD_CENTROID = 17; static const uint8_t DOWNLOAD_MATCHED_STAR = 18; static const uint8_t DOWNLOAD_DBIMAGE = 19; static const uint8_t DOWNLOAD_BLOBPIXEL = 24; -static const uint8_t FPGA_ACTION = 22; static const uint8_t LOG_LEVEL = 3; static const uint8_t LOG_SUBSCRIPTION = 19; static const uint8_t DEBUG_CAMERA = 20; @@ -530,7 +525,7 @@ namespace region_secrets { static const uint32_t REGION_13_SECRET = 0xe53cf10d; static const uint32_t REGION_14_SECRET = 0xe862b70b; static const uint32_t REGION_15_SECRET = 0x79b537ca; - uint32_t secret[16] { + static const uint32_t secret[16] { REGION_0_SECRET, REGION_1_SECRET, REGION_2_SECRET, @@ -556,9 +551,10 @@ enum class FlashSections: uint8_t { ARC_CONFIG_SECTION = 2 }; +// Flash region IDs of firmware partition enum class FirmwareRegions: uint32_t { - START = 1, - END = 8 + FIRST = 1, + LAST = 8 }; static const uint32_t FLASH_REGION_SIZE = 0x20000; @@ -1911,5 +1907,5 @@ class DebugCameraSet : public StaticLocalDataSet { sif::info << "DebugCameraSet::printSet: test: " << this->test << std::endl; } }; -} // namespace StarTracker -#endif /* LINUX_DEVICES_DEVICEDEFINITIONS_DEFINITIONS_H_ */ +} // namespace startracker +#endif /* LINUX_DEVICES_DEVICEDEFINITIONS_STARTRACKER_DEFINITIONS_H_ */ diff --git a/linux/devices/startracker/ArcsecDatalinkLayer.cpp b/linux/devices/startracker/ArcsecDatalinkLayer.cpp index 9d8d7bbf..24eab940 100644 --- a/linux/devices/startracker/ArcsecDatalinkLayer.cpp +++ b/linux/devices/startracker/ArcsecDatalinkLayer.cpp @@ -6,7 +6,7 @@ ArcsecDatalinkLayer::~ArcsecDatalinkLayer() {} void ArcsecDatalinkLayer::slipInit() { slipInfo.buffer = rxBuffer; - slipInfo.maxlength = StarTracker::MAX_FRAME_SIZE; + slipInfo.maxlength = startracker::MAX_FRAME_SIZE; slipInfo.length = 0; slipInfo.unescape_next = 0; slipInfo.prev_state = SLIP_COMPLETE; diff --git a/linux/devices/startracker/ArcsecDatalinkLayer.h b/linux/devices/startracker/ArcsecDatalinkLayer.h index d287a888..e3da9b6a 100644 --- a/linux/devices/startracker/ArcsecDatalinkLayer.h +++ b/linux/devices/startracker/ArcsecDatalinkLayer.h @@ -79,12 +79,12 @@ class ArcsecDatalinkLayer : public HasReturnvaluesIF { static const uint8_t STATUS_OFFSET = 2; // Used by arcsec slip decoding function process received data - uint8_t rxBuffer[StarTracker::MAX_FRAME_SIZE]; + uint8_t rxBuffer[startracker::MAX_FRAME_SIZE]; // Decoded frame will be copied to this buffer - uint8_t decodedFrame[StarTracker::MAX_FRAME_SIZE]; + uint8_t decodedFrame[startracker::MAX_FRAME_SIZE]; // Buffer where encoded frames will be stored. First byte of encoded frame represents type of // reply - uint8_t encBuffer[StarTracker::MAX_FRAME_SIZE * 2 + 2]; + uint8_t encBuffer[startracker::MAX_FRAME_SIZE * 2 + 2]; // Size of decoded frame uint32_t decFrameSize = 0; // Size of encoded frame diff --git a/linux/devices/startracker/StarTrackerHandler.cpp b/linux/devices/startracker/StarTrackerHandler.cpp index bddab7a1..5dde524b 100644 --- a/linux/devices/startracker/StarTrackerHandler.cpp +++ b/linux/devices/startracker/StarTrackerHandler.cpp @@ -81,7 +81,7 @@ ReturnValue_t StarTrackerHandler::initialize() { } result = manager->subscribeToEventRange(eventQueue->getId(), event::getEventId(StrHelper::IMAGE_UPLOAD_FAILED), - event::getEventId(StrHelper::FPGA_UPLOAD_FAILED)); + event::getEventId(StrHelper::FIRMWARE_UPDATE_FAILED)); if (result != RETURN_OK) { #if FSFW_CPP_OSTREAM_ENABLED == 1 sif::warning << "StarTrackerHandler::initialize: Failed to subscribe to events from " @@ -104,11 +104,11 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu ReturnValue_t result = RETURN_OK; switch (actionId) { - case (startrackerSTOP_IMAGE_LOADER): { + case (startracker::STOP_IMAGE_LOADER): { strHelper->stopProcess(); return EXECUTION_FINISHED; } - case (startrackerSET_JSON_FILE_NAME): { + case (startracker::SET_JSON_FILE_NAME): { if (size > MAX_PATH_SIZE) { return FILE_PATH_TOO_LONG; } @@ -128,9 +128,14 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu return result; } + result = checkCommand(actionId); + if (result != RETURN_OK) { + return result; + } + // Intercept image loader commands which do not follow the common DHB communication flow switch (actionId) { - case (startrackerUPLOAD_IMAGE): { + case (startracker::UPLOAD_IMAGE): { result = DeviceHandlerBase::acceptExternalDeviceCommands(); if (result != RETURN_OK) { return result; @@ -145,7 +150,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu strHelperExecuting = true; return EXECUTION_FINISHED; } - case (startrackerDOWNLOAD_IMAGE): { + case (startracker::DOWNLOAD_IMAGE): { result = DeviceHandlerBase::acceptExternalDeviceCommands(); if (result != RETURN_OK) { return result; @@ -161,20 +166,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu strHelperExecuting = true; return EXECUTION_FINISHED; } - case (startrackerWRITE): { - result = DeviceHandlerBase::acceptExternalDeviceCommands(); - if (result != RETURN_OK) { - return result; - } - result = executeWriteCommand(data, size); - if (result != RETURN_OK) { - return result; - } - - strHelperExecuting = true; - return EXECUTION_FINISHED; - } - case (startrackerREAD): { + case (startracker::READ): { result = DeviceHandlerBase::acceptExternalDeviceCommands(); if (result != RETURN_OK) { return result; @@ -186,43 +178,21 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu strHelperExecuting = true; return EXECUTION_FINISHED; } - case (startrackerCHANGE_DOWNLOAD_FILE): { + case (startracker::CHANGE_DOWNLOAD_FILE): { if (size > MAX_FILE_NAME) { return FILENAME_TOO_LONG; } strHelper->setDownloadImageName(std::string(reinterpret_cast(data), size)); return EXECUTION_FINISHED; } - case (startrackerCHANGE_FPGA_DOWNLOAD_FILE): { - if (size > MAX_FILE_NAME) { - return FILENAME_TOO_LONG; - } - strHelper->setDownloadFpgaImage(std::string(reinterpret_cast(data), size)); - return EXECUTION_FINISHED; - } - case (startrackerSET_READ_FILENAME): { + case (startracker::SET_READ_FILENAME): { if (size > MAX_FILE_NAME) { return FILENAME_TOO_LONG; } strHelper->setDownloadImageName(std::string(reinterpret_cast(data), size)); return EXECUTION_FINISHED; } - case (startrackerDOWNLOAD_FPGA_IMAGE): { - result = DeviceHandlerBase::acceptExternalDeviceCommands(); - if (result != RETURN_OK) { - return result; - } - if (size > MAX_PATH_SIZE) { - return FILE_PATH_TOO_LONG; - } - result = executeFpgaDownloadCommand(data, size); - if (result != RETURN_OK) { - return result; - } - strHelperExecuting = true; - return EXECUTION_FINISHED; - } - case (startrackerUPLOAD_FPGA_IMAGE): { + case (startracker::FIRMWARE_UPDATE): { result = DeviceHandlerBase::acceptExternalDeviceCommands(); if (result != RETURN_OK) { return result; @@ -230,7 +200,8 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu if (size > MAX_PATH_SIZE + MAX_FILE_NAME) { return FILE_PATH_TOO_LONG; } - result = strHelper->startFpgaUpload(std::string(reinterpret_cast(data), size)); + result = + strHelper->startFirmwareUpdate(std::string(reinterpret_cast(data), size)); if (result != RETURN_OK) { return result; } @@ -266,9 +237,15 @@ void StarTrackerHandler::doStartUp() { return; case StartupState::BOOT_DELAY: if (bootCountdown.hasTimedOut()) { - startupState = StartupState::LOGLEVEL; + startupState = StartupState::VERIFY_BOOT; } return; + case StartupState::FAILED_FIRMWARE_BOOT: + startupState = StartupState::IDLE; + // Though the star tracker failed to boot the firmware the device handler will go to + // mode on. In bootloader mode the star tracker is still on and can e.g. perform firmware + // updates. + break; case StartupState::DONE: startupState = StartupState::IDLE; break; @@ -279,17 +256,25 @@ void StarTrackerHandler::doStartUp() { } void StarTrackerHandler::doShutDown() { - // If star tracker is shutdown also stop all running processes in the image loader task + // If the star tracker is shutdown also stop all running processes in the image loader task strHelper->stopProcess(); + internalState = InternalState::IDLE; + startupState = StartupState::IDLE; setMode(_MODE_POWER_DOWN); } void StarTrackerHandler::doOffActivity() { startupState = StartupState::IDLE; } ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) { + if (!bootCountdown.hasTimedOut()) { + return NOTHING_TO_SEND; + } switch (internalState) { + case InternalState::CHECK_PROGRAM: + *id = startracker::REQ_VERSION; + break; case InternalState::TEMPERATURE_REQUEST: - *id = startrackerREQ_TEMPERATURE; + *id = startracker::REQ_TEMPERATURE; break; default: sif::debug << "StarTrackerHandler::buildNormalDeviceCommand: Invalid internal step" @@ -300,82 +285,92 @@ ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t* id } ReturnValue_t StarTrackerHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) { - if (mode != _MODE_START_UP) { + if (mode == _MODE_TO_NORMAL && currentProgram != startracker::Program::FIRMWARE) { + internalState = InternalState::CHECK_PROGRAM; + *id = startracker::BOOT; + bootCountdown.setTimeout(BOOT_TIMEOUT); + return buildCommandFromCommand(*id, nullptr, 0); + } else if (mode != _MODE_START_UP) { return NOTHING_TO_SEND; } switch (startupState) { case StartupState::CHECK_BOOT_STATE: - *id = startrackerREQ_VERSION; - startupState = StartupState::WAIT_FOR_EXECUTION; + *id = startracker::REQ_VERSION; + startupState = StartupState::STARTUP_CHECK; return buildCommandFromCommand(*id, nullptr, 0); case StartupState::BOOT: - *id = startrackerBOOT; + *id = startracker::BOOT; bootCountdown.setTimeout(BOOT_TIMEOUT); startupState = StartupState::BOOT_DELAY; return buildCommandFromCommand(*id, nullptr, 0); + case StartupState::VERIFY_BOOT: + // Again read program to check if firmware boot was successful + *id = startracker::REQ_VERSION; + startupState = StartupState::FIRMWARE_CHECK; + return buildCommandFromCommand(*id, nullptr, 0); case StartupState::LOGLEVEL: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerLOGLEVEL; + *id = startracker::LOGLEVEL; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::LIMITS: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerLIMITS; + *id = startracker::LIMITS; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::TRACKING: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerTRACKING; + *id = startracker::TRACKING; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::MOUNTING: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerMOUNTING; + *id = startracker::MOUNTING; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::IMAGE_PROCESSOR: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerIMAGE_PROCESSOR; + *id = startracker::IMAGE_PROCESSOR; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::CAMERA: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerCAMERA; + *id = startracker::CAMERA; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::CENTROIDING: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerCENTROIDING; + *id = startracker::CENTROIDING; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::LISA: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerLISA; + *id = startracker::LISA; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::MATCHING: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerMATCHING; + *id = startracker::MATCHING; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::VALIDATION: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerVALIDATION; + *id = startracker::VALIDATION; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::ALGO: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerALGO; + *id = startracker::ALGO; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::LOG_SUBSCRIPTION: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerLOGSUBSCRIPTION; + *id = startracker::LOGSUBSCRIPTION; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); case StartupState::DEBUG_CAMERA: startupState = StartupState::WAIT_FOR_EXECUTION; - *id = startrackerDEBUG_CAMERA; + *id = startracker::DEBUG_CAMERA; return buildCommandFromCommand(*id, reinterpret_cast(paramJsonFile.c_str()), paramJsonFile.size()); default: @@ -389,221 +384,218 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi size_t commandDataLen) { ReturnValue_t result = RETURN_OK; switch (deviceCommand) { - case (startrackerPING_REQUEST): { + case (startracker::PING_REQUEST): { preparePingRequest(); return RETURN_OK; } - case (startrackerREQ_TIME): { + case (startracker::REQ_TIME): { prepareTimeRequest(); return RETURN_OK; } - case (startrackerBOOT): { + case (startracker::BOOT): { prepareBootCommand(); return RETURN_OK; } - case (startrackerREQ_VERSION): { + case (startracker::REQ_VERSION): { prepareVersionRequest(); return RETURN_OK; } - case (startrackerREQ_INTERFACE): { + case (startracker::REQ_INTERFACE): { prepareInterfaceRequest(); return RETURN_OK; } - case (startrackerREQ_POWER): { + case (startracker::REQ_POWER): { preparePowerRequest(); return RETURN_OK; } - case (startrackerSWITCH_TO_BOOTLOADER_PROGRAM): { + case (startracker::SWITCH_TO_BOOTLOADER_PROGRAM): { + currentProgram = startracker::Program::BOOTLOADER; prepareRebootCommand(); return RETURN_OK; } - case (startrackerTAKE_IMAGE): { + case (startracker::TAKE_IMAGE): { prepareTakeImageCommand(commandData); return RETURN_OK; } - case (startrackerSUBSCRIPTION): { + case (startracker::SUBSCRIPTION): { Subscription subscription; result = prepareParamCommand(commandData, commandDataLen, subscription); return RETURN_OK; } - case (startrackerREQ_SOLUTION): { + case (startracker::REQ_SOLUTION): { prepareSolutionRequest(); return RETURN_OK; } - case (startrackerREQ_TEMPERATURE): { + case (startracker::REQ_TEMPERATURE): { prepareTemperatureRequest(); return RETURN_OK; } - case (startrackerREQ_HISTOGRAM): { + case (startracker::REQ_HISTOGRAM): { prepareHistogramRequest(); return RETURN_OK; } - case (startrackerREQ_CONTRAST): { + case (startracker::REQ_CONTRAST): { prepareContrastRequest(); return RETURN_OK; } - case (startrackerRESET_ERROR): { + case (startracker::RESET_ERROR): { prepareErrorResetRequest(); return RETURN_OK; } - case (startrackerLIMITS): { + case (startracker::LIMITS): { Limits limits; result = prepareParamCommand(commandData, commandDataLen, limits); return result; } - case (startrackerMOUNTING): { + case (startracker::MOUNTING): { Mounting mounting; result = prepareParamCommand(commandData, commandDataLen, mounting); return result; } - case (startrackerIMAGE_PROCESSOR): { + case (startracker::IMAGE_PROCESSOR): { ImageProcessor imageProcessor; result = prepareParamCommand(commandData, commandDataLen, imageProcessor); return result; } - case (startrackerCAMERA): { + case (startracker::CAMERA): { Camera camera; result = prepareParamCommand(commandData, commandDataLen, camera); return result; } - case (startrackerCENTROIDING): { + case (startracker::CENTROIDING): { Centroiding centroiding; result = prepareParamCommand(commandData, commandDataLen, centroiding); return result; } - case (startrackerLISA): { + case (startracker::LISA): { Lisa lisa; result = prepareParamCommand(commandData, commandDataLen, lisa); return result; } - case (startrackerMATCHING): { + case (startracker::MATCHING): { Matching matching; result = prepareParamCommand(commandData, commandDataLen, matching); return result; } - case (startrackerVALIDATION): { + case (startracker::VALIDATION): { Validation validation; result = prepareParamCommand(commandData, commandDataLen, validation); return result; } - case (startrackerALGO): { + case (startracker::ALGO): { Algo algo; result = prepareParamCommand(commandData, commandDataLen, algo); return result; } - case (startrackerTRACKING): { + case (startracker::TRACKING): { Tracking tracking; result = prepareParamCommand(commandData, commandDataLen, tracking); return result; } - case (startrackerLOGLEVEL): { + case (startracker::LOGLEVEL): { LogLevel logLevel; result = prepareParamCommand(commandData, commandDataLen, logLevel); return result; } - case (startrackerLOGSUBSCRIPTION): { + case (startracker::LOGSUBSCRIPTION): { LogSubscription logSubscription; result = prepareParamCommand(commandData, commandDataLen, logSubscription); return result; } - case (startrackerDEBUG_CAMERA): { + case (startracker::DEBUG_CAMERA): { DebugCamera debugCamera; result = prepareParamCommand(commandData, commandDataLen, debugCamera); return result; } - case (startrackerERASE): { + case (startracker::ERASE): { result = prepareEraseCommand(commandData, commandDataLen); return result; } - case (startrackerUNLOCK): { + case (startracker::UNLOCK): { result = prepareUnlockCommand(commandData, commandDataLen); return result; } - case (startrackerCHECKSUM): { + case (startracker::CHECKSUM): { result = prepareChecksumCommand(commandData, commandDataLen); return result; } - case (startrackerSET_TIME): { + case (startracker::SET_TIME): { result = prepareSetTimeCommand(commandData, commandDataLen); return result; } - case (startrackerDOWNLOAD_CENTROID): { + case (startracker::DOWNLOAD_CENTROID): { result = prepareDownloadCentroidCommand(commandData, commandDataLen); return result; } - case (startrackerUPLOAD_CENTROID): { + case (startracker::UPLOAD_CENTROID): { result = prepareUploadCentroidCommand(commandData, commandDataLen); return result; } - case (startrackerDOWNLOAD_MATCHED_STAR): { + case (startracker::DOWNLOAD_MATCHED_STAR): { result = prepareDownloadMatchedStarCommand(commandData, commandDataLen); return result; } - case (startrackerDOWNLOAD_DBIMAGE): { + case (startracker::DOWNLOAD_DBIMAGE): { result = prepareDownloadDbImageCommand(commandData, commandDataLen); return result; } - case (startrackerDOWNLOAD_BLOBPIXEL): { + case (startracker::DOWNLOAD_BLOBPIXEL): { result = prepareDownloadBlobPixelCommand(commandData, commandDataLen); return result; } - case (startrackerFPGA_ACTION): { - result = prepareFpgaActionCommand(commandData, commandDataLen); - return result; - } - case (startrackerREQ_CAMERA): { + case (startracker::REQ_CAMERA): { result = prepareRequestCameraParams(); return result; } - case (startrackerREQ_LIMITS): { + case (startracker::REQ_LIMITS): { result = prepareRequestLimitsParams(); return result; } - case (startrackerREQ_LOG_LEVEL): { + case (startracker::REQ_LOG_LEVEL): { result = prepareRequestLogLevelParams(); return result; } - case (startrackerREQ_MOUNTING): { + case (startracker::REQ_MOUNTING): { result = prepareRequestMountingParams(); return result; } - case (startrackerREQ_IMAGE_PROCESSOR): { + case (startracker::REQ_IMAGE_PROCESSOR): { result = prepareRequestImageProcessorParams(); return result; } - case (startrackerREQ_CENTROIDING): { + case (startracker::REQ_CENTROIDING): { result = prepareRequestCentroidingParams(); return result; } - case (startrackerREQ_LISA): { + case (startracker::REQ_LISA): { result = prepareRequestLisaParams(); return result; } - case (startrackerREQ_MATCHING): { + case (startracker::REQ_MATCHING): { result = prepareRequestMatchingParams(); return result; } - case (startrackerREQ_TRACKING): { + case (startracker::REQ_TRACKING): { result = prepareRequestTrackingParams(); return result; } - case (startrackerREQ_VALIDATION): { + case (startracker::REQ_VALIDATION): { result = prepareRequestValidationParams(); return result; } - case (startrackerREQ_ALGO): { + case (startracker::REQ_ALGO): { result = prepareRequestAlgoParams(); return result; } - case (startrackerREQ_SUBSCRIPTION): { + case (startracker::REQ_SUBSCRIPTION): { result = prepareRequestSubscriptionParams(); return result; } - case (startrackerREQ_LOG_SUBSCRIPTION): { + case (startracker::REQ_LOG_SUBSCRIPTION): { result = prepareRequestLogSubscriptionParams(); return result; } - case (startrackerREQ_DEBUG_CAMERA): { + case (startracker::REQ_DEBUG_CAMERA): { result = prepareRequestDebugCameraParams(); return result; } @@ -616,111 +608,109 @@ ReturnValue_t StarTrackerHandler::buildCommandFromCommand(DeviceCommandId_t devi void StarTrackerHandler::fillCommandAndReplyMap() { /** Reply lengths are unknown because of the slip encoding. Thus always maximum reply size * is specified */ - this->insertInCommandAndReplyMap(startrackerPING_REQUEST, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandMap(startrackerBOOT); - this->insertInCommandAndReplyMap(startrackerREQ_VERSION, 3, &versionSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_TIME, 3, &timeSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandMap(startrackerUPLOAD_IMAGE); - this->insertInCommandMap(startrackerDOWNLOAD_IMAGE); - this->insertInCommandAndReplyMap(startrackerREQ_POWER, 3, &powerSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_INTERFACE, 3, &interfaceSet, - startrackerMAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::PING_REQUEST, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandMap(startracker::BOOT); + this->insertInCommandAndReplyMap(startracker::REQ_VERSION, 3, &versionSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_TIME, 3, &timeSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandMap(startracker::UPLOAD_IMAGE); + this->insertInCommandMap(startracker::DOWNLOAD_IMAGE); + this->insertInCommandAndReplyMap(startracker::REQ_POWER, 3, &powerSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_INTERFACE, 3, &interfaceSet, + startracker::MAX_FRAME_SIZE * 2 + 2); // Reboot has no reply. Star tracker reboots immediately - this->insertInCommandMap(startrackerSWITCH_TO_BOOTLOADER_PROGRAM); - this->insertInCommandAndReplyMap(startrackerSUBSCRIPTION, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_SOLUTION, 3, &solutionSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_TEMPERATURE, 3, &temperatureSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_HISTOGRAM, 3, &histogramSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_CONTRAST, 3, &contrastSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerLOGLEVEL, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerLOGSUBSCRIPTION, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerDEBUG_CAMERA, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerLIMITS, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerMOUNTING, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerIMAGE_PROCESSOR, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerCAMERA, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerCAMERA, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerCENTROIDING, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerLISA, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerMATCHING, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerTRACKING, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerVALIDATION, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerALGO, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerTAKE_IMAGE, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerRESET_ERROR, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerERASE, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerUNLOCK, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerCHECKSUM, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerSET_TIME, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerDOWNLOAD_CENTROID, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerUPLOAD_CENTROID, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerDOWNLOAD_MATCHED_STAR, 3, &downloadMatchedStar, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerDOWNLOAD_DBIMAGE, 3, &downloadDbImage, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerDOWNLOAD_BLOBPIXEL, 3, &downloadBlobPixel, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerFPGA_ACTION, 3, nullptr, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_CAMERA, 3, &cameraSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_LIMITS, 3, &limitsSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_LOG_LEVEL, 3, &loglevelSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_MOUNTING, 3, &mountingSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_IMAGE_PROCESSOR, 3, &imageProcessorSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_CENTROIDING, 3, ¢roidingSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_LISA, 3, &lisaSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_MATCHING, 3, &matchingSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_TRACKING, 3, &trackingSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_VALIDATION, 3, &validationSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_ALGO, 3, &algoSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_SUBSCRIPTION, 3, &subscriptionSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_LOG_SUBSCRIPTION, 3, &logSubscriptionSet, - startrackerMAX_FRAME_SIZE * 2 + 2); - this->insertInCommandAndReplyMap(startrackerREQ_DEBUG_CAMERA, 3, &debugCameraSet, - startrackerMAX_FRAME_SIZE * 2 + 2); + this->insertInCommandMap(startracker::SWITCH_TO_BOOTLOADER_PROGRAM); + this->insertInCommandAndReplyMap(startracker::SUBSCRIPTION, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_SOLUTION, 3, &solutionSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_TEMPERATURE, 3, &temperatureSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_HISTOGRAM, 3, &histogramSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_CONTRAST, 3, &contrastSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::LOGLEVEL, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::LOGSUBSCRIPTION, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::DEBUG_CAMERA, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::LIMITS, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::MOUNTING, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::IMAGE_PROCESSOR, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::CAMERA, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::CAMERA, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::CENTROIDING, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::LISA, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::MATCHING, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::TRACKING, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::VALIDATION, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::ALGO, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::TAKE_IMAGE, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::RESET_ERROR, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::ERASE, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::UNLOCK, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::CHECKSUM, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::SET_TIME, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::DOWNLOAD_CENTROID, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::UPLOAD_CENTROID, 3, nullptr, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::DOWNLOAD_MATCHED_STAR, 3, &downloadMatchedStar, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::DOWNLOAD_DBIMAGE, 3, &downloadDbImage, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::DOWNLOAD_BLOBPIXEL, 3, &downloadBlobPixel, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_CAMERA, 3, &cameraSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_LIMITS, 3, &limitsSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_LOG_LEVEL, 3, &loglevelSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_MOUNTING, 3, &mountingSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_IMAGE_PROCESSOR, 3, &imageProcessorSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_CENTROIDING, 3, ¢roidingSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_LISA, 3, &lisaSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_MATCHING, 3, &matchingSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_TRACKING, 3, &trackingSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_VALIDATION, 3, &validationSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_ALGO, 3, &algoSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_SUBSCRIPTION, 3, &subscriptionSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_LOG_SUBSCRIPTION, 3, &logSubscriptionSet, + startracker::MAX_FRAME_SIZE * 2 + 2); + this->insertInCommandAndReplyMap(startracker::REQ_DEBUG_CAMERA, 3, &debugCameraSet, + startracker::MAX_FRAME_SIZE * 2 + 2); } ReturnValue_t StarTrackerHandler::scanForReply(const uint8_t* start, size_t remainingSize, @@ -781,53 +771,49 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id, ReturnValue_t result = RETURN_OK; switch (id) { - case (startrackerREQ_TIME): { - result = handleTm(timeSet, startrackerTimeSet::SIZE); + case (startracker::REQ_TIME): { + result = handleTm(timeSet, startracker::TimeSet::SIZE); break; } - case (startrackerPING_REQUEST): { + case (startracker::PING_REQUEST): { result = handlePingReply(); break; } - case (startrackerBOOT): - case (startrackerTAKE_IMAGE): - case (startrackerRESET_ERROR): - case (startrackerUNLOCK): - case (startrackerSET_TIME): - case (startrackerFPGA_ACTION): { - result = handleActionReply(); + case (startracker::BOOT): + case (startracker::TAKE_IMAGE): + case (startracker::RESET_ERROR): + case (startracker::UNLOCK): + case (startracker::SET_TIME): + case (startracker::DOWNLOAD_CENTROID): { + result = handleActionReplySet(downloadCentroidSet, startracker::DownloadCentroidSet::SIZE); break; } - case (startrackerDOWNLOAD_CENTROID): { - result = handleActionReplySet(downloadCentroidSet, startrackerDownloadCentroidSet::SIZE); + case (startracker::DOWNLOAD_MATCHED_STAR): { + result = handleActionReplySet(downloadMatchedStar, startracker::DownloadMatchedStar::SIZE); break; } - case (startrackerDOWNLOAD_MATCHED_STAR): { - result = handleActionReplySet(downloadMatchedStar, startrackerDownloadMatchedStar::SIZE); + case (startracker::DOWNLOAD_DBIMAGE): { + result = handleActionReplySet(downloadDbImage, startracker::DownloadDBImage::SIZE); break; } - case (startrackerDOWNLOAD_DBIMAGE): { - result = handleActionReplySet(downloadDbImage, startrackerDownloadDBImage::SIZE); + case (startracker::DOWNLOAD_BLOBPIXEL): { + result = handleActionReplySet(downloadBlobPixel, startracker::DownloadBlobPixel::SIZE); break; } - case (startrackerDOWNLOAD_BLOBPIXEL): { - result = handleActionReplySet(downloadBlobPixel, startrackerDownloadBlobPixel::SIZE); - break; - } - case (startrackerUPLOAD_CENTROID): { + case (startracker::UPLOAD_CENTROID): { result = handleUploadCentroidReply(); break; } - case (startrackerERASE): { + case (startracker::ERASE): { result = handleEraseReply(); break; } - case (startrackerCHECKSUM): { + case (startracker::CHECKSUM): { result = handleChecksumReply(); break; } - case (startrackerREQ_VERSION): { - result = handleTm(versionSet, startrackerVersionSet::SIZE); + case (startracker::REQ_VERSION): { + result = handleTm(versionSet, startracker::VersionSet::SIZE); if (result != RETURN_OK) { return result; } @@ -837,101 +823,101 @@ ReturnValue_t StarTrackerHandler::interpretDeviceReply(DeviceCommandId_t id, } break; } - case (startrackerREQ_INTERFACE): { - result = handleTm(interfaceSet, startrackerInterfaceSet::SIZE); + case (startracker::REQ_INTERFACE): { + result = handleTm(interfaceSet, startracker::InterfaceSet::SIZE); break; } - case (startrackerREQ_POWER): { - result = handleTm(powerSet, startrackerPowerSet::SIZE); + case (startracker::REQ_POWER): { + result = handleTm(powerSet, startracker::PowerSet::SIZE); break; } - case (startrackerREQ_SOLUTION): { - result = handleTm(solutionSet, startrackerSolutionSet::SIZE); + case (startracker::REQ_SOLUTION): { + result = handleTm(solutionSet, startracker::SolutionSet::SIZE); break; } - case (startrackerREQ_TEMPERATURE): { - result = handleTm(temperatureSet, startrackerTemperatureSet::SIZE); + case (startracker::REQ_TEMPERATURE): { + result = handleTm(temperatureSet, startracker::TemperatureSet::SIZE); break; } - case (startrackerREQ_HISTOGRAM): { - result = handleTm(histogramSet, startrackerHistogramSet::SIZE); + case (startracker::REQ_HISTOGRAM): { + result = handleTm(histogramSet, startracker::HistogramSet::SIZE); break; } - case (startrackerREQ_CONTRAST): { - result = handleTm(contrastSet, startrackerContrastSet::SIZE); + case (startracker::REQ_CONTRAST): { + result = handleTm(contrastSet, startracker::ContrastSet::SIZE); break; } - case (startrackerSUBSCRIPTION): - case (startrackerLOGLEVEL): - case (startrackerLOGSUBSCRIPTION): - case (startrackerDEBUG_CAMERA): - case (startrackerLIMITS): - case (startrackerMOUNTING): - case (startrackerCAMERA): - case (startrackerCENTROIDING): - case (startrackerLISA): - case (startrackerMATCHING): - case (startrackerTRACKING): - case (startrackerVALIDATION): - case (startrackerIMAGE_PROCESSOR): - case (startrackerALGO): { + case (startracker::SUBSCRIPTION): + case (startracker::LOGLEVEL): + case (startracker::LOGSUBSCRIPTION): + case (startracker::DEBUG_CAMERA): + case (startracker::LIMITS): + case (startracker::MOUNTING): + case (startracker::CAMERA): + case (startracker::CENTROIDING): + case (startracker::LISA): + case (startracker::MATCHING): + case (startracker::TRACKING): + case (startracker::VALIDATION): + case (startracker::IMAGE_PROCESSOR): + case (startracker::ALGO): { result = handleSetParamReply(); break; } - case (startrackerREQ_CAMERA): { - handleParamRequest(cameraSet, startrackerCameraSet::SIZE); + case (startracker::REQ_CAMERA): { + handleParamRequest(cameraSet, startracker::CameraSet::SIZE); break; } - case (startrackerREQ_LIMITS): { - handleParamRequest(limitsSet, startrackerLimitsSet::SIZE); + case (startracker::REQ_LIMITS): { + handleParamRequest(limitsSet, startracker::LimitsSet::SIZE); break; } - case (startrackerREQ_LOG_LEVEL): { - handleParamRequest(loglevelSet, startrackerLogLevelSet::SIZE); + case (startracker::REQ_LOG_LEVEL): { + handleParamRequest(loglevelSet, startracker::LogLevelSet::SIZE); break; } - case (startrackerREQ_MOUNTING): { - handleParamRequest(mountingSet, startrackerMountingSet::SIZE); + case (startracker::REQ_MOUNTING): { + handleParamRequest(mountingSet, startracker::MountingSet::SIZE); break; } - case (startrackerREQ_IMAGE_PROCESSOR): { - handleParamRequest(imageProcessorSet, startrackerImageProcessorSet::SIZE); + case (startracker::REQ_IMAGE_PROCESSOR): { + handleParamRequest(imageProcessorSet, startracker::ImageProcessorSet::SIZE); break; } - case (startrackerREQ_CENTROIDING): { - handleParamRequest(centroidingSet, startrackerCentroidingSet::SIZE); + case (startracker::REQ_CENTROIDING): { + handleParamRequest(centroidingSet, startracker::CentroidingSet::SIZE); break; } - case (startrackerREQ_LISA): { - handleParamRequest(lisaSet, startrackerLisaSet::SIZE); + case (startracker::REQ_LISA): { + handleParamRequest(lisaSet, startracker::LisaSet::SIZE); break; } - case (startrackerREQ_MATCHING): { - handleParamRequest(matchingSet, startrackerMatchingSet::SIZE); + case (startracker::REQ_MATCHING): { + handleParamRequest(matchingSet, startracker::MatchingSet::SIZE); break; } - case (startrackerREQ_TRACKING): { - handleParamRequest(trackingSet, startrackerTrackingSet::SIZE); + case (startracker::REQ_TRACKING): { + handleParamRequest(trackingSet, startracker::TrackingSet::SIZE); break; } - case (startrackerREQ_VALIDATION): { - handleParamRequest(validationSet, startrackerValidationSet::SIZE); + case (startracker::REQ_VALIDATION): { + handleParamRequest(validationSet, startracker::ValidationSet::SIZE); break; } - case (startrackerREQ_ALGO): { - handleParamRequest(algoSet, startrackerAlgoSet::SIZE); + case (startracker::REQ_ALGO): { + handleParamRequest(algoSet, startracker::AlgoSet::SIZE); break; } - case (startrackerREQ_SUBSCRIPTION): { - handleParamRequest(subscriptionSet, startrackerSubscriptionSet::SIZE); + case (startracker::REQ_SUBSCRIPTION): { + handleParamRequest(subscriptionSet, startracker::SubscriptionSet::SIZE); break; } - case (startrackerREQ_LOG_SUBSCRIPTION): { - handleParamRequest(logSubscriptionSet, startrackerLogSubscriptionSet::SIZE); + case (startracker::REQ_LOG_SUBSCRIPTION): { + handleParamRequest(logSubscriptionSet, startracker::LogSubscriptionSet::SIZE); break; } - case (startrackerREQ_DEBUG_CAMERA): { - handleParamRequest(debugCameraSet, startrackerDebugCameraSet::SIZE); + case (startracker::REQ_DEBUG_CAMERA): { + handleParamRequest(debugCameraSet, startracker::DebugCameraSet::SIZE); break; } default: { @@ -949,335 +935,343 @@ uint32_t StarTrackerHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, LocalDataPoolManager& poolManager) { - localDataPoolMap.emplace(startrackerTICKS_TIME_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTIME_TIME_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerRUN_TIME, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerUNIX_TIME, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TICKS_TIME_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TIME_TIME_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::RUN_TIME, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::UNIX_TIME, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTICKS_VERSION_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTIME_VERSION_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerPROGRAM, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMAJOR, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMINOR, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TICKS_VERSION_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TIME_VERSION_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::PROGRAM, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MAJOR, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MINOR, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTICKS_INTERFACE_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTIME_INTERFACE_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerFRAME_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCHECKSUM_ERROR_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSET_PARAM_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSET_PARAM_REPLY_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerPARAM_REQUEST_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerPARAM_REPLY_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerREQ_TM_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTM_REPLY_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerACTION_REQ_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerACTION_REPLY_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TICKS_INTERFACE_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TIME_INTERFACE_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::FRAME_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CHECKSUM_ERROR_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SET_PARAM_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SET_PARAM_REPLY_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::PARAM_REQUEST_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::PARAM_REPLY_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::REQ_TM_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TM_REPLY_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::ACTION_REQ_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::ACTION_REPLY_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTICKS_POWER_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTIME_POWER_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMCU_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMCU_VOLTAGE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerFPGA_CORE_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerFPGA_CORE_VOLTAGE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerFPGA_18_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerFPGA_18_VOLTAGE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerFPGA_25_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerFPGA_25_VOLTAGE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCMV_21_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCMV_21_VOLTAGE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCMV_PIX_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCMV_PIX_VOLTAGE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCMV_33_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCMV_33_VOLTAGE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCMV_RES_CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCMV_RES_VOLTAGE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TICKS_POWER_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TIME_POWER_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MCU_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MCU_VOLTAGE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::FPGA_CORE_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::FPGA_CORE_VOLTAGE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::FPGA_18_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::FPGA_18_VOLTAGE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::FPGA_25_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::FPGA_25_VOLTAGE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CMV_21_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CMV_21_VOLTAGE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CMV_PIX_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CMV_PIX_VOLTAGE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CMV_33_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CMV_33_VOLTAGE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CMV_RES_CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CMV_RES_VOLTAGE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTICKS_TEMPERATURE_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTIME_TEMPERATURE_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMCU_TEMPERATURE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCMOS_TEMPERATURE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerFPGA_TEMPERATURE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TICKS_TEMPERATURE_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TIME_TEMPERATURE_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CMOS_TEMPERATURE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::FPGA_TEMPERATURE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTICKS_SOLUTION_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTIME_SOLUTION_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCALI_QW, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCALI_QX, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCALI_QY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCALI_QZ, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRACK_CONFIDENCE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRACK_QW, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRACK_QX, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRACK_QY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRACK_QZ, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRACK_REMOVED, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSTARS_CENTROIDED, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSTARS_MATCHED_DATABASE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_QW, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_QX, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_QY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_QZ, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_PERC_CLOSE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_NR_CLOSE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRUST_WORTHY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSTABLE_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSOLUTION_STRATEGY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TICKS_SOLUTION_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TIME_SOLUTION_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CALI_QW, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CALI_QX, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CALI_QY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CALI_QZ, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRACK_CONFIDENCE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRACK_QW, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRACK_QX, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRACK_QY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRACK_QZ, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRACK_REMOVED, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::STARS_CENTROIDED, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::STARS_MATCHED_DATABASE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_QW, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_QX, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_QY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_QZ, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_PERC_CLOSE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_NR_CLOSE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRUST_WORTHY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::STABLE_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SOLUTION_STRATEGY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTICKS_HISTOGRAM_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTIME_HISTOGRAM_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINA0, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINA1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINA2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINA3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINA4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINA5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINA6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINA7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINA8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINB0, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINB1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINB2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINB3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINB4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINB5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINB6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINB7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINB8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINC0, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINC1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINC2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINC3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINC4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINC5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINC6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINC7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BINC8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BIND0, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BIND1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BIND2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BIND3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BIND4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BIND5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BIND6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BIND7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerHISTOGRAM_BIND8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TICKS_HISTOGRAM_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TIME_HISTOGRAM_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINA0, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINA1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINA2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINA3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINA4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINA5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINA6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINA7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINA8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINB0, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINB1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINB2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINB3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINB4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINB5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINB6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINB7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINB8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINC0, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINC1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINC2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINC3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINC4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINC5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINC6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINC7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BINC8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BIND0, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BIND1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BIND2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BIND3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BIND4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BIND5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BIND6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BIND7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::HISTOGRAM_BIND8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTICKS_CONTRAST_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTIME_CONTRAST_SET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINA0, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINA1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINA2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINA3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINA4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINA5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINA6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINA7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINA8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINB0, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINB1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINB2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINB3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINB4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINB5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINB6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINB7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINB8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINC8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINC0, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINC1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINC2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINC3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINC4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINC5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINC6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINC7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BINC8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BIND0, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BIND1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BIND2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BIND3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BIND4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BIND5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BIND6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BIND7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCONTRAST_BIND8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCHKSUM, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TICKS_CONTRAST_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TIME_CONTRAST_SET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINA0, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINA1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINA2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINA3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINA4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINA5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINA6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINA7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINA8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINB0, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINB1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINB2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINB3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINB4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINB5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINB6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINB7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINB8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINC8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINC0, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINC1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINC2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINC3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINC4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINC5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINC6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINC7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BINC8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BIND0, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BIND1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BIND2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BIND3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BIND4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BIND5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BIND6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BIND7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CONTRAST_BIND8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CHKSUM, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_ID, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_PIXX, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_PIXY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_X_UNCORRECTED, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_Y_UNCORRECTED, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_X_CORRECTED, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_Y_CORRECTED, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_MAGNITUDE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_CXA, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_CYA, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDWL_QUALITY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_ID, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_PIXX, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_PIXY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_X_UNCORRECTED, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_Y_UNCORRECTED, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_X_CORRECTED, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_Y_CORRECTED, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_MAGNITUDE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_CXA, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_CYA, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DWL_QUALITY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_ID, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_CAMFPX, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_CAMFPY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_CAMCARTX, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_CAMCARTY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_CAMCARTZ, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_CAMMAGNITUDE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_DBFPX, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_DBFPY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_DBCARTX, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_DBCARTY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_DBCARTZ, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_DBMAGNITUDE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHEDSTR_CATALOGID, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_ID, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_CAMFPX, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_CAMFPY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_CAMCARTX, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_CAMCARTY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_CAMCARTZ, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_CAMMAGNITUDE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_DBFPX, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_DBFPY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_DBCARTX, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_DBCARTY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_DBCARTZ, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_DBMAGNITUDE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHEDSTR_CATALOGID, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerBLOBPIX_ID, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerBLOBPIX_X, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerBLOBPIX_Y, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerBLOBPIX_TOT_VAL, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerBLOBPIX_IN_USE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerBLOBPIX_BRIGHT_NEIGHBOURS, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerBLOBPIX_REGION, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::BLOBPIX_ID, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::BLOBPIX_X, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::BLOBPIX_Y, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::BLOBPIX_TOT_VAL, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::BLOBPIX_IN_USE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::BLOBPIX_BRIGHT_NEIGHBOURS, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::BLOBPIX_REGION, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAMERA_MODE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerFOCALLENGTH, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerEXPOSURE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerINTERVAL, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAMERA_OFFSET, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerPGAGAIN, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerADCGAIN, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_REG1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_VAL1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_REG2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_VAL2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_REG3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_VAL3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_REG4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_VAL4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_REG5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_VAL5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_REG6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_VAL6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_REG7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_VAL7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_REG8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_VAL8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCAM_FREQ_1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAMERA_MODE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::FOCALLENGTH, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::EXPOSURE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::INTERVAL, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAMERA_OFFSET, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::PGAGAIN, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::ADCGAIN, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_REG1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_VAL1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_REG2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_VAL2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_REG3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_VAL3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_REG4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_VAL4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_REG5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_VAL5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_REG6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_VAL6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_REG7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_VAL7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_REG8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_VAL8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CAM_FREQ_1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLIMITS_ACTION, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLIMITS_FPGA18CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLIMITS_FPGA25CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLIMITS_FPGA10CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLIMITS_MCUCURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLIMITS_CMOS21CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLIMITS_CMOSPIXCURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLIMITS_CMOS33CURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLIMITS_CMOSVRESCURRENT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLIMITS_CMOSTEMPERATURE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LIMITS_ACTION, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LIMITS_FPGA18CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LIMITS_FPGA25CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LIMITS_FPGA10CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LIMITS_MCUCURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LIMITS_CMOS21CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LIMITS_CMOSPIXCURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LIMITS_CMOS33CURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LIMITS_CMOSVRESCURRENT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LIMITS_CMOSTEMPERATURE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL9, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL10, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL11, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL12, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL13, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL14, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL15, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOGLEVEL16, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL9, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL10, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL11, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL12, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL13, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL14, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL15, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOGLEVEL16, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMOUNTING_QW, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMOUNTING_QX, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMOUNTING_QY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMOUNTING_QZ, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MOUNTING_QW, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MOUNTING_QX, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MOUNTING_QY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MOUNTING_QZ, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerIMAGE_PROCESSOR_MODE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerIMAGE_PROCESSOR_STORE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerIMAGE_PROCESSOR_SIGNALTHRESHOLD, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerIMAGE_PROCESSOR_DARKTHRESHOLD, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerIMAGE_PROCESSOR_BACKGROUNDCOMPENSATION, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::IMAGE_PROCESSOR_MODE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::IMAGE_PROCESSOR_STORE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::IMAGE_PROCESSOR_SIGNALTHRESHOLD, + new PoolEntry({0})); + localDataPoolMap.emplace(startracker::IMAGE_PROCESSOR_DARKTHRESHOLD, + new PoolEntry({0})); + localDataPoolMap.emplace(startracker::IMAGE_PROCESSOR_BACKGROUNDCOMPENSATION, + new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_ENABLE_FILTER, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_MAX_QUALITY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_DARK_THRESHOLD, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_MIN_QUALITY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_MAX_INTENSITY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_MIN_INTENSITY, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_MAX_MAGNITUDE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_GAUSSIAN_CMAX, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_GAUSSIAN_CMIN, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_TRANSMATRIX00, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_TRANSMATRIX01, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_TRANSMATRIX10, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerCENTROIDING_TRANSMATRIX11, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_ENABLE_FILTER, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_MAX_QUALITY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_DARK_THRESHOLD, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_MIN_QUALITY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_MAX_INTENSITY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_MIN_INTENSITY, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_MAX_MAGNITUDE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_GAUSSIAN_CMAX, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_GAUSSIAN_CMIN, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_TRANSMATRIX00, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_TRANSMATRIX01, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_TRANSMATRIX10, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::CENTROIDING_TRANSMATRIX11, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_MODE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_PREFILTER_DIST_THRESHOLD, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_PREFILTER_ANGLE_THRESHOLD, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_FOV_WIDTH, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_FOV_HEIGHT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_FLOAT_STAR_LIMIT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_CLOSE_STAR_LIMIT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_RATING_WEIGHT_CLOSE_STAR_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_RATING_WEIGHT_FRACTION_CLOSE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_RATING_WEIGHT_MEAN_SUM, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_RATING_WEIGHT_DB_STAR_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_MAX_COMBINATIONS, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_NR_STARS_STOP, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLISA_FRACTION_CLOSE_STOP, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_MODE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_PREFILTER_DIST_THRESHOLD, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_PREFILTER_ANGLE_THRESHOLD, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_FOV_WIDTH, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_FOV_HEIGHT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_FLOAT_STAR_LIMIT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_CLOSE_STAR_LIMIT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_RATING_WEIGHT_CLOSE_STAR_COUNT, + new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_RATING_WEIGHT_FRACTION_CLOSE, + new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_RATING_WEIGHT_MEAN_SUM, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_RATING_WEIGHT_DB_STAR_COUNT, + new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_MAX_COMBINATIONS, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_NR_STARS_STOP, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LISA_FRACTION_CLOSE_STOP, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHING_SQUARED_DISTANCE_LIMIT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerMATCHING_SQUARED_SHIFT_LIMIT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHING_SQUARED_DISTANCE_LIMIT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::MATCHING_SQUARED_SHIFT_LIMIT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRACKING_THIN_LIMIT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRACKING_OUTLIER_THRESHOLD, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRACKING_OUTLIER_THRESHOLD_QUEST, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerTRACKING_TRACKER_CHOICE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRACKING_THIN_LIMIT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRACKING_OUTLIER_THRESHOLD, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRACKING_OUTLIER_THRESHOLD_QUEST, + new PoolEntry({0})); + localDataPoolMap.emplace(startracker::TRACKING_TRACKER_CHOICE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerVALIDATION_STABLE_COUNT, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerVALIDATION_MAX_DIFFERENCE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerVALIDATION_MIN_TRACKER_CONFIDENCE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerVALIDATION_MIN_MATCHED_STARS, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::VALIDATION_STABLE_COUNT, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::VALIDATION_MAX_DIFFERENCE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::VALIDATION_MIN_TRACKER_CONFIDENCE, + new PoolEntry({0})); + localDataPoolMap.emplace(startracker::VALIDATION_MIN_MATCHED_STARS, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerALGO_MODE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerALGO_I2T_MIN_CONFIDENCE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerALGO_I2T_MIN_MATCHED, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerALGO_I2L_MIN_CONFIDENCE, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerALGO_I2L_MIN_MATCHED, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::ALGO_MODE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::ALGO_I2T_MIN_CONFIDENCE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::ALGO_I2T_MIN_MATCHED, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::ALGO_I2L_MIN_CONFIDENCE, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::ALGO_I2L_MIN_MATCHED, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM3, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM4, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM5, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM6, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM7, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM8, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM9, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM10, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM11, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM12, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM13, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM14, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM15, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerSUBSCRIPTION_TM16, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM3, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM4, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM5, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM6, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM7, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM8, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM9, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM10, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM11, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM12, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM13, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM14, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM15, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::SUBSCRIPTION_TM16, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOG_SUBSCRIPTION_LEVEL1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOG_SUBSCRIPTION_MODULE1, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOG_SUBSCRIPTION_LEVEL2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerLOG_SUBSCRIPTION_MODULE2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOG_SUBSCRIPTION_LEVEL1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOG_SUBSCRIPTION_MODULE1, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOG_SUBSCRIPTION_LEVEL2, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::LOG_SUBSCRIPTION_MODULE2, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDEBUG_CAMERA_TIMING, new PoolEntry({0})); - localDataPoolMap.emplace(startrackerDEBUG_CAMERA_TEST, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DEBUG_CAMERA_TIMING, new PoolEntry({0})); + localDataPoolMap.emplace(startracker::DEBUG_CAMERA_TEST, new PoolEntry({0})); return RETURN_OK; } size_t StarTrackerHandler::getNextReplyLength(DeviceCommandId_t commandId) { - return startrackerMAX_FRAME_SIZE; + return startracker::MAX_FRAME_SIZE; } ReturnValue_t StarTrackerHandler::doSendReadHook() { @@ -1290,8 +1284,10 @@ ReturnValue_t StarTrackerHandler::doSendReadHook() { ReturnValue_t StarTrackerHandler::checkMode(ActionId_t actionId) { switch (actionId) { - case startrackerUPLOAD_IMAGE: - case startrackerDOWNLOAD_IMAGE: { + case startracker::UPLOAD_IMAGE: + case startracker::DOWNLOAD_IMAGE: + case startracker::READ: + case startracker::FIRMWARE_UPDATE: { return DeviceHandlerBase::acceptExternalDeviceCommands(); default: break; @@ -1303,68 +1299,60 @@ ReturnValue_t StarTrackerHandler::checkMode(ActionId_t actionId) { ReturnValue_t StarTrackerHandler::scanForActionReply(DeviceCommandId_t* foundId) { const uint8_t* reply = dataLinkLayer.getReply(); switch (*reply) { - case (startrackerID::PING): { - *foundId = startrackerPING_REQUEST; + case (startracker::ID::PING): { + *foundId = startracker::PING_REQUEST; break; } - case (startrackerID::WRITE): { - *foundId = startrackerWRITE; + case (startracker::ID::BOOT): { + *foundId = startracker::BOOT; break; } - case (startrackerID::BOOT): { - *foundId = startrackerBOOT; + case (startracker::ID::TAKE_IMAGE): { + *foundId = startracker::TAKE_IMAGE; break; } - case (startrackerID::TAKE_IMAGE): { - *foundId = startrackerTAKE_IMAGE; + case (startracker::ID::UPLOAD_IMAGE): { + *foundId = startracker::UPLOAD_IMAGE; break; } - case (startrackerID::UPLOAD_IMAGE): { - *foundId = startrackerUPLOAD_IMAGE; + case (startracker::ID::ERROR_RESET): { + *foundId = startracker::RESET_ERROR; break; } - case (startrackerID::ERROR_RESET): { - *foundId = startrackerRESET_ERROR; + case (startracker::ID::ERASE): { + *foundId = startracker::ERASE; break; } - case (startrackerID::ERASE): { - *foundId = startrackerERASE; + case (startracker::ID::UNLOCK): { + *foundId = startracker::UNLOCK; break; } - case (startrackerID::UNLOCK): { - *foundId = startrackerUNLOCK; + case (startracker::ID::CHECKSUM): { + *foundId = startracker::CHECKSUM; break; } - case (startrackerID::CHECKSUM): { - *foundId = startrackerCHECKSUM; + case (startracker::ID::SET_TIME): { + *foundId = startracker::SET_TIME; break; } - case (startrackerID::SET_TIME): { - *foundId = startrackerSET_TIME; + case (startracker::ID::DOWNLOAD_CENTROID): { + *foundId = startracker::DOWNLOAD_CENTROID; break; } - case (startrackerID::DOWNLOAD_CENTROID): { - *foundId = startrackerDOWNLOAD_CENTROID; + case (startracker::ID::UPLOAD_CENTROID): { + *foundId = startracker::UPLOAD_CENTROID; break; } - case (startrackerID::UPLOAD_CENTROID): { - *foundId = startrackerUPLOAD_CENTROID; + case (startracker::ID::DOWNLOAD_MATCHED_STAR): { + *foundId = startracker::DOWNLOAD_MATCHED_STAR; break; } - case (startrackerID::DOWNLOAD_MATCHED_STAR): { - *foundId = startrackerDOWNLOAD_MATCHED_STAR; + case (startracker::ID::DOWNLOAD_DBIMAGE): { + *foundId = startracker::DOWNLOAD_DBIMAGE; break; } - case (startrackerID::DOWNLOAD_DBIMAGE): { - *foundId = startrackerDOWNLOAD_DBIMAGE; - break; - } - case (startrackerID::DOWNLOAD_BLOBPIXEL): { - *foundId = startrackerDOWNLOAD_BLOBPIXEL; - break; - } - case (startrackerID::FPGA_ACTION): { - *foundId = startrackerFPGA_ACTION; + case (startracker::ID::DOWNLOAD_BLOBPIXEL): { + *foundId = startracker::DOWNLOAD_BLOBPIXEL; break; } default: @@ -1378,60 +1366,60 @@ ReturnValue_t StarTrackerHandler::scanForActionReply(DeviceCommandId_t* foundId) ReturnValue_t StarTrackerHandler::scanForSetParameterReply(DeviceCommandId_t* foundId) { const uint8_t* reply = dataLinkLayer.getReply(); switch (*reply) { - case (startrackerID::SUBSCRIPTION): { - *foundId = startrackerSUBSCRIPTION; + case (startracker::ID::SUBSCRIPTION): { + *foundId = startracker::SUBSCRIPTION; break; } - case (startrackerID::LIMITS): { - *foundId = startrackerLIMITS; + case (startracker::ID::LIMITS): { + *foundId = startracker::LIMITS; break; } - case (startrackerID::MOUNTING): { - *foundId = startrackerMOUNTING; + case (startracker::ID::MOUNTING): { + *foundId = startracker::MOUNTING; break; } - case (startrackerID::IMAGE_PROCESSOR): { - *foundId = startrackerIMAGE_PROCESSOR; + case (startracker::ID::IMAGE_PROCESSOR): { + *foundId = startracker::IMAGE_PROCESSOR; break; } - case (startrackerID::CAMERA): { - *foundId = startrackerCAMERA; + case (startracker::ID::CAMERA): { + *foundId = startracker::CAMERA; break; } - case (startrackerID::CENTROIDING): { - *foundId = startrackerCENTROIDING; + case (startracker::ID::CENTROIDING): { + *foundId = startracker::CENTROIDING; break; } - case (startrackerID::LISA): { - *foundId = startrackerLISA; + case (startracker::ID::LISA): { + *foundId = startracker::LISA; break; } - case (startrackerID::MATCHING): { - *foundId = startrackerMATCHING; + case (startracker::ID::MATCHING): { + *foundId = startracker::MATCHING; break; } - case (startrackerID::TRACKING): { - *foundId = startrackerTRACKING; + case (startracker::ID::TRACKING): { + *foundId = startracker::TRACKING; break; } - case (startrackerID::VALIDATION): { - *foundId = startrackerVALIDATION; + case (startracker::ID::VALIDATION): { + *foundId = startracker::VALIDATION; break; } - case (startrackerID::ALGO): { - *foundId = startrackerALGO; + case (startracker::ID::ALGO): { + *foundId = startracker::ALGO; break; } - case (startrackerID::LOG_LEVEL): { - *foundId = startrackerLOGLEVEL; + case (startracker::ID::LOG_LEVEL): { + *foundId = startracker::LOGLEVEL; break; } - case (startrackerID::DEBUG_CAMERA): { - *foundId = startrackerDEBUG_CAMERA; + case (startracker::ID::DEBUG_CAMERA): { + *foundId = startracker::DEBUG_CAMERA; break; } - case (startrackerID::LOG_SUBSCRIPTION): { - *foundId = startrackerLOGSUBSCRIPTION; + case (startracker::ID::LOG_SUBSCRIPTION): { + *foundId = startracker::LOGSUBSCRIPTION; break; } default: @@ -1445,60 +1433,60 @@ ReturnValue_t StarTrackerHandler::scanForSetParameterReply(DeviceCommandId_t* fo ReturnValue_t StarTrackerHandler::scanForGetParameterReply(DeviceCommandId_t* foundId) { const uint8_t* reply = dataLinkLayer.getReply(); switch (*reply) { - case (startrackerID::CAMERA): { - *foundId = startrackerREQ_CAMERA; + case (startracker::ID::CAMERA): { + *foundId = startracker::REQ_CAMERA; break; } - case (startrackerID::LIMITS): { - *foundId = startrackerREQ_LIMITS; + case (startracker::ID::LIMITS): { + *foundId = startracker::REQ_LIMITS; break; } - case (startrackerID::LOG_LEVEL): { - *foundId = startrackerREQ_LOG_LEVEL; + case (startracker::ID::LOG_LEVEL): { + *foundId = startracker::REQ_LOG_LEVEL; break; } - case (startrackerID::MOUNTING): { - *foundId = startrackerREQ_MOUNTING; + case (startracker::ID::MOUNTING): { + *foundId = startracker::REQ_MOUNTING; break; } - case (startrackerID::IMAGE_PROCESSOR): { - *foundId = startrackerREQ_IMAGE_PROCESSOR; + case (startracker::ID::IMAGE_PROCESSOR): { + *foundId = startracker::REQ_IMAGE_PROCESSOR; break; } - case (startrackerID::CENTROIDING): { - *foundId = startrackerREQ_CENTROIDING; + case (startracker::ID::CENTROIDING): { + *foundId = startracker::REQ_CENTROIDING; break; } - case (startrackerID::LISA): { - *foundId = startrackerREQ_LISA; + case (startracker::ID::LISA): { + *foundId = startracker::REQ_LISA; break; } - case (startrackerID::MATCHING): { - *foundId = startrackerREQ_MATCHING; + case (startracker::ID::MATCHING): { + *foundId = startracker::REQ_MATCHING; break; } - case (startrackerID::TRACKING): { - *foundId = startrackerREQ_TRACKING; + case (startracker::ID::TRACKING): { + *foundId = startracker::REQ_TRACKING; break; } - case (startrackerID::VALIDATION): { - *foundId = startrackerREQ_VALIDATION; + case (startracker::ID::VALIDATION): { + *foundId = startracker::REQ_VALIDATION; break; } - case (startrackerID::ALGO): { - *foundId = startrackerREQ_ALGO; + case (startracker::ID::ALGO): { + *foundId = startracker::REQ_ALGO; break; } - case (startrackerID::SUBSCRIPTION): { - *foundId = startrackerREQ_SUBSCRIPTION; + case (startracker::ID::SUBSCRIPTION): { + *foundId = startracker::REQ_SUBSCRIPTION; break; } - case (startrackerID::LOG_SUBSCRIPTION): { - *foundId = startrackerREQ_LOG_SUBSCRIPTION; + case (startracker::ID::LOG_SUBSCRIPTION): { + *foundId = startracker::REQ_LOG_SUBSCRIPTION; break; } - case (startrackerID::DEBUG_CAMERA): { - *foundId = startrackerREQ_DEBUG_CAMERA; + case (startracker::ID::DEBUG_CAMERA): { + *foundId = startracker::REQ_DEBUG_CAMERA; break; } default: { @@ -1513,36 +1501,36 @@ ReturnValue_t StarTrackerHandler::scanForGetParameterReply(DeviceCommandId_t* fo ReturnValue_t StarTrackerHandler::scanForTmReply(DeviceCommandId_t* foundId) { const uint8_t* reply = dataLinkLayer.getReply(); switch (*reply) { - case (startrackerID::VERSION): { - *foundId = startrackerREQ_VERSION; + case (startracker::ID::VERSION): { + *foundId = startracker::REQ_VERSION; break; } - case (startrackerID::INTERFACE): { - *foundId = startrackerREQ_INTERFACE; + case (startracker::ID::INTERFACE): { + *foundId = startracker::REQ_INTERFACE; break; } - case (startrackerID::POWER): { - *foundId = startrackerREQ_POWER; + case (startracker::ID::POWER): { + *foundId = startracker::REQ_POWER; break; } - case (startrackerID::TEMPERATURE): { - *foundId = startrackerREQ_TEMPERATURE; + case (startracker::ID::TEMPERATURE): { + *foundId = startracker::REQ_TEMPERATURE; break; } - case (startrackerID::HISTOGRAM): { - *foundId = startrackerREQ_HISTOGRAM; + case (startracker::ID::HISTOGRAM): { + *foundId = startracker::REQ_HISTOGRAM; break; } - case (startrackerID::CONTRAST): { - *foundId = startrackerREQ_CONTRAST; + case (startracker::ID::CONTRAST): { + *foundId = startracker::REQ_CONTRAST; break; } - case (startrackerID::TIME): { - *foundId = startrackerREQ_TIME; + case (startracker::ID::TIME): { + *foundId = startracker::REQ_TIME; break; } - case (startrackerID::SOLUTION): { - *foundId = startrackerREQ_SOLUTION; + case (startracker::ID::SOLUTION): { + *foundId = startracker::REQ_SOLUTION; break; } default: { @@ -1570,79 +1558,6 @@ void StarTrackerHandler::handleEvent(EventMessage* eventMessage) { } } -ReturnValue_t StarTrackerHandler::executeWriteCommand(const uint8_t* commandData, - size_t commandDataLen) { - ReturnValue_t result = RETURN_OK; - if (commandDataLen < WriteCmd::MIN_LENGTH) { - sif::warning << "StarTrackerHandler::executeWriteCommand: Command too short" << std::endl; - return COMMAND_TOO_SHORT; - } - uint8_t region = *(commandData); - uint32_t address; - size_t size = sizeof(address); - const uint8_t* addressPtr = commandData + WriteCmd::ADDRESS_OFFSET; - result = SerializeAdapter::deSerialize(&address, addressPtr, &size, SerializeIF::Endianness::BIG); - if (result != RETURN_OK) { - sif::debug << "StarTrackerHandler::executeWriteCommand: Deserialization of address failed" - << std::endl; - return result; - } - if (commandDataLen - sizeof(address) - sizeof(region) > MAX_PATH_SIZE) { - sif::warning << "StarTrackerHandler::executeWriteCommand: Received command with invalid" - << " path and filename" << std::endl; - return FILE_PATH_TOO_LONG; - } - const uint8_t* filePtr = commandData + WriteCmd::FILE_OFFSET; - std::string fullname = std::string(reinterpret_cast(filePtr), - commandDataLen - sizeof(address) - sizeof(region)); - result = strHelper->startFlashWrite(fullname, region, address); - if (result != RETURN_OK) { - return result; - } - return result; -} - -ReturnValue_t StarTrackerHandler::executeFpgaDownloadCommand(const uint8_t* commandData, - size_t commandDataLen) { - ReturnValue_t result = RETURN_OK; - if (commandDataLen < FpgaDownloadCmd::MIN_LENGTH) { - sif::warning << "StarTrackerHandler::executeFpgaDownloadCommand: Command too short" - << std::endl; - return COMMAND_TOO_SHORT; - } - uint32_t position; - size_t size = sizeof(position); - result = - SerializeAdapter::deSerialize(&position, &commandData, &size, SerializeIF::Endianness::BIG); - if (result != RETURN_OK) { - sif::debug << "StarTrackerHandler::executeWriteCommand: Deserialization of position failed" - << std::endl; - return result; - } - uint32_t length; - size = sizeof(length); - result = - SerializeAdapter::deSerialize(&length, &commandData, &size, SerializeIF::Endianness::BIG); - if (result != RETURN_OK) { - sif::debug << "StarTrackerHandler::executeWriteCommand: Deserialization of length failed" - << std::endl; - return result; - } - if (commandDataLen - sizeof(position) - sizeof(length) > MAX_PATH_SIZE) { - sif::warning << "StarTrackerHandler::executeFpgaDownloadCommand: Received command with " - " invalid path and filename" - << std::endl; - return FILE_PATH_TOO_LONG; - } - std::string fullname = std::string(reinterpret_cast(commandData), - commandDataLen - sizeof(position) - sizeof(length)); - result = strHelper->startFpgaDownload(fullname, position, length); - if (result != RETURN_OK) { - return result; - } - return result; -} - ReturnValue_t StarTrackerHandler::executeReadCommand(const uint8_t* commandData, size_t commandDataLen) { ReturnValue_t result = RETURN_OK; @@ -1825,72 +1740,70 @@ ReturnValue_t StarTrackerHandler::prepareUploadCentroidCommand(const uint8_t* co << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::id, &req.id); + result = j.getValue(startracker::UploadCentroidKeys::id, &req.id); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::id << " does not exist" << std::endl; + << startracker::UploadCentroidKeys::id << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::pixx, &req.pixx); + result = j.getValue(startracker::UploadCentroidKeys::pixx, &req.pixx); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::pixx << " does not exist" << std::endl; + << startracker::UploadCentroidKeys::pixx << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::pixy, &req.pixy); + result = j.getValue(startracker::UploadCentroidKeys::pixy, &req.pixy); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::pixy << " does not exist" << std::endl; + << startracker::UploadCentroidKeys::pixy << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::x_uncorrected, &req.x_uncorrected); + result = j.getValue(startracker::UploadCentroidKeys::x_uncorrected, &req.x_uncorrected); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::x_uncorrected << " does not exist" - << std::endl; + << startracker::UploadCentroidKeys::x_uncorrected << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::y_uncorrected, &req.y_uncorrected); + result = j.getValue(startracker::UploadCentroidKeys::y_uncorrected, &req.y_uncorrected); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::y_uncorrected << " does not exist" - << std::endl; + << startracker::UploadCentroidKeys::y_uncorrected << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::x_corrected, &req.x_corrected); + result = j.getValue(startracker::UploadCentroidKeys::x_corrected, &req.x_corrected); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::x_corrected << " does not exist" << std::endl; + << startracker::UploadCentroidKeys::x_corrected << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::y_corrected, &req.y_corrected); + result = j.getValue(startracker::UploadCentroidKeys::y_corrected, &req.y_corrected); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::y_corrected << " does not exist" << std::endl; + << startracker::UploadCentroidKeys::y_corrected << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::magnitude, &req.magnitude); + result = j.getValue(startracker::UploadCentroidKeys::magnitude, &req.magnitude); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::magnitude << " does not exist" << std::endl; + << startracker::UploadCentroidKeys::magnitude << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::cxa, &req.cxa); + result = j.getValue(startracker::UploadCentroidKeys::cxa, &req.cxa); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::cxa << " does not exist" << std::endl; + << startracker::UploadCentroidKeys::cxa << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::cya, &req.cya); + result = j.getValue(startracker::UploadCentroidKeys::cya, &req.cya); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::cya << " does not exist" << std::endl; + << startracker::UploadCentroidKeys::cya << " does not exist" << std::endl; return result; } - result = j.getValue(startrackerUploadCentroidKeys::quality, &req.quality); + result = j.getValue(startracker::UploadCentroidKeys::quality, &req.quality); if (result != RETURN_OK) { sif::warning << "StarTrackerHandler::prepareUploadCentroidCommand: The key " - << startrackerUploadCentroidKeys::quality << " does not exist" << std::endl; + << startracker::UploadCentroidKeys::quality << " does not exist" << std::endl; return result; } uint32_t length = 0; @@ -2218,7 +2131,7 @@ ReturnValue_t StarTrackerHandler::prepareRequestDebugCameraParams() { ReturnValue_t StarTrackerHandler::handleSetParamReply() { const uint8_t* reply = dataLinkLayer.getReply(); uint8_t status = *(reply + STATUS_OFFSET); - if (status != startrackerSTATUS_OK) { + if (status != startracker::STATUS_OK) { sif::warning << "StarTrackerHandler::handleSetParamReply: Failed to execute parameter set " " command with parameter ID" << static_cast(*(reply + PARAMETER_ID_OFFSET)) << std::endl; @@ -2236,7 +2149,7 @@ ReturnValue_t StarTrackerHandler::handleSetParamReply() { ReturnValue_t StarTrackerHandler::handleActionReply() { const uint8_t* reply = dataLinkLayer.getReply(); uint8_t status = *(reply + STATUS_OFFSET); - if (status != startrackerSTATUS_OK) { + if (status != startracker::STATUS_OK) { sif::warning << "StarTrackerHandler::handleActionReply: Failed to execute action " << "command with action ID " << static_cast(*(reply + ACTION_ID_OFFSET)) << " and status " @@ -2266,7 +2179,7 @@ ReturnValue_t StarTrackerHandler::handleEraseReply() { return result; } const uint8_t* replyData = dataLinkLayer.getReply() + ACTION_DATA_OFFSET; - startrackerEraseReply eraseReply(replyData); + startracker::EraseReply eraseReply(replyData); if (eraseReply.getRegion() != eraseCmd.rememberRegion) { sif::warning << "StarTrackerHandler::handleEraseReply: Region mismatch" << std::endl; return REGION_MISMATCH; @@ -2281,7 +2194,7 @@ ReturnValue_t StarTrackerHandler::handleChecksumReply() { return result; } const uint8_t* replyData = dataLinkLayer.getReply() + ACTION_DATA_OFFSET; - startrackerChecksumReply checksumReply(replyData); + startracker::ChecksumReply checksumReply(replyData); if (checksumReply.getRegion() != checksumCmd.rememberRegion) { sif::warning << "StarTrackerHandler::handleChecksumReply: Region mismatch" << std::endl; return REGION_MISMATCH; @@ -2296,7 +2209,7 @@ ReturnValue_t StarTrackerHandler::handleChecksumReply() { } PoolReadGuard rg(&checksumSet); checksumSet.checksum = checksumReply.getChecksum(); - handleDeviceTM(&checksumSet, startrackerCHECKSUM); + handleDeviceTM(&checksumSet, startracker::CHECKSUM); #if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1 checksumReply.printChecksum(); #endif /* OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1 */ @@ -2339,7 +2252,7 @@ ReturnValue_t StarTrackerHandler::handlePingReply() { sif::info << "StarTracker: Ping status: " << static_cast(status) << std::endl; sif::info << "Ping id: 0x" << std::hex << pingId << std::endl; #endif /* OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_STARTRACKER == 1 */ - if (status != startrackerSTATUS_OK || pingId != PING_ID) { + if (status != startracker::STATUS_OK || pingId != PING_ID) { sif::warning << "StarTrackerHandler::handlePingReply: Ping failed" << std::endl; result = PING_FAILED; } else { @@ -2353,17 +2266,32 @@ ReturnValue_t StarTrackerHandler::handlePingReply() { ReturnValue_t StarTrackerHandler::checkProgram() { PoolReadGuard pg(&versionSet); switch (versionSet.program.value) { - case startrackerProgram::BOOTLOADER: + case startracker::Program::BOOTLOADER: // Star tracker currently in bootloader program. Need to send boot command to switch to // firmware program - if (startupState != StartupState::IDLE) { + currentProgram = startracker::Program::BOOTLOADER; + if (startupState == StartupState::STARTUP_CHECK) { startupState = StartupState::BOOT; } + else if (startupState == StartupState::FIRMWARE_CHECK) { + startupState = StartupState::FAILED_FIRMWARE_BOOT; + } + if (internalState == InternalState::CHECK_PROGRAM){ + // Firmware boot failed when trying to switch to normal mode + internalState = InternalState::IDLE; + sif::warning << "StarTrackerHandler::checkProgram: Failed to boot firmware when " + << "trying to switch to normal mode" << std::endl; + setMode(_MODE_TO_ON); + } break; - case startrackerProgram::FIRMWARE: + case startracker::Program::FIRMWARE: // Firmware already booted - if (startupState != StartupState::IDLE) { - startupState = StartupState::LIMITS; + currentProgram = startracker::Program::FIRMWARE; + if (startupState == StartupState::FIRMWARE_CHECK) { + startupState = StartupState::LOGLEVEL; + } + if (internalState == InternalState::CHECK_PROGRAM) { + internalState = InternalState::TEMPERATURE_REQUEST; } break; default: @@ -2377,7 +2305,7 @@ ReturnValue_t StarTrackerHandler::checkProgram() { ReturnValue_t StarTrackerHandler::handleTm(LocalPoolDataSetBase& dataset, size_t size) { ReturnValue_t result = RETURN_OK; uint8_t status = *(dataLinkLayer.getReply() + STATUS_OFFSET); - if (status != startrackerSTATUS_OK) { + if (status != startracker::STATUS_OK) { sif::warning << "StarTrackerHandler::handleTm: Reply error: " << static_cast(status) << std::endl; return REPLY_ERROR; @@ -2407,7 +2335,7 @@ ReturnValue_t StarTrackerHandler::handleTm(LocalPoolDataSetBase& dataset, size_t ReturnValue_t StarTrackerHandler::handleActionReplySet(LocalPoolDataSetBase& dataset, size_t size) { ReturnValue_t result = RETURN_OK; uint8_t status = *(dataLinkLayer.getReply() + STATUS_OFFSET); - if (status != startrackerSTATUS_OK) { + if (status != startracker::STATUS_OK) { sif::warning << "StarTrackerHandler::handleActionReplySet: Reply error: " << static_cast(status) << std::endl; return REPLY_ERROR; @@ -2436,55 +2364,55 @@ ReturnValue_t StarTrackerHandler::handleActionReplySet(LocalPoolDataSetBase& dat void StarTrackerHandler::handleStartup(const uint8_t* parameterId) { switch (*parameterId) { - case (startrackerID::LOG_LEVEL): { + case (startracker::ID::LOG_LEVEL): { startupState = StartupState::LIMITS; break; } - case (startrackerID::LIMITS): { + case (startracker::ID::LIMITS): { startupState = StartupState::TRACKING; break; } - case (startrackerID::TRACKING): { + case (startracker::ID::TRACKING): { startupState = StartupState::MOUNTING; break; } - case (startrackerID::MOUNTING): { + case (startracker::ID::MOUNTING): { startupState = StartupState::IMAGE_PROCESSOR; break; } - case (startrackerID::IMAGE_PROCESSOR): { + case (startracker::ID::IMAGE_PROCESSOR): { startupState = StartupState::CAMERA; break; } - case (startrackerID::CAMERA): { + case (startracker::ID::CAMERA): { startupState = StartupState::CENTROIDING; break; } - case (startrackerID::CENTROIDING): { + case (startracker::ID::CENTROIDING): { startupState = StartupState::LISA; break; } - case (startrackerID::LISA): { + case (startracker::ID::LISA): { startupState = StartupState::MATCHING; break; } - case (startrackerID::MATCHING): { + case (startracker::ID::MATCHING): { startupState = StartupState::VALIDATION; break; } - case (startrackerID::VALIDATION): { + case (startracker::ID::VALIDATION): { startupState = StartupState::ALGO; break; } - case (startrackerID::ALGO): { + case (startracker::ID::ALGO): { startupState = StartupState::LOG_SUBSCRIPTION; break; } - case (startrackerID::LOG_SUBSCRIPTION): { + case (startracker::ID::LOG_SUBSCRIPTION): { startupState = StartupState::DEBUG_CAMERA; break; } - case (startrackerID::DEBUG_CAMERA): { + case (startracker::ID::DEBUG_CAMERA): { startupState = StartupState::DONE; break; } @@ -2495,3 +2423,41 @@ void StarTrackerHandler::handleStartup(const uint8_t* parameterId) { } } } + +ReturnValue_t StarTrackerHandler::checkCommand(ActionId_t actionId) { + switch(actionId) { + case startracker::BOOT: + if (currentProgram != startracker::Program::BOOTLOADER) { + return STARTRACKER_ALREADY_BOOTED; + } + break; + case startracker::REQ_INTERFACE: + case startracker::REQ_TIME: + case startracker::SWITCH_TO_BOOTLOADER_PROGRAM: + case startracker::DOWNLOAD_IMAGE: + case startracker::UPLOAD_IMAGE: + case startracker::REQ_POWER: + case startracker::TAKE_IMAGE: + case startracker::DOWNLOAD_CENTROID: + case startracker::UPLOAD_CENTROID: + case startracker::REQ_SOLUTION: + case startracker::REQ_TEMPERATURE: + case startracker::REQ_HISTOGRAM: + case startracker::REQ_CONTRAST: + case startracker::DOWNLOAD_MATCHED_STAR: + case startracker::DOWNLOAD_DBIMAGE: + case startracker::DOWNLOAD_BLOBPIXEL: + if (currentProgram != startracker::Program::FIRMWARE) { + return STARTRACKER_RUNNING_BOOTLOADER; + } + break; + case startracker::FIRMWARE_UPDATE: + if (currentProgram != startracker::Program::BOOTLOADER) { + return STARTRACKER_RUNNING_FIRMWARE; + } + break; + default: + break; + } + return RETURN_OK; +} diff --git a/linux/devices/startracker/StarTrackerHandler.h b/linux/devices/startracker/StarTrackerHandler.h index 37411179..dc140015 100644 --- a/linux/devices/startracker/StarTrackerHandler.h +++ b/linux/devices/startracker/StarTrackerHandler.h @@ -131,6 +131,12 @@ class StarTrackerHandler : public DeviceHandlerBase { //! [EXPORT] : [COMMENT] Star tracker handler currently executing a command and using the //! communication interface static const ReturnValue_t STR_HELPER_EXECUTING = MAKE_RETURN_CODE(0xBA); + //! [EXPORT] : [COMMENT] Star tracker is already in firmware mode + static const ReturnValue_t STARTRACKER_ALREADY_BOOTED = MAKE_RETURN_CODE(0xBB); + //! [EXPORT] : [COMMENT] Star tracker is in firmware mode but must be in bootloader mode to execute this command + static const ReturnValue_t STARTRACKER_RUNNING_FIRMWARE = MAKE_RETURN_CODE(0xBC); + //! [EXPORT] : [COMMENT] Star tracker is in bootloader mode but must be in firmware mode to execute this command + static const ReturnValue_t STARTRACKER_RUNNING_BOOTLOADER = MAKE_RETURN_CODE(0xBD); static const size_t MAX_PATH_SIZE = 50; static const size_t MAX_FILE_NAME = 30; @@ -246,33 +252,33 @@ class StarTrackerHandler : public DeviceHandlerBase { ArcsecDatalinkLayer dataLinkLayer; - StarTracker::TemperatureSet temperatureSet; - StarTracker::VersionSet versionSet; - StarTracker::PowerSet powerSet; - StarTracker::InterfaceSet interfaceSet; - StarTracker::TimeSet timeSet; - StarTracker::SolutionSet solutionSet; - StarTracker::HistogramSet histogramSet; - StarTracker::ContrastSet contrastSet; - StarTracker::ChecksumSet checksumSet; - StarTracker::DownloadCentroidSet downloadCentroidSet; - StarTracker::DownloadMatchedStar downloadMatchedStar; - StarTracker::DownloadDBImage downloadDbImage; - StarTracker::DownloadBlobPixel downloadBlobPixel; - StarTracker::CameraSet cameraSet; - StarTracker::LimitsSet limitsSet; - StarTracker::LogLevelSet loglevelSet; - StarTracker::MountingSet mountingSet; - StarTracker::ImageProcessorSet imageProcessorSet; - StarTracker::CentroidingSet centroidingSet; - StarTracker::LisaSet lisaSet; - StarTracker::MatchingSet matchingSet; - StarTracker::TrackingSet trackingSet; - StarTracker::ValidationSet validationSet; - StarTracker::AlgoSet algoSet; - StarTracker::SubscriptionSet subscriptionSet; - StarTracker::LogSubscriptionSet logSubscriptionSet; - StarTracker::DebugCameraSet debugCameraSet; + startracker::TemperatureSet temperatureSet; + startracker::VersionSet versionSet; + startracker::PowerSet powerSet; + startracker::InterfaceSet interfaceSet; + startracker::TimeSet timeSet; + startracker::SolutionSet solutionSet; + startracker::HistogramSet histogramSet; + startracker::ContrastSet contrastSet; + startracker::ChecksumSet checksumSet; + startracker::DownloadCentroidSet downloadCentroidSet; + startracker::DownloadMatchedStar downloadMatchedStar; + startracker::DownloadDBImage downloadDbImage; + startracker::DownloadBlobPixel downloadBlobPixel; + startracker::CameraSet cameraSet; + startracker::LimitsSet limitsSet; + startracker::LogLevelSet loglevelSet; + startracker::MountingSet mountingSet; + startracker::ImageProcessorSet imageProcessorSet; + startracker::CentroidingSet centroidingSet; + startracker::LisaSet lisaSet; + startracker::MatchingSet matchingSet; + startracker::TrackingSet trackingSet; + startracker::ValidationSet validationSet; + startracker::AlgoSet algoSet; + startracker::SubscriptionSet subscriptionSet; + startracker::LogSubscriptionSet logSubscriptionSet; + startracker::DebugCameraSet debugCameraSet; // Pointer to object responsible for uploading and downloading images to/from the star tracker StrHelper* strHelper = nullptr; @@ -280,10 +286,11 @@ class StarTrackerHandler : public DeviceHandlerBase { uint8_t commandBuffer[startracker::MAX_FRAME_SIZE]; // Countdown to insert delay for star tracker to switch from bootloader to firmware program + // Loading firmware requires some time and the command will not trigger a reply when executed Countdown bootCountdown; -#ifndef EGSE - std::string paramJsonFile = "/mnt/sd0/startracker/flight-config.json"; +#ifdef EGSE + std::string paramJsonFile = "/home/pi/arcsec/json/flight-config.json"; #else #if OBSW_STAR_TRACKER_GROUND_CONFIG == 1 std::string paramJsonFile = "/mnt/sd0/startracker/ground-config.json"; @@ -292,15 +299,22 @@ class StarTrackerHandler : public DeviceHandlerBase { #endif #endif - enum class InternalState { TEMPERATURE_REQUEST }; + enum class InternalState { + IDLE, + CHECK_PROGRAM, + TEMPERATURE_REQUEST, + }; - InternalState internalState = InternalState::TEMPERATURE_REQUEST; + InternalState internalState = InternalState::IDLE; enum class StartupState { IDLE, CHECK_BOOT_STATE, BOOT, + VERIFY_BOOT, + STARTUP_CHECK, BOOT_DELAY, + FIRMWARE_CHECK, LOGLEVEL, LIMITS, TRACKING, @@ -316,13 +330,16 @@ class StarTrackerHandler : public DeviceHandlerBase { LOG_SUBSCRIPTION, DEBUG_CAMERA, WAIT_FOR_EXECUTION, - DONE + DONE, + FAILED_FIRMWARE_BOOT }; StartupState startupState = StartupState::IDLE; bool strHelperExecuting = false; + uint8_t currentProgram = startracker::Program::BOOTLOADER; + /** * @brief Handles internal state */ @@ -360,24 +377,6 @@ class StarTrackerHandler : public DeviceHandlerBase { */ void handleEvent(EventMessage* eventMessage); - /** - * @brief Executes the write command - * - * @param commandData Pointer to received command data - * @param commandDataLen Size of received command data - * - * @return RETURN_OK if start of execution was successful, otherwise error return value - */ - ReturnValue_t executeWriteCommand(const uint8_t* commandData, size_t commandDataLen); - - /** - * @brief Starts the execution of the fpga download command - * - * @param commandData Pointer to buffer with command data - * @param commandDataLen Size of received command - */ - ReturnValue_t executeFpgaDownloadCommand(const uint8_t* commandData, size_t commandDataLen); - /** * @brief Extracts information for flash-read-command from TC data and starts execution of * flash-read-procedure @@ -586,6 +585,15 @@ class StarTrackerHandler : public DeviceHandlerBase { * @return RETURN_OK if successful, otherwise error return value */ ReturnValue_t handleTm(LocalPoolDataSetBase& dataset, size_t size); + + /** + * @brief Checks if star tracker is in valid mode for executing the received command. + * + * @param actioId Id of received command + * + * @return RETURN_OK if star tracker is in valid mode, otherwise error return value + */ + ReturnValue_t checkCommand(ActionId_t actionId); }; #endif /* MISSION_DEVICES_STARTRACKERHANDLER_H_ */ diff --git a/linux/devices/startracker/StarTrackerJsonCommands.cpp b/linux/devices/startracker/StarTrackerJsonCommands.cpp index d8ddb7ca..c481c72a 100644 --- a/linux/devices/startracker/StarTrackerJsonCommands.cpp +++ b/linux/devices/startracker/StarTrackerJsonCommands.cpp @@ -10,7 +10,7 @@ ReturnValue_t Limits::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::LIMITS); + addSetParamHeader(buffer, startracker::ID::LIMITS); offset = 2; result = getParam(arcseckeys::ACTION, param); if (result != RETURN_OK) { @@ -88,7 +88,7 @@ ReturnValue_t Tracking::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::TRACKING); + addSetParamHeader(buffer, startracker::ID::TRACKING); offset = 2; result = getParam(arcseckeys::THIN_LIMIT, param); if (result != RETURN_OK) { @@ -124,7 +124,7 @@ ReturnValue_t Mounting::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::MOUNTING); + addSetParamHeader(buffer, startracker::ID::MOUNTING); offset = 2; result = getParam(arcseckeys::qw, param); if (result != RETURN_OK) { @@ -160,7 +160,7 @@ ReturnValue_t ImageProcessor::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::IMAGE_PROCESSOR); + addSetParamHeader(buffer, startracker::ID::IMAGE_PROCESSOR); offset = 2; result = getParam(arcseckeys::IMAGE_PROCESSOR_MODE, param); if (result != RETURN_OK) { @@ -202,7 +202,7 @@ ReturnValue_t Camera::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::CAMERA); + addSetParamHeader(buffer, startracker::ID::CAMERA); offset = 2; result = getParam(arcseckeys::MODE, param); if (result != RETURN_OK) { @@ -358,7 +358,7 @@ ReturnValue_t Centroiding::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::CENTROIDING); + addSetParamHeader(buffer, startracker::ID::CENTROIDING); offset = 2; result = getParam(arcseckeys::ENABLE_FILTER, param); if (result != RETURN_OK) { @@ -448,7 +448,7 @@ ReturnValue_t Lisa::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::LISA); + addSetParamHeader(buffer, startracker::ID::LISA); offset = 2; result = getParam(arcseckeys::LISA_MODE, param); if (result != RETURN_OK) { @@ -545,7 +545,7 @@ ReturnValue_t Matching::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::MATCHING); + addSetParamHeader(buffer, startracker::ID::MATCHING); offset = 2; result = getParam(arcseckeys::SQUARED_DISTANCE_LIMIT, param); if (result != RETURN_OK) { @@ -569,7 +569,7 @@ ReturnValue_t Validation::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::VALIDATION); + addSetParamHeader(buffer, startracker::ID::VALIDATION); offset = 2; result = getParam(arcseckeys::STABLE_COUNT, param); if (result != RETURN_OK) { @@ -605,7 +605,7 @@ ReturnValue_t Algo::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::ALGO); + addSetParamHeader(buffer, startracker::ID::ALGO); offset = 2; result = getParam(arcseckeys::MODE, param); if (result != RETURN_OK) { @@ -647,7 +647,7 @@ ReturnValue_t LogLevel::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::LOG_LEVEL); + addSetParamHeader(buffer, startracker::ID::LOG_LEVEL); offset = 2; result = getParam(arcseckeys::LOGLEVEL1, param); if (result != RETURN_OK) { @@ -756,7 +756,7 @@ ReturnValue_t Subscription::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::SUBSCRIPTION); + addSetParamHeader(buffer, startracker::ID::SUBSCRIPTION); offset = 2; result = getParam(arcseckeys::TELEMETRY_1, param); if (result != RETURN_OK) { @@ -864,7 +864,7 @@ ReturnValue_t LogSubscription::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::LOG_SUBSCRIPTION); + addSetParamHeader(buffer, startracker::ID::LOG_SUBSCRIPTION); offset = 2; result = getParam(arcseckeys::LEVEL1, param); if (result != RETURN_OK) { @@ -900,7 +900,7 @@ ReturnValue_t DebugCamera::createCommand(uint8_t* buffer) { ReturnValue_t result = RETURN_OK; uint8_t offset = 0; std::string param; - addSetParamHeader(buffer, StarTracker::ID::DEBUG_CAMERA); + addSetParamHeader(buffer, startracker::ID::DEBUG_CAMERA); offset = 2; result = getParam(arcseckeys::TIMING, param); if (result != RETURN_OK) { diff --git a/linux/devices/startracker/StrHelper.cpp b/linux/devices/startracker/StrHelper.cpp index 77bfe3d9..f2f89a31 100644 --- a/linux/devices/startracker/StrHelper.cpp +++ b/linux/devices/startracker/StrHelper.cpp @@ -1,4 +1,5 @@ #include "StrHelper.h" +#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h" #include #include @@ -60,26 +61,6 @@ ReturnValue_t StrHelper::performOperation(uint8_t operationCode) { internalState = InternalState::IDLE; break; } - case InternalState::DOWNLOAD_FPGA_IMAGE: { - result = performFpgaDownload(); - if (result == RETURN_OK) { - triggerEvent(FPGA_DOWNLOAD_SUCCESSFUL); - } else { - triggerEvent(FPGA_DOWNLOAD_FAILED); - } - internalState = InternalState::IDLE; - break; - } - case InternalState::UPLOAD_FPGA_IMAGE: { - result = performFpgaUpload(); - if (result == RETURN_OK) { - triggerEvent(FPGA_UPLOAD_SUCCESSFUL); - } else { - triggerEvent(FPGA_UPLOAD_FAILED); - } - internalState = InternalState::IDLE; - break; - } case InternalState::FIRMWARE_UPDATE: { result = performFirmwareUpdate(); if (result == RETURN_OK) { @@ -148,8 +129,6 @@ void StrHelper::setDownloadImageName(std::string filename) { downloadImage.filen void StrHelper::setFlashReadFilename(std::string filename) { flashRead.filename = filename; } -void StrHelper::setDownloadFpgaImage(std::string filename) { fpgaDownload.fileName = filename; } - ReturnValue_t StrHelper::startFirmwareUpdate(std::string fullname) { #ifdef XIPHOS_Q7S ReturnValue_t result = checkPath(fullname); @@ -162,7 +141,8 @@ ReturnValue_t StrHelper::startFirmwareUpdate(std::string fullname) { return FILE_NOT_EXISTS; } flashWrite.address = 0; - flashWrite.section = static_cast(RegionId::MAIN_FIRMWARE_SECTION); + flashWrite.firstRegion = static_cast(startracker::FirmwareRegions::FIRST); + flashWrite.lastRegion = static_cast(startracker::FirmwareRegions::LAST); internalState = InternalState::FIRMWARE_UPDATE; semaphore.release(); terminate = false; @@ -190,25 +170,6 @@ ReturnValue_t StrHelper::startFlashRead(std::string path, uint8_t region, uint32 return RETURN_OK; } -ReturnValue_t StrHelper::startFpgaDownload(std::string path, uint32_t startPosition, - uint32_t length) { - fpgaDownload.path = path; - fpgaDownload.startPosition = startPosition; - fpgaDownload.length = length; - internalState = InternalState::DOWNLOAD_FPGA_IMAGE; - semaphore.release(); - terminate = false; - return RETURN_OK; -} - -ReturnValue_t StrHelper::startFpgaUpload(std::string uploadFile) { - fpgaUpload.uploadFile = uploadFile; - internalState = InternalState::UPLOAD_FPGA_IMAGE; - semaphore.release(); - terminate = false; - return RETURN_OK; -} - ReturnValue_t StrHelper::performImageDownload() { ReturnValue_t result; struct DownloadActionRequest downloadReq; @@ -223,6 +184,7 @@ ReturnValue_t StrHelper::performImageDownload() { downloadReq.position = 0; while (downloadReq.position < ImageDownload::LAST_POSITION) { if (terminate) { + file.close(); return RETURN_OK; } arc_pack_download_action_req(&downloadReq, commandBuffer, &size); @@ -257,7 +219,7 @@ ReturnValue_t StrHelper::performImageDownload() { return result; } file.write(reinterpret_cast(datalinkLayer.getReply() + IMAGE_DATA_OFFSET), - IMAGE_DATA_SIZE); + CHUNK_SIZE); downloadReq.position++; #if OBSW_DEBUG_STARTRACKER == 1 printProgress(downloadReq.position, ImageDownload::LAST_POSITION); @@ -287,6 +249,7 @@ ReturnValue_t StrHelper::performImageUpload() { imageSize = file.tellg(); while ((uploadReq.position + 1) * SIZE_IMAGE_PART < imageSize) { if (terminate) { + file.close(); return RETURN_OK; } file.seekg(uploadReq.position * SIZE_IMAGE_PART, file.beg); @@ -294,10 +257,12 @@ ReturnValue_t StrHelper::performImageUpload() { arc_pack_upload_action_req(&uploadReq, commandBuffer, &size); result = sendAndRead(size, uploadReq.position); if (result != RETURN_OK) { + file.close(); return RETURN_FAILED; } result = checkActionReply(); if (result != RETURN_OK) { + file.close(); return result; } #if OBSW_DEBUG_STARTRACKER == 1 @@ -329,8 +294,8 @@ ReturnValue_t StrHelper::performImageUpload() { ReturnValue_t StrHelper::performFirmwareUpdate() { using namespace startracker; ReturnValue_t result = RETURN_OK; - result = unlockAndEraseRegions(static_cast(FirmwareRegions::START), - static_cast(FirmwareRegions::END)); + result = unlockAndEraseRegions(static_cast(startracker::FirmwareRegions::FIRST), + static_cast(startracker::FirmwareRegions::LAST)); if (result != RETURN_OK) { return result; } @@ -341,7 +306,7 @@ ReturnValue_t StrHelper::performFirmwareUpdate() { ReturnValue_t StrHelper::performFlashWrite() { ReturnValue_t result = RETURN_OK; uint32_t size = 0; - uint32_t remainingBytes = 0; + uint32_t bytesWritten = 0; uint32_t fileSize = 0; struct WriteActionRequest req; if (not std::filesystem::exists(flashWrite.fullname)) { @@ -352,30 +317,49 @@ ReturnValue_t StrHelper::performFlashWrite() { std::ifstream file(flashWrite.fullname, std::ifstream::binary); file.seekg(0, file.end); fileSize = file.tellg(); - remainingBytes = fileSize; - req.region = flashWrite.section; - req.address = flashWrite.address; - req.length = MAX_FLASH_DATA; - while (remainingBytes >= MAX_FLASH_DATA) { + if (fileSize > FLASH_REGION_SIZE * (flashWrite.lastRegion - flashWrite.firstRegion)) { + sif::warning << "StrHelper::performFlashWrite: Invalid file" << std::endl; + return RETURN_FAILED; + } + uint32_t fileChunks = fileSize / CHUNK_SIZE; + bytesWritten = 0; + req.region = flashWrite.firstRegion; + req.length = CHUNK_SIZE; + for (uint32_t idx = 0; idx < fileChunks; idx++) { if (terminate) { + file.close(); return RETURN_OK; } - file.seekg(fileSize - remainingBytes, file.beg); - file.read(reinterpret_cast(req.data), MAX_FLASH_DATA); + file.seekg(idx * CHUNK_SIZE, file.beg); + file.read(reinterpret_cast(req.data), CHUNK_SIZE); + if (bytesWritten + CHUNK_SIZE > FLASH_REGION_SIZE) { + req.region++; + bytesWritten = 0; + } + req.address = bytesWritten; arc_pack_write_action_req(&req, commandBuffer, &size); result = sendAndRead(size, req.address); if (result != RETURN_OK) { + file.close(); return result; } result = checkFlashActionReply(req.region, req.address, req.length); if (result != RETURN_OK) { + file.close(); return result; } - remainingBytes = remainingBytes - MAX_FLASH_DATA; + bytesWritten += CHUNK_SIZE; } - file.seekg(fileSize - remainingBytes, file.beg); + uint32_t remainingBytes = fileSize - fileChunks * CHUNK_SIZE; + file.seekg((fileChunks - 1) * CHUNK_SIZE , file.beg); file.read(reinterpret_cast(req.data), remainingBytes); file.close(); + if (bytesWritten + CHUNK_SIZE > FLASH_REGION_SIZE) { + req.region++; + bytesWritten = 0; + } + req.address = bytesWritten; + req.length = remainingBytes; arc_pack_write_action_req(&req, commandBuffer, &size); result = sendAndRead(size, req.address); if (result != RETURN_OK) { @@ -405,10 +389,10 @@ ReturnValue_t StrHelper::performFlashRead() { if (terminate) { return RETURN_OK; } - if ((flashRead.size - bytesRead) < MAX_FLASH_DATA) { + if ((flashRead.size - bytesRead) < CHUNK_SIZE) { req.length = flashRead.size - bytesRead; } else { - req.length = MAX_FLASH_DATA; + req.length = CHUNK_SIZE; } req.address = flashRead.address + bytesRead; arc_pack_read_action_req(&req, commandBuffer, &size); @@ -451,97 +435,6 @@ ReturnValue_t StrHelper::performFlashRead() { return RETURN_OK; } -ReturnValue_t StrHelper::performFpgaDownload() { - ReturnValue_t result; - struct DownloadFPGAImageActionRequest req; - uint32_t size = 0; - uint32_t retries = 0; - Timestamp timestamp; - std::string image = fpgaDownload.path + "/" + timestamp.str() + fpgaDownload.fileName; - std::ofstream file(image, std::ios_base::app | std::ios_base::out); - if (not std::filesystem::exists(image)) { - return FILE_CREATION_FAILED; - } - req.pos = fpgaDownload.startPosition; - while (req.pos < fpgaDownload.length) { - if (terminate) { - return RETURN_OK; - } - if (fpgaDownload.length - req.pos >= FpgaDownload::MAX_DATA) { - req.length = FpgaDownload::MAX_DATA; - } else { - req.length = fpgaDownload.length - req.pos; - } - arc_pack_downloadfpgaimage_action_req(&req, commandBuffer, &size); - result = sendAndRead(size, req.pos); - if (result != RETURN_OK) { - if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) { - uartComIF->flushUartRxBuffer(comCookie); - retries++; - continue; - } - file.close(); - return result; - } - result = checkFpgaActionReply(req.pos, req.length); - if (result != RETURN_OK) { - if (retries < CONFIG_MAX_DOWNLOAD_RETRIES) { - uartComIF->flushUartRxBuffer(comCookie); - retries++; - continue; - } - file.close(); - return result; - } - file.write(reinterpret_cast(datalinkLayer.getReply() + FpgaDownload::DATA_OFFSET), - req.length); - req.pos += req.length; - retries = 0; - } - file.close(); - return RETURN_OK; -} - -ReturnValue_t StrHelper::performFpgaUpload() { - ReturnValue_t result = RETURN_OK; - uint32_t commandSize = 0; - uint32_t bytesUploaded = 0; - uint32_t fileSize = 0; - struct UploadFPGAImageActionRequest req; - if (not std::filesystem::exists(fpgaUpload.uploadFile)) { - triggerEvent(STR_HELPER_FILE_NOT_EXISTS, static_cast(internalState)); - internalState = InternalState::IDLE; - return RETURN_FAILED; - } - std::ifstream file(flashWrite.fullname, std::ifstream::binary); - file.seekg(0, file.end); - fileSize = file.tellg(); - req.pos = 0; - while (bytesUploaded <= fileSize) { - if (terminate) { - return RETURN_OK; - } - if (fileSize - bytesUploaded > FpgaUpload::MAX_DATA) { - req.length = FpgaUpload::MAX_DATA; - } else { - req.length = fileSize - bytesUploaded; - } - file.seekg(bytesUploaded, file.beg); - file.read(reinterpret_cast(req.data), req.length); - arc_pack_uploadfpgaimage_action_req(&req, commandBuffer, &commandSize); - result = sendAndRead(commandSize, req.pos); - if (result != RETURN_OK) { - return RETURN_FAILED; - } - result = checkFpgaActionReply(req.pos, req.length); - if (result != RETURN_OK) { - return result; - } - bytesUploaded += req.length; - } - return RETURN_OK; -} - ReturnValue_t StrHelper::sendAndRead(size_t size, uint32_t parameter) { ReturnValue_t result = RETURN_OK; ReturnValue_t decResult = RETURN_OK; @@ -660,32 +553,6 @@ ReturnValue_t StrHelper::checkFlashActionReply(uint8_t region_, uint32_t address return RETURN_OK; } -ReturnValue_t StrHelper::checkFpgaActionReply(uint32_t expectedPosition, uint32_t expectedLength) { - ReturnValue_t result = RETURN_OK; - result = checkActionReply(); - if (result != RETURN_OK) { - return result; - } - const uint8_t* data = datalinkLayer.getReply() + ACTION_DATA_OFFSET; - uint32_t position; - size_t size = sizeof(position); - result = SerializeAdapter::deSerialize(&position, &data, &size, SerializeIF::Endianness::LITTLE); - if (result != RETURN_OK) { - sif::warning << "StrHelper::checkFpgaActionReply: Deserialization of position failed" - << std::endl; - return result; - } - uint32_t length; - size = sizeof(length); - result = SerializeAdapter::deSerialize(&length, &data, &size, SerializeIF::Endianness::LITTLE); - if (result != RETURN_OK) { - sif::warning << "StrHelper::checkFpgaActionReply: Deserialization of length failed" - << std::endl; - return result; - } - return result; -} - #ifdef XIPHOS_Q7S ReturnValue_t StrHelper::checkPath(std::string name) { if (name.substr(0, sizeof(SdCardManager::SD_0_MOUNT_POINT)) == @@ -718,15 +585,15 @@ void StrHelper::printProgress(uint32_t itemsTransferred, uint32_t fullNumItems) } ReturnValue_t StrHelper::unlockAndEraseRegions(uint32_t from, uint32_t to) { - using namespace startracker::region_secrets; + ReturnValue_t result = RETURN_OK; struct UnlockActionRequest unlockReq; struct EraseActionRequest eraseReq; uint32_t size = 0; for (uint8_t idx = from; idx <= to; idx++) { unlockReq.region = idx; - unlockReq.code = secret[idx]; - arc_pack_unlock_action_req(&req, commandBuffer, &size); - sendAndRead(size, req.region); + unlockReq.code = startracker::region_secrets::secret[idx]; + arc_pack_unlock_action_req(&unlockReq, commandBuffer, &size); + sendAndRead(size, unlockReq.region); result = checkActionReply(); if (result != RETURN_OK) { sif::warning << "StrHelper::unlockAndEraseRegions: Failed to unlock region with id " diff --git a/linux/devices/startracker/StrHelper.h b/linux/devices/startracker/StrHelper.h index 85ae0b49..e65ce782 100644 --- a/linux/devices/startracker/StrHelper.h +++ b/linux/devices/startracker/StrHelper.h @@ -24,11 +24,11 @@ extern "C" { /** * @brief Helper class for the star tracker handler to accelerate large data transfers. + * + * @author J. Meier */ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasReturnvaluesIF { - using namespace startracker; - public: static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::STR_HELPER; @@ -44,53 +44,43 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu static const Event FLASH_WRITE_SUCCESSFUL = MAKE_EVENT(4, severity::LOW); //! [EXPORT] : [COMMENT] Finished flash read procedure successfully static const Event FLASH_READ_SUCCESSFUL = MAKE_EVENT(5, severity::LOW); - //! [EXPORT] : [COMMENT] Flash write procedure failed - static const Event FLASH_WRITE_FAILED = MAKE_EVENT(6, severity::LOW); //! [EXPORT] : [COMMENT] Flash read procedure failed - static const Event FLASH_READ_FAILED = MAKE_EVENT(7, severity::LOW); - //! [EXPORT] : [COMMENT] Download of FPGA image successful - static const Event FPGA_DOWNLOAD_SUCCESSFUL = MAKE_EVENT(8, severity::LOW); - //! [EXPORT] : [COMMENT] Download of FPGA image failed - static const Event FPGA_DOWNLOAD_FAILED = MAKE_EVENT(9, severity::LOW); - //! [EXPORT] : [COMMENT] Upload of FPGA image successful - static const Event FPGA_UPLOAD_SUCCESSFUL = MAKE_EVENT(10, severity::LOW); - //! [EXPORT] : [COMMENT] Upload of FPGA image failed - static const Event FPGA_UPLOAD_FAILED = MAKE_EVENT(11, severity::LOW); + static const Event FLASH_READ_FAILED = MAKE_EVENT(6, severity::LOW); //! [EXPORT] : [COMMENT] Firmware update was successful - static const Event FIRMWARE_UPDATE_SUCCESSFUL = MAKE_EVENT(12, severity::LOW); + static const Event FIRMWARE_UPDATE_SUCCESSFUL = MAKE_EVENT(7, severity::LOW); //! [EXPORT] : [COMMENT] Firmware update failed - static const Event FIRMWARE_UPDATE_FAILED = MAKE_EVENT(13, severity::LOW); + static const Event FIRMWARE_UPDATE_FAILED = MAKE_EVENT(8, severity::LOW); //! [EXPORT] : [COMMENT] 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 - static const Event STR_HELPER_READING_REPLY_FAILED = MAKE_EVENT(14, severity::LOW); + static const Event STR_HELPER_READING_REPLY_FAILED = MAKE_EVENT(9, severity::LOW); //! [EXPORT] : [COMMENT] Unexpected stop of decoding sequence //! P1: Return code of failed communication interface read call //! P1: Upload/download position for which the read call failed - static const Event STR_HELPER_COM_ERROR = MAKE_EVENT(15, severity::LOW); + static const Event STR_HELPER_COM_ERROR = MAKE_EVENT(10, severity::LOW); //! [EXPORT] : [COMMENT] Star tracker did not send replies (maybe device is powered off) //! P1: Position of upload or download packet for which no reply was sent - static const Event STR_HELPER_NO_REPLY = MAKE_EVENT(16, severity::LOW); + static const Event STR_HELPER_NO_REPLY = MAKE_EVENT(11, severity::LOW); //! [EXPORT] : [COMMENT] 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 - static const Event STR_HELPER_DEC_ERROR = MAKE_EVENT(17, severity::LOW); + static const Event STR_HELPER_DEC_ERROR = MAKE_EVENT(12, severity::LOW); //! [EXPORT] : [COMMENT] Position mismatch //! P1: The expected position and thus the position for which the image upload/download failed - static const Event POSITION_MISMATCH = MAKE_EVENT(18, severity::LOW); + static const Event POSITION_MISMATCH = MAKE_EVENT(13, severity::LOW); //! [EXPORT] : [COMMENT] Specified file does not exist //! P1: Internal state of str helper - static const Event STR_HELPER_FILE_NOT_EXISTS = MAKE_EVENT(19, severity::LOW); + static const Event STR_HELPER_FILE_NOT_EXISTS = MAKE_EVENT(14, severity::LOW); //! [EXPORT] : [COMMENT] Sending packet to star tracker failed //! P1: Return code of communication interface sendMessage function //! P2: Position of upload/download packet, or address of flash write/read request for which //! sending failed - static const Event STR_HELPER_SENDING_PACKET_FAILED = MAKE_EVENT(20, severity::LOW); + static const Event STR_HELPER_SENDING_PACKET_FAILED = MAKE_EVENT(15, severity::LOW); //! [EXPORT] : [COMMENT] Communication interface requesting reply failed //! P1: Return code of failed request //! P1: Upload/download position, or address of flash write/read request for which transmission //! failed - static const Event STR_HELPER_REQUESTING_MSG_FAILED = MAKE_EVENT(21, severity::LOW); + static const Event STR_HELPER_REQUESTING_MSG_FAILED = MAKE_EVENT(16, severity::LOW); StrHelper(object_id_t objectId); virtual ~StrHelper(); @@ -134,23 +124,6 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu */ ReturnValue_t startFlashRead(std::string path, uint8_t region, uint32_t address, uint32_t length); - /** - * @brief Starts the download of the FPGA image - * - * @param path The path where the file with the downloaded data will be created - * @param startPosition Offset in fpga image to read from - * @param length Number of bytes to dwonload from the FPGA image - * - */ - ReturnValue_t startFpgaDownload(std::string path, uint32_t startPosition, uint32_t length); - - /** - * @brief Starts upload of new image to FPGA - * - * @param uploadFile Full name of file containing FPGA image data - */ - ReturnValue_t startFpgaUpload(std::string uploadFile); - /** * @brief Can be used to interrupt a running data transfer. */ @@ -166,11 +139,6 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu */ void setFlashReadFilename(std::string filename); - /** - * @brief Set download FPGA image name - */ - void setDownloadFpgaImage(std::string filename); - private: static const uint8_t INTERFACE_ID = CLASS_ID::STR_HELPER; @@ -196,35 +164,13 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu // Size of one image part which can be sent per action request static const size_t SIZE_IMAGE_PART = 1024; static constexpr uint32_t FIVE_PERCENT = 5; + static const uint32_t FLASH_REGION_SIZE = 0x20000; class ImageDownload { public: static const uint32_t LAST_POSITION = 4095; }; - class FpgaDownload { - public: - static const uint16_t MAX_DATA = 1024; - static const uint8_t DATA_OFFSET = 10; - // Start position of fpga image part to download - uint32_t startPosition = 0; - // Length of image part to download - uint32_t length = 0; - // Path where downloaded FPGA image will be stored - std::string path; - // Name of file containing downloaded FPGA image - std::string fileName = "fpgaimage.bin"; - }; - FpgaDownload fpgaDownload; - - class FpgaUpload { - public: - static const uint32_t MAX_DATA = 1024; - // Full name of file to upload - std::string uploadFile; - }; - FpgaUpload fpgaUpload; - static const uint32_t MAX_POLLS = 10000; static const uint8_t ACTION_DATA_OFFSET = 2; @@ -234,18 +180,14 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu static const uint8_t REGION_OFFSET = 2; static const uint8_t ADDRESS_OFFSET = 3; static const uint8_t LENGTH_OFFSET = 7; - static const size_t IMAGE_DATA_SIZE = 1024; - static const size_t MAX_FLASH_DATA = 1024; + static const size_t CHUNK_SIZE = 1024; static const size_t CONFIG_MAX_DOWNLOAD_RETRIES = 3; enum class InternalState { IDLE, UPLOAD_IMAGE, DOWNLOAD_IMAGE, - FLASH_WRITE, FLASH_READ, - DOWNLOAD_FPGA_IMAGE, - UPLOAD_FPGA_IMAGE, FIRMWARE_UPDATE }; @@ -275,8 +217,10 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu public: // File which contains data to write when executing the flash write command std::string fullname; - // Section where to write to - uint8_t section = 0; + // The first region to write to + uint8_t firstRegion = 0; + // Maximum region the flash write command is allowed to write to + uint8_t lastRegion = 0; // Will be set with the flash write command and specifies the start address where to write the // flash data to uint32_t address = 0; @@ -325,6 +269,13 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu */ ReturnValue_t performImageUpload(); + /** + * @brief Performs firmware update + * + * @return RETURN_OK if successful, otherwise error return value + */ + ReturnValue_t performFirmwareUpdate(); + /** * @brief Performs download of last taken image from the star tracker. * @@ -338,6 +289,8 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu /** * @brief Handles flash write procedure * + * @param ID of first region to write to + * * @return RETURN_OK if successful, otherwise RETURN_FAILED */ ReturnValue_t performFlashWrite(); @@ -348,18 +301,6 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu */ ReturnValue_t performFlashRead(); - /** - * @brief Performs the download of the FPGA image which requires to be slip over multiple - * action requests. - */ - ReturnValue_t performFpgaDownload(); - - /** - * @brief Performs upload of new FPGA image. Upload sequence split over multiple commands - * because one command can only transport 1024 bytes of image data. - */ - ReturnValue_t performFpgaUpload(); - /** * @brief Sends packet to the star tracker and reads reply by using the communication * interface @@ -395,14 +336,6 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu */ ReturnValue_t checkFlashActionReply(uint8_t region_, uint32_t address_, uint16_t length_); - /** - * @brief Checks the reply to the fpga download and upload request - * - * @param expectedPosition The expected position value in the reply - * @param expectedLength The expected length field in the reply - */ - ReturnValue_t checkFpgaActionReply(uint32_t expectedPosition, uint32_t expectedLength); - #ifdef XIPHOS_Q7S /** * @brief Checks if a path points to an sd card and whether the SD card is monuted. @@ -427,7 +360,7 @@ class StrHelper : public SystemObject, public ExecutableObjectIF, public HasRetu * @param to Last region in range to unlock * */ - ReturnValue_t unlockRegions(uint32_t from, uint32_t to); + ReturnValue_t unlockAndEraseRegions(uint32_t from, uint32_t to); }; #endif /* BSP_Q7S_DEVICES_STRHELPER_H_ */ diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 922892c8..117e264f 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 140 translations. + * @brief Auto-generated event translation file. Contains 137 translations. * @details - * Generated on: 2022-02-03 17:30:40 + * Generated on: 2022-02-13 15:31:27 */ #include "translateEvents.h" @@ -131,12 +131,9 @@ const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL"; const char *IMAGE_DOWNLOAD_SUCCESSFUL_STRING = "IMAGE_DOWNLOAD_SUCCESSFUL"; const char *FLASH_WRITE_SUCCESSFUL_STRING = "FLASH_WRITE_SUCCESSFUL"; const char *FLASH_READ_SUCCESSFUL_STRING = "FLASH_READ_SUCCESSFUL"; -const char *FLASH_WRITE_FAILED_STRING = "FLASH_WRITE_FAILED"; const char *FLASH_READ_FAILED_STRING = "FLASH_READ_FAILED"; -const char *FPGA_DOWNLOAD_SUCCESSFUL_STRING = "FPGA_DOWNLOAD_SUCCESSFUL"; -const char *FPGA_DOWNLOAD_FAILED_STRING = "FPGA_DOWNLOAD_FAILED"; -const char *FPGA_UPLOAD_SUCCESSFUL_STRING = "FPGA_UPLOAD_SUCCESSFUL"; -const char *FPGA_UPLOAD_FAILED_STRING = "FPGA_UPLOAD_FAILED"; +const char *FIRMWARE_UPDATE_SUCCESSFUL_STRING = "FIRMWARE_UPDATE_SUCCESSFUL"; +const char *FIRMWARE_UPDATE_FAILED_STRING = "FIRMWARE_UPDATE_FAILED"; const char *STR_HELPER_READING_REPLY_FAILED_STRING = "STR_HELPER_READING_REPLY_FAILED"; const char *STR_HELPER_COM_ERROR_STRING = "STR_HELPER_COM_ERROR"; const char *STR_HELPER_NO_REPLY_STRING = "STR_HELPER_NO_REPLY"; @@ -146,290 +143,284 @@ 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 *translateEvents(Event event) { - switch ((event & 0xffff)) { - case (2200): - return STORE_SEND_WRITE_FAILED_STRING; - case (2201): - return STORE_WRITE_FAILED_STRING; - case (2202): - return STORE_SEND_READ_FAILED_STRING; - case (2203): - return STORE_READ_FAILED_STRING; - case (2204): - return UNEXPECTED_MSG_STRING; - case (2205): - return STORING_FAILED_STRING; - case (2206): - return TM_DUMP_FAILED_STRING; - case (2207): - return STORE_INIT_FAILED_STRING; - case (2208): - return STORE_INIT_EMPTY_STRING; - case (2209): - return STORE_CONTENT_CORRUPTED_STRING; - case (2210): - return STORE_INITIALIZE_STRING; - case (2211): - return INIT_DONE_STRING; - case (2212): - return DUMP_FINISHED_STRING; - case (2213): - return DELETION_FINISHED_STRING; - case (2214): - return DELETION_FAILED_STRING; - case (2215): - return AUTO_CATALOGS_SENDING_FAILED_STRING; - case (2600): - return GET_DATA_FAILED_STRING; - case (2601): - return STORE_DATA_FAILED_STRING; - case (2800): - return DEVICE_BUILDING_COMMAND_FAILED_STRING; - case (2801): - return DEVICE_SENDING_COMMAND_FAILED_STRING; - case (2802): - return DEVICE_REQUESTING_REPLY_FAILED_STRING; - case (2803): - return DEVICE_READING_REPLY_FAILED_STRING; - case (2804): - return DEVICE_INTERPRETING_REPLY_FAILED_STRING; - case (2805): - return DEVICE_MISSED_REPLY_STRING; - case (2806): - return DEVICE_UNKNOWN_REPLY_STRING; - case (2807): - return DEVICE_UNREQUESTED_REPLY_STRING; - case (2808): - return INVALID_DEVICE_COMMAND_STRING; - case (2809): - return MONITORING_LIMIT_EXCEEDED_STRING; - case (2810): - return MONITORING_AMBIGUOUS_STRING; - case (2811): - return DEVICE_WANTS_HARD_REBOOT_STRING; - case (4201): - return FUSE_CURRENT_HIGH_STRING; - case (4202): - return FUSE_WENT_OFF_STRING; - case (4204): - return POWER_ABOVE_HIGH_LIMIT_STRING; - case (4205): - return POWER_BELOW_LOW_LIMIT_STRING; - case (4300): - return SWITCH_WENT_OFF_STRING; - case (5000): - return HEATER_ON_STRING; - case (5001): - return HEATER_OFF_STRING; - case (5002): - return HEATER_TIMEOUT_STRING; - case (5003): - return HEATER_STAYED_ON_STRING; - case (5004): - return HEATER_STAYED_OFF_STRING; - case (5200): - return TEMP_SENSOR_HIGH_STRING; - case (5201): - return TEMP_SENSOR_LOW_STRING; - case (5202): - return TEMP_SENSOR_GRADIENT_STRING; - case (5901): - return COMPONENT_TEMP_LOW_STRING; - case (5902): - return COMPONENT_TEMP_HIGH_STRING; - case (5903): - return COMPONENT_TEMP_OOL_LOW_STRING; - case (5904): - return COMPONENT_TEMP_OOL_HIGH_STRING; - case (5905): - return TEMP_NOT_IN_OP_RANGE_STRING; - case (7101): - return FDIR_CHANGED_STATE_STRING; - case (7102): - return FDIR_STARTS_RECOVERY_STRING; - case (7103): - return FDIR_TURNS_OFF_DEVICE_STRING; - case (7201): - return MONITOR_CHANGED_STATE_STRING; - case (7202): - return VALUE_BELOW_LOW_LIMIT_STRING; - case (7203): - return VALUE_ABOVE_HIGH_LIMIT_STRING; - case (7204): - return VALUE_OUT_OF_RANGE_STRING; - case (7400): - return CHANGING_MODE_STRING; - case (7401): - return MODE_INFO_STRING; - case (7402): - return FALLBACK_FAILED_STRING; - case (7403): - return MODE_TRANSITION_FAILED_STRING; - case (7404): - return CANT_KEEP_MODE_STRING; - case (7405): - return OBJECT_IN_INVALID_MODE_STRING; - case (7406): - return FORCING_MODE_STRING; - case (7407): - return MODE_CMD_REJECTED_STRING; - case (7506): - return HEALTH_INFO_STRING; - case (7507): - return CHILD_CHANGED_HEALTH_STRING; - case (7508): - return CHILD_PROBLEMS_STRING; - case (7509): - return OVERWRITING_HEALTH_STRING; - case (7510): - return TRYING_RECOVERY_STRING; - case (7511): - return RECOVERY_STEP_STRING; - case (7512): - return RECOVERY_DONE_STRING; - case (7900): - return RF_AVAILABLE_STRING; - case (7901): - return RF_LOST_STRING; - case (7902): - return BIT_LOCK_STRING; - case (7903): - return BIT_LOCK_LOST_STRING; - case (7905): - return FRAME_PROCESSING_FAILED_STRING; - case (8900): - return CLOCK_SET_STRING; - case (8901): - return CLOCK_SET_FAILURE_STRING; - case (9700): - return TEST_STRING; - case (10600): - return CHANGE_OF_SETUP_PARAMETER_STRING; - case (10900): - return GPIO_PULL_HIGH_FAILED_STRING; - case (10901): - return GPIO_PULL_LOW_FAILED_STRING; - case (10902): - return SWITCH_ALREADY_ON_STRING; - case (10903): - return SWITCH_ALREADY_OFF_STRING; - case (10904): - return MAIN_SWITCH_TIMEOUT_STRING; - case (11000): - return MAIN_SWITCH_ON_TIMEOUT_STRING; - case (11001): - return MAIN_SWITCH_OFF_TIMEOUT_STRING; - case (11002): - return DEPLOYMENT_FAILED_STRING; - case (11003): - return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; - case (11004): - return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; - case (11101): - return MEMORY_READ_RPT_CRC_FAILURE_STRING; - case (11102): - return ACK_FAILURE_STRING; - case (11103): - return EXE_FAILURE_STRING; - case (11104): - return CRC_FAILURE_EVENT_STRING; - case (11201): - return SELF_TEST_I2C_FAILURE_STRING; - case (11202): - return SELF_TEST_SPI_FAILURE_STRING; - case (11203): - return SELF_TEST_ADC_FAILURE_STRING; - case (11204): - return SELF_TEST_PWM_FAILURE_STRING; - case (11205): - return SELF_TEST_TC_FAILURE_STRING; - case (11206): - return SELF_TEST_MTM_RANGE_FAILURE_STRING; - case (11207): - return SELF_TEST_COIL_CURRENT_FAILURE_STRING; - case (11208): - return INVALID_ERROR_BYTE_STRING; - case (11301): - return ERROR_STATE_STRING; - case (11501): - return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; - case (11502): - return SUPV_ACK_FAILURE_STRING; - case (11503): - return SUPV_EXE_FAILURE_STRING; - case (11504): - return SUPV_CRC_FAILURE_EVENT_STRING; - case (11600): - return SANITIZATION_FAILED_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): - return MRAM_DUMP_FAILED_STRING; - case (11802): - return MRAM_DUMP_FINISHED_STRING; - case (11901): - return INVALID_TC_FRAME_STRING; - case (11902): - return INVALID_FAR_STRING; - case (11903): - return CARRIER_LOCK_STRING; - case (11904): - return BIT_LOCK_PDEC_STRING; - case (12000): - return IMAGE_UPLOAD_FAILED_STRING; - case (12001): - return IMAGE_DOWNLOAD_FAILED_STRING; - case (12002): - return IMAGE_UPLOAD_SUCCESSFUL_STRING; - case (12003): - return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; - case (12004): - return FLASH_WRITE_SUCCESSFUL_STRING; - case (12005): - return FLASH_READ_SUCCESSFUL_STRING; - case (12006): - return FLASH_WRITE_FAILED_STRING; - case (12007): - return FLASH_READ_FAILED_STRING; - case (12008): - return FPGA_DOWNLOAD_SUCCESSFUL_STRING; - case (12009): - return FPGA_DOWNLOAD_FAILED_STRING; - case (12010): - return FPGA_UPLOAD_SUCCESSFUL_STRING; - case (12011): - return FPGA_UPLOAD_FAILED_STRING; - case (12012): - return STR_HELPER_READING_REPLY_FAILED_STRING; - case (12013): - return STR_HELPER_COM_ERROR_STRING; - case (12014): - return STR_HELPER_NO_REPLY_STRING; - case (12015): - return STR_HELPER_DEC_ERROR_STRING; - case (12016): - return POSITION_MISMATCH_STRING; - case (12017): - return STR_HELPER_FILE_NOT_EXISTS_STRING; - case (12018): - return STR_HELPER_SENDING_PACKET_FAILED_STRING; - case (12019): - return STR_HELPER_REQUESTING_MSG_FAILED_STRING; - default: - return "UNKNOWN_EVENT"; - } - return 0; +const char * translateEvents(Event event) { + switch( (event & 0xffff) ) { + case(2200): + return STORE_SEND_WRITE_FAILED_STRING; + case(2201): + return STORE_WRITE_FAILED_STRING; + case(2202): + return STORE_SEND_READ_FAILED_STRING; + case(2203): + return STORE_READ_FAILED_STRING; + case(2204): + return UNEXPECTED_MSG_STRING; + case(2205): + return STORING_FAILED_STRING; + case(2206): + return TM_DUMP_FAILED_STRING; + case(2207): + return STORE_INIT_FAILED_STRING; + case(2208): + return STORE_INIT_EMPTY_STRING; + case(2209): + return STORE_CONTENT_CORRUPTED_STRING; + case(2210): + return STORE_INITIALIZE_STRING; + case(2211): + return INIT_DONE_STRING; + case(2212): + return DUMP_FINISHED_STRING; + case(2213): + return DELETION_FINISHED_STRING; + case(2214): + return DELETION_FAILED_STRING; + case(2215): + return AUTO_CATALOGS_SENDING_FAILED_STRING; + case(2600): + return GET_DATA_FAILED_STRING; + case(2601): + return STORE_DATA_FAILED_STRING; + case(2800): + return DEVICE_BUILDING_COMMAND_FAILED_STRING; + case(2801): + return DEVICE_SENDING_COMMAND_FAILED_STRING; + case(2802): + return DEVICE_REQUESTING_REPLY_FAILED_STRING; + case(2803): + return DEVICE_READING_REPLY_FAILED_STRING; + case(2804): + return DEVICE_INTERPRETING_REPLY_FAILED_STRING; + case(2805): + return DEVICE_MISSED_REPLY_STRING; + case(2806): + return DEVICE_UNKNOWN_REPLY_STRING; + case(2807): + return DEVICE_UNREQUESTED_REPLY_STRING; + case(2808): + return INVALID_DEVICE_COMMAND_STRING; + case(2809): + return MONITORING_LIMIT_EXCEEDED_STRING; + case(2810): + return MONITORING_AMBIGUOUS_STRING; + case(2811): + return DEVICE_WANTS_HARD_REBOOT_STRING; + case(4201): + return FUSE_CURRENT_HIGH_STRING; + case(4202): + return FUSE_WENT_OFF_STRING; + case(4204): + return POWER_ABOVE_HIGH_LIMIT_STRING; + case(4205): + return POWER_BELOW_LOW_LIMIT_STRING; + case(4300): + return SWITCH_WENT_OFF_STRING; + case(5000): + return HEATER_ON_STRING; + case(5001): + return HEATER_OFF_STRING; + case(5002): + return HEATER_TIMEOUT_STRING; + case(5003): + return HEATER_STAYED_ON_STRING; + case(5004): + return HEATER_STAYED_OFF_STRING; + case(5200): + return TEMP_SENSOR_HIGH_STRING; + case(5201): + return TEMP_SENSOR_LOW_STRING; + case(5202): + return TEMP_SENSOR_GRADIENT_STRING; + case(5901): + return COMPONENT_TEMP_LOW_STRING; + case(5902): + return COMPONENT_TEMP_HIGH_STRING; + case(5903): + return COMPONENT_TEMP_OOL_LOW_STRING; + case(5904): + return COMPONENT_TEMP_OOL_HIGH_STRING; + case(5905): + return TEMP_NOT_IN_OP_RANGE_STRING; + case(7101): + return FDIR_CHANGED_STATE_STRING; + case(7102): + return FDIR_STARTS_RECOVERY_STRING; + case(7103): + return FDIR_TURNS_OFF_DEVICE_STRING; + case(7201): + return MONITOR_CHANGED_STATE_STRING; + case(7202): + return VALUE_BELOW_LOW_LIMIT_STRING; + case(7203): + return VALUE_ABOVE_HIGH_LIMIT_STRING; + case(7204): + return VALUE_OUT_OF_RANGE_STRING; + case(7400): + return CHANGING_MODE_STRING; + case(7401): + return MODE_INFO_STRING; + case(7402): + return FALLBACK_FAILED_STRING; + case(7403): + return MODE_TRANSITION_FAILED_STRING; + case(7404): + return CANT_KEEP_MODE_STRING; + case(7405): + return OBJECT_IN_INVALID_MODE_STRING; + case(7406): + return FORCING_MODE_STRING; + case(7407): + return MODE_CMD_REJECTED_STRING; + case(7506): + return HEALTH_INFO_STRING; + case(7507): + return CHILD_CHANGED_HEALTH_STRING; + case(7508): + return CHILD_PROBLEMS_STRING; + case(7509): + return OVERWRITING_HEALTH_STRING; + case(7510): + return TRYING_RECOVERY_STRING; + case(7511): + return RECOVERY_STEP_STRING; + case(7512): + return RECOVERY_DONE_STRING; + case(7900): + return RF_AVAILABLE_STRING; + case(7901): + return RF_LOST_STRING; + case(7902): + return BIT_LOCK_STRING; + case(7903): + return BIT_LOCK_LOST_STRING; + case(7905): + return FRAME_PROCESSING_FAILED_STRING; + case(8900): + return CLOCK_SET_STRING; + case(8901): + return CLOCK_SET_FAILURE_STRING; + case(9700): + return TEST_STRING; + case(10600): + return CHANGE_OF_SETUP_PARAMETER_STRING; + case(10900): + return GPIO_PULL_HIGH_FAILED_STRING; + case(10901): + return GPIO_PULL_LOW_FAILED_STRING; + case(10902): + return SWITCH_ALREADY_ON_STRING; + case(10903): + return SWITCH_ALREADY_OFF_STRING; + case(10904): + return MAIN_SWITCH_TIMEOUT_STRING; + case(11000): + return MAIN_SWITCH_ON_TIMEOUT_STRING; + case(11001): + return MAIN_SWITCH_OFF_TIMEOUT_STRING; + case(11002): + return DEPLOYMENT_FAILED_STRING; + case(11003): + return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING; + case(11004): + return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING; + case(11101): + return MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11102): + return ACK_FAILURE_STRING; + case(11103): + return EXE_FAILURE_STRING; + case(11104): + return CRC_FAILURE_EVENT_STRING; + case(11201): + return SELF_TEST_I2C_FAILURE_STRING; + case(11202): + return SELF_TEST_SPI_FAILURE_STRING; + case(11203): + return SELF_TEST_ADC_FAILURE_STRING; + case(11204): + return SELF_TEST_PWM_FAILURE_STRING; + case(11205): + return SELF_TEST_TC_FAILURE_STRING; + case(11206): + return SELF_TEST_MTM_RANGE_FAILURE_STRING; + case(11207): + return SELF_TEST_COIL_CURRENT_FAILURE_STRING; + case(11208): + return INVALID_ERROR_BYTE_STRING; + case(11301): + return ERROR_STATE_STRING; + case(11501): + return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING; + case(11502): + return SUPV_ACK_FAILURE_STRING; + case(11503): + return SUPV_EXE_FAILURE_STRING; + case(11504): + return SUPV_CRC_FAILURE_EVENT_STRING; + case(11600): + return SANITIZATION_FAILED_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): + return MRAM_DUMP_FAILED_STRING; + case(11802): + return MRAM_DUMP_FINISHED_STRING; + case(11901): + return INVALID_TC_FRAME_STRING; + case(11902): + return INVALID_FAR_STRING; + case(11903): + return CARRIER_LOCK_STRING; + case(11904): + return BIT_LOCK_PDEC_STRING; + case(12000): + return IMAGE_UPLOAD_FAILED_STRING; + case(12001): + return IMAGE_DOWNLOAD_FAILED_STRING; + case(12002): + return IMAGE_UPLOAD_SUCCESSFUL_STRING; + case(12003): + return IMAGE_DOWNLOAD_SUCCESSFUL_STRING; + case(12004): + return FLASH_WRITE_SUCCESSFUL_STRING; + case(12005): + return FLASH_READ_SUCCESSFUL_STRING; + case(12006): + return FLASH_READ_FAILED_STRING; + case(12007): + return FIRMWARE_UPDATE_SUCCESSFUL_STRING; + case(12008): + return FIRMWARE_UPDATE_FAILED_STRING; + case(12009): + return STR_HELPER_READING_REPLY_FAILED_STRING; + case(12010): + return STR_HELPER_COM_ERROR_STRING; + case(12011): + return STR_HELPER_NO_REPLY_STRING; + case(12012): + return STR_HELPER_DEC_ERROR_STRING; + case(12013): + return POSITION_MISMATCH_STRING; + case(12014): + return STR_HELPER_FILE_NOT_EXISTS_STRING; + case(12015): + return STR_HELPER_SENDING_PACKET_FAILED_STRING; + case(12016): + return STR_HELPER_REQUESTING_MSG_FAILED_STRING; + default: + return "UNKNOWN_EVENT"; + } + return 0; } diff --git a/linux/fsfwconfig/events/translateEvents.h b/linux/fsfwconfig/events/translateEvents.h index 1b8a8831..bdabb21b 100644 --- a/linux/fsfwconfig/events/translateEvents.h +++ b/linux/fsfwconfig/events/translateEvents.h @@ -3,6 +3,6 @@ #include "fsfw/events/Event.h" -const char* translateEvents(Event event); +const char * translateEvents(Event event); #endif /* FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_ */ diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 08e6e126..2400e1d8 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -1,8 +1,8 @@ /** * @brief Auto-generated object translation file. * @details - * Contains 110 translations. - * Generated on: 2022-02-03 12:01:36 + * Contains 111 translations. + * Generated on: 2022-02-13 15:31:32 */ #include "translateObjects.h" @@ -109,6 +109,7 @@ const char *TIME_STAMPER_STRING = "TIME_STAMPER"; const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END"; const char *SPI_TEST_STRING = "SPI_TEST"; const char *UART_TEST_STRING = "UART_TEST"; +const char *I2C_TEST_STRING = "I2C_TEST"; const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER"; const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE"; const char *LIBGPIOD_TEST_STRING = "LIBGPIOD_TEST"; @@ -117,230 +118,232 @@ const char *TM_FUNNEL_STRING = "TM_FUNNEL"; const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE"; const char *NO_OBJECT_STRING = "NO_OBJECT"; -const char *translateObject(object_id_t object) { - switch ((object & 0xFFFFFFFF)) { - case 0x00005060: - return P60DOCK_TEST_TASK_STRING; - case 0x43000003: - return CORE_CONTROLLER_STRING; - case 0x43100002: - return ACS_CONTROLLER_STRING; - case 0x43400001: - return THERMAL_CONTROLLER_STRING; - case 0x44120006: - return MGM_0_LIS3_HANDLER_STRING; - case 0x44120010: - return GYRO_0_ADIS_HANDLER_STRING; - case 0x44120032: - return SUS_1_STRING; - case 0x44120033: - return SUS_2_STRING; - case 0x44120034: - return SUS_3_STRING; - case 0x44120035: - return SUS_4_STRING; - case 0x44120036: - return SUS_5_STRING; - case 0x44120037: - return SUS_6_STRING; - case 0x44120038: - return SUS_7_STRING; - case 0x44120039: - return SUS_8_STRING; - case 0x44120040: - return SUS_9_STRING; - case 0x44120041: - return SUS_10_STRING; - case 0x44120042: - return SUS_11_STRING; - case 0x44120043: - return SUS_12_STRING; - case 0x44120044: - return SUS_13_STRING; - case 0x44120047: - return RW1_STRING; - case 0x44120107: - return MGM_1_RM3100_HANDLER_STRING; - case 0x44120111: - return GYRO_1_L3G_HANDLER_STRING; - case 0x44120148: - return RW2_STRING; - case 0x44120208: - return MGM_2_LIS3_HANDLER_STRING; - case 0x44120212: - return GYRO_2_ADIS_HANDLER_STRING; - case 0x44120249: - return RW3_STRING; - case 0x44120309: - return MGM_3_RM3100_HANDLER_STRING; - case 0x44120313: - return GYRO_3_L3G_HANDLER_STRING; - case 0x44120350: - return RW4_STRING; - case 0x44130001: - return STAR_TRACKER_STRING; - case 0x44130045: - return GPS_CONTROLLER_STRING; - case 0x44140014: - return IMTQ_HANDLER_STRING; - case 0x442000A1: - return PCDU_HANDLER_STRING; - case 0x44250000: - return P60DOCK_HANDLER_STRING; - case 0x44250001: - return PDU1_HANDLER_STRING; - case 0x44250002: - return PDU2_HANDLER_STRING; - case 0x44250003: - return ACU_HANDLER_STRING; - case 0x44260000: - return BPX_BATT_HANDLER_STRING; - case 0x443200A5: - return RAD_SENSOR_STRING; - case 0x44330000: - return PLOC_UPDATER_STRING; - case 0x44330001: - return PLOC_MEMORY_DUMPER_STRING; - case 0x44330002: - return STR_HELPER_STRING; - case 0x44330015: - return PLOC_MPSOC_HANDLER_STRING; - case 0x44330016: - return PLOC_SUPERVISOR_HANDLER_STRING; - case 0x444100A2: - return SOLAR_ARRAY_DEPL_HANDLER_STRING; - case 0x444100A4: - return HEATER_HANDLER_STRING; - case 0x44420004: - return TMP1075_HANDLER_1_STRING; - case 0x44420005: - return TMP1075_HANDLER_2_STRING; - case 0x44420016: - return RTD_IC_3_STRING; - case 0x44420017: - return RTD_IC_4_STRING; - case 0x44420018: - return RTD_IC_5_STRING; - case 0x44420019: - return RTD_IC_6_STRING; - case 0x44420020: - return RTD_IC_7_STRING; - case 0x44420021: - return RTD_IC_8_STRING; - case 0x44420022: - return RTD_IC_9_STRING; - case 0x44420023: - return RTD_IC_10_STRING; - case 0x44420024: - return RTD_IC_11_STRING; - case 0x44420025: - return RTD_IC_12_STRING; - case 0x44420026: - return RTD_IC_13_STRING; - case 0x44420027: - return RTD_IC_14_STRING; - case 0x44420028: - return RTD_IC_15_STRING; - case 0x44420029: - return RTD_IC_16_STRING; - case 0x44420030: - return RTD_IC_17_STRING; - case 0x44420031: - return RTD_IC_18_STRING; - case 0x445300A3: - return SYRLINKS_HK_HANDLER_STRING; - case 0x49000000: - return ARDUINO_COM_IF_STRING; - case 0x49010005: - return GPIO_IF_STRING; - case 0x49020004: - return SPI_COM_IF_STRING; - case 0x49030003: - return UART_COM_IF_STRING; - case 0x49040002: - return I2C_COM_IF_STRING; - case 0x49050001: - return CSP_COM_IF_STRING; - case 0x50000100: - return CCSDS_PACKET_DISTRIBUTOR_STRING; - case 0x50000200: - return PUS_PACKET_DISTRIBUTOR_STRING; - case 0x50000300: - return TMTC_BRIDGE_STRING; - case 0x50000400: - return TMTC_POLLING_TASK_STRING; - case 0x50000500: - return FILE_SYSTEM_HANDLER_STRING; - case 0x50000600: - return PTME_STRING; - case 0x50000700: - return PDEC_HANDLER_STRING; - case 0x50000800: - return CCSDS_HANDLER_STRING; - case 0x51000500: - return PUS_SERVICE_6_STRING; - case 0x53000000: - return FSFW_OBJECTS_START_STRING; - case 0x53000001: - return PUS_SERVICE_1_VERIFICATION_STRING; - case 0x53000002: - return PUS_SERVICE_2_DEVICE_ACCESS_STRING; - case 0x53000003: - return PUS_SERVICE_3_HOUSEKEEPING_STRING; - case 0x53000005: - return PUS_SERVICE_5_EVENT_REPORTING_STRING; - case 0x53000008: - return PUS_SERVICE_8_FUNCTION_MGMT_STRING; - case 0x53000009: - return PUS_SERVICE_9_TIME_MGMT_STRING; - case 0x53000017: - return PUS_SERVICE_17_TEST_STRING; - case 0x53000020: - return PUS_SERVICE_20_PARAMETERS_STRING; - case 0x53000200: - return PUS_SERVICE_200_MODE_MGMT_STRING; - case 0x53000201: - return PUS_SERVICE_201_HEALTH_STRING; - case 0x53001000: - return CFDP_PACKET_DISTRIBUTOR_STRING; - case 0x53010000: - return HEALTH_TABLE_STRING; - case 0x53010100: - return MODE_STORE_STRING; - case 0x53030000: - return EVENT_MANAGER_STRING; - case 0x53040000: - return INTERNAL_ERROR_REPORTER_STRING; - case 0x534f0100: - return TC_STORE_STRING; - case 0x534f0200: - return TM_STORE_STRING; - case 0x534f0300: - return IPC_STORE_STRING; - case 0x53500010: - return TIME_STAMPER_STRING; - case 0x53ffffff: - return FSFW_OBJECTS_END_STRING; - case 0x54000010: - return SPI_TEST_STRING; - case 0x54000020: - return UART_TEST_STRING; - case 0x5400AFFE: - return DUMMY_HANDLER_STRING; - case 0x5400CAFE: - return DUMMY_INTERFACE_STRING; - case 0x54123456: - return LIBGPIOD_TEST_STRING; - case 0x54694269: - return TEST_TASK_STRING; - case 0x73000100: - return TM_FUNNEL_STRING; - case 0x73500000: - return CCSDS_IP_CORE_BRIDGE_STRING; - case 0xFFFFFFFF: - return NO_OBJECT_STRING; - default: - return "UNKNOWN_OBJECT"; - } - return 0; +const char* translateObject(object_id_t object) { + switch( (object & 0xFFFFFFFF) ) { + case 0x00005060: + return P60DOCK_TEST_TASK_STRING; + case 0x43000003: + return CORE_CONTROLLER_STRING; + case 0x43100002: + return ACS_CONTROLLER_STRING; + case 0x43400001: + return THERMAL_CONTROLLER_STRING; + case 0x44120006: + return MGM_0_LIS3_HANDLER_STRING; + case 0x44120010: + return GYRO_0_ADIS_HANDLER_STRING; + case 0x44120032: + return SUS_1_STRING; + case 0x44120033: + return SUS_2_STRING; + case 0x44120034: + return SUS_3_STRING; + case 0x44120035: + return SUS_4_STRING; + case 0x44120036: + return SUS_5_STRING; + case 0x44120037: + return SUS_6_STRING; + case 0x44120038: + return SUS_7_STRING; + case 0x44120039: + return SUS_8_STRING; + case 0x44120040: + return SUS_9_STRING; + case 0x44120041: + return SUS_10_STRING; + case 0x44120042: + return SUS_11_STRING; + case 0x44120043: + return SUS_12_STRING; + case 0x44120044: + return SUS_13_STRING; + case 0x44120047: + return RW1_STRING; + case 0x44120107: + return MGM_1_RM3100_HANDLER_STRING; + case 0x44120111: + return GYRO_1_L3G_HANDLER_STRING; + case 0x44120148: + return RW2_STRING; + case 0x44120208: + return MGM_2_LIS3_HANDLER_STRING; + case 0x44120212: + return GYRO_2_ADIS_HANDLER_STRING; + case 0x44120249: + return RW3_STRING; + case 0x44120309: + return MGM_3_RM3100_HANDLER_STRING; + case 0x44120313: + return GYRO_3_L3G_HANDLER_STRING; + case 0x44120350: + return RW4_STRING; + case 0x44130001: + return STAR_TRACKER_STRING; + case 0x44130045: + return GPS_CONTROLLER_STRING; + case 0x44140014: + return IMTQ_HANDLER_STRING; + case 0x442000A1: + return PCDU_HANDLER_STRING; + case 0x44250000: + return P60DOCK_HANDLER_STRING; + case 0x44250001: + return PDU1_HANDLER_STRING; + case 0x44250002: + return PDU2_HANDLER_STRING; + case 0x44250003: + return ACU_HANDLER_STRING; + case 0x44260000: + return BPX_BATT_HANDLER_STRING; + case 0x443200A5: + return RAD_SENSOR_STRING; + case 0x44330000: + return PLOC_UPDATER_STRING; + case 0x44330001: + return PLOC_MEMORY_DUMPER_STRING; + case 0x44330002: + return STR_HELPER_STRING; + case 0x44330015: + return PLOC_MPSOC_HANDLER_STRING; + case 0x44330016: + return PLOC_SUPERVISOR_HANDLER_STRING; + case 0x444100A2: + return SOLAR_ARRAY_DEPL_HANDLER_STRING; + case 0x444100A4: + return HEATER_HANDLER_STRING; + case 0x44420004: + return TMP1075_HANDLER_1_STRING; + case 0x44420005: + return TMP1075_HANDLER_2_STRING; + case 0x44420016: + return RTD_IC_3_STRING; + case 0x44420017: + return RTD_IC_4_STRING; + case 0x44420018: + return RTD_IC_5_STRING; + case 0x44420019: + return RTD_IC_6_STRING; + case 0x44420020: + return RTD_IC_7_STRING; + case 0x44420021: + return RTD_IC_8_STRING; + case 0x44420022: + return RTD_IC_9_STRING; + case 0x44420023: + return RTD_IC_10_STRING; + case 0x44420024: + return RTD_IC_11_STRING; + case 0x44420025: + return RTD_IC_12_STRING; + case 0x44420026: + return RTD_IC_13_STRING; + case 0x44420027: + return RTD_IC_14_STRING; + case 0x44420028: + return RTD_IC_15_STRING; + case 0x44420029: + return RTD_IC_16_STRING; + case 0x44420030: + return RTD_IC_17_STRING; + case 0x44420031: + return RTD_IC_18_STRING; + case 0x445300A3: + return SYRLINKS_HK_HANDLER_STRING; + case 0x49000000: + return ARDUINO_COM_IF_STRING; + case 0x49010005: + return GPIO_IF_STRING; + case 0x49020004: + return SPI_COM_IF_STRING; + case 0x49030003: + return UART_COM_IF_STRING; + case 0x49040002: + return I2C_COM_IF_STRING; + case 0x49050001: + return CSP_COM_IF_STRING; + case 0x50000100: + return CCSDS_PACKET_DISTRIBUTOR_STRING; + case 0x50000200: + return PUS_PACKET_DISTRIBUTOR_STRING; + case 0x50000300: + return TMTC_BRIDGE_STRING; + case 0x50000400: + return TMTC_POLLING_TASK_STRING; + case 0x50000500: + return FILE_SYSTEM_HANDLER_STRING; + case 0x50000600: + return PTME_STRING; + case 0x50000700: + return PDEC_HANDLER_STRING; + case 0x50000800: + return CCSDS_HANDLER_STRING; + case 0x51000500: + return PUS_SERVICE_6_STRING; + case 0x53000000: + return FSFW_OBJECTS_START_STRING; + case 0x53000001: + return PUS_SERVICE_1_VERIFICATION_STRING; + case 0x53000002: + return PUS_SERVICE_2_DEVICE_ACCESS_STRING; + case 0x53000003: + return PUS_SERVICE_3_HOUSEKEEPING_STRING; + case 0x53000005: + return PUS_SERVICE_5_EVENT_REPORTING_STRING; + case 0x53000008: + return PUS_SERVICE_8_FUNCTION_MGMT_STRING; + case 0x53000009: + return PUS_SERVICE_9_TIME_MGMT_STRING; + case 0x53000017: + return PUS_SERVICE_17_TEST_STRING; + case 0x53000020: + return PUS_SERVICE_20_PARAMETERS_STRING; + case 0x53000200: + return PUS_SERVICE_200_MODE_MGMT_STRING; + case 0x53000201: + return PUS_SERVICE_201_HEALTH_STRING; + case 0x53001000: + return CFDP_PACKET_DISTRIBUTOR_STRING; + case 0x53010000: + return HEALTH_TABLE_STRING; + case 0x53010100: + return MODE_STORE_STRING; + case 0x53030000: + return EVENT_MANAGER_STRING; + case 0x53040000: + return INTERNAL_ERROR_REPORTER_STRING; + case 0x534f0100: + return TC_STORE_STRING; + case 0x534f0200: + return TM_STORE_STRING; + case 0x534f0300: + return IPC_STORE_STRING; + case 0x53500010: + return TIME_STAMPER_STRING; + case 0x53ffffff: + return FSFW_OBJECTS_END_STRING; + case 0x54000010: + return SPI_TEST_STRING; + case 0x54000020: + return UART_TEST_STRING; + case 0x54000030: + return I2C_TEST_STRING; + case 0x5400AFFE: + return DUMMY_HANDLER_STRING; + case 0x5400CAFE: + return DUMMY_INTERFACE_STRING; + case 0x54123456: + return LIBGPIOD_TEST_STRING; + case 0x54694269: + return TEST_TASK_STRING; + case 0x73000100: + return TM_FUNNEL_STRING; + case 0x73500000: + return CCSDS_IP_CORE_BRIDGE_STRING; + case 0xFFFFFFFF: + return NO_OBJECT_STRING; + default: + return "UNKNOWN_OBJECT"; + } + return 0; } diff --git a/tmtc b/tmtc index 5d8b9aac..f1542990 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 5d8b9aac1fea707015bd991b865da7f3405859e8 +Subproject commit f15429906931de519bda712efd8025ae7de12248