Merge remote-tracking branch 'origin/main' into thermal_controller

This commit is contained in:
Robin Müller 2023-03-31 19:17:41 +02:00
commit ce5ae8a713
16 changed files with 167 additions and 79 deletions

View File

@ -10,6 +10,27 @@ list yields a list of all related PRs for each release.
# [unreleased]
# [v2.20.0] 2023-03-28
## Changed
- COM `Submode` enum moved from subsystem module to separate definitions module and renamed
to `Mode`. Added re-imports with the name `ComMode` in the subsystem and syrlinks module.
- Convert various enums to proper `IntEnum`s
- Updates for some enumerations.
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/178
## Fixed
- Eb to N0 calculation: Improve robustness against division by zero.
- Some fixes for PCDU commands: Wrongfully packed command to switch devices off instead of on.
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/180.
## Added
- Added `PcduSwitches` enum.
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/179
# [v2.19.4] 2023-03-24
## Fixed

View File

@ -1,12 +1,12 @@
__version__ = "2.19.4"
__version__ = "2.20.0"
import logging
from pathlib import Path
SW_NAME = "eive-tmtc"
VERSION_MAJOR = 2
VERSION_MINOR = 19
VERSION_REVISION = 4
VERSION_MINOR = 20
VERSION_REVISION = 0
EIVE_TMTC_ROOT = Path(__file__).parent
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent

View File

@ -203,6 +203,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
12801;0x3201;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/acs/AcsBoardAssembly.h
12802;0x3202;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/AcsBoardAssembly.h
12803;0x3203;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/AcsBoardAssembly.h
12804;0x3204;DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY;MEDIUM;This is triggered when the assembly would have normally switched the board side, but the GPS device of the other side was marked faulty. P1: Current submode.;mission/system/acs/AcsBoardAssembly.h
12900;0x3264;TRANSITION_OTHER_SIDE_FAILED;HIGH;No description;mission/system/acs/SusAssembly.h
12901;0x3265;NOT_ENOUGH_DEVICES_DUAL_MODE;HIGH;No description;mission/system/acs/SusAssembly.h
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h
@ -271,9 +272,13 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/persistentTmStoreDefs.h
14301;0x37dd;FILE_TOO_LARGE;LOW;File in store too large. P1: Detected file size P2: Allowed file size;mission/persistentTmStoreDefs.h
14302;0x37de;BUSY_DUMPING_EVENT;INFO;No description;mission/persistentTmStoreDefs.h
14303;0x37df;DUMP_WAS_CANCELLED;LOW;Dump was cancelled. P1: Object ID of store.;mission/persistentTmStoreDefs.h
14305;0x37e1;DUMP_OK_STORE_DONE;INFO;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14306;0x37e2;DUMP_NOK_STORE_DONE;INFO;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14307;0x37e3;DUMP_MISC_STORE_DONE;INFO;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14308;0x37e4;DUMP_HK_STORE_DONE;INFO;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14309;0x37e5;DUMP_CFDP_STORE_DONE;INFO;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14310;0x37e6;DUMP_OK_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14311;0x37e7;DUMP_NOK_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14312;0x37e8;DUMP_MISC_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14313;0x37e9;DUMP_HK_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h
14314;0x37ea;DUMP_CFDP_CANCELLED;LOW;P1: Number of dumped packets. P2: Total dumped bytes.;mission/persistentTmStoreDefs.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
203 12801 0x3201 NOT_ENOUGH_DEVICES_DUAL_MODE HIGH No description mission/system/acs/AcsBoardAssembly.h
204 12802 0x3202 POWER_STATE_MACHINE_TIMEOUT MEDIUM No description mission/system/acs/AcsBoardAssembly.h
205 12803 0x3203 SIDE_SWITCH_TRANSITION_NOT_ALLOWED LOW Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination mission/system/acs/AcsBoardAssembly.h
206 12804 0x3204 DIRECT_TRANSITION_TO_DUAL_OTHER_GPS_FAULTY MEDIUM This is triggered when the assembly would have normally switched the board side, but the GPS device of the other side was marked faulty. P1: Current submode. mission/system/acs/AcsBoardAssembly.h
207 12900 0x3264 TRANSITION_OTHER_SIDE_FAILED HIGH No description mission/system/acs/SusAssembly.h
208 12901 0x3265 NOT_ENOUGH_DEVICES_DUAL_MODE HIGH No description mission/system/acs/SusAssembly.h
209 12902 0x3266 POWER_STATE_MACHINE_TIMEOUT MEDIUM No description mission/system/acs/SusAssembly.h
272 14300 0x37dc POSSIBLE_FILE_CORRUPTION LOW P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp. mission/persistentTmStoreDefs.h
273 14301 0x37dd FILE_TOO_LARGE LOW File in store too large. P1: Detected file size P2: Allowed file size mission/persistentTmStoreDefs.h
274 14302 0x37de BUSY_DUMPING_EVENT INFO No description mission/persistentTmStoreDefs.h
14303 0x37df DUMP_WAS_CANCELLED LOW Dump was cancelled. P1: Object ID of store. mission/persistentTmStoreDefs.h
275 14305 0x37e1 DUMP_OK_STORE_DONE INFO P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
276 14306 0x37e2 DUMP_NOK_STORE_DONE INFO P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
277 14307 0x37e3 DUMP_MISC_STORE_DONE INFO P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
278 14308 0x37e4 DUMP_HK_STORE_DONE INFO P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
279 14309 0x37e5 DUMP_CFDP_STORE_DONE INFO P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
280 14310 0x37e6 DUMP_OK_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
281 14311 0x37e7 DUMP_NOK_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
282 14312 0x37e8 DUMP_MISC_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
283 14313 0x37e9 DUMP_HK_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h
284 14314 0x37ea DUMP_CFDP_CANCELLED LOW P1: Number of dumped packets. P2: Total dumped bytes. mission/persistentTmStoreDefs.h

View File

@ -49,6 +49,9 @@ GYRO_1_L3G_HANDLER_ID = bytes([0x44, 0x12, 0x01, 0x11])
GYRO_2_ADIS_HANDLER_ID = bytes([0x44, 0x12, 0x02, 0x12])
GYRO_3_L3G_HANDLER_ID = bytes([0x44, 0x12, 0x03, 0x13])
GPS_CONTROLLER = bytes([0x44, 0x13, 0x00, 0x45])
GPS_0_HEALTH_DEV = bytes([0x44, 0x13, 0x00, 0x46])
GPS_1_HEALTH_DEV = bytes([0x44, 0x13, 0x00, 0x47])
RW1_ID = bytes([0x44, 0x12, 0x00, 0x47])
RW2_ID = bytes([0x44, 0x12, 0x01, 0x48])
RW3_ID = bytes([0x44, 0x12, 0x02, 0x49])

View File

@ -29,6 +29,8 @@
0x44120350;RW4
0x44130001;STAR_TRACKER
0x44130045;GPS_CONTROLLER
0x44130046;GPS_0_HEALTH_DEV
0x44130047;GPS_1_HEALTH_DEV
0x44140013;IMTQ_POLLING
0x44140014;IMTQ_HANDLER
0x442000A1;PCDU_HANDLER

1 0x00005060 P60DOCK_TEST_TASK
29 0x44120350 RW4
30 0x44130001 STAR_TRACKER
31 0x44130045 GPS_CONTROLLER
32 0x44130046 GPS_0_HEALTH_DEV
33 0x44130047 GPS_1_HEALTH_DEV
34 0x44140013 IMTQ_POLLING
35 0x44140014 IMTQ_HANDLER
36 0x442000A1 PCDU_HANDLER

View File

@ -291,8 +291,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x2e02;HPA_InvalidDomainId;No description;2;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
0x2e03;HPA_InvalidValue;No description;3;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
0x2e05;HPA_ReadOnly;No description;5;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
0x2f01;ASC_NoPacketFound;No description;1;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/DleParser.h
0x2f02;ASC_PossiblePacketLoss;No description;2;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/DleParser.h
0x2f01;ASC_TooLongForTargetType;No description;1;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
0x2f02;ASC_InvalidCharacters;No description;2;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
0x2f03;ASC_BufferTooSmall;No description;3;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
0x3001;POS_InPowerTransition;No description;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
0x3002;POS_SwitchStateMismatch;No description;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
@ -371,8 +371,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
@ -402,9 +402,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
0x4500;HSPI_HalTimeoutRetval;No description;0;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
0x4501;HSPI_HalBusyRetval;No description;1;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
0x4502;HSPI_HalErrorRetval;No description;2;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
@ -415,12 +415,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x4805;HGIO_GpioDuplicateDetected;No description;5;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
0x4806;HGIO_GpioInitFailed;No description;6;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
0x4807;HGIO_GpioGetValueFailed;No description;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
0x4aa0;MGMLIS3_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;MGM_LIS3MDL;mission/acs/RwHandler.h
0x4aa1;MGMLIS3_InvalidRampTime;Action Message with invalid ramp time was received.;161;MGM_LIS3MDL;mission/acs/RwHandler.h
0x4aa2;MGMLIS3_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;MGM_LIS3MDL;mission/acs/RwHandler.h
0x4aa3;MGMLIS3_ExecutionFailed;Command execution failed;163;MGM_LIS3MDL;mission/acs/RwHandler.h
0x4aa4;MGMLIS3_CrcError;Reaction wheel reply has invalid crc;164;MGM_LIS3MDL;mission/acs/RwHandler.h
0x4aa5;MGMLIS3_ValueNotRead;No description;165;MGM_LIS3MDL;mission/acs/RwHandler.h
0x4c00;SPPA_NoPacketFound;No description;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
0x4c01;SPPA_SplitPacket;No description;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
0x4fa1;HEATER_CommandNotSupported;No description;161;HEATER_HANDLER;mission/tcs/HeaterHandler.h
@ -492,12 +486,16 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x57a1;PLSPVhLP_ProcessTerminated;Process has been terminated by command;161;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h
0x57a2;PLSPVhLP_PathNotExists;Received command with invalid pathname;162;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h
0x57a3;PLSPVhLP_EventBufferReplyInvalidApid;Expected event buffer TM but received space packet with other APID;163;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h
0x58a0;SUSS_ErrorUnlockMutex;No description;160;SUS_HANDLER;mission/acs/archive/LegacySusHandler.h
0x58a1;SUSS_ErrorLockMutex;No description;161;SUS_HANDLER;mission/acs/archive/LegacySusHandler.h
0x58a0;SUSS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SUS_HANDLER;mission/acs/RwHandler.h
0x58a1;SUSS_InvalidRampTime;Action Message with invalid ramp time was received.;161;SUS_HANDLER;mission/acs/RwHandler.h
0x58a2;SUSS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SUS_HANDLER;mission/acs/RwHandler.h
0x58a3;SUSS_ExecutionFailed;Command execution failed;163;SUS_HANDLER;mission/acs/RwHandler.h
0x58a4;SUSS_CrcError;Reaction wheel reply has invalid crc;164;SUS_HANDLER;mission/acs/RwHandler.h
0x58a5;SUSS_ValueNotRead;No description;165;SUS_HANDLER;mission/acs/RwHandler.h
0x5900;IPCI_NoReplyAvailable;No description;0;CCSDS_IP_CORE_BRIDGE;linux/acs/ImtqPollingTask.h
0x5901;IPCI_NoPacketFound;No description;1;CCSDS_IP_CORE_BRIDGE;linux/com/SyrlinksComHandler.h
0x59a0;IPCI_PapbBusy;No description;160;CCSDS_IP_CORE_BRIDGE;linux/ipcore/PapbVcInterface.h
0x5aa0;PTME_UnknownVcId;No description;160;PTME;linux/ipcore/Ptme.h
0x5c00;STRHLP_NoReplyAvailable;No description;0;STR_HELPER;linux/acs/ImtqPollingTask.h
0x5c01;STRHLP_SdNotMounted;SD card specified in path string not mounted;1;STR_HELPER;linux/acs/StrComHandler.h
0x5c02;STRHLP_FileNotExists;Specified file does not exist on filesystem;2;STR_HELPER;linux/acs/StrComHandler.h
0x5c03;STRHLP_PathNotExists;Specified path does not exist;3;STR_HELPER;linux/acs/StrComHandler.h
@ -515,7 +513,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x5d03;GOMS_InvalidParamSize;No description;3;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h
0x5d04;GOMS_InvalidPayloadSize;No description;4;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h
0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h
0x5e02;PLMEMDUMP_InvalidCrc;No description;2;PLOC_MEMORY_DUMPER;linux/payload/ScexHelper.h
0x5ea0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h
0x5ea1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/payload/PlocMemoryDumper.h
0x5fa0;PDEC_AbandonedCltuRetval;No description;160;PDEC_HANDLER;linux/ipcore/PdecHandler.h
@ -544,6 +541,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NvmParameterBase.h
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
0x6502;PLMPHLP_InvalidCrc;No description;2;PLOC_MPSOC_HELPER;linux/payload/ScexHelper.h
0x65a0;PLMPHLP_FileClosedAccidentally;File accidentally close;160;PLOC_MPSOC_HELPER;linux/payload/PlocMpsocHelper.h
0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h
0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h

1 Full ID (hex) Name Description Unique ID Subsytem Name File Path
291 0x2e02 HPA_InvalidDomainId No description 2 HAS_PARAMETERS_IF fsfw/src/fsfw/parameters/HasParametersIF.h
292 0x2e03 HPA_InvalidValue No description 3 HAS_PARAMETERS_IF fsfw/src/fsfw/parameters/HasParametersIF.h
293 0x2e05 HPA_ReadOnly No description 5 HAS_PARAMETERS_IF fsfw/src/fsfw/parameters/HasParametersIF.h
294 0x2f01 ASC_NoPacketFound ASC_TooLongForTargetType No description 1 ASCII_CONVERTER fsfw/src/fsfw/globalfunctions/DleParser.h fsfw/src/fsfw/globalfunctions/AsciiConverter.h
295 0x2f02 ASC_PossiblePacketLoss ASC_InvalidCharacters No description 2 ASCII_CONVERTER fsfw/src/fsfw/globalfunctions/DleParser.h fsfw/src/fsfw/globalfunctions/AsciiConverter.h
296 0x2f03 ASC_BufferTooSmall No description 3 ASCII_CONVERTER fsfw/src/fsfw/globalfunctions/AsciiConverter.h
297 0x3001 POS_InPowerTransition No description 1 POWER_SWITCHER fsfw/src/fsfw/power/PowerSwitcher.h
298 0x3002 POS_SwitchStateMismatch No description 2 POWER_SWITCHER fsfw/src/fsfw/power/PowerSwitcher.h
371 0x3e03 HKM_PeriodicHelperInvalid No description 3 HOUSEKEEPING_MANAGER fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
372 0x3e04 HKM_PoolobjectNotFound No description 4 HOUSEKEEPING_MANAGER fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
373 0x3e05 HKM_DatasetNotFound No description 5 HOUSEKEEPING_MANAGER fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
374 0x3f01 DLEE_StreamTooShort DLEE_NoPacketFound No description 1 DLE_ENCODER fsfw/src/fsfw/globalfunctions/DleEncoder.h fsfw/src/fsfw/globalfunctions/DleParser.h
375 0x3f02 DLEE_DecodingError DLEE_PossiblePacketLoss No description 2 DLE_ENCODER fsfw/src/fsfw/globalfunctions/DleEncoder.h fsfw/src/fsfw/globalfunctions/DleParser.h
376 0x4201 PUS11_InvalidTypeTimeWindow No description 1 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
377 0x4202 PUS11_InvalidTimeWindow No description 2 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
378 0x4203 PUS11_TimeshiftingNotPossible No description 3 PUS_SERVICE_11 fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
402 0x4403 UXOS_CommandError Command execution failed 3 LINUX_OSAL fsfw/src/fsfw_hal/linux/CommandExecutor.h
403 0x4404 UXOS_NoCommandLoadedOrPending 4 LINUX_OSAL fsfw/src/fsfw_hal/linux/CommandExecutor.h
404 0x4406 UXOS_PcloseCallError No description 6 LINUX_OSAL fsfw/src/fsfw_hal/linux/CommandExecutor.h
405 0x4500 HSPI_HalTimeoutRetval HSPI_OpeningFileFailed No description 0 HAL_SPI fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
406 0x4501 HSPI_HalBusyRetval HSPI_FullDuplexTransferFailed No description 1 HAL_SPI fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
407 0x4502 HSPI_HalErrorRetval HSPI_HalfDuplexTransferFailed No description 2 HAL_SPI fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
408 0x4601 HURT_UartReadFailure No description 1 HAL_UART fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
409 0x4602 HURT_UartReadSizeMissmatch No description 2 HAL_UART fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
410 0x4603 HURT_UartRxBufferTooSmall No description 3 HAL_UART fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
415 0x4805 HGIO_GpioDuplicateDetected No description 5 HAL_GPIO fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
416 0x4806 HGIO_GpioInitFailed No description 6 HAL_GPIO fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
417 0x4807 HGIO_GpioGetValueFailed No description 7 HAL_GPIO fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
0x4aa0 MGMLIS3_InvalidSpeed Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000] 160 MGM_LIS3MDL mission/acs/RwHandler.h
0x4aa1 MGMLIS3_InvalidRampTime Action Message with invalid ramp time was received. 161 MGM_LIS3MDL mission/acs/RwHandler.h
0x4aa2 MGMLIS3_SetSpeedCommandInvalidLength Received set speed command has invalid length. Should be 6. 162 MGM_LIS3MDL mission/acs/RwHandler.h
0x4aa3 MGMLIS3_ExecutionFailed Command execution failed 163 MGM_LIS3MDL mission/acs/RwHandler.h
0x4aa4 MGMLIS3_CrcError Reaction wheel reply has invalid crc 164 MGM_LIS3MDL mission/acs/RwHandler.h
0x4aa5 MGMLIS3_ValueNotRead No description 165 MGM_LIS3MDL mission/acs/RwHandler.h
418 0x4c00 SPPA_NoPacketFound No description 0 SPACE_PACKET_PARSER fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
419 0x4c01 SPPA_SplitPacket No description 1 SPACE_PACKET_PARSER fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
420 0x4fa1 HEATER_CommandNotSupported No description 161 HEATER_HANDLER mission/tcs/HeaterHandler.h
486 0x57a1 PLSPVhLP_ProcessTerminated Process has been terminated by command 161 PLOC_SUPV_HELPER linux/payload/PlocSupvUartMan.h
487 0x57a2 PLSPVhLP_PathNotExists Received command with invalid pathname 162 PLOC_SUPV_HELPER linux/payload/PlocSupvUartMan.h
488 0x57a3 PLSPVhLP_EventBufferReplyInvalidApid Expected event buffer TM but received space packet with other APID 163 PLOC_SUPV_HELPER linux/payload/PlocSupvUartMan.h
489 0x58a0 SUSS_ErrorUnlockMutex SUSS_InvalidSpeed No description Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000] 160 SUS_HANDLER mission/acs/archive/LegacySusHandler.h mission/acs/RwHandler.h
490 0x58a1 SUSS_ErrorLockMutex SUSS_InvalidRampTime No description Action Message with invalid ramp time was received. 161 SUS_HANDLER mission/acs/archive/LegacySusHandler.h mission/acs/RwHandler.h
491 0x58a2 SUSS_SetSpeedCommandInvalidLength Received set speed command has invalid length. Should be 6. 162 SUS_HANDLER mission/acs/RwHandler.h
492 0x58a3 SUSS_ExecutionFailed Command execution failed 163 SUS_HANDLER mission/acs/RwHandler.h
493 0x58a4 SUSS_CrcError Reaction wheel reply has invalid crc 164 SUS_HANDLER mission/acs/RwHandler.h
494 0x58a5 SUSS_ValueNotRead No description 165 SUS_HANDLER mission/acs/RwHandler.h
495 0x5900 IPCI_NoReplyAvailable No description 0 CCSDS_IP_CORE_BRIDGE linux/acs/ImtqPollingTask.h
496 0x5901 IPCI_NoPacketFound No description 1 CCSDS_IP_CORE_BRIDGE linux/com/SyrlinksComHandler.h
497 0x59a0 IPCI_PapbBusy No description 160 CCSDS_IP_CORE_BRIDGE linux/ipcore/PapbVcInterface.h
498 0x5aa0 PTME_UnknownVcId No description 160 PTME linux/ipcore/Ptme.h
0x5c00 STRHLP_NoReplyAvailable No description 0 STR_HELPER linux/acs/ImtqPollingTask.h
499 0x5c01 STRHLP_SdNotMounted SD card specified in path string not mounted 1 STR_HELPER linux/acs/StrComHandler.h
500 0x5c02 STRHLP_FileNotExists Specified file does not exist on filesystem 2 STR_HELPER linux/acs/StrComHandler.h
501 0x5c03 STRHLP_PathNotExists Specified path does not exist 3 STR_HELPER linux/acs/StrComHandler.h
513 0x5d03 GOMS_InvalidParamSize No description 3 GOM_SPACE_HANDLER mission/power/GomspaceDeviceHandler.h
514 0x5d04 GOMS_InvalidPayloadSize No description 4 GOM_SPACE_HANDLER mission/power/GomspaceDeviceHandler.h
515 0x5d05 GOMS_UnknownReplyId No description 5 GOM_SPACE_HANDLER mission/power/GomspaceDeviceHandler.h
0x5e02 PLMEMDUMP_InvalidCrc No description 2 PLOC_MEMORY_DUMPER linux/payload/ScexHelper.h
516 0x5ea0 PLMEMDUMP_MramAddressTooHigh The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000. 160 PLOC_MEMORY_DUMPER linux/payload/PlocMemoryDumper.h
517 0x5ea1 PLMEMDUMP_MramInvalidAddressCombination The specified end address is lower than the start address 161 PLOC_MEMORY_DUMPER linux/payload/PlocMemoryDumper.h
518 0x5fa0 PDEC_AbandonedCltuRetval No description 160 PDEC_HANDLER linux/ipcore/PdecHandler.h
541 0x63a0 NVMB_KeyNotExists Specified key does not exist in json file 160 NVM_PARAM_BASE mission/memory/NvmParameterBase.h
542 0x64a0 FSHLP_SdNotMounted SD card specified with path string not mounted 160 FILE_SYSTEM_HELPER bsp_q7s/fs/FilesystemHelper.h
543 0x64a1 FSHLP_FileNotExists Specified file does not exist on filesystem 161 FILE_SYSTEM_HELPER bsp_q7s/fs/FilesystemHelper.h
544 0x6502 PLMPHLP_InvalidCrc No description 2 PLOC_MPSOC_HELPER linux/payload/ScexHelper.h
545 0x65a0 PLMPHLP_FileClosedAccidentally File accidentally close 160 PLOC_MPSOC_HELPER linux/payload/PlocMpsocHelper.h
546 0x66a0 SADPL_CommandNotSupported No description 160 SA_DEPL_HANDLER mission/SolarArrayDeploymentHandler.h
547 0x66a1 SADPL_DeploymentAlreadyExecuting No description 161 SA_DEPL_HANDLER mission/SolarArrayDeploymentHandler.h

View File

@ -7,6 +7,7 @@ from eive_tmtc.config.definitions import CustomServiceList
from eive_tmtc.pus_tm.defs import PrintWrapper
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
from tmtccmd.config.tmtc import tmtc_definitions_provider
from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command, Mode
from tmtccmd.tc import DefaultPusQueueHelper
from tmtccmd.tc.pus_3_fsfw_hk import (
make_sid,
@ -20,6 +21,8 @@ _LOGGER = logging.getLogger(__name__)
class OpCode:
OFF = "off"
ON = "on"
REQ_OS_HK = ["hk"]
ENABLE_HK = ["enable_hk"]
DISABLE_HK = ["disable_hk"]
@ -27,6 +30,8 @@ class OpCode:
class Info:
OFF = "Off"
ON = "On"
REQ_OS_HK = "Request One-Shot HK"
ENABLE_HK = "Enable HK"
DISABLE_HK = "Disable HK"
@ -44,6 +49,8 @@ def add_gps_cmds(defs: TmtcDefinitionWrapper):
oce.add(keys=OpCode.REQ_OS_HK, info=Info.REQ_OS_HK)
oce.add(keys=OpCode.ENABLE_HK, info=Info.ENABLE_HK)
oce.add(keys=OpCode.DISABLE_HK, info=Info.DISABLE_HK)
oce.add(keys=OpCode.OFF, info=Info.OFF)
oce.add(keys=OpCode.ON, info=Info.ON)
defs.add_service(
name=CustomServiceList.GPS_CTRL.value,
info="GPS/GNSS Controller",
@ -72,6 +79,12 @@ def pack_gps_command(object_id: bytes, q: DefaultPusQueueHelper, op_code: str):
if op_code in OpCode.REQ_OS_HK:
q.add_log_cmd(f"GPS: {Info.REQ_OS_HK}")
q.add_pus_tc(create_request_one_hk_command(sid=sid))
if op_code in OpCode.ON:
q.add_log_cmd(f"GPS: {Info.ON}")
q.add_pus_tc(create_mode_command(object_id, Mode.ON, 0))
if op_code in OpCode.OFF:
q.add_log_cmd(f"GPS: {Info.OFF}")
q.add_pus_tc(create_mode_command(object_id, Mode.OFF, 0))
def handle_gps_data(printer: FsfwTmTcPrinter, hk_data: bytes):

View File

@ -97,12 +97,19 @@ class OpCodes:
NORMAL = "nml"
OFF = "off"
PING = "ping"
REQUEST_SOLUTION_SET = "request_sol_set"
REQUEST_SOLUTION_SET_HK = "hk_req_sol"
REQUEST_SOLUTION_SET_ACTION = "action_req_sol"
TAKE_IMAGE = "take_image"
UPLOAD_IMAGE = "upload_image"
SET_IMG_PROCESSOR_MODE = "set_img_proc_mode"
class Info:
REQUEST_SOLUTION_SET = "Request Solution Set HK once"
REQUEST_SOLUTION_SET_HK = "Request Solution Set HK once"
REQUEST_SOLUTION_SET_ACTION = "Request Solution Set Action"
UPLOAD_IMAGE = "Upload Image"
TAKE_IMAGE = "Take Image"
SET_IMG_PROCESSOR_MODE = "Set Image Processor Mode"
class SetId(enum.IntEnum):
@ -128,7 +135,7 @@ class FileDefs:
egse_histogram_upload_img_config = (
"/home/pi/arcsec/json/upload-image-histogram.json"
)
q7s_ground_config = "/mnt/sd0/startracker/json/ground-config.json"
q7s_ground_config = "/mnt/sd0/startracker/ground-config.json"
q7s_flight_config = "/mnt/sd0/startracker/flight-config.json"
firmware2_1 = "/home/pi/arcsec/firmware/sagitta-2-1.bin"
firmware22_1 = "/home/pi/arcsec/firmware/sagitta-22-1.bin"
@ -136,31 +143,31 @@ class FileDefs:
json_dict = {
"1": ["Q7S flight config", FileDefs.q7s_flight_config],
"2": ["Q7S ground config", FileDefs.q7s_ground_config],
"3": ["EGSE flight config", FileDefs.egse_flight_config],
"4": ["EGSE ground config", FileDefs.egse_ground_config],
"5": [
"1": ("Q7S flight config", FileDefs.q7s_flight_config),
"2": ("Q7S ground config", FileDefs.q7s_ground_config),
"3": ("EGSE flight config", FileDefs.egse_flight_config),
"4": ("EGSE ground config", FileDefs.egse_ground_config),
"5": (
"EGSE get solution, upload image config",
FileDefs.egse_solution_upload_img_config,
],
"6": [
),
"6": (
"EGSE get histogram, upload image config",
FileDefs.egse_solution_upload_img_config,
],
),
}
firmware_dict = {
"1": ["Firmware Major = 2, Minor = 1", FileDefs.firmware2_1],
"2": ["Firmware Major = 22, Minor = 1", FileDefs.firmware22_1],
"3": ["Firmware Origin", FileDefs.firmware_origin],
"1": ("Firmware Major = 2, Minor = 1", FileDefs.firmware2_1),
"2": ("Firmware Major = 22, Minor = 1", FileDefs.firmware22_1),
"3": ("Firmware Origin", FileDefs.firmware_origin),
}
upload_image_dict = {
"1": ["q7s gemma", "/mnt/sd0/startracker/gemma.bin"],
"2": ["egse gemma", "/home/pi/arcsec/star-images/gemma.bin"],
"3": ["q7s polaris", "/mnt/sd0/startracker/polaris.bin"],
"4": ["egse polaris", "/home/pi/arcsec/star-images/polaris.bin"],
"1": ("q7s gemma", "/mnt/sd0/startracker/gemma.bin"),
"2": ("egse gemma", "/home/pi/arcsec/star-images/gemma.bin"),
"3": ("q7s polaris", "/mnt/sd0/startracker/polaris.bin"),
"4": ("egse polaris", "/home/pi/arcsec/star-images/polaris.bin"),
}
@ -175,7 +182,8 @@ class PartitionSize:
STAR_TRACKER_FIRMWARE = 464572
class Submode:
class Submode(enum.IntEnum):
DEFAULT = 0
BOOTLOADER = 1
FIRMWARE = 2
@ -203,9 +211,13 @@ def pack_star_tracker_commands(
q.add_log_cmd("Star tracker: Mode Off")
data = pack_mode_data(obyt, Mode.OFF, 0)
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=data))
if op_code == OpCodes.REQUEST_SOLUTION_SET:
q.add_log_cmd(Info.REQUEST_SOLUTION_SET)
if op_code == OpCodes.REQUEST_SOLUTION_SET_HK:
q.add_log_cmd(Info.REQUEST_SOLUTION_SET_HK)
q.add_pus_tc(create_request_one_diag_command(make_sid(obyt, SetId.SOLUTION)))
if op_code == OpCodes.REQUEST_SOLUTION_SET_ACTION:
q.add_log_cmd("Star tracker: Request solution")
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_SOLUTION)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "4":
q.add_log_cmd("Star tracker: Mode Raw")
data = pack_mode_data(obyt, Mode.RAW, 0)
@ -253,11 +265,7 @@ def pack_star_tracker_commands(
q.add_log_cmd("Star tracker: Request time")
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_TIME)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "14":
q.add_log_cmd("Star tracker: Request solution")
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_SOLUTION)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "15":
if op_code == OpCodes.UPLOAD_IMAGE:
q.add_log_cmd("Star tracker: Upload image")
image = get_upload_image()
data = (
@ -360,7 +368,9 @@ def pack_star_tracker_commands(
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == OpCodes.TAKE_IMAGE:
q.add_log_cmd("Star tracker: Take image")
actionid = int(input("Specify parameter ID (take image - 4): "))
actionid = int(
input("Specify parameter ID (4: take image, 7: get histogram): ")
)
data = (
obyt
+ struct.pack("!I", StarTrackerActionId.TAKE_IMAGE)
@ -510,8 +520,8 @@ def pack_star_tracker_commands(
q.add_log_cmd("Star tracker: Request limits")
data = obyt + struct.pack("!I", StarTrackerActionId.REQ_LIMITS)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == "51":
q.add_log_cmd("Star tracker: Set image processor parameters")
if op_code == OpCodes.SET_IMG_PROCESSOR_MODE:
q.add_log_cmd(Info.SET_IMG_PROCESSOR_MODE)
json_file = get_config_file()
data = (
obyt
@ -797,10 +807,13 @@ def add_str_cmds(defs: TmtcDefinitionWrapper):
oce.add(OpCodes.ON_FIRMWARE, "Mode On, Submode Firmware")
oce.add(OpCodes.NORMAL, "Mode Normal")
oce.add(OpCodes.OFF, "Mode Off")
oce.add("4", "Star Tracker: Mode Raw")
# oce.add("4", "Star Tracker: Mode Raw")
oce.add(OpCodes.PING, "Star Tracker: Ping")
oce.add(OpCodes.TAKE_IMAGE, "Take Image")
oce.add(OpCodes.REQUEST_SOLUTION_SET, "Request Solution Set HK")
oce.add(OpCodes.REQUEST_SOLUTION_SET_HK, Info.REQUEST_SOLUTION_SET_HK)
oce.add(OpCodes.REQUEST_SOLUTION_SET_ACTION, Info.REQUEST_SOLUTION_SET_ACTION)
oce.add(OpCodes.UPLOAD_IMAGE, Info.UPLOAD_IMAGE)
oce.add(OpCodes.SET_IMG_PROCESSOR_MODE, Info.SET_IMG_PROCESSOR_MODE)
oce.add("6", "Star Tracker: Switch to bootloader program")
oce.add("7", "Star Tracker: Request temperature")
oce.add("8", "Star Tracker: Request version")
@ -810,7 +823,6 @@ def add_str_cmds(defs: TmtcDefinitionWrapper):
oce.add("12", "Star Tracker: Boot image (requires bootloader mode)")
oce.add("13", "Star Tracker: Request time")
oce.add("14", "Star Tracker: Request solution")
oce.add("15", "Star Tracker: Upload image")
oce.add("16", "Star Tracker: Download image")
oce.add("17", "Star Tracker: Set limit parameters")
oce.add("17", "Star Tracker: Set limit parameters")
@ -832,7 +844,6 @@ def add_str_cmds(defs: TmtcDefinitionWrapper):
oce.add("37", "Star Tracker: Get checksum")
oce.add("49", "Star Tracker: Request camera parameter")
oce.add("50", "Star Tracker: Request limits")
oce.add("51", "Star Tracker: Set image processor parameters")
oce.add("52", "Star Tracker: (EGSE only) Load camera ground config")
oce.add("53", "Star Tracker: (EGSE only) Load camera flight config")
oce.add("54", "Star Tracker: Request log level parameters")

View File

@ -48,6 +48,7 @@ class Submode(enum.IntEnum):
UNSET = 0
DATARATE_LOW = 1
DATARATE_HIGH = 2
DATARATE_DEFAULT = 3
class OpCode:

View File

@ -0,0 +1,9 @@
import enum
class Mode(enum.IntEnum):
RX_ONLY = 10
RX_AND_TX_DEF_DATARATE = 11
RX_AND_TX_LOW_DATARATE = 12
RX_AND_TX_HIGH_DATARATE = 13
RX_AND_TX_CARRIER_WAVE = 14

View File

@ -3,6 +3,9 @@ import enum
from eive_tmtc.config.definitions import CustomServiceList
from eive_tmtc.config.object_ids import COM_SUBSYSTEM_ID
from eive_tmtc.tmtc.com.syrlinks_handler import Datarate
from .defs import Mode as ComMode
from tmtccmd.config.tmtc import (
tmtc_definitions_provider,
TmtcDefinitionWrapper,
@ -29,14 +32,6 @@ class ParameterId(enum.IntEnum):
TRANSMITTER_TIMEOUT = 1
class Submode(enum.IntEnum):
RX_ONLY = 10
RX_AND_TX_DEF_DATARATE = 11
RX_AND_TX_LOW_DATARATE = 12
RX_AND_TX_HIGH_DATARATE = 13
RX_AND_TX_CARRIER_WAVE = 14
class OpCode:
RX_ONLY = "rx_only"
TX_AND_RX_DEF_RATE = "rx_and_tx_default_rate"
@ -72,21 +67,21 @@ def build_com_subsystem_cmd(p: ServiceProviderParams):
prefix = "COM Subsystem"
if o == OpCode.RX_ONLY:
q.add_log_cmd(Info.RX_ONLY)
q.add_pus_tc(create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_ONLY, 0))
q.add_pus_tc(create_mode_command(COM_SUBSYSTEM_ID, ComMode.RX_ONLY, 0))
elif o == OpCode.TX_AND_RX_DEF_RATE:
q.add_log_cmd(Info.TX_AND_RX_DEF_DATARATE)
q.add_pus_tc(
create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_AND_TX_DEF_DATARATE, 0)
create_mode_command(COM_SUBSYSTEM_ID, ComMode.RX_AND_TX_DEF_DATARATE, 0)
)
elif o == OpCode.TX_AND_RX_LOW_RATE:
q.add_log_cmd(Info.TX_AND_RX_LOW_DATARATE)
q.add_pus_tc(
create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_AND_TX_LOW_DATARATE, 0)
create_mode_command(COM_SUBSYSTEM_ID, ComMode.RX_AND_TX_LOW_DATARATE, 0)
)
elif o == OpCode.TX_AND_RX_HIGH_RATE:
q.add_log_cmd(Info.TX_AND_RX_HIGH_DATARATE)
q.add_pus_tc(
create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_AND_TX_HIGH_DATARATE, 0)
create_mode_command(COM_SUBSYSTEM_ID, ComMode.RX_AND_TX_HIGH_DATARATE, 0)
)
if o == OpCode.UPDATE_DEFAULT_DATARATE_LOW:
q.add_log_cmd(f"{prefix}: {Info.UPDATE_DEFAULT_DATARATE_LOW}")
@ -115,7 +110,7 @@ def build_com_subsystem_cmd(p: ServiceProviderParams):
elif o == OpCode.TX_AND_RX_CARRIER_WAVE:
q.add_log_cmd(Info.TX_AND_RX_CARRIER_WAVE)
q.add_pus_tc(
create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_AND_TX_CARRIER_WAVE, 0)
create_mode_command(COM_SUBSYSTEM_ID, ComMode.RX_AND_TX_CARRIER_WAVE, 0)
)
elif o == OpCode.CHANGE_TRANSMITTER_TIMEOUT:
timeout = int(input("Specify timeout to set [ms]: "))

View File

@ -10,7 +10,7 @@ import logging
import math
from eive_tmtc.pus_tm.defs import PrintWrapper
from eive_tmtc.tmtc.com.subsystem import Submode
from eive_tmtc.tmtc.com.defs import Mode as ComMode
from eive_tmtc.config.definitions import CustomServiceList
from tmtccmd.config.tmtc import (
tmtc_definitions_provider,
@ -155,21 +155,21 @@ def pack_syrlinks_command(
q.add_log_cmd(f"{prefix}: {Info.ON}")
q.add_pus_tc(create_mode_command(obyt, Mode.ON, 0))
if op_code == OpCode.NORMAL_RX_ONLY:
normal_mode_cmd(q, Info.NORMAL_RX_ONLY, Submode.RX_ONLY)
normal_mode_cmd(q, Info.NORMAL_RX_ONLY, ComMode.RX_ONLY)
if op_code == OpCode.NORMAL_RX_AND_TX_LOW_DATARATE:
normal_mode_cmd(
q, Info.NORMAL_RX_AND_TX_LOW_DATARATE, Submode.RX_AND_TX_LOW_DATARATE
q, Info.NORMAL_RX_AND_TX_LOW_DATARATE, ComMode.RX_AND_TX_LOW_DATARATE
)
if op_code == OpCode.NORMAL_RX_AND_TX_DEF_DATARATE:
normal_mode_cmd(
q, Info.NORMAL_RX_AND_TX_DEF_DATARATE, Submode.RX_AND_TX_DEFAULT_DATARATE
q, Info.NORMAL_RX_AND_TX_DEF_DATARATE, ComMode.RX_AND_TX_DEF_DATARATE
)
if op_code == OpCode.NORMAL_RX_AND_TX_HIGH_DATARATE:
normal_mode_cmd(
q, Info.NORMAL_RX_AND_TX_HIGH_DATARATE, Submode.RX_AND_TX_HIGH_DATARATE
q, Info.NORMAL_RX_AND_TX_HIGH_DATARATE, ComMode.RX_AND_TX_HIGH_DATARATE
)
if op_code in OpCode.NORMAL_RX_AND_TX_CW:
normal_mode_cmd(q, Info.NORMAL_RX_AND_TX_CW, Submode.RX_AND_TX_CW)
normal_mode_cmd(q, Info.NORMAL_RX_AND_TX_CW, ComMode.RX_AND_TX_CARRIER_WAVE)
if op_code in OpCode.HK_RX_REGS:
q.add_log_cmd(f"{prefix}: {Info.HK_RX_REGS}")
sid = make_sid(obyt, SetId.RX_REGISTERS_DATASET)
@ -304,7 +304,13 @@ def handle_syrlinks_rx_registers_dataset(printer: FsfwTmTcPrinter, hk_data: byte
rx_agc = rx_agc_value & 0xFFF
rx_demod_eb = struct.unpack("!I", hk_data[13:17])[0] & 0xFFFFFF
rx_demod_n0 = struct.unpack("!I", hk_data[17:21])[0] & 0xFFFFFF
if rx_demod_n0 > 0:
eb_to_n0 = 20 * math.log10(rx_demod_eb / rx_demod_n0) - 3
else:
logging.getLogger(__name__).warning(
"RX Demod N0 is 0, can not calculate Eb to N0"
)
eb_to_n0 = 0
rx_data_rate_raw = hk_data[21]
rx_data_rate = -1
if rx_data_rate_raw == 0:

View File

@ -8,7 +8,7 @@ from eive_tmtc.config.object_ids import (
RW_ASSEMBLY,
SUS_BOARD_ASS_ID,
MGM_0_LIS3_HANDLER_ID,
MGM_1_RM3100_HANDLER_ID
MGM_1_RM3100_HANDLER_ID,
)
SUBSYSTEM_DICT = {
@ -26,7 +26,7 @@ ACS_OBJ_DICT = {
5: ("GYR 0 ADIS", GYRO_0_ADIS_HANDLER_ID),
6: ("GYR 1 L3G", GYRO_1_L3G_HANDLER_ID),
7: ("MGM 0 LIS3", MGM_0_LIS3_HANDLER_ID),
8: ("MGM 1 RM3100", MGM_1_RM3100_HANDLER_ID)
8: ("MGM 1 RM3100", MGM_1_RM3100_HANDLER_ID),
}

View File

@ -255,7 +255,7 @@ def mgt_off_cmd(q: DefaultPusQueueHelper):
def create_mgt_off_cmd() -> PusTelecommand:
return create_generic_on_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.MGT)
return create_generic_off_cmd(PDU_1_HANDLER_ID, Pdu1ChIndex.MGT)
def sun_sensor_nominal_on_cmd(q: DefaultPusQueueHelper):

View File

@ -284,7 +284,7 @@ def heater_off_cmd(q: DefaultPusQueueHelper):
def create_heater_off_cmd() -> PusTelecommand:
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.HEATER)
return create_generic_off_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.HEATER)
def sus_red_on_cmd(q: DefaultPusQueueHelper):
@ -372,4 +372,4 @@ def payload_camera_off_cmd(q: DefaultPusQueueHelper):
def create_payload_camera_off_cmd() -> PusTelecommand:
return create_generic_on_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.PL_CAM)
return create_generic_off_cmd(PDU_2_HANDLER_ID, Pdu2ChIndex.PL_CAM)

View File

@ -49,6 +49,30 @@ class PcduSetIds(enum.IntEnum):
SWITCHER_SET = 0
class PcduSwitches(enum.IntEnum):
PDU1_CH0_TCS_BOARD_3V3 = 0
PDU1_CH1_SYRLINKS_12V = 1
PDU1_CH2_STAR_TRACKER_5V = 2
PDU1_CH3_MGT_5V = 3
PDU1_CH4_SUS_NOMINAL_3V3 = 4
PDU1_CH5_SOLAR_CELL_EXP_5V = 5
PDU1_CH6_PLOC_12V = 6
PDU1_CH7_ACS_A_SIDE_3V3 = 7
PDU1_CH8_UNOCCUPIED = 8
PDU2_CH0_Q7S = 9
PDU2_CH1_PL_PCDU_BATT_0_14V8 = 10
PDU2_CH2_RW_5V = 11
PDU2_CH3_TCS_BOARD_HEATER_IN_8V = 12
PDU2_CH4_SUS_REDUNDANT_3V3 = 13
PDU2_CH5_DEPLOYMENT_MECHANISM_8V = 14
PDU2_CH6_PL_PCDU_BATT_1_14V8 = 15
PDU2_CH7_ACS_BOARD_SIDE_B_3V3 = 16
PDU2_CH8_PAYLOAD_CAMERA = 17
P60_DOCK_5V_STACK = 18
def pack_power_commands(q: DefaultPusQueueHelper, op_code: str):
pdu1_switch_cmds(q, op_code)
pdu2_switch_cmds(q, op_code)