Merge pull request 'New SCEX commands' (#103) from irini into main

Reviewed-on: #103
This commit is contained in:
Robin Müller 2022-07-13 15:33:59 +02:00
commit 742a081a10
83 changed files with 379 additions and 100 deletions

4
.gitignore vendored
View File

@ -5,5 +5,7 @@ __pycache__
log
/gps_log.txt
/config/*.json
tmtc_conf.json
/scex_conf.json
/tmtc_conf.json
/seqcnt.txt

View File

@ -13,7 +13,7 @@
<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 acu -l -t 6" />
<option name="PARAMETERS" value="-s acu -l -d 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 bpx -t 6 --hk" />
<option name="PARAMETERS" value="-s bpx -d 6 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 bpx -o hk -t 6 --hk" />
<option name="PARAMETERS" value="-s bpx -o hk -d 6 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 bpx -o rst_boot_cnt -t 6" />
<option name="PARAMETERS" value="-s bpx -o rst_boot_cnt -d 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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="-c udp -s imtq -o 8 -l -t 4 --hk" />
<option name="PARAMETERS" value="-c udp -s imtq -o 8 -l -d 4 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 imtq -o 2 -l -t 4 --hk" />
<option name="PARAMETERS" value="-s imtq -o 2 -l -d 4 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 imtq -o 4 -l -t 4 --hk" />
<option name="PARAMETERS" value="-s imtq -o 4 -l -d 4 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 imtq -o 6 -l -t 4 --hk" />
<option name="PARAMETERS" value="-s imtq -o 6 -l -d 4 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 imtq -o 1 -l -t 4 --hk" />
<option name="PARAMETERS" value="-s imtq -o 1 -l -d 4 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 imtq -o 3 -l -t 4 --hk" />
<option name="PARAMETERS" value="-s imtq -o 3 -l -d 4 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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="-c udp -s imtq -o 5 -l -t 4 --hk" />
<option name="PARAMETERS" value="-c udp -s imtq -o 5 -l -d 4 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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="-m seqcmd -c udp -s imtq -l -t 4" />
<option name="PARAMETERS" value="-m seqcmd -c udp -s imtq -l -d 4" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 pdu1 -t 6" />
<option name="PARAMETERS" value="-s pdu1 -d 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 pdu2 -l -t 6" />
<option name="PARAMETERS" value="-s pdu2 -l -d 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 ploc_mpsoc -t 6" />
<option name="PARAMETERS" value="-s ploc_mpsoc -d 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 ploc_supv -t 6" />
<option name="PARAMETERS" value="-s ploc_supv -d 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 17 -o 0 -t 3" />
<option name="PARAMETERS" value="-s 17 -o 0 -d 3" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 reaction_wheel_1 -l -t 8 --hk" />
<option name="PARAMETERS" value="-s reaction_wheel_1 -l -d 8 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 reaction_wheel_2 -l -t 6 --hk" />
<option name="PARAMETERS" value="-s reaction_wheel_2 -l -d 6 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 reaction_wheel_3 -l -t 6 --hk" />
<option name="PARAMETERS" value="-s reaction_wheel_3 -l -d 6 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 reaction_wheel_4 -l -t 12 --hk" />
<option name="PARAMETERS" value="-s reaction_wheel_4 -l -d 12 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
<option name="PARAMETERS" value="-s core -o reboot_0_0 -t 4" />
<option name="PARAMETERS" value="-s core -o reboot_0_0 -d 4" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 reboot_0_1 -t 4" />
<option name="PARAMETERS" value="-s core -o reboot_0_1 -d 4" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 reboot_1_0 -t 4" />
<option name="PARAMETERS" value="-s core -o reboot_1_0 -d 4" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 reboot_1_1 -t 4" />
<option name="PARAMETERS" value="-s core -o reboot_1_1 -d 4" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 reboot -t 4" />
<option name="PARAMETERS" value="-s core -o reboot -d 4" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 reboot_self -t 4" />
<option name="PARAMETERS" value="-s core -o reboot_self -d 4" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />

24
.run/SCEX .run.xml Normal file
View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="SCEX " type="PythonConfigurationType" factoryName="Python" folderName="Devices">
<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 scex" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

24
.run/SCEX Ping.run.xml Normal file
View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="SCEX Ping" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
<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$/tmtccli.py" />
<option name="PARAMETERS" value="-s scex -o ping" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

24
.run/SCEX oneCell.run.xml Normal file
View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="SCEX oneCell" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
<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 scex -o 4 -d 4" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

View File

@ -13,7 +13,7 @@
<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 star_tracker -l -t 6" />
<option name="PARAMETERS" value="-s star_tracker -l -d 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 syrlinks -t 6" />
<option name="PARAMETERS" value="-s syrlinks -d 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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="-c udp -s imtq -o 7 -l -t 4 --hk" />
<option name="PARAMETERS" value="-c udp -s imtq -o 7 -l -d 4 --hk" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 2 -t 4" />
<option name="PARAMETERS" value="-s 2 -d 4" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 200 -o 0 -t 4" />
<option name="PARAMETERS" value="-s 200 -o 0 -d 4" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -13,7 +13,7 @@
<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 8 -t 8" />
<option name="PARAMETERS" value="-s 8 -d 8" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />

View File

@ -50,3 +50,4 @@ class CustomServiceList(enum.Enum):
RTD = "rtd"
TVTTESTPROCEDURE = "tvtestproc"
CONTROLLERS = "controllers"
SCEX = "scex"

View File

@ -128,6 +128,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/obc/PdecHandler.h
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/obc/PdecHandler.h
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/obc/PdecHandler.h
12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/obc/PdecHandler.h
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/obc/PdecHandler.h
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
@ -206,3 +208,4 @@ 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
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
13800;0x35e8;EXPERIMENT_TIMEDOUT;LOW;;mission/devices/devicedefinitions/ScexDefinitions.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
128 12402 0x3072 INVALID_FAR HIGH Read invalid FAR from PDEC after startup linux/obc/PdecHandler.h
129 12403 0x3073 CARRIER_LOCK INFO Carrier lock detected linux/obc/PdecHandler.h
130 12404 0x3074 BIT_LOCK_PDEC INFO Bit lock detected (data valid) linux/obc/PdecHandler.h
131 12405 0x3075 LOST_CARRIER_LOCK_PDEC INFO Lost carrier lock linux/obc/PdecHandler.h
132 12406 0x3076 LOST_BIT_LOCK_PDEC INFO Lost bit lock linux/obc/PdecHandler.h
133 12500 0x30d4 IMAGE_UPLOAD_FAILED LOW Image upload failed linux/devices/startracker/StrHelper.h
134 12501 0x30d5 IMAGE_DOWNLOAD_FAILED LOW Image download failed linux/devices/startracker/StrHelper.h
135 12502 0x30d6 IMAGE_UPLOAD_SUCCESSFUL LOW Uploading image to star tracker was successfulop linux/devices/startracker/StrHelper.h
208 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
209 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
210 13703 0x3587 REBOOT_HW MEDIUM bsp_q7s/core/CoreController.h
211 13800 0x35e8 EXPERIMENT_TIMEDOUT LOW mission/devices/devicedefinitions/ScexDefinitions.h

View File

@ -4,11 +4,10 @@ from config.definitions import SPACE_PACKET_IDS
from tmtccmd import TmTcCfgHookBase, CcsdsTmtcBackend
from tmtccmd.com_if import ComInterface
from tmtccmd.config import TmTcDefWrapper
from tmtccmd.utility.retval import RetvalDictT
from tmtccmd.utility.obj_id import ObjectIdDictT
from config.retvals import get_retval_dict
from pus_tc.cmd_definitions import get_eive_service_op_code_dict
from tmtccmd.util import ObjectIdDictT, RetvalDictT
class EiveHookObject(TmTcCfgHookBase):

View File

@ -4,7 +4,7 @@
it to your needs.
"""
import os.path
from tmtccmd.utility.obj_id import ObjectIdDictT
from tmtccmd.util.obj_id import ObjectIdDictT
from tmtccmd.fsfw import parse_fsfw_objects_csv
from tmtccmd.logging import get_console_logger
@ -25,6 +25,7 @@ PDU_1_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x01])
PDU_2_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x02])
ACU_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x03])
BPX_HANDLER_ID = bytes([0x44, 0x26, 0x00, 0x00])
SCEX_HANDLER_ID = bytes([0x44, 0x33, 0x00, 0x32])
# Thermal Object IDs
THERMAL_CONTROLLER_ID = bytes([0x43, 0x40, 0x00, 0x01])

View File

@ -46,6 +46,7 @@
0x44330015;PLOC_MPSOC_HANDLER
0x44330016;PLOC_SUPERVISOR_HANDLER
0x44330017;PLOC_SUPERVISOR_HELPER
0x44330032;SCEX
0x444100A2;SOLAR_ARRAY_DEPL_HANDLER
0x444100A4;HEATER_HANDLER
0x44420004;TMP1075_HANDLER_1
@ -69,6 +70,7 @@
0x445300A3;SYRLINKS_HK_HANDLER
0x49000000;ARDUINO_COM_IF
0x49010005;GPIO_IF
0x49010006;SCEX_UART_READER
0x49020004;SPI_MAIN_COM_IF
0x49020005;SPI_RW_COM_IF
0x49020006;SPI_RTD_COM_IF

1 0x00005060 P60DOCK_TEST_TASK
46 0x44330015 PLOC_MPSOC_HANDLER
47 0x44330016 PLOC_SUPERVISOR_HANDLER
48 0x44330017 PLOC_SUPERVISOR_HELPER
49 0x44330032 SCEX
50 0x444100A2 SOLAR_ARRAY_DEPL_HANDLER
51 0x444100A4 HEATER_HANDLER
52 0x44420004 TMP1075_HANDLER_1
70 0x445300A3 SYRLINKS_HK_HANDLER
71 0x49000000 ARDUINO_COM_IF
72 0x49010005 GPIO_IF
73 0x49010006 SCEX_UART_READER
74 0x49020004 SPI_MAIN_COM_IF
75 0x49020005 SPI_RW_COM_IF
76 0x49020006 SPI_RTD_COM_IF

2
deps/spacepackets vendored

@ -1 +1 @@
Subproject commit 5317f4c384321b5b5d8832f51c530fa91d3b2ae5
Subproject commit 0fce08fa9a37b50096198ea563ed22fc0447e1b4

2
deps/tmtccmd vendored

@ -1 +1 @@
Subproject commit a0afee42dd743888a3cb38952f45c0678a0fbcf3
Subproject commit 598aecbcae8a2d194f17ea27fd6a274b114a83c0

View File

@ -12,7 +12,7 @@ from typing import Union
from spacepackets.ecss import PusTelecommand
from tmtccmd.tc.pus_8_funccmd import generate_action_command
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
class GomspaceDeviceActionIds(enum.IntEnum):

View File

@ -1,3 +1,4 @@
from pus_tc.devs.scex import add_scex_cmds
from pus_tc.system.proc import add_proc_cmds
from pus_tc.devs.gps import add_gps_cmds
@ -35,8 +36,9 @@ def get_eive_service_op_code_dict() -> TmTcDefWrapper:
add_ccsds_cmds(defs=def_wrapper)
add_pdec_cmds(defs=def_wrapper)
add_heater_cmds(defs=def_wrapper)
add_tmp_sens_cmds(defs=def_wrapper)
add_proc_cmds(defs=def_wrapper)
add_tmp_sens_cmds(def_wrapper)
add_proc_cmds(def_wrapper)
add_scex_cmds(def_wrapper)
return def_wrapper

View File

@ -20,7 +20,7 @@ from gomspace.gomspace_common import Info as GsInfo
from config.object_ids import ACU_HANDLER_ID
from pus_tc.devs.p60dock import P60DockConfigTable
from tmtccmd.tc.pus_8_funccmd import generate_action_command
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
class ACUConfigTable:

View File

@ -9,7 +9,7 @@ import struct
from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.tc import QueueHelper
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
class CommandIds:

View File

@ -9,7 +9,7 @@ from config.definitions import CustomServiceList
from config.object_ids import get_object_ids
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
from tmtccmd.tc import QueueHelper
from tmtccmd.utility.obj_id import ObjectIdU32
from tmtccmd.util.obj_id import ObjectIdU32
from tmtccmd.tc.pus_201_fsfw_health import (
pack_set_health_cmd_data,
FsfwHealth,

View File

@ -15,7 +15,7 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
generate_one_hk_command,
)
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
class ImtqSetIds:

View File

@ -10,7 +10,7 @@ import struct
from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.tc import QueueHelper
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
class ActionIds:

View File

@ -12,7 +12,7 @@ import enum
from tmtccmd.logging import get_console_logger
from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.tc import QueueHelper
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
from utility.input_helper import InputHelper
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes

View File

@ -12,7 +12,7 @@ from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.logging import get_console_logger
from tmtccmd.tc import QueueHelper
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
from utility.input_helper import InputHelper
LOGGER = get_console_logger()

View File

@ -14,7 +14,7 @@ from pus_tc.service_200_mode import pack_mode_data, Modes
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
from tmtccmd.tc import QueueHelper
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
class SetIds:

View File

@ -6,7 +6,7 @@ from spacepackets.ecss import PusTelecommand
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
from tmtccmd.tc import QueueHelper
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
from tmtccmd.tc.pus_200_fsfw_modes import Modes, pack_mode_data, Subservices
import config.object_ids as oids
from config.object_ids import get_object_ids

169
pus_tc/devs/scex.py Normal file
View File

@ -0,0 +1,169 @@
import enum
import json
from config.definitions import CustomServiceList
from tmtccmd.tc import QueueHelper
from tmtccmd.tc.pus_8_funccmd import generate_action_command
from tmtccmd.config import OpCodeEntry, TmTcDefWrapper
from config.object_ids import SCEX_HANDLER_ID
USE_SCEX_CONF_FILE = True
class OpCodes:
PING = ["0", "ping"]
ION_CMD = ["1", "ion"]
TEMP_CMD = ["2", "temp"]
EXP_STATUS_CMD = ["3", "expstatus"]
ONE_CELLS_CMD = ["4", "onecell"]
ALL_CELLS_CMD = ["5", "allcells"]
FRAM = ["6", "fram"]
class ActionIds(enum.IntEnum):
PING = 7
ION_CMD = 4
TEMP_CMD = 3
EXP_STATUS_CMD = 2
ONE_CELLS_CMD = 6
ALL_CELLS_CMD = 5
FRAM = 1
class Info:
PING = "Send Ping command"
ION_CMD = "Read Ion"
TEMP_CMD = "Read Temperature"
EXP_STATUS_CMD = "Read Experiment Status"
ONE_CELLS_CMD = "One Cell"
ALL_CELLS_CMD = "All Cells"
FRAM = "Read FRAM"
def add_scex_cmds(defs: TmTcDefWrapper):
oce = OpCodeEntry()
oce.add(keys=OpCodes.PING, info=Info.PING)
oce.add(keys=OpCodes.ION_CMD, info=Info.ION_CMD)
oce.add(keys=OpCodes.TEMP_CMD, info=Info.TEMP_CMD)
oce.add(keys=OpCodes.EXP_STATUS_CMD, info=Info.EXP_STATUS_CMD)
oce.add(keys=OpCodes.ONE_CELLS_CMD, info=Info.ONE_CELLS_CMD)
oce.add(keys=OpCodes.ALL_CELLS_CMD, info=Info.ALL_CELLS_CMD)
oce.add(keys=OpCodes.FRAM, info=Info.FRAM)
defs.add_service(
name=CustomServiceList.SCEX.value,
info="SCEX Device",
op_code_entry=oce
)
def pack_scex_cmds(q: QueueHelper, op_code: str):
if op_code in OpCodes.PING:
q.add_log_cmd(Info.PING)
app_data = bytes([0])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.PING, app_data))
if op_code in OpCodes.ION_CMD:
q.add_log_cmd(Info.ION_CMD)
app_data = bytes([0])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.ION_CMD, app_data))
if op_code in OpCodes.TEMP_CMD:
q.add_log_cmd(Info.TEMP_CMD)
app_data = bytes([0])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.TEMP_CMD, app_data))
if op_code in OpCodes.EXP_STATUS_CMD:
q.add_log_cmd(Info.EXP_STATUS_CMD)
app_data = bytes([0])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.EXP_STATUS_CMD, app_data))
# one cell
if op_code in OpCodes.ONE_CELLS_CMD:
q.add_log_cmd(Info.ONE_CELLS_CMD)
app_data = bytearray()
# cell number
cn = 0
while True:
cell_select = input("Which solar cell should be measured? (1-10): ")
if not cell_select.isdigit():
print("Invalid cell number. Try again.")
continue
cell_select = int(cell_select)
if cell_select < 1 or cell_select > 10:
print(
f"Invalid cell number {cell_select}, "
f"Please enter a valid number: "
)
continue
cn = cell_select - 1
break
if USE_SCEX_CONF_FILE:
with open("template/scex_conf.json") as json_file:
json_data = json.load(json_file)
first_dac = json_data["first_dac"]
last_dac = json_data["last_dac"]
res_switch1 = json_data["res_switch1"]
res_switch2 = json_data["res_switch2"]
dac_weight1 = json_data["dac_weight1"]
dac_weight2 = json_data["dac_weight2"]
dac_weight3 = json_data["dac_weight3"]
# in app_data
# app_data.extend(struct.pack("!H", first_dac))
append_16_bit_val(packet=app_data, val=first_dac[cn])
append_16_bit_val(packet=app_data, val=last_dac[cn])
append_16_bit_val(packet=app_data, val=res_switch1[cn])
append_16_bit_val(packet=app_data, val=res_switch2[cn])
app_data.append(dac_weight1[cn])
app_data.append(dac_weight2[cn])
app_data.append(dac_weight3[cn])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.ONE_CELLS_CMD, app_data))
if op_code in OpCodes.ALL_CELLS_CMD:
q.add_log_cmd(Info.ALL_CELLS_CMD)
app_data = bytearray()
# cell number
cn = 0
if USE_SCEX_CONF_FILE:
with open("template/scex_conf.json") as json_file:
json_data = json.load(json_file)
first_dac = json_data["first_dac"]
last_dac = json_data["last_dac"]
res_switch1 = json_data["res_switch1"]
res_switch2 = json_data["res_switch2"]
dac_weight1 = json_data["dac_weight1"]
dac_weight2 = json_data["dac_weight2"]
dac_weight3 = json_data["dac_weight3"]
# in app_data
# app_data.extend(struct.pack("!H", first_dac))
append_16_bit_val(packet=app_data, val=first_dac[cn])
append_16_bit_val(packet=app_data, val=last_dac[cn])
append_16_bit_val(packet=app_data, val=res_switch1[cn])
append_16_bit_val(packet=app_data, val=res_switch2[cn])
app_data.append(dac_weight1[cn])
app_data.append(dac_weight2[cn])
app_data.append(dac_weight3[cn])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.ALL_CELLS_CMD, app_data))
if op_code in OpCodes.FRAM:
q.add_log_cmd(Info.FRAM)
app_data = bytes([0])
q.add_pus_tc(generate_action_command(SCEX_HANDLER_ID, ActionIds.FRAM, app_data))
def append_16_bit_val(packet: bytearray, val: int):
packet.append((val >> 8) & 0xFF)
packet.append(val & 0xFF)

View File

@ -12,7 +12,7 @@ from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
from tmtccmd.logging import get_console_logger
from tmtccmd.tc import QueueHelper
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
from utility.input_helper import InputHelper

View File

@ -12,7 +12,7 @@ import struct
from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.tc import QueueHelper
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
class Commands:

View File

@ -11,7 +11,7 @@ from spacepackets.ecss.tc import PusTelecommand
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
import struct
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
class SetIds:

View File

@ -9,7 +9,7 @@ from spacepackets.ecss.tc import PusTelecommand
from pus_tc.service_200_mode import pack_mode_data
from tmtccmd.tc import QueueHelper
from tmtccmd.tc.pus_200_fsfw_modes import Modes
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
class Tmp1075TestProcedure:

View File

@ -1,6 +1,10 @@
"""Hook function which packs telecommands based on service and operation code string
"""
from typing import cast
from pus_tc.devs.rtd import pack_rtd_commands
from pus_tc.devs.scex import pack_scex_cmds
from pus_tc.system.controllers import pack_cmd_ctrl_to_prompted_mode, get_object_from_op_code
from tmtccmd import DefaultProcedureInfo
from tmtccmd.config import CoreServiceList
from tmtccmd.logging import get_console_logger
@ -64,11 +68,12 @@ from config.object_ids import (
get_object_ids,
)
import config.object_ids as oids
from tmtccmd.util import ObjectIdU32
LOGGER = get_console_logger()
def handle_default_procedure(info: DefaultProcedureInfo, wrapper: FeedWrapper):
def handle_default_procedure(info: DefaultProcedureInfo, wrapper: FeedWrapper, gui: bool):
queue_helper = wrapper.queue_helper
service = info.service
op_code = info.op_code
@ -80,28 +85,28 @@ def handle_default_procedure(info: DefaultProcedureInfo, wrapper: FeedWrapper):
if service == CoreServiceList.SERVICE_200.value:
return pack_service200_test_into(q=queue_helper)
if service == CustomServiceList.P60DOCK.value:
object_id = obj_id_man.get(P60_DOCK_HANDLER)
object_id = cast(ObjectIdU32, obj_id_man.get(P60_DOCK_HANDLER))
return pack_p60dock_cmds(object_id=object_id, q=queue_helper, op_code=op_code)
if service == CustomServiceList.RTD.value:
return pack_rtd_commands(object_id=None, q=queue_helper, op_code=op_code)
if service == CustomServiceList.PDU1.value:
object_id = obj_id_man.get(PDU_1_HANDLER_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(PDU_1_HANDLER_ID))
return pack_pdu1_commands(object_id=object_id, q=queue_helper, op_code=op_code)
if service == CustomServiceList.PDU2.value:
object_id = obj_id_man.get(PDU_2_HANDLER_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(PDU_2_HANDLER_ID))
return pack_pdu2_commands(object_id=object_id, q=queue_helper, op_code=op_code)
if service == CustomServiceList.ACU.value:
object_id = obj_id_man.get(ACU_HANDLER_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(ACU_HANDLER_ID))
return pack_acu_commands(object_id=object_id, q=queue_helper, op_code=op_code)
if service == CustomServiceList.BPX_BATTERY.value:
return pack_bpx_commands(q=queue_helper, op_code=op_code)
if service == CustomServiceList.TMP1075_1.value:
object_id = obj_id_man.get(TMP_1075_1_HANDLER_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(TMP_1075_1_HANDLER_ID))
return pack_tmp1075_test_into(
object_id=object_id, q=queue_helper, op_code=op_code
)
if service == CustomServiceList.TMP1075_2.value:
object_id = obj_id_man.get(TMP_1075_2_HANDLER_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(TMP_1075_2_HANDLER_ID))
return pack_tmp1075_test_into(
object_id=object_id, q=queue_helper, op_code=op_code
)
@ -109,10 +114,10 @@ def handle_default_procedure(info: DefaultProcedureInfo, wrapper: FeedWrapper):
object_id = HEATER_ID
return pack_heater_cmds(object_id=object_id, q=queue_helper, op_code=op_code)
if service == CustomServiceList.IMTQ.value:
object_id = obj_id_man.get(IMTQ_HANDLER_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(IMTQ_HANDLER_ID))
return pack_imtq_test_into(object_id=object_id, q=queue_helper, op_code=op_code)
if service == CustomServiceList.PLOC_MPSOC.value:
object_id = obj_id_man.get(PLOC_MPSOC_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(PLOC_MPSOC_ID))
return pack_ploc_mpsoc_commands(
object_id=object_id, q=queue_helper, op_code=op_code
)
@ -133,29 +138,29 @@ def handle_default_procedure(info: DefaultProcedureInfo, wrapper: FeedWrapper):
object_id=RW4_ID, rw_idx=4, q=queue_helper, op_code=op_code
)
if service == CustomServiceList.RAD_SENSOR.value:
object_id = obj_id_man.get(RAD_SENSOR_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(RAD_SENSOR_ID))
return pack_rad_sensor_test_into(
object_id=object_id, q=queue_helper, op_code=op_code
)
if service == CustomServiceList.PLOC_SUPV.value:
object_id = obj_id_man.get(PLOC_SUPV_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(PLOC_SUPV_ID))
return pack_ploc_supv_commands(
object_id=object_id, q=queue_helper, op_code=op_code
)
if service == CustomServiceList.STAR_TRACKER.value:
object_id = obj_id_man.get(STAR_TRACKER_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(STAR_TRACKER_ID))
return pack_star_tracker_commands(
object_id=object_id, q=queue_helper, op_code=op_code
)
if service == CustomServiceList.STR_IMG_HELPER.value:
object_id = obj_id_man.get(STR_IMG_HELPER_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(STR_IMG_HELPER_ID))
return pack_str_img_helper_command(
object_id=object_id, q=queue_helper, op_code=op_code
)
if service == CustomServiceList.CORE.value:
return pack_core_commands(q=queue_helper, op_code=op_code)
if service == CustomServiceList.PLOC_MEMORY_DUMPER.value:
object_id = obj_id_man.get(PLOC_MEMORY_DUMPER_ID)
object_id = cast(ObjectIdU32, obj_id_man.get(PLOC_MEMORY_DUMPER_ID))
return pack_ploc_memory_dumper_cmd(
object_id=object_id, q=queue_helper, op_code=op_code
)
@ -194,5 +199,13 @@ def handle_default_procedure(info: DefaultProcedureInfo, wrapper: FeedWrapper):
if service == CustomServiceList.TIME.value:
return pack_set_current_time_ascii_command(q=queue_helper)
if service == CustomServiceList.RW_ASSEMBLY.value:
return pack_rw_ass_cmds(q=queue_helper, object_id=RW_ASSEMBLY, op_code=op_code)
return pack_rw_ass_cmds(
q=queue_helper, object_id=RW_ASSEMBLY, op_code=op_code
)
if service == CustomServiceList.CONTROLLERS.value:
return pack_cmd_ctrl_to_prompted_mode(
q=queue_helper, object_id=get_object_from_op_code(op_code), gui=gui
)
if service == CustomServiceList.SCEX.value:
return pack_scex_cmds(q=queue_helper, op_code=op_code)
LOGGER.warning(f"Invalid Service {service}")

View File

@ -1,6 +1,6 @@
from tmtccmd.tc import QueueHelper
from tmtccmd.tc.pus_200_fsfw_modes import Modes
from tmtccmd.utility import ObjectIdU32
from tmtccmd.util import ObjectIdU32
from .common import command_mode
import config.object_ids as obj_ids

View File

@ -7,7 +7,7 @@ from pus_tc.devs.star_tracker import StarTrackerActionIds
from gomspace.gomspace_common import GomspaceDeviceActionIds
from tmtccmd.logging import get_console_logger
from tmtccmd.tm import Service8FsfwTm
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
LOGGER = get_console_logger()

View File

@ -1,4 +1,4 @@
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
class PrintWrapper:

View File

@ -2,7 +2,7 @@ import struct
from pus_tc.devs.bpx_batt import BpxSetIds
from pus_tm.defs import PrintWrapper
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
def handle_bpx_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):

View File

@ -1,7 +1,7 @@
import struct
from pus_tm.defs import PrintWrapper
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
def handle_gps_data(printer: FsfwTmTcPrinter, hk_data: bytes):

View File

@ -1,8 +1,8 @@
import struct
from pus_tm.defs import PrintWrapper
from tmtccmd.utility import ObjectIdU32
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util import ObjectIdU32
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from pus_tc.devs.gyros import L3gGyroSetIds, AdisGyroSetIds
import config.object_ids as obj_ids

View File

@ -1,7 +1,7 @@
import struct
from pus_tm.defs import PrintWrapper
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
def handle_eng_set(printer: FsfwTmTcPrinter, hk_data: bytes):

View File

@ -2,8 +2,8 @@ import struct
from pus_tm.defs import PrintWrapper
from pus_tc.devs.mgms import MgmRm3100SetIds, MgmLis3SetIds
from tmtccmd.utility import ObjectIdU32
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util import ObjectIdU32
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
import config.object_ids as obj_ids

View File

@ -1,7 +1,7 @@
import struct
from typing import List, Tuple
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from pus_tm.defs import PrintWrapper
from gomspace.gomspace_common import SetIds

View File

@ -1,7 +1,7 @@
import struct
from pus_tm.defs import PrintWrapper
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from pus_tc.devs.plpcdu import SetIds

View File

@ -1,7 +1,7 @@
import struct
from pus_tm.defs import PrintWrapper
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from pus_tc.devs.rad_sensor import SetIds

View File

@ -1,7 +1,7 @@
import struct
from pus_tm.defs import PrintWrapper, FsfwTmTcPrinter
from tmtccmd.utility.obj_id import ObjectIdU32
from tmtccmd.util.obj_id import ObjectIdU32
def handle_rw_hk_data(

View File

@ -2,8 +2,8 @@ import struct
from pus_tm.defs import PrintWrapper
from pus_tc.devs.sus import SetIds
from tmtccmd.utility import ObjectIdU32
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util import ObjectIdU32
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
def handle_sus_hk(

View File

@ -2,7 +2,7 @@ import struct
from pus_tm.defs import PrintWrapper
from pus_tc.devs.syrlinks_hk_handler import SetIds
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
def handle_syrlinks_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):

View File

@ -5,7 +5,7 @@ from config.object_ids import get_object_ids
from tmtccmd.tm import Service5Tm
from tmtccmd.logging import get_console_logger
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.fsfw import parse_fsfw_events_csv, EventDictT, EventInfo

View File

@ -8,7 +8,7 @@ from tmtccmd.logging.pus import RawTmtcTimedLogWrapper
from tmtccmd.pus import VerificationWrapper
from tmtccmd.tm import Service20FsfwTm, Service200FsfwTm
from tmtccmd.tm.pus_17_test import Service17TmExtended
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from .event_handler import handle_event_packet
from .verification_handler import handle_service_1_packet

View File

@ -9,7 +9,7 @@ from tmtccmd.tm.pus_3_fsfw_hk import (
HkContentType,
Service3FsfwTm,
)
from tmtccmd.utility.obj_id import ObjectIdU32, ObjectIdDictT
from tmtccmd.util.obj_id import ObjectIdU32, ObjectIdDictT
from tmtccmd.logging import get_console_logger
from pus_tm.devs.bpx_bat import handle_bpx_hk_data

View File

@ -2,7 +2,7 @@ import struct
from pus_tm.defs import PrintWrapper
from pus_tc.system.core import SetIds
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
def handle_core_hk_data(printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes):

View File

@ -3,8 +3,8 @@ import struct
from pus_tm.defs import PrintWrapper
from pus_tm.tcp_server_objects import *
from tmtccmd.utility import ObjectIdU32
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.util import ObjectIdU32
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
class SetIds(enum.IntEnum):

View File

@ -4,7 +4,7 @@ import json
import base64
from tmtccmd.logging import get_console_logger
from tmtccmd.utility.obj_id import ObjectIdU32
from tmtccmd.util.obj_id import ObjectIdU32
from dle_encoder import DleEncoder
LOGGER = get_console_logger()

9
template/scex_conf.json Normal file
View File

@ -0,0 +1,9 @@
{
"first_dac": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"last_dac": [40000, 40000, 40000, 40000, 40000, 40000, 40000, 40000, 40000, 40000],
"res_switch1": [8000, 8000, 8000, 7000, 8000, 8000, 8000, 8000, 8000, 8000],
"res_switch2": [15650, 15650, 15650, 13400, 15650, 13400, 13400, 13400, 13400, 13400],
"dac_weight1": [35, 35, 35, 35, 35, 37, 37, 37, 37, 37],
"dac_weight2": [30, 30, 30, 50, 30, 28, 28, 28, 28, 28],
"dac_weight3": [35, 35, 35, 35, 35, 35, 35, 35, 35, 35]
}

18
tmtcc.py Normal file → Executable file
View File

@ -27,6 +27,8 @@ except ImportError as error:
from spacepackets.ecss import PusVerificator
from tmtccmd import get_console_logger, TcHandlerBase, BackendBase
from tmtccmd.com_if import ComInterface
from tmtccmd.util import FileSeqCountProvider, PusFileSeqCountProvider
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.logging.pus import (
RawTmtcTimedLogWrapper,
@ -35,10 +37,8 @@ from tmtccmd.logging.pus import (
)
from tmtccmd.pus import VerificationWrapper
from tmtccmd.tm import SpecificApidHandlerBase, GenericApidHandlerBase, CcsdsTmHandler
from tmtccmd.utility.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.core import BackendRequest
from tmtccmd.logging import get_current_time_string
from tmtccmd.pus import FileSeqCountProvider
from tmtccmd.tc import (
ProcedureHelper,
FeedWrapper,
@ -88,23 +88,25 @@ class TcHandler(TcHandlerBase):
pus_verificator: PusVerificator,
file_logger: logging.Logger,
raw_logger: RawTmtcTimedLogWrapper,
gui: bool
):
super().__init__()
self.seq_count_provider = seq_count_provider
self.pus_verificator = pus_verificator
self.file_logger = file_logger
self.raw_logger = raw_logger
self.gui = gui
def feed_cb(self, info: ProcedureHelper, wrapper: FeedWrapper):
if info.proc_type == TcProcedureType.DEFAULT:
handle_default_procedure(info.to_def_procedure(), wrapper)
handle_default_procedure(info.to_def_procedure(), wrapper, self.gui)
def send_cb(self, entry_helper: QueueEntryHelper, com_if: ComInterface):
if entry_helper.is_tc:
if entry_helper.entry_type == TcQueueEntryType.PUS_TC:
pus_tc_wrapper = entry_helper.to_pus_tc_entry()
pus_tc_wrapper.pus_tc.seq_count = (
self.seq_count_provider.next_seq_count()
self.seq_count_provider.get_and_increment()
)
pus_tc_wrapper.pus_tc.apid = PUS_APID
# Add TC after Sequence Count stamping
@ -148,17 +150,19 @@ def setup_tmtc(
verificator: PusVerificator,
printer: FsfwTmTcPrinter,
raw_logger: RawTmtcTimedLogWrapper,
gui: bool
) -> (CcsdsTmHandler, TcHandler):
verification_wrapper = VerificationWrapper(verificator, LOGGER, printer.file_logger)
pus_handler = PusHandler(verification_wrapper, printer, raw_logger)
ccsds_handler = CcsdsTmHandler(generic_handler=UnknownApidHandler(None))
ccsds_handler.add_apid_handler(pus_handler)
seq_count_provider = FileSeqCountProvider()
seq_count_provider = PusFileSeqCountProvider()
tc_handler = TcHandler(
seq_count_provider=seq_count_provider,
pus_verificator=verificator,
file_logger=printer.file_logger,
raw_logger=raw_logger,
gui=gui
)
return ccsds_handler, tc_handler
@ -185,7 +189,9 @@ def main():
printer = FsfwTmTcPrinter(tmtc_logger.logger)
raw_logger = RawTmtcTimedLogWrapper(when=TimedLogWhen.PER_HOUR, interval=2)
pus_verificator = PusVerificator()
ccsds_handler, tc_handler = setup_tmtc(pus_verificator, printer, raw_logger)
ccsds_handler, tc_handler = setup_tmtc(
pus_verificator, printer, raw_logger, setup_wrapper.params.use_gui
)
tmtccmd.setup(setup_wrapper)
tmtc_backend = setup_backend(