OBSW Update Commands #114
2
.gitignore
vendored
2
.gitignore
vendored
@ -8,4 +8,4 @@ log
|
|||||||
|
|
||||||
/scex_conf.json
|
/scex_conf.json
|
||||||
/tmtc_conf.json
|
/tmtc_conf.json
|
||||||
/seqcnt.txt
|
/seqcnt*.txt
|
||||||
|
24
.run/CFDP Help.run.xml
Normal file
24
.run/CFDP Help.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="CFDP Help" type="PythonConfigurationType" factoryName="Python" folderName="CFDP">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="cfdp -h" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/CFDP Test File Large.run.xml
Normal file
24
.run/CFDP Test File Large.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="CFDP Test File Large" type="PythonConfigurationType" factoryName="Python" folderName="CFDP">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="cfdp filetest/obsw_update.bin /tmp/obsw_update.bin -d 0.3" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/CFDP Test File Small.run.xml
Normal file
24
.run/CFDP Test File Small.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="CFDP Test File Small" type="PythonConfigurationType" factoryName="Python" folderName="CFDP">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="cfdp filetest/cfdp_test.txt /tmp/cfdp_test.txt -d 0.2" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/OBSW Switch to Both SDs.run.xml
Normal file
24
.run/OBSW Switch to Both SDs.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="OBSW Switch to Both SDs" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s core -o switch_to_both_sd_cards -d 8" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/OBSW Switch to SD 0.run.xml
Normal file
24
.run/OBSW Switch to SD 0.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="OBSW Switch to SD 0" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s core -o switch_to_sd_0 -d 8" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/OBSW Switch to SD 1.run.xml
Normal file
24
.run/OBSW Switch to SD 1.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="OBSW Switch to SD 1" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s core -o switch_to_sd_1 -d 8" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/OBSW Update from SD 0.run.xml
Normal file
24
.run/OBSW Update from SD 0.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="OBSW Update from SD 0" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s core -o obsw_update_sd0 -d 20" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/OBSW Update from SD 1.run.xml
Normal file
24
.run/OBSW Update from SD 1.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="OBSW Update from SD 1" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s core -o obsw_update_sd1 -d 20" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/OBSW Update from tmp.run.xml
Normal file
24
.run/OBSW Update from tmp.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="OBSW Update from tmp" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s core -o obsw_update_tmp -d 20" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/Transfer OBSW CFDP.run.xml
Normal file
24
.run/Transfer OBSW CFDP.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Transfer OBSW CFDP" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="cfdp ../cmake-build-release-q7s/eive-sw-update.tar.xz /tmp/eive-sw-update.tar.xz -d 0.3" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
@ -12,6 +12,8 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [v1.13.0]
|
# [v1.13.0]
|
||||||
|
|
||||||
|
- CFDP integration
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/113
|
||||||
- Major Update for `tmtccmd` and `spacepackets` dependencies which improves user API significantly.
|
- Major Update for `tmtccmd` and `spacepackets` dependencies which improves user API significantly.
|
||||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/102
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/102
|
||||||
- Add commands to request MGM HK or enable/disable periodic HK for it
|
- Add commands to request MGM HK or enable/disable periodic HK for it
|
||||||
|
@ -6,9 +6,14 @@
|
|||||||
|
|
||||||
import enum
|
import enum
|
||||||
|
|
||||||
|
from spacepackets.util import UnsignedByteField
|
||||||
|
|
||||||
PUS_APID = 0x65
|
PUS_APID = 0x65
|
||||||
SPACE_PACKET_IDS = (0x08 << 8 | PUS_APID,)
|
SPACE_PACKET_IDS = (0x08 << 8 | PUS_APID,)
|
||||||
|
CFDP_APID = 0x66
|
||||||
|
|
||||||
|
CFDP_LOCAL_ENTITY_ID = UnsignedByteField(byte_len=2, val=1)
|
||||||
|
CFDP_REMOTE_ENTITY_ID = UnsignedByteField(byte_len=2, val=CFDP_APID)
|
||||||
|
|
||||||
|
|
||||||
class CustomServiceList(str, enum.Enum):
|
class CustomServiceList(str, enum.Enum):
|
||||||
|
@ -69,6 +69,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
7510;0x1d56;TRYING_RECOVERY;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
7510;0x1d56;TRYING_RECOVERY;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7511;0x1d57;RECOVERY_STEP;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
7511;0x1d57;RECOVERY_STEP;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
7512;0x1d58;RECOVERY_DONE;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
7512;0x1d58;RECOVERY_DONE;MEDIUM;;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
|
7600;0x1db0;HANDLE_PACKET_FAILED;LOW;;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
7900;0x1edc;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7900;0x1edc;RF_AVAILABLE;INFO;A RF available signal was detected. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
7901;0x1edd;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7901;0x1edd;RF_LOST;INFO;A previously found RF available signal was lost. P1: raw RFA state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||||
@ -119,8 +120,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
12003;0x2ee3;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/devices/ploc/PlocSupervisorHandler.h
|
12003;0x2ee3;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12004;0x2ee4;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/devices/ploc/PlocSupervisorHandler.h
|
12004;0x2ee4;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12005;0x2ee5;SUPV_MPSOC_SHUWDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/devices/ploc/PlocSupervisorHandler.h
|
12005;0x2ee5;SUPV_MPSOC_SHUWDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12100;0x2f44;SANITIZATION_FAILED;LOW;;bsp_q7s/memory/SdCardManager.h
|
12100;0x2f44;SANITIZATION_FAILED;LOW;;bsp_q7s/fs/SdCardManager.h
|
||||||
12101;0x2f45;MOUNTED_SD_CARD;INFO;;bsp_q7s/memory/SdCardManager.h
|
12101;0x2f45;MOUNTED_SD_CARD;INFO;;bsp_q7s/fs/SdCardManager.h
|
||||||
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/devices/ploc/PlocMemoryDumper.h
|
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/devices/ploc/PlocMemoryDumper.h
|
||||||
12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/devices/ploc/PlocMemoryDumper.h
|
12301;0x300d;MRAM_DUMP_FAILED;LOW;Received completion failure report form PLOC supervisor handler P1: MRAM start address of failing dump command;linux/devices/ploc/PlocMemoryDumper.h
|
||||||
12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/devices/ploc/PlocMemoryDumper.h
|
12302;0x300e;MRAM_DUMP_FINISHED;LOW;MRAM dump finished successfully;linux/devices/ploc/PlocMemoryDumper.h
|
||||||
@ -215,6 +216,3 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||||
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
||||||
13703;0x3587;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
|
13703;0x3587;REBOOT_HW;MEDIUM;;bsp_q7s/core/CoreController.h
|
||||||
13800;0x35e8;MISSING_PACKET;LOW;;mission/devices/devicedefinitions/ScexDefinitions.h
|
|
||||||
13801;0x35e9;EXPERIMENT_TIMEDOUT;LOW;;mission/devices/devicedefinitions/ScexDefinitions.h
|
|
||||||
13802;0x35ea;MULTI_PACKET_COMMAND_DONE;INFO;;mission/devices/devicedefinitions/ScexDefinitions.h
|
|
||||||
|
|
@ -25,7 +25,7 @@ class EiveHookObject(TmTcCfgHookBase):
|
|||||||
|
|
||||||
cfg = create_com_interface_cfg_default(
|
cfg = create_com_interface_cfg_default(
|
||||||
com_if_key=com_if_key,
|
com_if_key=com_if_key,
|
||||||
json_cfg_path=self.json_cfg_path,
|
json_cfg_path=self.cfg_path,
|
||||||
space_packet_ids=SPACE_PACKET_IDS,
|
space_packet_ids=SPACE_PACKET_IDS,
|
||||||
)
|
)
|
||||||
return create_com_interface_default(cfg)
|
return create_com_interface_default(cfg)
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
0x44330015;PLOC_MPSOC_HANDLER
|
0x44330015;PLOC_MPSOC_HANDLER
|
||||||
0x44330016;PLOC_SUPERVISOR_HANDLER
|
0x44330016;PLOC_SUPERVISOR_HANDLER
|
||||||
0x44330017;PLOC_SUPERVISOR_HELPER
|
0x44330017;PLOC_SUPERVISOR_HELPER
|
||||||
0x44330032;SCEX
|
|
||||||
0x444100A2;SOLAR_ARRAY_DEPL_HANDLER
|
0x444100A2;SOLAR_ARRAY_DEPL_HANDLER
|
||||||
0x444100A4;HEATER_HANDLER
|
0x444100A4;HEATER_HANDLER
|
||||||
0x44420004;TMP1075_HANDLER_1
|
0x44420004;TMP1075_HANDLER_1
|
||||||
@ -70,7 +69,6 @@
|
|||||||
0x445300A3;SYRLINKS_HK_HANDLER
|
0x445300A3;SYRLINKS_HK_HANDLER
|
||||||
0x49000000;ARDUINO_COM_IF
|
0x49000000;ARDUINO_COM_IF
|
||||||
0x49010005;GPIO_IF
|
0x49010005;GPIO_IF
|
||||||
0x49010006;SCEX_UART_READER
|
|
||||||
0x49020004;SPI_MAIN_COM_IF
|
0x49020004;SPI_MAIN_COM_IF
|
||||||
0x49020005;SPI_RW_COM_IF
|
0x49020005;SPI_RW_COM_IF
|
||||||
0x49020006;SPI_RTD_COM_IF
|
0x49020006;SPI_RTD_COM_IF
|
||||||
@ -130,6 +128,8 @@
|
|||||||
0x73000002;SUS_BOARD_ASS
|
0x73000002;SUS_BOARD_ASS
|
||||||
0x73000003;TCS_BOARD_ASS
|
0x73000003;TCS_BOARD_ASS
|
||||||
0x73000004;RW_ASS
|
0x73000004;RW_ASS
|
||||||
|
0x73000005;CFDP_HANDLER
|
||||||
|
0x73000006;CFDP_DISTRIBUTOR
|
||||||
0x73000100;TM_FUNNEL
|
0x73000100;TM_FUNNEL
|
||||||
0x73500000;CCSDS_IP_CORE_BRIDGE
|
0x73500000;CCSDS_IP_CORE_BRIDGE
|
||||||
0xFFFFFFFF;NO_OBJECT
|
0xFFFFFFFF;NO_OBJECT
|
||||||
|
|
@ -89,17 +89,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x06e2;PP_InvalidContent;;226;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x06e2;PP_InvalidContent;;226;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x06e3;PP_UnalignedAccess;;227;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x06e3;PP_UnalignedAccess;;227;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x06e4;PP_WriteProtected;;228;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x06e4;PP_WriteProtected;;228;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
0x4300;FILS_GenericFileError;;0;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4301;FILS_IsBusy;;1;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4302;FILS_InvalidParameters;;2;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4305;FILS_FileDoesNotExist;;5;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4306;FILS_FileAlreadyExists;;6;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4307;FILS_FileLocked;;7;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x430a;FILS_DirectoryDoesNotExist;;10;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x430b;FILS_DirectoryAlreadyExists;;11;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x430c;FILS_DirectoryNotEmpty;;12;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x430f;FILS_SequencePacketMissingWrite;;15;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x4310;FILS_SequencePacketMissingRead;;16;FILE_SYSTEM;fsfw/src/fsfw/memory/HasFileSystemIF.h
|
|
||||||
0x13e0;MH_UnknownCmd;;224;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x13e0;MH_UnknownCmd;;224;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
0x13e1;MH_InvalidAddress;;225;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x13e1;MH_InvalidAddress;;225;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
0x13e2;MH_InvalidSize;;226;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x13e2;MH_InvalidSize;;226;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
@ -215,19 +204,20 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x0804;DPS_DataSetUninitialised;;4;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0804;DPS_DataSetUninitialised;;4;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0805;DPS_DataSetFull;;5;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0805;DPS_DataSetFull;;5;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0806;DPS_PoolVarNull;;6;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
0x0806;DPS_PoolVarNull;;6;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x1c01;TCD_PacketLost;;1;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
0x1c01;TCD_PacketLost;;1;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||||
0x1c02;TCD_DestinationNotFound;;2;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
0x1c02;TCD_DestinationNotFound;;2;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||||
0x1c03;TCD_ServiceIdAlreadyExists;;3;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributor.h
|
0x1c03;TCD_ServiceIdAlreadyExists;;3;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||||
0x1b00;TCC_InvalidCcsdsVersion;;0;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b00;TCC_NoDestinationFound;;0;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b01;TCC_InvalidApid;;1;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b01;TCC_InvalidCcsdsVersion;;1;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b02;TCC_InvalidPacketType;;2;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b02;TCC_InvalidApid;;2;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b03;TCC_InvalidSecHeaderField;;3;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b03;TCC_InvalidPacketType;;3;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b04;TCC_IncorrectPrimaryHeader;;4;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b04;TCC_InvalidSecHeaderField;;4;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b05;TCC_IncompletePacket;;5;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b05;TCC_IncorrectPrimaryHeader;;5;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b06;TCC_InvalidPusVersion;;6;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b07;TCC_IncompletePacket;;7;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b07;TCC_IncorrectChecksum;;7;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b08;TCC_InvalidPusVersion;;8;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b08;TCC_IllegalPacketSubtype;;8;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b09;TCC_IncorrectChecksum;;9;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1b09;TCC_IncorrectSecondaryHeader;;9;PACKET_CHECK;fsfw/src/fsfw/tcdistribution/definitions.h
|
0x1b0a;TCC_IllegalPacketSubtype;;10;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
|
0x1b0b;TCC_IncorrectSecondaryHeader;;11;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x3001;POS_InPowerTransition;;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
0x3001;POS_InPowerTransition;;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||||
0x3002;POS_SwitchStateMismatch;;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
0x3002;POS_SwitchStateMismatch;;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||||
0x0501;PS_SwitchOn;;1;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
0x0501;PS_SwitchOn;;1;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
@ -324,13 +314,31 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x31e3;LIM_WrongLimitId;;227;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x31e3;LIM_WrongLimitId;;227;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x31ee;LIM_MonitorNotFound;;238;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
0x31ee;LIM_MonitorNotFound;;238;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3601;CFDP_InvalidTlvType;;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3601;CFDP_InvalidTlvType;;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3602;CFDP_InvalidDirectiveFields;;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3602;CFDP_InvalidDirectiveField;;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3603;CFDP_InvalidPduDatafieldLen;;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3603;CFDP_InvalidPduDatafieldLen;;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3604;CFDP_InvalidAckDirectiveFields;;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3604;CFDP_InvalidAckDirectiveFields;;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3605;CFDP_MetadataCantParseOptions;;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3605;CFDP_MetadataCantParseOptions;;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3606;CFDP_FinishedCantParseFsResponses;;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3606;CFDP_NakCantParseOptions;;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
|
0x3607;CFDP_FinishedCantParseFsResponses;;7;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3608;CFDP_FilestoreRequiresSecondFile;;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3608;CFDP_FilestoreRequiresSecondFile;;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x3609;CFDP_FilestoreResponseCantParseFsMessage;;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
0x3609;CFDP_FilestoreResponseCantParseFsMessage;;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
|
0x360a;CFDP_InvalidPduFormat;;10;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
|
0x4300;FILS_GenericFileError;;0;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4301;FILS_GenericDirError;;1;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4303;FILS_GenericRenameError;;3;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4304;FILS_IsBusy;;4;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4305;FILS_InvalidParameters;;5;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430a;FILS_FileDoesNotExist;;10;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430b;FILS_FileAlreadyExists;;11;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430c;FILS_NotAFile;;12;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430d;FILS_FileLocked;;13;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430e;FILS_PermissionDenied;;14;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4315;FILS_DirectoryDoesNotExist;;21;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4316;FILS_DirectoryAlreadyExists;;22;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4317;FILS_NotADirectory;;23;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4318;FILS_DirectoryNotEmpty;;24;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x431e;FILS_SequencePacketMissingWrite;;30;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x431f;FILS_SequencePacketMissingRead;;31;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
0x2c01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2c01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2c02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2c02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2cb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2cb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
@ -458,15 +466,15 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x1d04;ATC_SendTmFailed;;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1d04;ATC_SendTmFailed;;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
0x1d05;ATC_Timeout;;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x1d05;ATC_Timeout;;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
0x6b00;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
0x6b00;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
||||||
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/memory/FilesystemHelper.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/memory/FilesystemHelper.h
|
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||||
0x6a00;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a00;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a01;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a01;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a02;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a02;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a03;SDMA_AlreadyOff;;3;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a03;SDMA_AlreadyOff;;3;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0a;SDMA_StatusFileNexists;;10;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0a;SDMA_StatusFileNexists;;10;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0b;SDMA_StatusFileFormatInvalid;;11;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0b;SDMA_StatusFileFormatInvalid;;11;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0c;SDMA_MountError;;12;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0c;SDMA_MountError;;12;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/memory/SdCardManager.h
|
0x6a0f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
|
|
2
deps/spacepackets
vendored
2
deps/spacepackets
vendored
@ -1 +1 @@
|
|||||||
Subproject commit da2859688bc36ac258f0d75edbc2768761f34f31
|
Subproject commit 84f1af27d4b15dde47b9944e0e533dff6fd8b1a4
|
2
deps/tmtccmd
vendored
2
deps/tmtccmd
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 5583005cd57fce94ac718fd5ad35f639623fcac6
|
Subproject commit 96ca55b17a823ce10307e8aa6d8cd906323d1ae5
|
1
filetest/cfdp_test.txt
Normal file
1
filetest/cfdp_test.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
hello world
|
BIN
filetest/obsw_update.bin
Normal file
BIN
filetest/obsw_update.bin
Normal file
Binary file not shown.
@ -1,6 +1,7 @@
|
|||||||
import enum
|
import enum
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
|
from spacepackets.ecss import PusTelecommand
|
||||||
from tmtccmd.config import TmtcDefinitionWrapper
|
from tmtccmd.config import TmtcDefinitionWrapper
|
||||||
|
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
@ -17,12 +18,15 @@ LOGGER = get_console_logger()
|
|||||||
class ActionIds(enum.IntEnum):
|
class ActionIds(enum.IntEnum):
|
||||||
LIST_DIR_INTO_FILE = 0
|
LIST_DIR_INTO_FILE = 0
|
||||||
SWITCH_REBOOT_FILE_HANDLING = 5
|
SWITCH_REBOOT_FILE_HANDLING = 5
|
||||||
RESET_ALL_REBOOT_COUNTERS = 6
|
RESET_REBOOT_COUNTER = 6
|
||||||
RESET_REBOOT_COUNTER_00 = 7
|
SWITCH_IMG_LOCK = 7
|
||||||
RESET_REBOOT_COUNTER_01 = 8
|
SET_MAX_REBOOT_CNT = 8
|
||||||
RESET_REBOOT_COUNTER_10 = 9
|
UPDATE_OBSW_FROM_SD_0 = 10
|
||||||
RESET_REBOOT_COUNTER_11 = 10
|
UPDATE_OBSW_FROM_SD_1 = 11
|
||||||
SET_MAX_REBOOT_CNT = 11
|
UPDATE_OBSW_FROM_TMP = 12
|
||||||
|
SWITCH_TO_SD_0 = 16
|
||||||
|
SWITCH_TO_SD_1 = 17
|
||||||
|
SWITCH_TO_BOTH_SD_CARDS = 18
|
||||||
XSC_REBOOT = 32
|
XSC_REBOOT = 32
|
||||||
FULL_REBOOT = 34
|
FULL_REBOOT = 34
|
||||||
|
|
||||||
@ -40,6 +44,12 @@ class OpCodes:
|
|||||||
XSC_REBOOT_1_1 = ["5", "reboot_11"]
|
XSC_REBOOT_1_1 = ["5", "reboot_11"]
|
||||||
REBOOT_FULL = ["6", "reboot_regular"]
|
REBOOT_FULL = ["6", "reboot_regular"]
|
||||||
GET_HK = ["7", "get_hk"]
|
GET_HK = ["7", "get_hk"]
|
||||||
|
OBSW_UPDATE_FROM_SD_0 = ["obsw_update_sd0"]
|
||||||
|
OBSW_UPDATE_FROM_SD_1 = ["obsw_update_sd1"]
|
||||||
|
OBSW_UPDATE_FROM_TMP = ["obsw_update_tmp"]
|
||||||
|
SWITCH_TO_SD_0 = ["switch_to_sd_0"]
|
||||||
|
SWITCH_TO_SD_1 = ["switch_to_sd_1"]
|
||||||
|
SWITCH_TO_BOTH_SD_CARDS = ["switch_to_both_sd_cards"]
|
||||||
ENABLE_REBOOT_FILE_HANDLING = ["32", "rbh_off"]
|
ENABLE_REBOOT_FILE_HANDLING = ["32", "rbh_off"]
|
||||||
DISABLE_REBOOT_FILE_HANDLING = ["33", "rbh_on"]
|
DISABLE_REBOOT_FILE_HANDLING = ["33", "rbh_on"]
|
||||||
RESET_ALL_REBOOT_COUNTERS = ["34", "rbh_reset_a"]
|
RESET_ALL_REBOOT_COUNTERS = ["34", "rbh_reset_a"]
|
||||||
@ -53,6 +63,12 @@ class OpCodes:
|
|||||||
class Info:
|
class Info:
|
||||||
REBOOT_XSC = "XSC reboot with prompt"
|
REBOOT_XSC = "XSC reboot with prompt"
|
||||||
REBOOT_FULL = "Full regular reboot"
|
REBOOT_FULL = "Full regular reboot"
|
||||||
|
OBSW_UPDATE_FROM_SD_0 = "Update OBSW from SD Card 0"
|
||||||
|
OBSW_UPDATE_FROM_SD_1 = "Update OBSW from SD Card 1"
|
||||||
|
OBSW_UPDATE_FROM_TMP = "Update OBSW from tmp folder"
|
||||||
|
SWITCH_TO_SD_0 = "Switch to SD card 0"
|
||||||
|
SWITCH_TO_SD_1 = "Switch to SD card 1"
|
||||||
|
SWITCH_TO_BOTH_SD_CARDS = "Switch to both SD cards with specified active card"
|
||||||
|
|
||||||
|
|
||||||
class Chip(enum.IntEnum):
|
class Chip(enum.IntEnum):
|
||||||
@ -110,6 +126,12 @@ def add_core_controller_definitions(defs: TmtcDefinitionWrapper):
|
|||||||
keys=OpCodes.RESET_REBOOT_COUNTER_11,
|
keys=OpCodes.RESET_REBOOT_COUNTER_11,
|
||||||
info="Reset reboot counter 1 1",
|
info="Reset reboot counter 1 1",
|
||||||
)
|
)
|
||||||
|
oce.add(keys=OpCodes.OBSW_UPDATE_FROM_SD_0, info=Info.OBSW_UPDATE_FROM_SD_0)
|
||||||
|
oce.add(keys=OpCodes.OBSW_UPDATE_FROM_SD_1, info=Info.OBSW_UPDATE_FROM_SD_1)
|
||||||
|
oce.add(keys=OpCodes.OBSW_UPDATE_FROM_TMP, info=Info.OBSW_UPDATE_FROM_TMP)
|
||||||
|
oce.add(keys=OpCodes.SWITCH_TO_SD_0, info=Info.SWITCH_TO_SD_0)
|
||||||
|
oce.add(keys=OpCodes.SWITCH_TO_SD_1, info=Info.SWITCH_TO_SD_1)
|
||||||
|
oce.add(keys=OpCodes.SWITCH_TO_BOTH_SD_CARDS, info=Info.SWITCH_TO_BOTH_SD_CARDS)
|
||||||
defs.add_service(CustomServiceList.CORE.value, "Core Controller", oce)
|
defs.add_service(CustomServiceList.CORE.value, "Core Controller", oce)
|
||||||
|
|
||||||
|
|
||||||
@ -155,44 +177,76 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str):
|
|||||||
)
|
)
|
||||||
if op_code in OpCodes.DISABLE_REBOOT_FILE_HANDLING:
|
if op_code in OpCodes.DISABLE_REBOOT_FILE_HANDLING:
|
||||||
q.add_log_cmd("Disabling reboot file handling")
|
q.add_log_cmd("Disabling reboot file handling")
|
||||||
app_data = bytearray([0])
|
user_data = bytearray([0])
|
||||||
make_fsfw_action_cmd(
|
q.add_pus_tc(
|
||||||
object_id=CORE_CONTROLLER_ID,
|
make_fsfw_action_cmd(
|
||||||
action_id=ActionIds.SWITCH_REBOOT_FILE_HANDLING,
|
object_id=CORE_CONTROLLER_ID,
|
||||||
user_data=app_data,
|
action_id=ActionIds.SWITCH_REBOOT_FILE_HANDLING,
|
||||||
|
user_data=user_data,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.ENABLE_REBOOT_FILE_HANDLING:
|
if op_code in OpCodes.ENABLE_REBOOT_FILE_HANDLING:
|
||||||
q.add_log_cmd("Enabling reboot file handling")
|
q.add_log_cmd("Enabling reboot file handling")
|
||||||
app_data = bytearray([1])
|
user_data = bytearray([1])
|
||||||
make_fsfw_action_cmd(
|
q.add_pus_tc(
|
||||||
object_id=CORE_CONTROLLER_ID,
|
make_fsfw_action_cmd(
|
||||||
action_id=ActionIds.SWITCH_REBOOT_FILE_HANDLING,
|
object_id=CORE_CONTROLLER_ID,
|
||||||
user_data=app_data,
|
action_id=ActionIds.SWITCH_REBOOT_FILE_HANDLING,
|
||||||
|
user_data=user_data,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.RESET_ALL_REBOOT_COUNTERS:
|
if op_code in OpCodes.RESET_ALL_REBOOT_COUNTERS:
|
||||||
q.add_log_cmd("Resetting all reboot counters")
|
q.add_log_cmd("Resetting all reboot counters")
|
||||||
make_fsfw_action_cmd(
|
q.add_pus_tc(
|
||||||
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.RESET_ALL_REBOOT_COUNTERS
|
make_fsfw_action_cmd(
|
||||||
|
object_id=CORE_CONTROLLER_ID,
|
||||||
|
action_id=ActionIds.RESET_REBOOT_COUNTER,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.RESET_REBOOT_COUNTER_00:
|
if op_code in OpCodes.RESET_REBOOT_COUNTER_00:
|
||||||
q.add_log_cmd("Resetting reboot counter 0 0")
|
reset_specific_boot_counter(q, 0, 0)
|
||||||
make_fsfw_action_cmd(
|
|
||||||
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.RESET_REBOOT_COUNTER_00
|
|
||||||
)
|
|
||||||
if op_code in OpCodes.RESET_REBOOT_COUNTER_01:
|
if op_code in OpCodes.RESET_REBOOT_COUNTER_01:
|
||||||
q.add_log_cmd("Resetting reboot counter 0 1")
|
reset_specific_boot_counter(q, 0, 1)
|
||||||
make_fsfw_action_cmd(
|
|
||||||
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.RESET_REBOOT_COUNTER_01
|
|
||||||
)
|
|
||||||
if op_code in OpCodes.RESET_REBOOT_COUNTER_10:
|
if op_code in OpCodes.RESET_REBOOT_COUNTER_10:
|
||||||
q.add_log_cmd("Resetting reboot counter 1 0")
|
reset_specific_boot_counter(q, 1, 0)
|
||||||
make_fsfw_action_cmd(
|
|
||||||
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.RESET_REBOOT_COUNTER_10
|
|
||||||
)
|
|
||||||
if op_code in OpCodes.RESET_REBOOT_COUNTER_11:
|
if op_code in OpCodes.RESET_REBOOT_COUNTER_11:
|
||||||
q.add_log_cmd("Resetting reboot counter 1 1")
|
reset_specific_boot_counter(q, 1, 1)
|
||||||
make_fsfw_action_cmd(
|
if op_code in OpCodes.OBSW_UPDATE_FROM_SD_0:
|
||||||
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.RESET_REBOOT_COUNTER_11
|
q.add_log_cmd(Info.OBSW_UPDATE_FROM_SD_0)
|
||||||
|
q.add_pus_tc(pack_obsw_update_cmd(ActionIds.UPDATE_OBSW_FROM_SD_0))
|
||||||
|
if op_code in OpCodes.OBSW_UPDATE_FROM_SD_1:
|
||||||
|
q.add_log_cmd(Info.OBSW_UPDATE_FROM_SD_1)
|
||||||
|
q.add_pus_tc(pack_obsw_update_cmd(ActionIds.UPDATE_OBSW_FROM_SD_1))
|
||||||
|
if op_code in OpCodes.OBSW_UPDATE_FROM_TMP:
|
||||||
|
q.add_log_cmd(Info.OBSW_UPDATE_FROM_TMP)
|
||||||
|
q.add_pus_tc(pack_obsw_update_cmd(ActionIds.UPDATE_OBSW_FROM_TMP))
|
||||||
|
if op_code in OpCodes.SWITCH_TO_SD_0:
|
||||||
|
q.add_log_cmd(Info.SWITCH_TO_SD_0)
|
||||||
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
|
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.SWITCH_TO_SD_0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if op_code in OpCodes.SWITCH_TO_SD_1:
|
||||||
|
q.add_log_cmd(Info.SWITCH_TO_SD_1)
|
||||||
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
|
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.SWITCH_TO_SD_1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
if op_code in OpCodes.SWITCH_TO_BOTH_SD_CARDS:
|
||||||
|
while True:
|
||||||
|
active_sd_card = int(input("Please specify active SD cqrd [0/1]: "))
|
||||||
|
if active_sd_card not in [0, 1]:
|
||||||
|
LOGGER.warning("Invalid SD card specified. Try again")
|
||||||
|
break
|
||||||
|
q.add_log_cmd(Info.SWITCH_TO_BOTH_SD_CARDS)
|
||||||
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
|
object_id=CORE_CONTROLLER_ID,
|
||||||
|
action_id=ActionIds.SWITCH_TO_BOTH_SD_CARDS,
|
||||||
|
user_data=bytes([active_sd_card]),
|
||||||
|
)
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.GET_HK:
|
if op_code in OpCodes.GET_HK:
|
||||||
q.add_log_cmd("Requesting housekeeping set")
|
q.add_log_cmd("Requesting housekeeping set")
|
||||||
@ -200,6 +254,17 @@ def pack_core_commands(q: DefaultPusQueueHelper, op_code: str):
|
|||||||
q.add_pus_tc(generate_one_hk_command(sid))
|
q.add_pus_tc(generate_one_hk_command(sid))
|
||||||
|
|
||||||
|
|
||||||
|
def reset_specific_boot_counter(q: DefaultPusQueueHelper, chip: int, copy: int):
|
||||||
|
q.add_log_cmd(f"Resetting boot counter {chip} {copy}")
|
||||||
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
|
object_id=CORE_CONTROLLER_ID,
|
||||||
|
action_id=ActionIds.RESET_REBOOT_COUNTER,
|
||||||
|
user_data=bytes([chip, copy]),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def determine_reboot_params() -> (bool, Chip, Copy):
|
def determine_reboot_params() -> (bool, Chip, Copy):
|
||||||
chip_select = -1
|
chip_select = -1
|
||||||
copy_select = -1
|
copy_select = -1
|
||||||
@ -208,6 +273,10 @@ def determine_reboot_params() -> (bool, Chip, Copy):
|
|||||||
LOGGER.info("Rebooting currently running image")
|
LOGGER.info("Rebooting currently running image")
|
||||||
return True, chip_select, copy_select
|
return True, chip_select, copy_select
|
||||||
LOGGER.info("Rebooting image specified by chip and copy")
|
LOGGER.info("Rebooting image specified by chip and copy")
|
||||||
|
return False, determine_chip_and_copy()
|
||||||
|
|
||||||
|
|
||||||
|
def determine_chip_and_copy() -> (int, int):
|
||||||
while True:
|
while True:
|
||||||
chip_select = input("Chip select [0/1]: ")
|
chip_select = input("Chip select [0/1]: ")
|
||||||
if chip_select in ["0", "1"]:
|
if chip_select in ["0", "1"]:
|
||||||
@ -228,7 +297,15 @@ def determine_reboot_params() -> (bool, Chip, Copy):
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
LOGGER.warning("Invalid copy select value. Try again")
|
LOGGER.warning("Invalid copy select value. Try again")
|
||||||
return False, chip_select, copy_select
|
return chip_select, copy_select
|
||||||
|
|
||||||
|
|
||||||
|
def pack_obsw_update_cmd(action_id: int) -> PusTelecommand:
|
||||||
|
chip, copy = determine_chip_and_copy()
|
||||||
|
user_data = bytes([chip, copy])
|
||||||
|
return make_fsfw_action_cmd(
|
||||||
|
object_id=CORE_CONTROLLER_ID, action_id=action_id, user_data=user_data
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def perform_reboot_cmd(
|
def perform_reboot_cmd(
|
||||||
|
244
tmtcc.py
244
tmtcc.py
@ -3,7 +3,31 @@ import logging
|
|||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import cast
|
||||||
|
|
||||||
|
from spacepackets import SpacePacketHeader, SpacePacket
|
||||||
|
from spacepackets.cfdp import (
|
||||||
|
ConditionCode,
|
||||||
|
ChecksumType,
|
||||||
|
TransmissionMode,
|
||||||
|
PduHolder,
|
||||||
|
DirectiveType,
|
||||||
|
)
|
||||||
|
from tmtccmd.cfdp import CfdpUserBase, TransactionId
|
||||||
|
from tmtccmd.cfdp.defs import CfdpRequestType
|
||||||
|
from tmtccmd.cfdp.handler import CfdpInCcsdsHandler
|
||||||
|
from tmtccmd.cfdp.mib import (
|
||||||
|
DefaultFaultHandlerBase,
|
||||||
|
LocalEntityCfg,
|
||||||
|
IndicationCfg,
|
||||||
|
RemoteEntityCfg,
|
||||||
|
)
|
||||||
|
from tmtccmd.cfdp.user import (
|
||||||
|
TransactionFinishedParams,
|
||||||
|
MetadataRecvParams,
|
||||||
|
FileSegmentRecvdParams,
|
||||||
|
)
|
||||||
from tmtccmd.tc.handler import SendCbParams
|
from tmtccmd.tc.handler import SendCbParams
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -41,16 +65,29 @@ from tmtccmd.tm import SpecificApidHandlerBase, GenericApidHandlerBase, CcsdsTmH
|
|||||||
from tmtccmd.core import BackendRequest
|
from tmtccmd.core import BackendRequest
|
||||||
from tmtccmd.logging import get_current_time_string
|
from tmtccmd.logging import get_current_time_string
|
||||||
from tmtccmd.tc import (
|
from tmtccmd.tc import (
|
||||||
ProcedureHelper,
|
ProcedureWrapper,
|
||||||
FeedWrapper,
|
FeedWrapper,
|
||||||
TcProcedureType,
|
TcProcedureType,
|
||||||
TcQueueEntryType,
|
TcQueueEntryType,
|
||||||
DefaultPusQueueHelper,
|
DefaultPusQueueHelper,
|
||||||
)
|
)
|
||||||
from tmtccmd.config import default_json_path, SetupWrapper
|
from tmtccmd.config import (
|
||||||
from tmtccmd.config.args import SetupParams, ArgParserWrapper
|
default_json_path,
|
||||||
|
SetupWrapper,
|
||||||
|
params_to_procedure_conversion,
|
||||||
|
)
|
||||||
|
from tmtccmd.config.args import (
|
||||||
|
SetupParams,
|
||||||
|
PreArgsParsingWrapper,
|
||||||
|
ProcedureParamsWrapper,
|
||||||
|
)
|
||||||
from config import __version__
|
from config import __version__
|
||||||
from config.definitions import PUS_APID
|
from config.definitions import (
|
||||||
|
PUS_APID,
|
||||||
|
CFDP_APID,
|
||||||
|
CFDP_LOCAL_ENTITY_ID,
|
||||||
|
CFDP_REMOTE_ENTITY_ID,
|
||||||
|
)
|
||||||
from config.hook import EiveHookObject
|
from config.hook import EiveHookObject
|
||||||
from pus_tm.factory_hook import pus_factory_hook
|
from pus_tm.factory_hook import pus_factory_hook
|
||||||
from pus_tc.procedure_packer import handle_default_procedure
|
from pus_tc.procedure_packer import handle_default_procedure
|
||||||
@ -63,6 +100,61 @@ ROTATING_TIMED_LOGGER_INTERVAL_WHEN = TimedLogWhen.PER_MINUTE
|
|||||||
ROTATING_TIMED_LOGGER_INTERVAL = 30
|
ROTATING_TIMED_LOGGER_INTERVAL = 30
|
||||||
|
|
||||||
|
|
||||||
|
class EiveCfdpFaultHandler(DefaultFaultHandlerBase):
|
||||||
|
def notice_of_suspension_cb(self, cond: ConditionCode):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def notice_of_cancellation_cb(self, cond: ConditionCode):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def abandoned_cb(self, cond: ConditionCode):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def ignore_cb(self, cond: ConditionCode):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class EiveCfdpUser(CfdpUserBase):
|
||||||
|
def transaction_indication(self, transaction_id: TransactionId):
|
||||||
|
LOGGER.info(f"CFDP User: Start of File {transaction_id}")
|
||||||
|
|
||||||
|
def eof_sent_indication(self, transaction_id: TransactionId):
|
||||||
|
LOGGER.info(f"CFDP User: EOF sent for {transaction_id}")
|
||||||
|
|
||||||
|
def transaction_finished_indication(self, params: TransactionFinishedParams):
|
||||||
|
LOGGER.info(f"CFDP User: {params.transaction_id} finished")
|
||||||
|
|
||||||
|
def metadata_recv_indication(self, params: MetadataRecvParams):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def file_segment_recv_indication(self, params: FileSegmentRecvdParams):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def report_indication(self, transaction_id: TransactionId, status_report: any):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def suspended_indication(
|
||||||
|
self, transaction_id: TransactionId, cond_code: ConditionCode
|
||||||
|
):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def resumed_indication(self, transaction_id: TransactionId, progress: int):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def fault_indication(
|
||||||
|
self, transaction_id: TransactionId, cond_code: ConditionCode, progress: int
|
||||||
|
):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def abandoned_indication(
|
||||||
|
self, transaction_id: TransactionId, cond_code: ConditionCode, progress: int
|
||||||
|
):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def eof_recv_indication(self, transaction_id: TransactionId):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class PusHandler(SpecificApidHandlerBase):
|
class PusHandler(SpecificApidHandlerBase):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -84,32 +176,52 @@ class UnknownApidHandler(GenericApidHandlerBase):
|
|||||||
LOGGER.warning(f"Packet with unknwon APID {apid} detected")
|
LOGGER.warning(f"Packet with unknwon APID {apid} detected")
|
||||||
|
|
||||||
|
|
||||||
|
class CfdpInCcsdsWrapper(SpecificApidHandlerBase):
|
||||||
|
def __init__(self, cfdp_in_ccsds_handler: CfdpInCcsdsHandler):
|
||||||
|
super().__init__(CFDP_APID, None)
|
||||||
|
self.handler = cfdp_in_ccsds_handler
|
||||||
|
|
||||||
|
def handle_tm(self, packet: bytes, _user_args: any):
|
||||||
|
ccsds_header_raw = packet[0:6]
|
||||||
|
sp_header = SpacePacketHeader.unpack(ccsds_header_raw)
|
||||||
|
pdu = packet[6:]
|
||||||
|
sp = SpacePacket(sp_header, sec_header=None, user_data=pdu)
|
||||||
|
self.handler.pass_packet(sp)
|
||||||
|
|
||||||
|
|
||||||
class TcHandler(TcHandlerBase):
|
class TcHandler(TcHandlerBase):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
seq_count_provider: FileSeqCountProvider,
|
seq_count_provider: FileSeqCountProvider,
|
||||||
|
cfdp_in_ccsds_wrapper: CfdpInCcsdsWrapper,
|
||||||
pus_verificator: PusVerificator,
|
pus_verificator: PusVerificator,
|
||||||
file_logger: logging.Logger,
|
file_logger: logging.Logger,
|
||||||
raw_logger: RawTmtcTimedLogWrapper,
|
raw_logger: RawTmtcTimedLogWrapper,
|
||||||
gui: bool,
|
gui: bool,
|
||||||
):
|
):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
self.cfdp_handler_started = False
|
||||||
|
self.cfdp_dest_id = CFDP_REMOTE_ENTITY_ID
|
||||||
self.seq_count_provider = seq_count_provider
|
self.seq_count_provider = seq_count_provider
|
||||||
self.pus_verificator = pus_verificator
|
self.pus_verificator = pus_verificator
|
||||||
self.file_logger = file_logger
|
self.file_logger = file_logger
|
||||||
self.raw_logger = raw_logger
|
self.raw_logger = raw_logger
|
||||||
self.gui = gui
|
self.gui = gui
|
||||||
|
self.cfdp_done = False
|
||||||
self.queue_helper = DefaultPusQueueHelper(
|
self.queue_helper = DefaultPusQueueHelper(
|
||||||
queue_wrapper=None,
|
queue_wrapper=None,
|
||||||
pus_apid=PUS_APID,
|
pus_apid=PUS_APID,
|
||||||
seq_cnt_provider=seq_count_provider,
|
seq_cnt_provider=seq_count_provider,
|
||||||
pus_verificator=pus_verificator,
|
pus_verificator=pus_verificator,
|
||||||
)
|
)
|
||||||
|
self.cfdp_in_ccsds_wrapper = cfdp_in_ccsds_wrapper
|
||||||
|
|
||||||
def feed_cb(self, info: ProcedureHelper, wrapper: FeedWrapper):
|
def feed_cb(self, info: ProcedureWrapper, wrapper: FeedWrapper):
|
||||||
self.queue_helper.queue_wrapper = wrapper.queue_wrapper
|
self.queue_helper.queue_wrapper = wrapper.queue_wrapper
|
||||||
if info.proc_type == TcProcedureType.DEFAULT:
|
if info.proc_type == TcProcedureType.DEFAULT:
|
||||||
handle_default_procedure(self, info.to_def_procedure(), self.queue_helper)
|
handle_default_procedure(self, info.to_def_procedure(), self.queue_helper)
|
||||||
|
elif info.proc_type == TcProcedureType.CFDP:
|
||||||
|
self.handle_cfdp_procedure(info)
|
||||||
|
|
||||||
def send_cb(self, send_params: SendCbParams):
|
def send_cb(self, send_params: SendCbParams):
|
||||||
entry_helper = send_params.entry
|
entry_helper = send_params.entry
|
||||||
@ -130,17 +242,63 @@ class TcHandler(TcHandlerBase):
|
|||||||
f"{get_current_time_string(True)}: {tc_info_string}"
|
f"{get_current_time_string(True)}: {tc_info_string}"
|
||||||
)
|
)
|
||||||
send_params.com_if.send(raw_tc)
|
send_params.com_if.send(raw_tc)
|
||||||
|
elif entry_helper.entry_type == TcQueueEntryType.CCSDS_TC:
|
||||||
|
cfdp_packet_in_ccsds = entry_helper.to_space_packet_entry()
|
||||||
|
send_params.com_if.send(cfdp_packet_in_ccsds.space_packet.pack())
|
||||||
elif entry_helper.entry_type == TcQueueEntryType.LOG:
|
elif entry_helper.entry_type == TcQueueEntryType.LOG:
|
||||||
log_entry = entry_helper.to_log_entry()
|
log_entry = entry_helper.to_log_entry()
|
||||||
LOGGER.info(log_entry.log_str)
|
LOGGER.info(log_entry.log_str)
|
||||||
self.file_logger.info(log_entry.log_str)
|
self.file_logger.info(log_entry.log_str)
|
||||||
|
|
||||||
def queue_finished_cb(self, info: ProcedureHelper):
|
def handle_cfdp_procedure(self, info: ProcedureWrapper):
|
||||||
if info is not None and info.proc_type == TcQueueEntryType.PUS_TC:
|
cfdp_procedure = info.to_cfdp_procedure()
|
||||||
def_proc = info.to_def_procedure()
|
if cfdp_procedure.cfdp_request_type == CfdpRequestType.PUT:
|
||||||
LOGGER.info(
|
if (
|
||||||
f"Finished queue for service {def_proc.service} and op code {def_proc.op_code}"
|
not self.cfdp_in_ccsds_wrapper.handler.put_request_pending()
|
||||||
)
|
and not self.cfdp_handler_started
|
||||||
|
):
|
||||||
|
put_req = cfdp_procedure.request_wrapper.to_put_request()
|
||||||
|
put_req.cfg.destination_id = self.cfdp_dest_id
|
||||||
|
LOGGER.info(
|
||||||
|
f"CFDP: Starting file put request with parameters:\n{put_req}"
|
||||||
|
)
|
||||||
|
self.cfdp_in_ccsds_wrapper.handler.cfdp_handler.put_request(put_req)
|
||||||
|
self.cfdp_handler_started = True
|
||||||
|
|
||||||
|
for source_pair, dest_pair in self.cfdp_in_ccsds_wrapper.handler:
|
||||||
|
pdu, sp = source_pair
|
||||||
|
pdu = cast(PduHolder, pdu)
|
||||||
|
if pdu.is_file_directive:
|
||||||
|
if pdu.pdu_directive_type == DirectiveType.METADATA_PDU:
|
||||||
|
metadata = pdu.to_metadata_pdu()
|
||||||
|
self.queue_helper.add_log_cmd(
|
||||||
|
f"CFDP Source: Sending Metadata PDU for file with size "
|
||||||
|
f"{metadata.file_size}"
|
||||||
|
)
|
||||||
|
elif pdu.pdu_directive_type == DirectiveType.EOF_PDU:
|
||||||
|
self.queue_helper.add_log_cmd(
|
||||||
|
f"CFDP Source: Sending EOF PDU"
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
fd_pdu = pdu.to_file_data_pdu()
|
||||||
|
self.queue_helper.add_log_cmd(
|
||||||
|
f"CFDP Source: Sending File Data PDU for segment at offset "
|
||||||
|
f"{fd_pdu.offset} with length {len(fd_pdu.file_data)}"
|
||||||
|
)
|
||||||
|
self.queue_helper.add_ccsds_tc(sp)
|
||||||
|
self.cfdp_in_ccsds_wrapper.handler.confirm_source_packet_sent()
|
||||||
|
self.cfdp_in_ccsds_wrapper.handler.source_handler.state_machine()
|
||||||
|
|
||||||
|
def queue_finished_cb(self, info: ProcedureWrapper):
|
||||||
|
if info is not None:
|
||||||
|
if info.proc_type == TcQueueEntryType.PUS_TC:
|
||||||
|
def_proc = info.to_def_procedure()
|
||||||
|
LOGGER.info(
|
||||||
|
f"Finished queue for service {def_proc.service} and op code {def_proc.op_code}"
|
||||||
|
)
|
||||||
|
elif info.proc_type == TcProcedureType.CFDP:
|
||||||
|
LOGGER.info(f"Finished CFDP queue")
|
||||||
|
self.cfdp_done = True
|
||||||
|
|
||||||
|
|
||||||
def setup_params() -> SetupWrapper:
|
def setup_params() -> SetupWrapper:
|
||||||
@ -148,28 +306,71 @@ def setup_params() -> SetupWrapper:
|
|||||||
print(f"-- spacepackets v{spacepackets.__version__} --")
|
print(f"-- spacepackets v{spacepackets.__version__} --")
|
||||||
hook_obj = EiveHookObject(default_json_path())
|
hook_obj = EiveHookObject(default_json_path())
|
||||||
params = SetupParams()
|
params = SetupParams()
|
||||||
parser_wrapper = ArgParserWrapper(hook_obj)
|
parser_wrapper = PreArgsParsingWrapper()
|
||||||
parser_wrapper.create_default_parent_parser()
|
parser_wrapper.create_default_parent_parser()
|
||||||
parser_wrapper.create_default_parser()
|
parser_wrapper.create_default_parser()
|
||||||
parser_wrapper.add_def_proc_and_cfdp_as_subparsers()
|
parser_wrapper.add_def_proc_and_cfdp_as_subparsers()
|
||||||
parser_wrapper.parse()
|
post_arg_parsing_wrapper = parser_wrapper.parse(hook_obj)
|
||||||
tmtccmd.init_printout(parser_wrapper.use_gui)
|
tmtccmd.init_printout(post_arg_parsing_wrapper.use_gui)
|
||||||
parser_wrapper.set_params(params)
|
use_prompts = not post_arg_parsing_wrapper.use_gui
|
||||||
|
proc_param_wrapper = ProcedureParamsWrapper()
|
||||||
|
if use_prompts:
|
||||||
|
post_arg_parsing_wrapper.set_params_with_prompts(params, proc_param_wrapper)
|
||||||
|
else:
|
||||||
|
post_arg_parsing_wrapper.set_params_without_prompts(params, proc_param_wrapper)
|
||||||
params.apid = PUS_APID
|
params.apid = PUS_APID
|
||||||
setup_wrapper = SetupWrapper(hook_obj=hook_obj, setup_params=params)
|
setup_wrapper = SetupWrapper(
|
||||||
|
hook_obj=hook_obj, setup_params=params, proc_param_wrapper=proc_param_wrapper
|
||||||
|
)
|
||||||
return setup_wrapper
|
return setup_wrapper
|
||||||
|
|
||||||
|
|
||||||
def setup_tmtc(
|
def setup_cfdp_handler() -> CfdpInCcsdsWrapper:
|
||||||
|
fh_base = EiveCfdpFaultHandler()
|
||||||
|
cfdp_cfg = LocalEntityCfg(
|
||||||
|
local_entity_id=CFDP_LOCAL_ENTITY_ID,
|
||||||
|
indication_cfg=IndicationCfg(),
|
||||||
|
default_fault_handlers=fh_base,
|
||||||
|
)
|
||||||
|
remote_cfg = RemoteEntityCfg(
|
||||||
|
closure_requested=False,
|
||||||
|
entity_id=CFDP_REMOTE_ENTITY_ID,
|
||||||
|
max_file_segment_len=1024,
|
||||||
|
check_limit=None,
|
||||||
|
crc_on_transmission=False,
|
||||||
|
crc_type=ChecksumType.CRC_32,
|
||||||
|
default_transmission_mode=TransmissionMode.UNACKNOWLEDGED,
|
||||||
|
)
|
||||||
|
cfdp_seq_count_provider = FileSeqCountProvider(
|
||||||
|
max_bit_width=16, file_name=Path("seqcnt_cfdp_transaction.txt")
|
||||||
|
)
|
||||||
|
cfdp_ccsds_seq_count_provider = PusFileSeqCountProvider(
|
||||||
|
file_name=Path("seqcnt_cfdp_ccsds_.txt")
|
||||||
|
)
|
||||||
|
cfdp_user = EiveCfdpUser()
|
||||||
|
cfdp_in_ccsds_handler = CfdpInCcsdsHandler(
|
||||||
|
cfg=cfdp_cfg,
|
||||||
|
remote_cfgs=[remote_cfg],
|
||||||
|
ccsds_apid=CFDP_APID,
|
||||||
|
ccsds_seq_cnt_provider=cfdp_ccsds_seq_count_provider,
|
||||||
|
cfdp_seq_cnt_provider=cfdp_seq_count_provider,
|
||||||
|
user=cfdp_user,
|
||||||
|
)
|
||||||
|
return CfdpInCcsdsWrapper(cfdp_in_ccsds_handler)
|
||||||
|
|
||||||
|
|
||||||
|
def setup_tmtc_handlers(
|
||||||
verificator: PusVerificator,
|
verificator: PusVerificator,
|
||||||
printer: FsfwTmTcPrinter,
|
printer: FsfwTmTcPrinter,
|
||||||
raw_logger: RawTmtcTimedLogWrapper,
|
raw_logger: RawTmtcTimedLogWrapper,
|
||||||
gui: bool,
|
gui: bool,
|
||||||
) -> (CcsdsTmHandler, TcHandler):
|
) -> (CcsdsTmHandler, TcHandler):
|
||||||
|
cfdp_in_ccsds_wrapper = setup_cfdp_handler()
|
||||||
verification_wrapper = VerificationWrapper(verificator, LOGGER, printer.file_logger)
|
verification_wrapper = VerificationWrapper(verificator, LOGGER, printer.file_logger)
|
||||||
pus_handler = PusHandler(verification_wrapper, printer, raw_logger)
|
pus_handler = PusHandler(verification_wrapper, printer, raw_logger)
|
||||||
ccsds_handler = CcsdsTmHandler(generic_handler=UnknownApidHandler(None))
|
ccsds_handler = CcsdsTmHandler(generic_handler=UnknownApidHandler(None))
|
||||||
ccsds_handler.add_apid_handler(pus_handler)
|
ccsds_handler.add_apid_handler(pus_handler)
|
||||||
|
ccsds_handler.add_apid_handler(cfdp_in_ccsds_wrapper)
|
||||||
seq_count_provider = PusFileSeqCountProvider()
|
seq_count_provider = PusFileSeqCountProvider()
|
||||||
tc_handler = TcHandler(
|
tc_handler = TcHandler(
|
||||||
seq_count_provider=seq_count_provider,
|
seq_count_provider=seq_count_provider,
|
||||||
@ -177,6 +378,7 @@ def setup_tmtc(
|
|||||||
file_logger=printer.file_logger,
|
file_logger=printer.file_logger,
|
||||||
raw_logger=raw_logger,
|
raw_logger=raw_logger,
|
||||||
gui=gui,
|
gui=gui,
|
||||||
|
cfdp_in_ccsds_wrapper=cfdp_in_ccsds_wrapper,
|
||||||
)
|
)
|
||||||
return ccsds_handler, tc_handler
|
return ccsds_handler, tc_handler
|
||||||
|
|
||||||
@ -186,8 +388,12 @@ def setup_backend(
|
|||||||
tc_handler: TcHandler,
|
tc_handler: TcHandler,
|
||||||
ccsds_handler: CcsdsTmHandler,
|
ccsds_handler: CcsdsTmHandler,
|
||||||
) -> BackendBase:
|
) -> BackendBase:
|
||||||
|
init_proc = params_to_procedure_conversion(setup_wrapper.proc_param_wrapper)
|
||||||
tmtc_backend = tmtccmd.create_default_tmtc_backend(
|
tmtc_backend = tmtccmd.create_default_tmtc_backend(
|
||||||
setup_wrapper=setup_wrapper, tm_handler=ccsds_handler, tc_handler=tc_handler
|
setup_wrapper=setup_wrapper,
|
||||||
|
tm_handler=ccsds_handler,
|
||||||
|
tc_handler=tc_handler,
|
||||||
|
init_procedure=init_proc,
|
||||||
)
|
)
|
||||||
tmtccmd.start(tmtc_backend=tmtc_backend, hook_obj=setup_wrapper.hook_obj)
|
tmtccmd.start(tmtc_backend=tmtc_backend, hook_obj=setup_wrapper.hook_obj)
|
||||||
return tmtc_backend
|
return tmtc_backend
|
||||||
@ -206,7 +412,7 @@ def main():
|
|||||||
interval=ROTATING_TIMED_LOGGER_INTERVAL,
|
interval=ROTATING_TIMED_LOGGER_INTERVAL,
|
||||||
)
|
)
|
||||||
pus_verificator = PusVerificator()
|
pus_verificator = PusVerificator()
|
||||||
ccsds_handler, tc_handler = setup_tmtc(
|
ccsds_handler, tc_handler = setup_tmtc_handlers(
|
||||||
pus_verificator, printer, raw_logger, setup_wrapper.params.use_gui
|
pus_verificator, printer, raw_logger, setup_wrapper.params.use_gui
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user