Compare commits
145 Commits
07b6a9df18
...
v1.7.1
Author | SHA1 | Date | |
---|---|---|---|
ed1d9a81ed | |||
132d9d2456 | |||
6f8d63ba87 | |||
1f990e9647 | |||
2a6c0a6cab | |||
9aaf3cfa7a | |||
a81b8b608d | |||
6758ecef0d | |||
2e942ec21e | |||
3436172026 | |||
7302b10e06 | |||
193060ea65 | |||
![]() |
e552a92db4 | ||
![]() |
b0e78beaff | ||
![]() |
6d3be2af33 | ||
![]() |
b0ef4446d5 | ||
![]() |
d55a12a100 | ||
![]() |
ec0ef1a4f7 | ||
![]() |
3b073a7eef | ||
941f46401e | |||
2a38b1b16f | |||
fe1bed900a | |||
7a15062efe | |||
953f02e895 | |||
c226491b6c | |||
da2968a512 | |||
96e9f26fd0 | |||
011fea37a0 | |||
78b6830782 | |||
09cab1941f | |||
![]() |
a8ea01bb2f | ||
9d98eb6b60 | |||
8048c50c22 | |||
98deb8444f | |||
![]() |
10ea97ff0b | ||
![]() |
19b76d961c | ||
899cd942ce | |||
3d26373726 | |||
36582621f2 | |||
2a9862489d | |||
8a66b2a721 | |||
f4e5bc1956 | |||
5be05c2a92 | |||
0eb6736692 | |||
20a44b4b67 | |||
3927377e94 | |||
aaba7d5857 | |||
d241101d88 | |||
0b9bbf6212 | |||
01b5ae8252 | |||
8fc67c2665 | |||
4daddf7255 | |||
805470df6d | |||
0e317a435a | |||
e4eed4602d | |||
6debacd946 | |||
24fbb26ac0 | |||
208724f0a9 | |||
fe1e6a2877 | |||
d413ec6d08 | |||
fc87e36c2e | |||
58c20e31cc | |||
cc5e4459b4 | |||
7a4d6ee13a | |||
74c9da8504 | |||
16ec4a1914 | |||
b4dcf2296c | |||
877b9bb5c1 | |||
eb9e93fbee | |||
e8f48480f5 | |||
acb48916cf | |||
a82e6b2e64 | |||
06750809cb | |||
e23bc11608 | |||
bc77e6ae76 | |||
fa58c8e2c3 | |||
e3342cf474 | |||
4d2b7a6150 | |||
574a3e9207 | |||
986f88e290 | |||
3b5d92f908 | |||
684ae7a9c4 | |||
7cc06ef0e0 | |||
3c343f751f | |||
79e897b035 | |||
![]() |
3e466f06ef | ||
![]() |
934b79a2f1 | ||
![]() |
5fe23be649 | ||
![]() |
85f5bf2e6e | ||
7310513805 | |||
aa52ed79ea | |||
2e84c822c8 | |||
e993d2d2ea | |||
8703aeea55 | |||
f40b70f66e | |||
![]() |
80ee42089e | ||
754edffeae | |||
74c61842c8 | |||
19f5ba62de | |||
10fa7658d0 | |||
52428e4e03 | |||
146cb52b66 | |||
5f1803b663 | |||
4d737bfc12 | |||
6e3bef7ac5 | |||
dc999188c0 | |||
04920feea5 | |||
e06bb91f08 | |||
27c1da4f77 | |||
4d9df1ba87 | |||
81cd88f521 | |||
cf572c311c | |||
d1899ef181 | |||
07381147f7 | |||
90c45ea0c7 | |||
1d5fe4ebc7 | |||
2b85ece071 | |||
55cf05918c | |||
110ec9644a | |||
56f3f9c3f1 | |||
e19883d80f | |||
c10fbe7fbe | |||
4433fb68ac | |||
a0280c880b | |||
d9fc5563ce | |||
cf5ca54fbe | |||
b4868b78e1 | |||
8a071954af | |||
361eb39aa1 | |||
a84d125b4b | |||
be536aca49 | |||
39e8ff7134 | |||
7e64595d1a | |||
6b840eff43 | |||
eb9deae5ab | |||
4b0d457937 | |||
b1dc449ccf | |||
97075080de | |||
0c334f615f | |||
9be8713fa0 | |||
e0c896e62d | |||
34760becb9 | |||
75b01009f1 | |||
264a4a791e | |||
673a3e8ba4 |
12
.gitignore
vendored
12
.gitignore
vendored
@@ -4,4 +4,14 @@ log
|
||||
.idea/*
|
||||
!.idea/runConfigurations
|
||||
|
||||
*.json
|
||||
*.json
|
||||
|
||||
/Lib
|
||||
/Scripts
|
||||
/pyvenv.cfg
|
||||
/bin
|
||||
/lib
|
||||
/lib64
|
||||
/share
|
||||
|
||||
/venv
|
||||
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "tmtc_core"]
|
||||
path = tmtc_core
|
||||
url = https://git.ksat-stuttgart.de/irs/eive/tmtc_core.git
|
||||
[submodule "tmtccmd"]
|
||||
path = tmtccmd
|
||||
url = https://github.com/rmspacefish/tmtccmd.git
|
||||
|
24
.idea/runConfigurations/PLOC_SUPV_Test.xml
generated
Normal file
24
.idea/runConfigurations/PLOC_SUPV_Test.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="PLOC SUPV Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s ploc_supv -l -t 6 --hk" />
|
||||
<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
.idea/runConfigurations/RW1_Test.xml
generated
Normal file
24
.idea/runConfigurations/RW1_Test.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="RW1 Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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="sftp://eive@[2001:7c0:2018:1099:babe:0:e1fe:f1a5]:22/bin/python3.8" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="false" />
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s reaction_wheel_1 -l -t 8 --hk" />
|
||||
<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
.idea/runConfigurations/RW2_Test_.xml
generated
Normal file
24
.idea/runConfigurations/RW2_Test_.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="RW2 Test " type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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="sftp://eive@[2001:7c0:2018:1099:babe:0:e1fe:f1a5]:22/bin/python3.8" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="false" />
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s reaction_wheel_2 -l -t 6 --hk" />
|
||||
<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
.idea/runConfigurations/RW3_Test_.xml
generated
Normal file
24
.idea/runConfigurations/RW3_Test_.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="RW3 Test " type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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="sftp://eive@[2001:7c0:2018:1099:babe:0:e1fe:f1a5]:22/bin/python3.8" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="false" />
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s reaction_wheel_3 -l -t 6 --hk" />
|
||||
<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
.idea/runConfigurations/RW4_Test_.xml
generated
Normal file
24
.idea/runConfigurations/RW4_Test_.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="RW4 Test " type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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="sftp://eive@[2001:7c0:2018:1099:babe:0:e1fe:f1a5]:22/bin/python3.8" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="false" />
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s reaction_wheel_4 -l -t 12 --hk" />
|
||||
<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>
|
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Listener Mode UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="tmtcc Listener Mode UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 1 -c 2 --hk" />
|
||||
<option name="PARAMETERS" value="-m listener --hk" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
4
.idea/runConfigurations/tmtcc_Service_17_UDP.xml
generated
4
.idea/runConfigurations/tmtcc_Service_17_UDP.xml
generated
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Service 17 UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="tmtcc Service 17 UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s 17 -t 3" />
|
||||
<option name="PARAMETERS" value="-s 17 -o 0 -t 3" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Service 200 UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="tmtcc Service 200 UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s 200 -t 4" />
|
||||
<option name="PARAMETERS" value="-s 200 -o 0 -t 4" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
4
.idea/runConfigurations/tmtcc_Service_2_UDP.xml
generated
4
.idea/runConfigurations/tmtcc_Service_2_UDP.xml
generated
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Service 2 UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="tmtcc Service 2 UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s 2 -t 4" />
|
||||
<option name="PARAMETERS" value="-s 2 -t 4" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
4
.idea/runConfigurations/tmtcc_Service_3_UDP.xml
generated
4
.idea/runConfigurations/tmtcc_Service_3_UDP.xml
generated
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Service 3 UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="tmtcc Service 3 UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s 3 -p --hk" />
|
||||
<option name="PARAMETERS" value="-s 3 -p --hk" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
4
.idea/runConfigurations/tmtcc_Service_8_UDP.xml
generated
4
.idea/runConfigurations/tmtcc_Service_8_UDP.xml
generated
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Service 8 UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="tmtcc Service 8 UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@@ -13,7 +13,7 @@
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s 8 -t 8" />
|
||||
<option name="PARAMETERS" value="-s 8 -t 8" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
|
24
.idea/runConfigurations/tmtcclient_ACU_Test_UDP.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_ACU_Test_UDP.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient ACU Test UDP" 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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s acu -l" />
|
||||
<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
.idea/runConfigurations/tmtcclient_Heater_Test_UDP.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_Heater_Test_UDP.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient Heater Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s HEATER -l" />
|
||||
<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
.idea/runConfigurations/tmtcclient_IMTQ_Command_Dipole.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_IMTQ_Command_Dipole.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Command Dipole" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s imtq -o 7 -l -t 4 --hk" />
|
||||
<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
.idea/runConfigurations/tmtcclient_IMTQ_Get_Commanded_Dipole.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_IMTQ_Get_Commanded_Dipole.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Get Commanded Dipole" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s imtq -o 8 -l -t 4 --hk" />
|
||||
<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
.idea/runConfigurations/tmtcclient_IMTQ_Neg_X_Test.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_IMTQ_Neg_X_Test.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Neg X Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s imtq -o 2 -l -t 4 --hk" />
|
||||
<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
.idea/runConfigurations/tmtcclient_IMTQ_Neg_Y_Test.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_IMTQ_Neg_Y_Test.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Neg Y Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s imtq -o 4 -l -t 4 --hk" />
|
||||
<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
.idea/runConfigurations/tmtcclient_IMTQ_Neg_Z_Test.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_IMTQ_Neg_Z_Test.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Neg Z Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s imtq -o 6 -l -t 4 --hk" />
|
||||
<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
.idea/runConfigurations/tmtcclient_IMTQ_Pos_X_Test.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_IMTQ_Pos_X_Test.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Pos X Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s imtq -o 1 -l -t 4 --hk" />
|
||||
<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
.idea/runConfigurations/tmtcclient_IMTQ_Pos_Y_Test.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_IMTQ_Pos_Y_Test.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Pos Y Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s imtq -o 3 -l -t 4 --hk" />
|
||||
<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
.idea/runConfigurations/tmtcclient_IMTQ_Pos_Z_Test.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_IMTQ_Pos_Z_Test.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Pos Z Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-c udp -s imtq -o 5 -l -t 4 --hk" />
|
||||
<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>
|
@@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Single Command UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="tmtcclient IMTQ Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@@ -12,10 +12,10 @@
|
||||
<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$/tmtc_core/tmtcc_runner.py" />
|
||||
<option name="PARAMETERS" value="-m 2 -c 2 --boardIP=127.0.0.1" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s imtq -l -t 4" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" 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="" />
|
24
.idea/runConfigurations/tmtcclient_P60_Dock_Test_UDP.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_P60_Dock_Test_UDP.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient P60 Dock Test UDP" 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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s p60dock -l" />
|
||||
<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
.idea/runConfigurations/tmtcclient_PDU1_Test_UDP.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_PDU1_Test_UDP.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient PDU1 Test UDP" 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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s pdu1 -l" />
|
||||
<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
.idea/runConfigurations/tmtcclient_PDU2_Test_UDP.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_PDU2_Test_UDP.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient PDU2 Test UDP" 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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s pdu2 -l -t 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>
|
24
.idea/runConfigurations/tmtcclient_PLOC_Test_UDP_Flatsat.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_PLOC_Test_UDP_Flatsat.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient PLOC Test UDP Flatsat" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 1 -c 2 -s PLOC -l" />
|
||||
<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
.idea/runConfigurations/tmtcclient_PLOC_Test_UDP_Local.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_PLOC_Test_UDP_Local.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient PLOC Test UDP Local" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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="C:\Users\jakob\AppData\Local\Programs\Python\Python39\python.exe" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="false" />
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 1 -c 2 -s PLOC -l" />
|
||||
<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
.idea/runConfigurations/tmtcclient_S_A_Deployment_Test_UDP.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_S_A_Deployment_Test_UDP.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient S/A Deployment Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s SA_DEPL -l" />
|
||||
<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
.idea/runConfigurations/tmtcclient_Syrlinks_Test_UDP.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_Syrlinks_Test_UDP.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient Syrlinks Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s SYRLINKS -l --hk" />
|
||||
<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
.idea/runConfigurations/tmtcclient_TMP1075_1_Dock_Test_UDP.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_TMP1075_1_Dock_Test_UDP.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient TMP1075_1 Dock Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 3 -c 2 -s TMP1075_1 -l" />
|
||||
<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
.idea/runConfigurations/tmtcclient_TMP1075_2_Dock_Test_UDP.xml
generated
Normal file
24
.idea/runConfigurations/tmtcclient_TMP1075_2_Dock_Test_UDP.xml
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient TMP1075_2 Dock Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<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$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-m 1 -c 2 -s TMP1075_2 -l" />
|
||||
<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>
|
50
README.md
50
README.md
@@ -1,8 +1,46 @@
|
||||
### How to use this folder
|
||||
# TMTC Commander EIVE
|
||||
|
||||
This folder contains template files to set up the TMTC commander
|
||||
for a new mission or project. These files are the adaption
|
||||
point to customize the TMTC commander.
|
||||
# Set up virtual environment
|
||||
|
||||
## Linux
|
||||
|
||||
1. Create virtual environment
|
||||
|
||||
```sh
|
||||
python3 -m venv .
|
||||
```
|
||||
|
||||
2. Activate virtual environment
|
||||
|
||||
```sh
|
||||
./Scripts/activate
|
||||
```
|
||||
|
||||
3. Install `tmtccmd` for virtual environment. `-e` for interactive installation.
|
||||
|
||||
```sh
|
||||
cd tmtccmd
|
||||
python3 -m pip install -e .[gui]
|
||||
```
|
||||
|
||||
## Windows
|
||||
|
||||
1. Create virtual environment
|
||||
|
||||
```sh
|
||||
py -m venv .
|
||||
```
|
||||
|
||||
2. Activate virtual environment
|
||||
|
||||
```sh
|
||||
Scripts\activate.bat
|
||||
```
|
||||
|
||||
3. Install `tmtccmd` for virtual environment. `-e` for interactive installation.
|
||||
|
||||
```sh
|
||||
cd tmtccmd
|
||||
py -m pip install -e .[gui]
|
||||
```
|
||||
|
||||
To do so, simply copy all folder inside the TMTC commander root. This
|
||||
step is also required because the TMTC commander core will load some modules.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
def command_preparation_hook() -> PusTelecommand:
|
19
config/custom_mode_op.py
Normal file
19
config/custom_mode_op.py
Normal file
@@ -0,0 +1,19 @@
|
||||
"""
|
||||
@brief This file transfers control of custom mode handling to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
import enum
|
||||
|
||||
from tmtccmd.core.backend import TmTcHandler
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class CustomModeList(enum.IntEnum):
|
||||
pass
|
||||
|
||||
|
||||
def custom_mode_operation(tmtc_backend: TmTcHandler, mode: int):
|
||||
pass
|
31
config/definitions.py
Normal file
31
config/definitions.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""
|
||||
@brief This file transfers control of the custom definitions like modes to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
|
||||
import enum
|
||||
|
||||
|
||||
PUS_APID = 0x65
|
||||
|
||||
|
||||
class CustomServiceList(enum.Enum):
|
||||
TEST_DEVICE = "test",
|
||||
P60DOCK = "p60dock"
|
||||
PDU1 = "pdu1"
|
||||
PDU2 = "pdu2"
|
||||
ACU = "acu"
|
||||
TMP1075_1 = "tmp1075_1"
|
||||
TMP1075_2 = "tmp1075_2"
|
||||
HEATER = "heater"
|
||||
IMTQ = "imtq"
|
||||
PLOC = "ploc"
|
||||
PCDU = "pcdu",
|
||||
SA_DEPLYOMENT = "sa_depl"
|
||||
REACTION_WHEEL_1 = "reaction_wheel_1"
|
||||
REACTION_WHEEL_2 = "reaction_wheel_2"
|
||||
REACTION_WHEEL_3 = "reaction_wheel_3"
|
||||
REACTION_WHEEL_4 = "reaction_wheel_4"
|
||||
RAD_SENSOR = "rad_sensor"
|
||||
PLOC_SUPV = "ploc_supv"
|
36
config/globals_config.py
Normal file
36
config/globals_config.py
Normal file
@@ -0,0 +1,36 @@
|
||||
"""
|
||||
@brief This file transfers definitions of global variables to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
|
||||
import enum
|
||||
import argparse
|
||||
|
||||
|
||||
# All globals can be added here and will be part of a globals dictionary.
|
||||
from config.definitions import CustomServiceList, PUS_APID
|
||||
from config.custom_mode_op import CustomModeList
|
||||
from tmtccmd.config.definitions import CoreComInterfaces
|
||||
from tmtccmd.config.globals import set_default_globals_pre_args_parsing, \
|
||||
set_default_globals_post_args_parsing
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class CustomGlobalIds(enum.Enum):
|
||||
from enum import auto
|
||||
pass
|
||||
|
||||
|
||||
def set_globals_pre_args_parsing(gui: bool = False):
|
||||
set_default_globals_pre_args_parsing(
|
||||
gui=gui, apid=PUS_APID, com_if_id=CoreComInterfaces.TCPIP_UDP.value)
|
||||
|
||||
|
||||
def add_globals_post_args_parsing(args: argparse.Namespace, json_cfg_path: str):
|
||||
set_default_globals_post_args_parsing(
|
||||
args=args, custom_services_list=[CustomServiceList],
|
||||
custom_modes_list=[CustomModeList], json_cfg_path=json_cfg_path
|
||||
)
|
185
config/hook_implementations.py
Normal file
185
config/hook_implementations.py
Normal file
@@ -0,0 +1,185 @@
|
||||
import argparse
|
||||
from typing import Union, Dict, Tuple
|
||||
|
||||
from tmtccmd.config.definitions import ServiceOpCodeDictT
|
||||
from tmtccmd.tm.service_3_base import Service3Base
|
||||
from tmtccmd.ecss.tm import PusTelemetry
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
from tmtccmd.com_if.com_interface_base import CommunicationInterface
|
||||
from tmtccmd.core.backend import TmTcHandler
|
||||
from tmtccmd.config.hook import TmTcHookBase
|
||||
from tmtccmd.utility.tmtc_printer import TmTcPrinter
|
||||
from tmtccmd.config.globals import OpCodeDictKeys
|
||||
from config.object_ids import RW1_ID
|
||||
|
||||
from config.definitions import CustomServiceList
|
||||
|
||||
|
||||
class EiveHookObject(TmTcHookBase):
|
||||
|
||||
def get_service_op_code_dictionary(self) -> ServiceOpCodeDictT:
|
||||
from tmtccmd.config.globals import get_default_service_op_code_dict
|
||||
service_op_code_dict = get_default_service_op_code_dict()
|
||||
op_code_dict_srv_acu = {
|
||||
"0": ("ACU Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_acu_tuple = ("ACU Devices", op_code_dict_srv_acu)
|
||||
|
||||
op_code_dict_srv_tmp1075 = {
|
||||
"0": ("TMP1075 Tests", {OpCodeDictKeys.TIMEOUT: 2.2}),
|
||||
}
|
||||
service_tmp1075_1_tuple = ("TMP1075 1", op_code_dict_srv_tmp1075)
|
||||
service_tmp1075_2_tuple = ("TMP1075 2", op_code_dict_srv_tmp1075)
|
||||
|
||||
op_code_dict_srv_p60 = {
|
||||
"0": ("P60 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_p60_tuple = ("P60 Device", op_code_dict_srv_p60)
|
||||
|
||||
op_code_dict_srv_pdu1 = {
|
||||
"0": ("PDU1 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
|
||||
|
||||
op_code_dict_srv_pdu2 = {
|
||||
"0": ("PDU2 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_pdu2_tuple = ("PDU2 Device", op_code_dict_srv_pdu2)
|
||||
|
||||
op_code_dict_srv_heater = {
|
||||
"0": ("Heater Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_heater_tuple = ("Heater Device", op_code_dict_srv_heater)
|
||||
|
||||
op_code_dict_srv_imtq = {
|
||||
"0": ("IMTQ Tests All", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"1": ("IMTQ perform pos X self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"2": ("IMTQ perform neg X self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"3": ("IMTQ perform pos Y self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"4": ("IMTQ perform neg Y self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"5": ("IMTQ perform pos Z self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"6": ("IMTQ perform neg Z self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"7": ("IMTQ command dipole", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"8": ("IMTQ get commanded dipole", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_imtq_tuple = ("IMTQ Device", op_code_dict_srv_imtq)
|
||||
|
||||
op_code_dict_srv_rw = {
|
||||
"0": ("Reaction Wheel: Run all commands", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"1": ("Reaction Wheel: Set speed", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"2": ("Reaction Wheel: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"3": ("Reaction Wheel: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"4": ("Reaction Wheel: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"5": ("Reaction Wheel: Send get-telemetry-command", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_rw_tuple = ("Reaction Wheel", op_code_dict_srv_rw)
|
||||
|
||||
op_code_dict_srv_rad_sensor = {
|
||||
"0": ("Radiation Sensor: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"1": ("Radiation Sensor: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"2": ("Radiation Sensor: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_rad_sensor_tuple = ("Radiation Sensor", op_code_dict_srv_rad_sensor)
|
||||
|
||||
op_code_dict_srv_ploc_supv = {
|
||||
"0": ("PLOC Supervisor: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"1": ("PLOC Supervisor: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"2": ("PLOC Supervisor: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"3": ("PLOC Supervisor: Get HK Report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"4": ("PLOC Supervisor: Restart MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"5": ("PLOC Supervisor: Start MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"6": ("PLOC Supervisor: Shutdown MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"7": ("PLOC Supervisor: Select MPSoC boot image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"8": ("PLOC Supervisor: Set max restart tries", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"9": ("PLOC Supervisor: Reset MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"10": ("PLOC Supervisor: Set time reference", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"11": ("PLOC Supervisor: Set boot timeout", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"12": ("PLOC Supervisor: Disable Hk", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_ploc_supv_tuple = ("PLOC Supervisor", op_code_dict_srv_ploc_supv)
|
||||
|
||||
service_op_code_dict[CustomServiceList.ACU.value] = service_acu_tuple
|
||||
service_op_code_dict[CustomServiceList.TMP1075_1.value] = service_tmp1075_1_tuple
|
||||
service_op_code_dict[CustomServiceList.TMP1075_2.value] = service_tmp1075_2_tuple
|
||||
service_op_code_dict[CustomServiceList.P60DOCK.value] = service_p60_tuple
|
||||
service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu1_tuple
|
||||
service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu2_tuple
|
||||
service_op_code_dict[CustomServiceList.HEATER.value] = service_heater_tuple
|
||||
service_op_code_dict[CustomServiceList.IMTQ.value] = service_imtq_tuple
|
||||
service_op_code_dict[CustomServiceList.REACTION_WHEEL_1.value] = service_rw_tuple
|
||||
service_op_code_dict[CustomServiceList.REACTION_WHEEL_2.value] = service_rw_tuple
|
||||
service_op_code_dict[CustomServiceList.REACTION_WHEEL_3.value] = service_rw_tuple
|
||||
service_op_code_dict[CustomServiceList.REACTION_WHEEL_4.value] = service_rw_tuple
|
||||
service_op_code_dict[CustomServiceList.RAD_SENSOR.value] = service_rad_sensor_tuple
|
||||
service_op_code_dict[CustomServiceList.PLOC_SUPV.value] = service_ploc_supv_tuple
|
||||
return service_op_code_dict
|
||||
|
||||
def get_json_config_file_path(self) -> str:
|
||||
"""
|
||||
The user can specify a path and filename for the JSON configuration file by overriding this function.
|
||||
:return:
|
||||
"""
|
||||
return "config/tmtc_config.json"
|
||||
|
||||
def get_version(self) -> str:
|
||||
from config.version import SW_NAME, VERSION_MAJOR, VERSION_MINOR, VERSION_SUBMINOR
|
||||
return f"{SW_NAME} {VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_SUBMINOR}"
|
||||
|
||||
def add_globals_pre_args_parsing(self, gui: bool = False):
|
||||
from config.globals_config import set_globals_pre_args_parsing
|
||||
set_globals_pre_args_parsing(gui=gui)
|
||||
|
||||
def add_globals_post_args_parsing(self, args: argparse.Namespace):
|
||||
from config.globals_config import add_globals_post_args_parsing
|
||||
add_globals_post_args_parsing(args=args, json_cfg_path=self.get_json_config_file_path())
|
||||
|
||||
def assign_communication_interface(self, com_if_key: str, tmtc_printer: TmTcPrinter) -> \
|
||||
Union[CommunicationInterface, None]:
|
||||
from tmtccmd.config.com_if import create_communication_interface_default
|
||||
return create_communication_interface_default(
|
||||
com_if_key=com_if_key, tmtc_printer=tmtc_printer,
|
||||
json_cfg_path=self.get_json_config_file_path(), space_packet_id=0x0865
|
||||
)
|
||||
|
||||
def perform_mode_operation(self, tmtc_backend: TmTcHandler, mode: int):
|
||||
from config.custom_mode_op import custom_mode_operation
|
||||
custom_mode_operation(mode=mode, tmtc_backend=tmtc_backend)
|
||||
|
||||
def pack_service_queue(self, service: int, op_code: str, service_queue: TcQueueT):
|
||||
from pus_tc.tc_packer_hook import pack_service_queue_user
|
||||
pack_service_queue_user(service=service, op_code=op_code, service_queue=service_queue)
|
||||
|
||||
def tm_user_factory_hook(self, raw_tm_packet: bytearray) -> PusTelemetry:
|
||||
from pus_tm.factory_hook import tm_user_factory_hook
|
||||
return tm_user_factory_hook(raw_tm_packet=raw_tm_packet)
|
||||
|
||||
def get_object_ids(self) -> Dict[bytes, list]:
|
||||
from config.object_ids import get_object_ids
|
||||
return get_object_ids()
|
||||
|
||||
@staticmethod
|
||||
def handle_service_8_telemetry(
|
||||
object_id: bytes, action_id: int, custom_data: bytearray
|
||||
) -> Tuple[list, list]:
|
||||
from pus_tm.service_8_hook import user_analyze_service_8_data
|
||||
return user_analyze_service_8_data(
|
||||
object_id=object_id, action_id=action_id, custom_data=custom_data
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def handle_service_3_housekeeping(
|
||||
object_id: bytes, set_id: int, hk_data: bytearray, service3_packet: Service3Base
|
||||
) -> Tuple[list, list, bytearray, int]:
|
||||
from pus_tm.hk_handling import handle_user_hk_packet
|
||||
return handle_user_hk_packet(
|
||||
object_id=object_id, set_id=set_id, hk_data=hk_data, service3_packet=service3_packet
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def handle_service_5_event(
|
||||
object_id: bytes, event_id: int, param_1: int, param_2: int
|
||||
) -> str:
|
||||
if object_id == RW1_ID:
|
||||
if event_id == 1:
|
||||
return ""
|
||||
return ""
|
51
config/object_ids.py
Normal file
51
config/object_ids.py
Normal file
@@ -0,0 +1,51 @@
|
||||
"""
|
||||
@brief This file transfers control of the object IDs to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
from typing import Dict
|
||||
|
||||
PUS_SERVICE_17_ID = bytes([0x53, 0x00, 0x00, 0x17])
|
||||
TEST_DEVICE_ID = bytes([0x54, 0x00, 0xAF, 0xFE])
|
||||
P60_DOCK_HANDLER = bytes([0x44, 0x25, 0x00, 0x00])
|
||||
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])
|
||||
TMP_1075_1_HANDLER_ID = bytes([0x44, 0x42, 0x00, 0x04])
|
||||
TMP_1075_2_HANDLER_ID = bytes([0x44, 0x42, 0x00, 0x05])
|
||||
HEATER_ID = bytes([0x44, 0x41, 0x00, 0xA4])
|
||||
PCDU_HANDLER_ID = bytes([0x44, 0x20, 0x00, 0xA1])
|
||||
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x10, 0xA2])
|
||||
SYRLINKS_HANDLER = bytes([0x44, 0x53, 0x00, 0xA3])
|
||||
IMTQ_HANDLER_ID = bytes([0x44, 0x14, 0x00, 0x14])
|
||||
PLOC_MPSOC_ID = bytes([0x44, 0x33, 0x00, 0x15])
|
||||
RW1_ID = bytes([0x44, 0x12, 0x00, 0x1])
|
||||
RW2_ID = bytes([0x44, 0x12, 0x00, 0x2])
|
||||
RW3_ID = bytes([0x44, 0x12, 0x00, 0x3])
|
||||
RW4_ID = bytes([0x44, 0x12, 0x00, 0x4])
|
||||
START_TRACKER_ID = bytes([0x44, 0x13, 0x00, 0x1])
|
||||
RAD_SENSOR_ID = bytes([0x44, 0x32, 0x00, 0xA5])
|
||||
PLOC_SUPV_ID = bytes([0x44, 0x33, 0x00, 0x16])
|
||||
|
||||
|
||||
def get_object_ids() -> Dict[bytes, list]:
|
||||
object_id_dict = ({
|
||||
PUS_SERVICE_17_ID: "PUS Service 17",
|
||||
TEST_DEVICE_ID: "Test Device",
|
||||
P60_DOCK_HANDLER: "P60",
|
||||
PDU_1_HANDLER_ID: "PCDU PDU1 Handler",
|
||||
PDU_2_HANDLER_ID: "PCDU PDU2 Handler",
|
||||
ACU_HANDLER_ID: "ACU Handler",
|
||||
TMP_1075_1_HANDLER_ID: "TMP 1075 Handler 1",
|
||||
TMP_1075_2_HANDLER_ID: "TMP 1075 Handler 2",
|
||||
HEATER_ID: "Heater",
|
||||
PCDU_HANDLER_ID: "PCDU",
|
||||
SOLAR_ARRAY_DEPLOYMENT_ID: "Solar Array Deployment",
|
||||
RW1_ID: "Reaction Wheel 1",
|
||||
RW2_ID: "Reaction Wheel 2",
|
||||
RW3_ID: "Reaction Wheel 3",
|
||||
RW4_ID: "Reaction Wheel 4",
|
||||
RAD_SENSOR_ID: "Radiation Sensor",
|
||||
PLOC_SUPV_ID: "PLOC Supervisor",
|
||||
})
|
||||
return object_id_dict
|
@@ -1,18 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers control of communication interface setup to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
from typing import Union
|
||||
|
||||
from tmtc_core.com_if.tmtcc_com_interface_base import CommunicationInterface
|
||||
from tmtc_core.core.tmtc_core_definitions import ComInterfaces
|
||||
from tmtc_core.core.tmtcc_com_if_setup import create_communication_interface_default
|
||||
from tmtc_core.utility.tmtcc_tmtc_printer import TmTcPrinter
|
||||
|
||||
|
||||
def create_communication_interface_user(com_if: ComInterfaces, tmtc_printer: TmTcPrinter) -> \
|
||||
Union[CommunicationInterface, None]:
|
||||
return create_communication_interface_default(com_if, tmtc_printer)
|
||||
|
||||
|
@@ -1,42 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers control of the custom definitions like modes to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
|
||||
import enum
|
||||
from enum import auto
|
||||
|
||||
|
||||
# Mode options, set by args parser
|
||||
class ModeList(enum.Enum):
|
||||
Idle = 0
|
||||
ListenerMode = 1
|
||||
SingleCommandMode = 2
|
||||
ServiceTestMode = 3
|
||||
SoftwareTestMode = 4
|
||||
PromptMode = 32
|
||||
|
||||
|
||||
class ServiceList(enum.Enum):
|
||||
SERVICE_2 = 0
|
||||
SERVICE_3 = auto()
|
||||
SERVICE_5 = auto()
|
||||
SERVICE_8 = auto()
|
||||
SERVICE_9 = auto()
|
||||
SERVICE_17 = auto()
|
||||
SERVICE_20 = auto()
|
||||
SERVICE_23 = auto()
|
||||
SERVICE_200 = auto()
|
||||
|
||||
|
||||
class SerialConfig(enum.Enum):
|
||||
SERIAL_PORT = auto()
|
||||
SERIAL_BAUD_RATE = auto()
|
||||
SERIAL_TIMEOUT = auto()
|
||||
SERIAL_COMM_TYPE = auto()
|
||||
|
||||
|
||||
class EthernetConfig(enum.Enum):
|
||||
SEND_ADDRESS = auto()
|
||||
RECV_ADDRESS = auto()
|
@@ -1,223 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers definitions of global variables to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
|
||||
import enum
|
||||
import argparse
|
||||
|
||||
|
||||
# All globals can be added here and will be part of a globals dictionary.
|
||||
from config.tmtcc_definitions import ServiceList, ModeList
|
||||
|
||||
from tmtc_core.com_if.tmtcc_serial_com_if import SerialCommunicationType
|
||||
from tmtc_core.com_if.tmtcc_serial_utilities import determine_com_port
|
||||
from tmtc_core.core.tmtc_core_definitions import ComInterfaces
|
||||
from tmtc_core.utility.tmtcc_logger import get_logger
|
||||
|
||||
|
||||
class GlobalIds(enum.Enum):
|
||||
from enum import auto
|
||||
# Generic parameters
|
||||
APID = auto()
|
||||
MODE = auto()
|
||||
SERVICE = auto()
|
||||
SERVICELIST = auto()
|
||||
COM_IF = auto()
|
||||
OP_CODE = auto()
|
||||
TM_TIMEOUT = auto()
|
||||
|
||||
# Miscellaneous
|
||||
DISPLAY_MODE = auto()
|
||||
USE_LISTENER_AFTER_OP = auto()
|
||||
PRINT_HK = auto()
|
||||
PRINT_TM = auto()
|
||||
PRINT_RAW_TM = auto()
|
||||
PRINT_TO_FILE = auto()
|
||||
RESEND_TC = auto()
|
||||
TC_SEND_TIMEOUT_FACTOR = auto()
|
||||
|
||||
# Config dictionaries
|
||||
USE_SERIAL = auto()
|
||||
SERIAL_CONFIG = auto()
|
||||
USE_ETHERNET = auto()
|
||||
ETHERNET_CONFIG = auto()
|
||||
|
||||
# Object handles
|
||||
PRETTY_PRINTER = auto()
|
||||
TM_LISTENER_HANDLE = auto()
|
||||
COM_INTERFACE_HANDLE = auto()
|
||||
TMTC_PRINTER_HANDLE = auto()
|
||||
|
||||
|
||||
def add_globals_pre_args_parsing(gui: bool = False):
|
||||
from tmtc_core.core.tmtcc_globals_manager import update_global
|
||||
import pprint
|
||||
|
||||
update_global(GlobalIds.APID, 0xef)
|
||||
update_global(GlobalIds.COM_IF, ComInterfaces.EthernetUDP)
|
||||
update_global(GlobalIds.TC_SEND_TIMEOUT_FACTOR, 2)
|
||||
update_global(GlobalIds.TM_TIMEOUT, 4)
|
||||
update_global(GlobalIds.DISPLAY_MODE, "long")
|
||||
update_global(GlobalIds.PRINT_TO_FILE, True)
|
||||
|
||||
update_global(GlobalIds.SERIAL_CONFIG, dict())
|
||||
update_global(GlobalIds.ETHERNET_CONFIG, dict())
|
||||
pp = pprint.PrettyPrinter()
|
||||
update_global(GlobalIds.PRETTY_PRINTER, pp)
|
||||
update_global(GlobalIds.TM_LISTENER_HANDLE, None)
|
||||
update_global(GlobalIds.COM_INTERFACE_HANDLE, None)
|
||||
update_global(GlobalIds.TMTC_PRINTER_HANDLE, None)
|
||||
update_global(GlobalIds.PRINT_RAW_TM, False)
|
||||
update_global(GlobalIds.RESEND_TC, False)
|
||||
|
||||
update_global(GlobalIds.OP_CODE, "0")
|
||||
update_global(GlobalIds.MODE, ModeList.ListenerMode)
|
||||
|
||||
if gui:
|
||||
set_up_ethernet_cfg()
|
||||
|
||||
servicelist = dict()
|
||||
servicelist[ServiceList.SERVICE_2] = ["Service 2 Raw Commanding"]
|
||||
servicelist[ServiceList.SERVICE_3] = ["Service 3 Housekeeping"]
|
||||
servicelist[ServiceList.SERVICE_5] = ["Service 5 Event"]
|
||||
servicelist[ServiceList.SERVICE_8] = ["Service 8 Functional Commanding"]
|
||||
servicelist[ServiceList.SERVICE_9] = ["Service 9 Time"]
|
||||
servicelist[ServiceList.SERVICE_17] = ["Service 17 Test"]
|
||||
servicelist[ServiceList.SERVICE_20] = ["Service 20 Parameters"]
|
||||
servicelist[ServiceList.SERVICE_23] = ["Service 23 File Management"]
|
||||
servicelist[ServiceList.SERVICE_200] = ["Service 200 Mode Management"]
|
||||
update_global(GlobalIds.SERVICE, ServiceList.SERVICE_17)
|
||||
update_global(GlobalIds.SERVICELIST, servicelist)
|
||||
|
||||
|
||||
def add_globals_post_args_parsing(args: argparse.Namespace):
|
||||
from tmtc_core.core.tmtcc_globals_manager import update_global
|
||||
from config.tmtcc_definitions import ModeList
|
||||
logger = get_logger()
|
||||
|
||||
mode_param = ModeList.ListenerMode
|
||||
if 0 <= args.mode <= 6:
|
||||
if args.mode == 0:
|
||||
mode_param = ModeList.GUIMode
|
||||
elif args.mode == 1:
|
||||
mode_param = ModeList.ListenerMode
|
||||
elif args.mode == 2:
|
||||
mode_param = ModeList.SingleCommandMode
|
||||
elif args.mode == 3:
|
||||
mode_param = ModeList.ServiceTestMode
|
||||
elif args.mode == 4:
|
||||
mode_param = ModeList.SoftwareTestMode
|
||||
update_global(GlobalIds.MODE, mode_param)
|
||||
|
||||
if args.com_if == ComInterfaces.EthernetUDP.value:
|
||||
com_if = ComInterfaces.EthernetUDP
|
||||
elif args.com_if == ComInterfaces.Serial.value:
|
||||
com_if = ComInterfaces.Serial
|
||||
elif args.com_if == ComInterfaces.Dummy.value:
|
||||
com_if = ComInterfaces.Dummy
|
||||
elif args.com_if == ComInterfaces.QEMU.value:
|
||||
com_if = ComInterfaces.QEMU
|
||||
else:
|
||||
com_if = ComInterfaces.Serial
|
||||
update_global(GlobalIds.COM_IF, com_if)
|
||||
|
||||
if args.short_display_mode:
|
||||
display_mode_param = "short"
|
||||
else:
|
||||
display_mode_param = "long"
|
||||
update_global(GlobalIds.DISPLAY_MODE, display_mode_param)
|
||||
|
||||
service = str(args.service).lower()
|
||||
if service == "2":
|
||||
service = ServiceList.SERVICE_2
|
||||
elif service == "3":
|
||||
service = ServiceList.SERVICE_3
|
||||
elif service == "5":
|
||||
service = ServiceList.SERVICE_5
|
||||
elif service == "8":
|
||||
service = ServiceList.SERVICE_8
|
||||
elif service == "9":
|
||||
service = ServiceList.SERVICE_9
|
||||
elif service == "17":
|
||||
service = ServiceList.SERVICE_17
|
||||
elif service == "20":
|
||||
service = ServiceList.SERVICE_20
|
||||
elif service == "23":
|
||||
service = ServiceList.SERVICE_23
|
||||
else:
|
||||
logger.warning("Service not known! Setting standard service 17")
|
||||
service = ServiceList.SERVICE_17
|
||||
|
||||
update_global(GlobalIds.SERVICE, service)
|
||||
|
||||
if args.op_code is None:
|
||||
op_code = 0
|
||||
else:
|
||||
op_code = str(args.op_code).lower()
|
||||
update_global(GlobalIds.OP_CODE, op_code)
|
||||
|
||||
update_global(GlobalIds.USE_LISTENER_AFTER_OP, args.listener)
|
||||
update_global(GlobalIds.TM_TIMEOUT, args.tm_timeout)
|
||||
update_global(GlobalIds.PRINT_HK, args.print_hk)
|
||||
update_global(GlobalIds.PRINT_TM, args.print_tm)
|
||||
update_global(GlobalIds.PRINT_RAW_TM, args.raw_data_print)
|
||||
update_global(GlobalIds.PRINT_TO_FILE, args.print_log)
|
||||
update_global(GlobalIds.RESEND_TC, args.resend_tc)
|
||||
update_global(GlobalIds.TC_SEND_TIMEOUT_FACTOR, 3)
|
||||
|
||||
use_serial_cfg = False
|
||||
if com_if == ComInterfaces.Serial or com_if == ComInterfaces.QEMU:
|
||||
use_serial_cfg = True
|
||||
if use_serial_cfg:
|
||||
set_up_serial_cfg(com_if)
|
||||
|
||||
use_ethernet_cfg = False
|
||||
if com_if == ComInterfaces.EthernetUDP:
|
||||
use_ethernet_cfg = True
|
||||
if use_ethernet_cfg:
|
||||
# TODO: Port and IP address can also be passed as CLI parameters. Use them here if applicable
|
||||
set_up_ethernet_cfg()
|
||||
|
||||
|
||||
def set_up_serial_cfg(com_if: ComInterfaces):
|
||||
from tmtc_core.core.tmtcc_globals_manager import update_global
|
||||
update_global(GlobalIds.USE_SERIAL, True)
|
||||
from tmtc_core.core.tmtcc_globals_manager import get_global
|
||||
from config.tmtcc_definitions import SerialConfig
|
||||
serial_cfg_dict = get_global(GlobalIds.SERIAL_CONFIG)
|
||||
if com_if == ComInterfaces.Serial:
|
||||
com_port = determine_com_port()
|
||||
else:
|
||||
com_port = ""
|
||||
serial_cfg_dict.update({SerialConfig.SERIAL_PORT: com_port})
|
||||
serial_cfg_dict.update({SerialConfig.SERIAL_BAUD_RATE: 115200})
|
||||
serial_cfg_dict.update({SerialConfig.SERIAL_TIMEOUT: 0.01})
|
||||
serial_cfg_dict.update({SerialConfig.SERIAL_COMM_TYPE: SerialCommunicationType.DLE_ENCODING})
|
||||
serial_cfg_dict.update({SerialConfig.SERIAL_FRAME_SIZE: 256})
|
||||
serial_cfg_dict.update({SerialConfig.SERIAL_DLE_QUEUE_LEN: 25})
|
||||
serial_cfg_dict.update({SerialConfig.SERIAL_DLE_MAX_FRAME_SIZE: 1024})
|
||||
update_global(GlobalIds.SERIAL_CONFIG, serial_cfg_dict)
|
||||
|
||||
|
||||
def set_up_ethernet_cfg():
|
||||
from tmtc_core.core.tmtcc_globals_manager import update_global
|
||||
update_global(GlobalIds.USE_ETHERNET, True)
|
||||
from tmtc_core.core.tmtcc_globals_manager import get_global
|
||||
from config.tmtcc_definitions import EthernetConfig
|
||||
ethernet_cfg_dict = get_global(GlobalIds.ETHERNET_CONFIG)
|
||||
# Local host and unused port as default config
|
||||
default_send_ip = "127.0.0.1"
|
||||
default_send_port = 7301
|
||||
send_address = (default_send_ip, default_send_port)
|
||||
ethernet_cfg_dict.update({EthernetConfig.SEND_ADDRESS: send_address})
|
||||
# Bind to all interfaces (might be insecure!)
|
||||
default_rcv_ip = ''
|
||||
default_rcv_port = 7302
|
||||
recv_address = (default_rcv_ip, default_rcv_port)
|
||||
ethernet_cfg_dict.update({EthernetConfig.RECV_ADDRESS: recv_address})
|
||||
update_global(GlobalIds.ETHERNET_CONFIG, ethernet_cfg_dict)
|
||||
|
||||
|
||||
|
@@ -1,23 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers control of the object IDs to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
|
||||
import enum
|
||||
from typing import Dict
|
||||
|
||||
|
||||
class ObjectIds(enum.Enum):
|
||||
from enum import auto
|
||||
PUS_SERVICE_17 = auto()
|
||||
TEST_DEVICE = auto()
|
||||
|
||||
|
||||
def set_object_ids(object_id_dict: Dict[ObjectIds, bytearray]):
|
||||
o_ids = ObjectIds
|
||||
object_id_dict.update(
|
||||
{o_ids.PUS_SERVICE_17: bytearray([0x53, 0x00, 0x00, 0x17]),
|
||||
o_ids.TEST_DEVICE: bytearray([0x44, 0x00, 0xAF, 0xFE]),
|
||||
}
|
||||
)
|
@@ -1,22 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers control of custom mode handling to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
import sys
|
||||
|
||||
from config.tmtcc_definitions import ModeList
|
||||
from core.tmtc_backend import TmTcHandler
|
||||
from test.obsw_pus_service_test import run_selected_pus_tests
|
||||
from tmtc_core.utility.tmtcc_logger import get_logger
|
||||
from utility.tmtcc_binary_uploader import BinaryFileUploader
|
||||
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
def perform_mode_operation_user(tmtc_backend: TmTcHandler, mode: ModeList):
|
||||
"""
|
||||
Custom modes can be implemented here
|
||||
"""
|
||||
LOGGER.error(f"Unknown mode {mode}, Configuration error !")
|
||||
sys.exit()
|
@@ -1,10 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers control of versioning to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
import tmtc_core.core.tmtcc_version as core
|
||||
|
||||
SW_NAME = core.SW_NAME
|
||||
SW_VERSION = core.SW_VERSION
|
||||
SW_SUBVERSION = core.SW_SUBVERSION
|
6
config/version.py
Normal file
6
config/version.py
Normal file
@@ -0,0 +1,6 @@
|
||||
SW_NAME = "eive"
|
||||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 7
|
||||
VERSION_SUBMINOR = 1
|
||||
|
||||
__version__ = "1.7.1"
|
0
gomspace/__init__.py
Normal file
0
gomspace/__init__.py
Normal file
132
gomspace/gomspace_common.py
Normal file
132
gomspace/gomspace_common.py
Normal file
@@ -0,0 +1,132 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file gomspace_common.py
|
||||
@brief PDU2 tests
|
||||
@details All functions and classes common for all gomspace devices are defined in this file.
|
||||
@author J. Meier
|
||||
@date 17.12.2020
|
||||
"""
|
||||
|
||||
|
||||
class GomspaceDeviceActions:
|
||||
PING = bytearray([0x0, 0x0, 0x0, 0x1])
|
||||
REBOOT = bytearray([0x0, 0x0, 0x0, 0x4])
|
||||
PARAM_GET = bytearray([0x0, 0x0, 0x0, 0x00])
|
||||
PARAM_SET = bytearray([0x0, 0x0, 0x0, 0xFF])
|
||||
WDT_RESET = bytearray([0x0, 0x0, 0x0, 0x9])
|
||||
REQUEST_HK_TABLE = bytearray([0x0, 0x0, 0x0, 0x10])
|
||||
|
||||
|
||||
class TableIds:
|
||||
config = 1
|
||||
hk = 4
|
||||
|
||||
|
||||
class TableEntry:
|
||||
uint8_size = 1
|
||||
uint16_size = 2
|
||||
uint32_size = 4
|
||||
|
||||
def __init__(self, parameter_address: bytearray, parameter_size):
|
||||
self.parameter_address = parameter_address
|
||||
self.parameter_size = parameter_size
|
||||
|
||||
|
||||
class Channel:
|
||||
on = 1
|
||||
off = 0
|
||||
|
||||
|
||||
def pack_get_param_command(object_id: bytearray, table_id: int, memory_address: bytearray,
|
||||
parameter_size: int) -> bytearray:
|
||||
""" Function to generate a command to retrieve parameters like the temperature from a gomspace device.
|
||||
@param object_id: The object id of the gomspace device handler.
|
||||
@param table_id: The table id of the gomspace device
|
||||
@param memory_address: Address offset within table of the value to read.
|
||||
@param parameter_size: Size of the value to read. E.g. temperature is uint16_t and thus parameter_size is 2
|
||||
@return: The command as bytearray.
|
||||
"""
|
||||
action_id = GomspaceDeviceActions.PARAM_GET
|
||||
command = bytearray()
|
||||
command = command + object_id + action_id
|
||||
command.append(table_id)
|
||||
command = command + memory_address
|
||||
command.append(parameter_size)
|
||||
return command
|
||||
|
||||
|
||||
def pack_set_param_command(object_id: bytearray, memory_address: bytearray, parameter_size: int,
|
||||
parameter: int) -> bytearray:
|
||||
""" Function to generate a command to set a parameter
|
||||
@param object_id: The object id of the gomspace device handler.
|
||||
@param memory_address: Address offset within table of the value to set.
|
||||
@param parameter: The parameter value to set.
|
||||
@param parameter_size: Size of the value to set. There are uint8_t, uint16_t and uint32_t in the device tables.
|
||||
@return: The command as bytearray.
|
||||
"""
|
||||
action_id = GomspaceDeviceActions.PARAM_SET
|
||||
command = bytearray()
|
||||
command = command + object_id + action_id
|
||||
command = command + memory_address
|
||||
command.append(parameter_size)
|
||||
if parameter_size == 1:
|
||||
command.append(parameter)
|
||||
elif parameter_size == 2:
|
||||
byte_one = 0xFF00 & parameter >> 8
|
||||
byte_two = 0xFF & parameter
|
||||
command.append(byte_one)
|
||||
command.append(byte_two)
|
||||
elif parameter_size == 4:
|
||||
byte_one = 0xFF000000 & parameter >> 24
|
||||
byte_two = 0xFF0000 & parameter >> 16
|
||||
byte_three = 0xFF00 & parameter >> 8
|
||||
byte_four = 0xFF & parameter
|
||||
command.append(byte_one)
|
||||
command.append(byte_two)
|
||||
command.append(byte_three)
|
||||
command.append(byte_four)
|
||||
return command
|
||||
|
||||
|
||||
def pack_ping_command(object_id: bytearray, data: bytearray) -> bytearray:
|
||||
"""" Function to generate the command to ping a gomspace device
|
||||
@param object_id Object Id of the gomspace device handler.
|
||||
@param data Bytearray containing the bytes to send to the gomspace device. For now the on board software
|
||||
supports only the handling of up to 33 bytes.
|
||||
@note The ping request sends the specified data to a gompsace device. These
|
||||
data are simply copied by the device and then sent back.
|
||||
"""
|
||||
action_id = GomspaceDeviceActions.PING
|
||||
command = object_id + action_id + data
|
||||
return command
|
||||
|
||||
|
||||
def pack_gnd_wdt_reset_command(object_id: bytearray) -> bytearray:
|
||||
"""" Function to generate the command to reset the watchdog of a gomspace device.
|
||||
@param object_id Object Id of the gomspace device handler.
|
||||
"""
|
||||
action_id = GomspaceDeviceActions.WDT_RESET
|
||||
command = bytearray()
|
||||
command += object_id + action_id
|
||||
return command
|
||||
|
||||
|
||||
def pack_reboot_command(object_id: bytearray) -> bytearray:
|
||||
""" Function to generate the command which triggers a reboot of a gomspace device
|
||||
@param object_id The object id of the gomspace device handler.
|
||||
"""
|
||||
action_id = GomspaceDeviceActions.REBOOT
|
||||
command = bytearray()
|
||||
command += object_id + action_id
|
||||
return command
|
||||
|
||||
|
||||
def pack_request_full_hk_table_command(object_id: bytearray) -> bytearray:
|
||||
""" Function to generate the command to request the full housekeeping table from a gomspace
|
||||
device.
|
||||
@param object_id The object id of the gomspace device handler.
|
||||
"""
|
||||
action_id = GomspaceDeviceActions.REQUEST_HK_TABLE
|
||||
command = bytearray()
|
||||
command = object_id + action_id
|
||||
return command
|
21
gomspace/gomspace_pdu_definitions.py
Normal file
21
gomspace/gomspace_pdu_definitions.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from gomspace.gomspace_common import TableEntry
|
||||
|
||||
|
||||
class PDUConfigTable:
|
||||
out_en_0 = TableEntry(bytearray([0x00, 0x48]), TableEntry.uint8_size)
|
||||
out_en_1 = TableEntry(bytearray([0x00, 0x49]), TableEntry.uint8_size)
|
||||
out_en_2 = TableEntry(bytearray([0x00, 0x4A]), TableEntry.uint8_size)
|
||||
out_en_3 = TableEntry(bytearray([0x00, 0x4B]), TableEntry.uint8_size)
|
||||
out_en_4 = TableEntry(bytearray([0x00, 0x4C]), TableEntry.uint8_size)
|
||||
out_en_5 = TableEntry(bytearray([0x00, 0x4D]), TableEntry.uint8_size)
|
||||
out_en_6 = TableEntry(bytearray([0x00, 0x4E]), TableEntry.uint8_size)
|
||||
out_en_7 = TableEntry(bytearray([0x00, 0x4F]), TableEntry.uint8_size)
|
||||
out_en_8 = TableEntry(bytearray([0x00, 0x50]), TableEntry.uint8_size)
|
||||
# When channel consumes more than cur_lu_lim, channel is turned of immediately
|
||||
cur_lu_lim_0 = TableEntry(bytearray([0x00, 0xB8]), TableEntry.uint16_size)
|
||||
|
||||
|
||||
class PDUHkTable:
|
||||
temperature = TableEntry(bytearray([0x00, 0x28]), TableEntry.uint16_size)
|
||||
# Ground WDT value (remaining seconds until reboot)
|
||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0x80]), TableEntry.uint32_size)
|
15
lint.py
Executable file
15
lint.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
status = os.system("flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics")
|
||||
if os.WEXITSTATUS(status) != 0:
|
||||
print("Flake8 linter errors")
|
||||
sys.exit(0)
|
||||
os.system("flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
125
pus_tc/acu.py
Normal file
125
pus_tc/acu.py
Normal file
@@ -0,0 +1,125 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmtcc_tc_acu.py
|
||||
@brief ACU tests
|
||||
@author J. Meier
|
||||
@date 21.12.2020
|
||||
"""
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from gomspace.gomspace_common import *
|
||||
from pus_tc.p60dock import P60DockConfigTable
|
||||
|
||||
from config.object_ids import P60_DOCK_HANDLER
|
||||
|
||||
|
||||
class ACUTestProcedure:
|
||||
"""
|
||||
@brief Use this class to define the tests to perform for the ACU.
|
||||
@details Setting all to True will run all tests.
|
||||
Setting all to False will only run the tests set to True.
|
||||
"""
|
||||
all = False
|
||||
reboot = False
|
||||
read_gnd_wdt = False
|
||||
gnd_wdt_reset = False
|
||||
ping = False
|
||||
read_temperature1 = False
|
||||
read_temperature2 = False
|
||||
read_temperature3 = True
|
||||
read_mppt_mode = True
|
||||
read_vboost = True
|
||||
read_vbat_max_hi = True
|
||||
read_vbat_max_lo = True
|
||||
read_ov_mode = True
|
||||
|
||||
|
||||
class ACUConfigTable:
|
||||
mppt_mode = TableEntry(bytearray([0x00, 0x00]), TableEntry.uint8_size)
|
||||
mppt_d_mode = TableEntry(bytearray([0x00, 0x01]), TableEntry.uint8_size)
|
||||
vboost = TableEntry(bytearray([0x00, 0x02]), TableEntry.uint16_size)
|
||||
vbat_max_hi = TableEntry(bytearray([0x00, 0x10]), TableEntry.uint16_size)
|
||||
vbat_max_lo = TableEntry(bytearray([0x00, 0x12]), TableEntry.uint16_size)
|
||||
ov_mode = TableEntry(bytearray([0x00, 0x1A]), TableEntry.uint8_size)
|
||||
|
||||
|
||||
class ACUHkTable:
|
||||
temperature1 = TableEntry(bytearray([0x00, 0x1C]), TableEntry.uint16_size)
|
||||
temperature2 = TableEntry(bytearray([0x00, 0x1D]), TableEntry.uint16_size)
|
||||
temperature3 = TableEntry(bytearray([0x00, 0x1E]), TableEntry.uint16_size)
|
||||
# Ground WDT value (remaining seconds until reboot)
|
||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0x74]), TableEntry.uint32_size)
|
||||
|
||||
|
||||
def pack_acu_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing ACU"))
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Enabling ACU connected to X1 slot (channel 0)"))
|
||||
p60dock_object_id = P60_DOCK_HANDLER
|
||||
command = pack_set_param_command(p60dock_object_id, P60DockConfigTable.out_en_0.parameter_address,
|
||||
P60DockConfigTable.out_en_0.parameter_size, Channel.on)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if ACUTestProcedure.all or ACUTestProcedure.reboot:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reboot"))
|
||||
command = pack_reboot_command(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if ACUTestProcedure.all or ACUTestProcedure.read_gnd_wdt:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading ground watchdog timer value"))
|
||||
command = pack_get_param_command(object_id, TableIds.hk, ACUHkTable.wdt_gnd_left.parameter_address,
|
||||
ACUHkTable.wdt_gnd_left.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if ACUTestProcedure.all or ACUTestProcedure.gnd_wdt_reset:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Testing ground watchdog reset"))
|
||||
command = pack_gnd_wdt_reset_command(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if ACUTestProcedure.all or ACUTestProcedure.ping:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Ping Test"))
|
||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||
command = pack_ping_command(object_id, ping_data)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if ACUTestProcedure.all or ACUTestProcedure.read_temperature3:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading temperature 3"))
|
||||
command = pack_get_param_command(object_id, TableIds.hk, ACUHkTable.temperature3.parameter_address,
|
||||
ACUHkTable.temperature3.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if ACUTestProcedure.all or ACUTestProcedure.read_vboost:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vboost value"))
|
||||
command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.vboost.parameter_address,
|
||||
ACUConfigTable.vboost.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if ACUTestProcedure.all or ACUTestProcedure.read_vbat_max_hi:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vbat_max_hi"))
|
||||
command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.vbat_max_hi.parameter_address,
|
||||
ACUConfigTable.vbat_max_hi.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if ACUTestProcedure.all or ACUTestProcedure.read_vbat_max_lo:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vbat_max_lo"))
|
||||
command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.vbat_max_lo.parameter_address,
|
||||
ACUConfigTable.vbat_max_lo.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if ACUTestProcedure.all or ACUTestProcedure.read_ov_mode:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading ov_mode"))
|
||||
command = pack_get_param_command(object_id, TableIds.config, ACUConfigTable.ov_mode.parameter_address,
|
||||
ACUConfigTable.ov_mode.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning off ACU"))
|
||||
command = pack_set_param_command(p60dock_object_id, P60DockConfigTable.out_en_0.parameter_address,
|
||||
P60DockConfigTable.out_en_0.parameter_size, Channel.off)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
56
pus_tc/heater.py
Normal file
56
pus_tc/heater.py
Normal file
@@ -0,0 +1,56 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmtcc_tc_heater.py
|
||||
@brief Command sequence to test the HeaterHandler
|
||||
@author J. Meier
|
||||
@date 30.01.2021
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
class SwitchNumbers:
|
||||
HEATER_0 = 0
|
||||
HEATER_1 = 1
|
||||
HEATER_2 = 2
|
||||
HEATER_3 = 3
|
||||
HEATER_4 = 4
|
||||
HEATER_5 = 5
|
||||
HEATER_6 = 6
|
||||
HEATER_7 = 7
|
||||
NUMBER_OF_SWITCHES = 8
|
||||
|
||||
|
||||
class ActionIds:
|
||||
SWITCH_HEATER = bytearray([0x0, 0x0, 0x0, 0x0])
|
||||
|
||||
|
||||
def pack_heater_test_into(object_id: bytearray, tc_queue: TcQueueT):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Heater Switching"))
|
||||
|
||||
heater_number = int(input("Type number of heater to switch: "))
|
||||
if heater_number >= SwitchNumbers.NUMBER_OF_SWITCHES:
|
||||
print("Invalid heater switch number")
|
||||
return
|
||||
action = int(input("Turn switch on or off? (0 - off, 1 - on): "))
|
||||
if action != 0 and action != 1:
|
||||
print("Invalid action defined. Must be 0 (off) or 1 (on")
|
||||
debug_string = "Switching heater " + str(heater_number)
|
||||
tc_queue.appendleft((QueueCommands.PRINT, debug_string))
|
||||
command = pack_switch_heater_command(object_id, heater_number, action)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=300, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
|
||||
def pack_switch_heater_command(object_id: bytearray, switch_nr: int, switch_action: int) -> bytearray:
|
||||
""" Function to generate the command switch a heater
|
||||
@param object_id The object id of the HeaterHandler object.
|
||||
@param switch_nr The switch number identifying the heater to switch
|
||||
@param switch_action Action to perform. 0 - Sets switch off, 1 - Sets switch on.
|
||||
"""
|
||||
action_id = ActionIds.SWITCH_HEATER
|
||||
command = object_id + action_id
|
||||
command.append(switch_nr)
|
||||
command.append(switch_action)
|
||||
return command
|
179
pus_tc/imtq.py
Normal file
179
pus_tc/imtq.py
Normal file
@@ -0,0 +1,179 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file imtq.py
|
||||
@brief Tests for the ISIS IMTQ (Magnettorquer) device handler
|
||||
@author J. Meier
|
||||
@date 25.03.2021
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command
|
||||
|
||||
|
||||
class ImtqSetIds:
|
||||
ENG_HK_SET = 1
|
||||
CAL_MTM_SET = 2
|
||||
RAW_MTM_SET = 3
|
||||
POSITIVE_X_TEST = 4
|
||||
NEGATIVE_X_TEST = 5
|
||||
POSITIVE_Y_TEST = 6
|
||||
NEGATIVE_Y_TEST = 7
|
||||
POSITIVE_Z_TEST = 8
|
||||
NEGATIVE_Z_TEST = 9
|
||||
|
||||
|
||||
class ImtqActionIds:
|
||||
start_actuation_dipole = bytearray([0x0, 0x0, 0x0, 0x02])
|
||||
get_commanded_dipole = bytearray([0x0, 0x0, 0x0, 0x03])
|
||||
perform_positive_x_test = bytearray([0x0, 0x0, 0x0, 0x07])
|
||||
perform_negative_x_test = bytearray([0x0, 0x0, 0x0, 0x08])
|
||||
perform_positive_y_test = bytearray([0x0, 0x0, 0x0, 0x09])
|
||||
perform_negative_y_test = bytearray([0x0, 0x0, 0x0, 0x0A])
|
||||
perform_positive_z_test = bytearray([0x0, 0x0, 0x0, 0x0B])
|
||||
perform_negative_z_test = bytearray([0x0, 0x0, 0x0, 0x0C])
|
||||
# Initiates the reading of the last performed self test. After sending this command the results can be downlinked
|
||||
# via the housekeeping service by using the appropriate set ids listed above.
|
||||
read_self_test_results = bytearray([0x0, 0x0, 0x0, 0x0D])
|
||||
|
||||
|
||||
def pack_imtq_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing ISIS IMTQ handler with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if op_code == "0" or op_code == "1":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform positive x self test"))
|
||||
command = object_id + ImtqActionIds.perform_positive_x_test
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Initiate reading of positive x self test results"))
|
||||
command = object_id + ImtqActionIds.read_self_test_results
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Request dataset with positive x self test results"))
|
||||
sid = make_sid(object_id, ImtqSetIds.POSITIVE_X_TEST)
|
||||
command = generate_one_hk_command(sid, 24)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "0" or op_code == "2":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform negative x self test"))
|
||||
command = object_id + ImtqActionIds.perform_negative_x_test
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=25, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Initiate reading of negative x self test results"))
|
||||
command = object_id + ImtqActionIds.read_self_test_results
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Request dataset with negative x self test results"))
|
||||
sid = make_sid(object_id, ImtqSetIds.NEGATIVE_X_TEST)
|
||||
command = generate_one_hk_command(sid, 27)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "0" or op_code == "3":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform positive y self test"))
|
||||
command = object_id + ImtqActionIds.perform_positive_y_test
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Initiate reading of positive y self test results"))
|
||||
command = object_id + ImtqActionIds.read_self_test_results
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=29, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Request dataset with positive y self test results"))
|
||||
sid = make_sid(object_id, ImtqSetIds.POSITIVE_Y_TEST)
|
||||
command = generate_one_hk_command(sid, 30)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "0" or op_code == "4":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform negative y self test"))
|
||||
command = object_id + ImtqActionIds.perform_negative_y_test
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Initiate reading of negative y self test results"))
|
||||
command = object_id + ImtqActionIds.read_self_test_results
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Request dataset with negative y self test results"))
|
||||
sid = make_sid(object_id, ImtqSetIds.NEGATIVE_Y_TEST)
|
||||
command = generate_one_hk_command(sid, 33)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "0" or op_code == "5":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform positive z self test"))
|
||||
command = object_id + ImtqActionIds.perform_positive_z_test
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=34, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Initiate reading of positive z self test results"))
|
||||
command = object_id + ImtqActionIds.read_self_test_results
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=35, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Request dataset with positive z self test results"))
|
||||
sid = make_sid(object_id, ImtqSetIds.POSITIVE_Y_TEST)
|
||||
command = generate_one_hk_command(sid, 36)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "0" or op_code == "6":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform negative z self test"))
|
||||
command = object_id + ImtqActionIds.perform_negative_z_test
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=35, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Initiate reading of negative z self test results"))
|
||||
command = object_id + ImtqActionIds.read_self_test_results
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=36, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Request dataset with negative z self test results"))
|
||||
sid = make_sid(object_id, ImtqSetIds.NEGATIVE_Z_TEST)
|
||||
command = generate_one_hk_command(sid, 37)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "0" or op_code == "7":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Commanding dipole"))
|
||||
x_dipole = 0
|
||||
y_dipole = 0
|
||||
z_dipole = 0
|
||||
duration = 0 # ms
|
||||
command = pack_dipole_command(object_id, x_dipole, y_dipole, z_dipole, duration)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "0" or op_code == "8":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Get commanded dipole"))
|
||||
command = object_id + ImtqActionIds.get_commanded_dipole
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
|
||||
|
||||
def pack_dipole_command(object_id: bytearray, x_dipole: int, y_dipole: int, z_dipole: int, duration: int) -> bytearray:
|
||||
""" This function packs the command causing the ISIS IMTQ to generate a dipole.
|
||||
@param object_id The object id of the IMTQ handler.
|
||||
@param x_dipole The dipole of the x coil in 10^-4*Am^2 (max. 2000)
|
||||
@param y_dipole The dipole of the y coil in 10^-4*Am^2 (max. 2000)
|
||||
@param z_dipole The dipole of the z coil in 10^-4*Am^2 (max. 2000)
|
||||
@param duration The duration in milliseconds the dipole will be generated by the coils.
|
||||
When set to 0, the dipole will be generated until a new dipole actuation
|
||||
command is sent.
|
||||
"""
|
||||
action_id = ImtqActionIds.start_actuation_dipole
|
||||
command = bytearray()
|
||||
command = object_id + action_id
|
||||
command.extend(x_dipole.to_bytes(length=2, byteorder='big'))
|
||||
command.extend(y_dipole.to_bytes(length=2, byteorder='big'))
|
||||
command.extend(z_dipole.to_bytes(length=2, byteorder='big'))
|
||||
command.extend(duration.to_bytes(length=2, byteorder='big'))
|
||||
return command
|
161
pus_tc/p60dock.py
Normal file
161
pus_tc/p60dock.py
Normal file
@@ -0,0 +1,161 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmtcc_tc_p60dock.py
|
||||
@brief P60 Dock tests
|
||||
@author J. Meier
|
||||
@date 13.12.2020
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from gomspace.gomspace_common import *
|
||||
|
||||
|
||||
class P60DockTestProcedure:
|
||||
"""
|
||||
@brief Use this class to define the tests to perform for the P60Dock.
|
||||
@details Setting all to True will run all tests.
|
||||
Setting all to False will only run the tests set to True.
|
||||
"""
|
||||
all = False
|
||||
reboot = False
|
||||
read_gnd_wdt = False
|
||||
gnd_wdt_reset = False
|
||||
ping = False
|
||||
channel_3_off = False # pdu2
|
||||
read_temperature1 = True
|
||||
read_channel_3_state = False # pdu2
|
||||
read_cur_lu_lim_0 = False
|
||||
channel_3_on = False # pdu2
|
||||
invalid_table_id_test = False # Test to check if software properly handles invalid table ids
|
||||
invalid_address_test = False # Test to check if software properly handles invalid addresses
|
||||
invalid_parameter_size_test = False
|
||||
|
||||
|
||||
class P60DockConfigTable:
|
||||
out_en_0 = TableEntry(bytearray([0x00, 0x68]), TableEntry.uint8_size) # ACU
|
||||
out_en_1 = TableEntry(bytearray([0x00, 0x69]), TableEntry.uint8_size) # PDU1
|
||||
out_en_2 = TableEntry(bytearray([0x00, 0x6A]), TableEntry.uint8_size)
|
||||
out_en_3 = TableEntry(bytearray([0x00, 0x6B]), TableEntry.uint8_size) # PDU2
|
||||
# When channel consumes more than cur_lu_lim, channel is turned of immediately
|
||||
cur_lu_lim_0 = TableEntry(bytearray([0x00, 0xF8]), TableEntry.uint16_size)
|
||||
|
||||
|
||||
class P60DockHkTable:
|
||||
temperature1 = TableEntry(bytearray([0x00, 0x44]), TableEntry.uint16_size)
|
||||
temperature2 = TableEntry(bytearray([0x00, 0x46]), TableEntry.uint16_size)
|
||||
# Ground WDT value (remaining seconds until reboot)
|
||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0xA8]), TableEntry.uint32_size)
|
||||
|
||||
|
||||
def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.reboot:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reboot"))
|
||||
command = pack_reboot_command(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.read_gnd_wdt:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reading ground watchdog timer value"))
|
||||
command = pack_get_param_command(
|
||||
object_id, TableIds.hk, P60DockHkTable.wdt_gnd_left.parameter_address,
|
||||
P60DockHkTable.wdt_gnd_left.parameter_size
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.gnd_wdt_reset:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing ground watchdog reset"))
|
||||
command = pack_gnd_wdt_reset_command(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.ping:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Ping"))
|
||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||
command = pack_ping_command(object_id, ping_data)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_off:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing setting output channel 3 off"))
|
||||
parameter = 0 # set channel off
|
||||
command = pack_set_param_command(object_id, P60DockConfigTable.out_en_3.parameter_address,
|
||||
P60DockConfigTable.out_en_3.parameter_size, parameter)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.read_temperature1:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing temperature reading"))
|
||||
command = pack_get_param_command(
|
||||
object_id, TableIds.hk, P60DockHkTable.temperature1.parameter_address,
|
||||
P60DockHkTable.temperature1.parameter_size
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_on:
|
||||
tc_queue.appendleft((QueueCommands.PRINT,
|
||||
"P60 Dock: Testing Output Channel 3 state (PDU2)"))
|
||||
command = pack_get_param_command(object_id, TableIds.config, P60DockConfigTable.out_en_3.parameter_address,
|
||||
P60DockConfigTable.out_en_3.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=25, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.read_cur_lu_lim_0:
|
||||
tc_queue.appendleft((QueueCommands.PRINT,
|
||||
"P60 Dock: Reading current limit value of output channel 0"))
|
||||
command = pack_get_param_command(
|
||||
object_id, TableIds.config, P60DockConfigTable.cur_lu_lim_0.parameter_address,
|
||||
P60DockConfigTable.cur_lu_lim_0.parameter_size
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_on:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing setting output channel 3 on"))
|
||||
parameter = 1 # set channel on
|
||||
command = pack_set_param_command(object_id, P60DockConfigTable.out_en_3.parameter_address,
|
||||
P60DockConfigTable.out_en_3.parameter_size, parameter)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_table_id_test:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Testing invalid table id handling"))
|
||||
table_id_invalid = 5
|
||||
command = pack_get_param_command(
|
||||
object_id, table_id_invalid, P60DockHkTable.temperature1.parameter_address,
|
||||
P60DockHkTable.temperature1.parameter_size
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_address_test:
|
||||
tc_queue.appendleft((QueueCommands.PRINT,
|
||||
"P60 Dock: Testing invalid address handling in get param command"))
|
||||
invalid_address = bytearray([0x01, 0xF4])
|
||||
command = pack_get_param_command(object_id, TableIds.hk, invalid_address,
|
||||
P60DockHkTable.temperature1.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=29, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
tc_queue.appendleft((QueueCommands.PRINT,
|
||||
"P60 Dock: Testing invalid address handling in set param command"))
|
||||
invalid_address = bytearray([0x01, 0xF4])
|
||||
parameter_size = 2
|
||||
parameter = 1
|
||||
command = pack_set_param_command(object_id, invalid_address, parameter_size, parameter)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_parameter_size_test:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"P60 Dock: Testing handling of invalid parameter sizes in get-param command")
|
||||
)
|
||||
invalid_size = 5
|
||||
command = pack_get_param_command(
|
||||
object_id, TableIds.hk, P60DockHkTable.temperature1.parameter_address, invalid_size
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"P60 Dock: Testing handling of invalid parameter size in set-param command")
|
||||
)
|
||||
parameter = 1
|
||||
command = pack_set_param_command(
|
||||
object_id, P60DockConfigTable.out_en_3.parameter_address, invalid_size, parameter
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
75
pus_tc/pdu1.py
Normal file
75
pus_tc/pdu1.py
Normal file
@@ -0,0 +1,75 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmtcc_tc_pdu1.py
|
||||
@brief PDU2 tests
|
||||
@author J. Meier
|
||||
@date 17.12.2020
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from gomspace.gomspace_common import *
|
||||
from pus_tc.p60dock import P60DockConfigTable
|
||||
from gomspace.gomspace_pdu_definitions import *
|
||||
|
||||
|
||||
class PDU1TestProcedure:
|
||||
"""
|
||||
@brief Use this class to define the tests to perform for the PDU2.
|
||||
@details Setting all to True will run all tests.
|
||||
Setting all to False will only run the tests set to True.
|
||||
"""
|
||||
all = False
|
||||
reboot = False
|
||||
ping = False
|
||||
read_temperature = False
|
||||
turn_channel_2_on = False # Star Tracker connected to this channel (5V)
|
||||
turn_channel_2_off = False
|
||||
turn_channel_3_on = False # MTQ connected to this channel (5V)
|
||||
turn_channel_3_off = True
|
||||
|
||||
|
||||
def pack_pdu1_test_into(
|
||||
pdu1_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT
|
||||
):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing PDU1"))
|
||||
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))
|
||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||
command = pack_ping_command(pdu1_object_id, ping_data)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.read_temperature:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Testing temperature reading"))
|
||||
command = pack_get_param_command(
|
||||
pdu1_object_id, TableIds.hk, PDUHkTable.temperature.parameter_address,
|
||||
PDUHkTable.temperature.parameter_size
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_on:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 2 on (Star Tracker)"))
|
||||
command = pack_set_param_command(pdu1_object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.on)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_off:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 2 off (Star Tracker)"))
|
||||
command = pack_set_param_command(pdu1_object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_on:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 3 on (MTQ)"))
|
||||
command = pack_set_param_command(pdu1_object_id, PDUConfigTable.out_en_3.parameter_address,
|
||||
PDUConfigTable.out_en_3.parameter_size, Channel.on)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_off:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 3 off (MTQ)"))
|
||||
command = pack_set_param_command(pdu1_object_id, PDUConfigTable.out_en_3.parameter_address,
|
||||
PDUConfigTable.out_en_3.parameter_size, Channel.off)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
105
pus_tc/pdu2.py
Normal file
105
pus_tc/pdu2.py
Normal file
@@ -0,0 +1,105 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmtcc_tc_pdu2.py
|
||||
@brief PDU2 tests
|
||||
@author J. Meier
|
||||
@date 17.12.2020
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from gomspace.gomspace_common import *
|
||||
from gomspace.gomspace_pdu_definitions import *
|
||||
from pus_tc.p60dock import P60DockConfigTable
|
||||
|
||||
|
||||
class PDU2TestProcedure:
|
||||
"""
|
||||
@brief Use this class to define the tests to perform for the PDU2.
|
||||
@details Setting all to True will run all tests.
|
||||
Setting all to False will only run the tests set to True.
|
||||
"""
|
||||
all = False
|
||||
reboot = False
|
||||
read_gnd_wdt = False
|
||||
gnd_wdt_reset = False
|
||||
ping = False
|
||||
channel_2_off = False # Reaction wheels 5V
|
||||
read_temperature = True
|
||||
read_channel_2_state = False # Reaction wheels 5V
|
||||
read_cur_lu_lim_0 = False # OBC
|
||||
channel_2_on = False # Reaction wheels 5V
|
||||
invalid_table_id_test = False # Test to check if software properly handles invalid table ids
|
||||
invalid_address_test = False # Test to check if software properly handles invalid addresses
|
||||
invalid_parameter_size_test = False
|
||||
request_hk_table = False
|
||||
|
||||
|
||||
def pack_pdu2_test_into(pdu2_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing PDU2"))
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Enabling PDU2"))
|
||||
command = pack_set_param_command(p60dock_object_id, P60DockConfigTable.out_en_3.parameter_address,
|
||||
P60DockConfigTable.out_en_3.parameter_size, Channel.on)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.reboot:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Reboot"))
|
||||
command = pack_reboot_command(pdu2_object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.read_gnd_wdt:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Reading ground watchdog timer value"))
|
||||
command = pack_get_param_command(pdu2_object_id, TableIds.hk, PDUHkTable.wdt_gnd_left.parameter_address,
|
||||
PDUHkTable.wdt_gnd_left.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.gnd_wdt_reset:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Testing ground watchdog reset"))
|
||||
command = pack_gnd_wdt_reset_command(pdu2_object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.ping:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Ping Test"))
|
||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||
command = pack_ping_command(pdu2_object_id, ping_data)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.channel_2_on:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Testing setting output channel 2 on (TCS Heater)"))
|
||||
command = pack_set_param_command(pdu2_object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.on)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.read_temperature:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Testing temperature reading"))
|
||||
command = pack_get_param_command(pdu2_object_id, TableIds.hk, PDUHkTable.temperature.parameter_address,
|
||||
PDUHkTable.temperature.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.read_channel_2_state:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Reading output channel 2 state (TCS Heater)"))
|
||||
command = pack_get_param_command(pdu2_object_id, TableIds.config, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=25, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.read_cur_lu_lim_0:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Reading current limit value of output channel 0 (OBC)"))
|
||||
command = pack_get_param_command(pdu2_object_id, TableIds.config, PDUConfigTable.cur_lu_lim_0.parameter_address,
|
||||
PDUConfigTable.cur_lu_lim_0.parameter_size)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.channel_2_off:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Testing setting output channel 2 off"))
|
||||
command = pack_set_param_command(pdu2_object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if PDU2TestProcedure.all or PDU2TestProcedure.request_hk_table:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Requesting housekeeping table"))
|
||||
command = pack_request_full_hk_table_command(pdu2_object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
68
pus_tc/ploc_mpsoc.py
Normal file
68
pus_tc/ploc_mpsoc.py
Normal file
@@ -0,0 +1,68 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file ploc_mpsoc.py
|
||||
@brief Tests for commanding the MPSoC of the PLOC.
|
||||
The MPSoC is programmed by the ILH.
|
||||
@author J. Meier
|
||||
@date 06.03.2021
|
||||
"""
|
||||
import struct
|
||||
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
class PlocTestProcedure:
|
||||
"""
|
||||
@brief Use this class to define the tests to perform for the PLOC.
|
||||
@details Setting all to True will run all tests.
|
||||
Setting all to False will only run the tests set to True.
|
||||
"""
|
||||
all = False
|
||||
test_tc_mem_write = False
|
||||
test_tc_mem_read = True
|
||||
|
||||
|
||||
class PlocActionIds:
|
||||
tc_mem_write = bytearray([0x0, 0x0, 0x0, 0x1])
|
||||
tc_mem_read = bytearray([0x0, 0x0, 0x0, 0x2])
|
||||
|
||||
|
||||
class PlocReplyIds:
|
||||
tm_mem_read_report = 6
|
||||
|
||||
|
||||
def pack_ploc_mpsoc_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing PLOC MPSoC with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if PlocTestProcedure.all or PlocTestProcedure.test_tc_mem_write:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC: TC Mem Write Test"))
|
||||
memory_address = int(input("PLOC Tc Mem Write: Type memory address: 0x"), 16)
|
||||
memory_data = int(input("PLOC Tc Mem Write: Type memory data: 0x"), 16)
|
||||
command = generate_write_mem_command(object_id, struct.pack('!I', memory_address), memory_data)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if PlocTestProcedure.all or PlocTestProcedure.test_tc_mem_read:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC: TC Mem Read Test"))
|
||||
memory_address = int(input("PLOC Tc Mem Read: Type memory address: 0x"), 16)
|
||||
command = object_id + PlocActionIds.tc_mem_read + struct.pack('!I', memory_address)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
|
||||
|
||||
def generate_write_mem_command(object_id: bytearray, memory_address: bytearray, memory_data: int) -> bytearray:
|
||||
""" This function generates the command to write to a memory address within the PLOC
|
||||
@param object_id The object id of the PlocHandler
|
||||
@param memory_address The PLOC memory address where to write to.
|
||||
@param memory_data The data to write to the memory address specified by the bytearray memory_address.
|
||||
"""
|
||||
command = object_id + PlocActionIds.tc_mem_write + memory_address + struct.pack('!I', memory_data)
|
||||
return command
|
114
pus_tc/ploc_supervisor.py
Normal file
114
pus_tc/ploc_supervisor.py
Normal file
@@ -0,0 +1,114 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file ploc_supervisor.py
|
||||
@brief Tests for commanding the supervisor of the PLOC.
|
||||
The supervisor is programmed by Thales.
|
||||
@author J. Meier
|
||||
@date 10.07.2021
|
||||
"""
|
||||
import struct
|
||||
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
class SupvActionIds:
|
||||
HK_REPORT = 1
|
||||
RESTART_MPSOC = 2
|
||||
START_MPSOC = 3
|
||||
SHUTWOWN_MPSOC = 4
|
||||
SEL_MPSOC_BOOT_IMAGE = 5
|
||||
SET_BOOT_TIMEOUT = 6
|
||||
SET_MAX_RESTART_TRIES = 7
|
||||
RESET_MPSOC = 8
|
||||
SET_TIME_REF = 9
|
||||
DISABLE_HK = 10
|
||||
|
||||
|
||||
class SupvHkIds:
|
||||
HK_REPORT = 52
|
||||
|
||||
|
||||
def pack_ploc_supv_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing PLOC Supervisor with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if op_code == "3":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: TC Get Hk Report"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.HK_REPORT)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "4":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Restart MPSoC"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.RESTART_MPSOC)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "5":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Start MPSoC"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.START_MPSOC)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "6":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Shutdown MPSoC"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SHUTWOWN_MPSOC)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "7":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Select MPSoC boot image"))
|
||||
mem = int(input("MEM (NVM0 - 0 or NVM1 - 1):"))
|
||||
bp0 = int(input("BP0 (0 or 1):"))
|
||||
bp1 = int(input("BP1 (0 or 1):"))
|
||||
bp2 = int(input("BP2 (0 or 1):"))
|
||||
command = pack_sel_boot_image_cmd(object_id, mem, bp0, bp1, bp2)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "8":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set max restart tries"))
|
||||
restart_tries = int(input("Set maximum restart tries:"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_MAX_RESTART_TRIES) + struct.pack('!B', restart_tries)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=25, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "9":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Reset MPSoC"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.RESET_MPSOC)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "10":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set time reference"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_TIME_REF)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "11":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set boot timeout"))
|
||||
boot_timeout = int(input("Specify boot timeout [ms]:"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_BOOT_TIMEOUT) + struct.pack('!I', boot_timeout)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "12":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Disable HK"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.DISABLE_HK)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
|
||||
|
||||
def pack_sel_boot_image_cmd(object_id: bytearray, mem: int, bp0: int, bp1: int, bp2: int) -> bytearray:
|
||||
""" This function can be used to generate the command to select the image from which the MPSoC will boot
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
@param mem The memory from which the MPSoC shall boot (NVM0 - 0, NVM1 - 1)
|
||||
@param bp0 Partition pin 0
|
||||
@param bp1 Partition pin 1
|
||||
@param bp2 Partition pin 2
|
||||
"""
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SEL_MPSOC_BOOT_IMAGE)
|
||||
command = command + struct.pack('!B', mem)
|
||||
command = command + struct.pack('!B', bp0)
|
||||
command = command + struct.pack('!B', bp1)
|
||||
command = command + struct.pack('!B', bp2)
|
||||
return command
|
38
pus_tc/rad_sensor.py
Normal file
38
pus_tc/rad_sensor.py
Normal file
@@ -0,0 +1,38 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file rad_sensor.py
|
||||
@brief Tests for the radiation sensor handler
|
||||
@author J. Meier
|
||||
@date 01.07.2021
|
||||
"""
|
||||
import struct
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from pus_tc.service_200_mode import pack_mode_data
|
||||
|
||||
|
||||
def pack_rad_sensor_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing radiation sensor handler with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if op_code == "0":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Switch to mode on"))
|
||||
mode_data = pack_mode_data(object_id, 1, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=41, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "1":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Switch to mode normal"))
|
||||
mode_data = pack_mode_data(object_id, 2, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=42, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "2":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Rad sensor: Switch to mode off"))
|
||||
mode_data = pack_mode_data(object_id, 0, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=42, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
93
pus_tc/reaction_wheels.py
Normal file
93
pus_tc/reaction_wheels.py
Normal file
@@ -0,0 +1,93 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file reaction_wheels.py
|
||||
@brief Tests for the reaction wheel handler
|
||||
@author J. Meier
|
||||
@date 20.06.2021
|
||||
"""
|
||||
import struct
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from pus_tc.service_200_mode import pack_mode_data
|
||||
|
||||
|
||||
class RwSetIds:
|
||||
STATUS_SET_ID = 4
|
||||
TEMPERATURE_SET_ID = 8
|
||||
|
||||
|
||||
class RwCommandIds:
|
||||
RESET_MCU = bytearray([0x0, 0x0, 0x0, 0x01])
|
||||
# Reads status information from reaction wheel into dataset with id 4
|
||||
GET_RW_STATUS = bytearray([0x0, 0x0, 0x0, 0x04])
|
||||
INIT_RW_CONTROLLER = bytearray([0x0, 0x0, 0x0, 0x05])
|
||||
SET_SPEED = bytearray([0x0, 0x0, 0x0, 0x06])
|
||||
# Reads temperature from reaction wheel into dataset with id 8
|
||||
GET_TEMPERATURE = bytearray([0x0, 0x0, 0x0, 0x08])
|
||||
GET_TM = bytearray([0x0, 0x0, 0x0, 0x09])
|
||||
|
||||
|
||||
class SpeedDefinitions:
|
||||
RPM_100 = 1000
|
||||
RPM_5000 = 5000
|
||||
|
||||
|
||||
class RampTime:
|
||||
MS_1000 = 1000
|
||||
|
||||
|
||||
def pack_single_rw_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing reaction wheel handler with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if op_code == "0" or op_code == "1":
|
||||
speed = int(input("Specify speed [0.1 RPM]: "))
|
||||
ramp_time = int(input("Specify ramp time [ms]: "))
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Set speed"))
|
||||
command = pack_set_speed_command(object_id, speed, ramp_time)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=40, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "2":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Switch to mode on"))
|
||||
mode_data = pack_mode_data(object_id, 1, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=41, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "3":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Switch to mode normal"))
|
||||
mode_data = pack_mode_data(object_id, 2, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=42, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "4":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Switch to mode off"))
|
||||
mode_data = pack_mode_data(object_id, 0, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=43, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "5":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Reaction Wheel: Send get-telemetry-command"))
|
||||
command = object_id + RwCommandIds.GET_TM
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=44, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return tc_queue
|
||||
|
||||
|
||||
def pack_set_speed_command(object_id: bytearray, speed: int, ramp_time: int) -> bytearray:
|
||||
""" With this function a command is packed to set the speed of a reaction wheel
|
||||
@param object_id The object id of the reaction wheel handler.
|
||||
@param speed Valid speeds are [-65000, -1000] and [1000, 65000]. Values are specified in 0.1 * RPM
|
||||
@param ramp_time The time after which the reaction wheel will reached the commanded speed. Valid times are
|
||||
10 - 10000 ms
|
||||
"""
|
||||
command_id = RwCommandIds.SET_SPEED
|
||||
command = bytearray()
|
||||
command = object_id + command_id
|
||||
command = command + struct.pack('!i', speed)
|
||||
command = command + ramp_time.to_bytes(length=2, byteorder='big')
|
||||
return command
|
42
pus_tc/service_200_mode.py
Normal file
42
pus_tc/service_200_mode.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmtcc_tc_service200_mode.py
|
||||
@brief PUS Service 200: PUS custom service 200: Mode commanding
|
||||
@author R. Mueller
|
||||
@date 02.05.2020
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.tc.service_200_mode import pack_mode_data
|
||||
from config.object_ids import TEST_DEVICE_ID
|
||||
|
||||
TEST_DEVICE_OBJ_ID = TEST_DEVICE_ID
|
||||
|
||||
|
||||
def pack_service200_test_into(tc_queue: TcQueueT) -> TcQueueT:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 200"))
|
||||
# Object ID: Dummy Device
|
||||
obj_id = TEST_DEVICE_OBJ_ID
|
||||
# Set On Mode
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 200: Set Mode On"))
|
||||
mode_data = pack_mode_data(obj_id, 1, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=2000, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
# Set Normal mode
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 200: Set Mode Normal"))
|
||||
mode_data = pack_mode_data(obj_id, 2, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=2010, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
# Set Raw Mode
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 200: Set Mode Raw"))
|
||||
mode_data = pack_mode_data(obj_id, 3, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=2020, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
# Set Off Mode
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing Service 200: Set Mode Off"))
|
||||
mode_data = pack_mode_data(obj_id, 0, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=2030, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
tc_queue.appendleft((QueueCommands.EXPORT_LOG, "log/tmtc_log_service200.txt"))
|
||||
return tc_queue
|
22
pus_tc/solar_array_deployment.py
Normal file
22
pus_tc/solar_array_deployment.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file solar_array_deployment.py
|
||||
@brief The test function in this file simply returns a command which triggers the solar array deployment.
|
||||
@author J. Meier
|
||||
@date 15.02.2021
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
from tmtccmd.tc.packer import PusTelecommand
|
||||
|
||||
|
||||
class ActionIds:
|
||||
DEPLOY_SOLAR_ARRAYS = bytearray([0x0, 0x0, 0x0, 0x5])
|
||||
|
||||
|
||||
def pack_solar_array_deployment_test_into(object_id: bytearray, tc_queue: TcQueueT):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing S/A Deployment"))
|
||||
|
||||
command = object_id + ActionIds.DEPLOY_SOLAR_ARRAYS
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=200, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
28
pus_tc/syrlinks_hk_handler.py
Normal file
28
pus_tc/syrlinks_hk_handler.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file syrlinks_hk_handler.py
|
||||
@brief Syrlinks Hk Handler tests
|
||||
@author J. Meier
|
||||
@date 13.12.2020
|
||||
"""
|
||||
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command
|
||||
|
||||
|
||||
class SetIds:
|
||||
RX_REGISTERS_DATASET = 1
|
||||
TX_REGISTERS_DATASET = 2
|
||||
|
||||
|
||||
def pack_syrlinks_hk_handler_test_into(object_id: bytearray, tc_queue: TcQueueT):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Get RX Registers"))
|
||||
sid = make_sid(object_id, SetIds.RX_REGISTERS_DATASET)
|
||||
command = generate_one_hk_command(sid, 200)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Syrlinks: Get TX Registers"))
|
||||
sid = make_sid(object_id, SetIds.TX_REGISTERS_DATASET)
|
||||
command = generate_one_hk_command(sid, 201)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
106
pus_tc/tc_packer_hook.py
Normal file
106
pus_tc/tc_packer_hook.py
Normal file
@@ -0,0 +1,106 @@
|
||||
"""
|
||||
@brief This file transfers control of TC packing to the user
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
|
||||
import os
|
||||
from collections import deque
|
||||
from typing import Union
|
||||
|
||||
from tmtccmd.config.definitions import CoreServiceList
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
from tmtccmd.tc.service_5_event import pack_generic_service5_test_into
|
||||
from tmtccmd.tc.service_17_test import pack_service17_ping_command
|
||||
|
||||
from pus_tc.service_200_mode import pack_service200_test_into
|
||||
from pus_tc.p60dock import pack_p60dock_test_into
|
||||
from pus_tc.pdu2 import pack_pdu2_test_into
|
||||
from pus_tc.pdu1 import pack_pdu1_test_into
|
||||
from pus_tc.acu import pack_acu_test_into
|
||||
from pus_tc.imtq import pack_imtq_test_into
|
||||
from pus_tc.tmp1075 import pack_tmp1075_test_into
|
||||
from pus_tc.ploc_mpsoc import pack_ploc_mpsoc_test_into
|
||||
from pus_tc.ploc_supervisor import pack_ploc_supv_test_into
|
||||
from pus_tc.heater import pack_heater_test_into
|
||||
from pus_tc.reaction_wheels import pack_single_rw_test_into
|
||||
from pus_tc.rad_sensor import pack_rad_sensor_test_into
|
||||
from config.definitions import CustomServiceList
|
||||
from config.object_ids import P60_DOCK_HANDLER, PDU_1_HANDLER_ID, PDU_2_HANDLER_ID, ACU_HANDLER_ID, \
|
||||
TMP_1075_1_HANDLER_ID, TMP_1075_2_HANDLER_ID, HEATER_ID, IMTQ_HANDLER_ID, PLOC_MPSOC_ID, RW1_ID, RW2_ID, RW3_ID, RW4_ID, \
|
||||
RAD_SENSOR_ID, PLOC_SUPV_ID
|
||||
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
def pack_service_queue_user(service: Union[str, int], op_code: str, service_queue: TcQueueT):
|
||||
if service == CoreServiceList.SERVICE_5.value:
|
||||
return pack_generic_service5_test_into(tc_queue=service_queue)
|
||||
if service == CoreServiceList.SERVICE_17.value:
|
||||
return service_queue.appendleft(pack_service17_ping_command(ssc=1700).pack_command_tuple())
|
||||
if service == CoreServiceList.SERVICE_200.value:
|
||||
return pack_service200_test_into(tc_queue=service_queue)
|
||||
if service == CustomServiceList.P60DOCK.value:
|
||||
object_id = P60_DOCK_HANDLER
|
||||
return pack_p60dock_test_into(object_id=object_id, tc_queue=service_queue)
|
||||
if service == CustomServiceList.PDU1.value:
|
||||
pdu1_object_id = PDU_1_HANDLER_ID
|
||||
p60dock_object_id = P60_DOCK_HANDLER
|
||||
return pack_pdu1_test_into(
|
||||
pdu1_object_id=pdu1_object_id, p60dock_object_id=p60dock_object_id, tc_queue=service_queue
|
||||
)
|
||||
if service == CustomServiceList.PDU2.value:
|
||||
pdu2_object_id = PDU_2_HANDLER_ID
|
||||
p60dock_object_id = P60_DOCK_HANDLER
|
||||
return pack_pdu2_test_into(
|
||||
pdu2_object_id=pdu2_object_id, p60dock_object_id=p60dock_object_id, tc_queue=service_queue
|
||||
)
|
||||
if service == CustomServiceList.ACU.value:
|
||||
object_id = ACU_HANDLER_ID
|
||||
return pack_acu_test_into(object_id=object_id, tc_queue=service_queue)
|
||||
if service == CustomServiceList.TMP1075_1.value:
|
||||
object_id = TMP_1075_1_HANDLER_ID
|
||||
return pack_tmp1075_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.TMP1075_2.value:
|
||||
object_id = TMP_1075_2_HANDLER_ID
|
||||
return pack_tmp1075_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.HEATER.value:
|
||||
object_id = HEATER_ID
|
||||
return pack_heater_test_into(object_id=object_id, tc_queue=service_queue)
|
||||
if service == CustomServiceList.IMTQ.value:
|
||||
object_id = IMTQ_HANDLER_ID
|
||||
return pack_imtq_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.PLOC.value:
|
||||
object_id = PLOC_MPSOC_ID
|
||||
return pack_ploc_mpsoc_test_into(object_id=object_id, tc_queue=service_queue)
|
||||
if service == CustomServiceList.REACTION_WHEEL_1.value:
|
||||
object_id = RW1_ID
|
||||
return pack_single_rw_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.REACTION_WHEEL_2.value:
|
||||
object_id = RW2_ID
|
||||
return pack_single_rw_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.REACTION_WHEEL_3.value:
|
||||
object_id = RW3_ID
|
||||
return pack_single_rw_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.REACTION_WHEEL_4.value:
|
||||
object_id = RW4_ID
|
||||
return pack_single_rw_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.RAD_SENSOR.value:
|
||||
object_id = RAD_SENSOR_ID
|
||||
return pack_rad_sensor_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.PLOC_SUPV.value:
|
||||
object_id = PLOC_SUPV_ID
|
||||
return pack_ploc_supv_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
|
||||
LOGGER.warning("Invalid Service !")
|
||||
|
||||
|
||||
def create_total_tc_queue_user() -> TcQueueT:
|
||||
if not os.path.exists("log"):
|
||||
os.mkdir("log")
|
||||
tc_queue = deque()
|
||||
pack_generic_service5_test_into(tc_queue)
|
||||
tc_queue.appendleft(pack_service17_ping_command(ssc=1700).pack_command_tuple())
|
||||
return tc_queue
|
63
pus_tc/tmp1075.py
Normal file
63
pus_tc/tmp1075.py
Normal file
@@ -0,0 +1,63 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmp1075.py
|
||||
@brief TMP1075 tests
|
||||
@author J. Meier
|
||||
@date 06.01.2021
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from pus_tc.service_200_mode import pack_mode_data
|
||||
|
||||
|
||||
class Tmp1075TestProcedure:
|
||||
"""
|
||||
@brief Use this class to define the tests to perform for the Tmp1075.
|
||||
@details Setting all to True will run all tests.
|
||||
Setting all to False will only run the tests set to True.
|
||||
"""
|
||||
all = False
|
||||
start_adc_conversion = False
|
||||
get_temp = False
|
||||
set_mode_normal = True # Setting mode to normal starts continuous temperature reading
|
||||
set_mode_on = False # If mode is MODE_ON, temperature will only be read on command
|
||||
|
||||
|
||||
class Tmp1075ActionIds:
|
||||
get_temp = bytearray([0x0, 0x0, 0x0, 0x01])
|
||||
start_adc_conversion = bytearray([0x0, 0x0, 0x0, 0x02])
|
||||
|
||||
|
||||
def pack_tmp1075_test_into(object_id: bytearray, op_code: str, tc_queue: TcQueueT) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing Tmp1075 Temperature Sensor Handler with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if Tmp1075TestProcedure.all or Tmp1075TestProcedure.start_adc_conversion:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Starting new temperature conversion"))
|
||||
command = object_id + Tmp1075ActionIds.start_adc_conversion
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if Tmp1075TestProcedure.all or Tmp1075TestProcedure.get_temp:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Read temperature"))
|
||||
command = object_id + Tmp1075ActionIds.get_temp
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if Tmp1075TestProcedure.set_mode_normal:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Set Mode Normal"))
|
||||
mode_data = pack_mode_data(object_id, 2, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=220, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if Tmp1075TestProcedure.set_mode_on:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "TMP1075: Set Mode On"))
|
||||
mode_data = pack_mode_data(object_id, 1, 0)
|
||||
command = PusTelecommand(service=200, subservice=1, ssc=221, app_data=mode_data)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
@@ -1,34 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers control of TC packing to the user
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
|
||||
import os
|
||||
from collections import deque
|
||||
from typing import Union
|
||||
|
||||
from config.tmtcc_definitions import ServiceList
|
||||
from tmtc_core.utility.tmtcc_logger import get_logger
|
||||
from tmtc_core.pus_tc.tmtcc_pus_tc_base import TcQueueT
|
||||
from tmtc_core.pus_tc.tmtcc_tc_service5_event import pack_service5_test_into
|
||||
from tmtc_core.pus_tc.tmtcc_tc_service17_test import pack_service17_ping_command
|
||||
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
def pack_service_queue_user(service: Union[int, str], op_code: int, service_queue: TcQueueT):
|
||||
if service == ServiceList.SERVICE_5:
|
||||
return pack_service5_test_into(service_queue)
|
||||
if service == ServiceList.SERVICE_17:
|
||||
return service_queue.appendleft(pack_service17_ping_command(ssc=1700).pack_command_tuple())
|
||||
LOGGER.warning("Invalid Service !")
|
||||
|
||||
|
||||
def create_total_tc_queue_user() -> TcQueueT:
|
||||
if not os.path.exists("log"):
|
||||
os.mkdir("log")
|
||||
tc_queue = deque()
|
||||
pack_service5_test_into(tc_queue)
|
||||
tc_queue.appendleft(pack_service17_ping_command(ssc=1700).pack_command_tuple())
|
||||
return tc_queue
|
42
pus_tm/factory_hook.py
Normal file
42
pus_tm/factory_hook.py
Normal file
@@ -0,0 +1,42 @@
|
||||
"""
|
||||
@brief This file transfers control of TM parsing to the user
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
from tmtccmd.tm.service_8_functional_cmd import Service8TM
|
||||
from tmtccmd.ecss.tm import PusTelemetry
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
|
||||
from tmtccmd.tm.service_1_verification import Service1TM
|
||||
from tmtccmd.tm.service_3_housekeeping import Service3TM
|
||||
from tmtccmd.tm.service_5_event import Service5TM
|
||||
from tmtccmd.tm.service_17_test import Service17TM
|
||||
from tmtccmd.utility.tmtc_printer import TmTcPrinter
|
||||
|
||||
from config.definitions import PUS_APID
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
def ccsds_tm_handler(apid: int, raw_tm_packet: bytearray, tmtc_printer: TmTcPrinter) -> None:
|
||||
if apid == PUS_APID:
|
||||
pus_factory_hook(raw_tm_packet=raw_tm_packet, tmtc_printer=tmtc_printer)
|
||||
|
||||
|
||||
def pus_factory_hook(raw_tm_packet: bytearray, tmtc_printer: TmTcPrinter):
|
||||
service_type = raw_tm_packet[7]
|
||||
tm_packet = None
|
||||
if service_type == 1:
|
||||
tm_packet = Service1TM(raw_tm_packet)
|
||||
if service_type == 3:
|
||||
tm_packet = Service3TM(raw_tm_packet)
|
||||
if service_type == 5:
|
||||
tm_packet = Service5TM(raw_tm_packet)
|
||||
if service_type == 8:
|
||||
tm_packet = Service8TM(raw_tm_packet)
|
||||
if service_type == 17:
|
||||
tm_packet = Service17TM(raw_tm_packet)
|
||||
if tm_packet is None:
|
||||
LOGGER.info(f'The service {service_type} is not implemented in Telemetry Factory')
|
||||
tm_packet = PusTelemetry(raw_tm_packet)
|
||||
tmtc_printer.print_telemetry(packet=tm_packet)
|
157
pus_tm/hk_handling.py
Normal file
157
pus_tm/hk_handling.py
Normal file
@@ -0,0 +1,157 @@
|
||||
"""
|
||||
@brief This file transfers control of housekeeping handling (PUS service 3) to the
|
||||
developer
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
import struct
|
||||
from typing import Tuple
|
||||
|
||||
from tmtccmd.tm.service_3_housekeeping import Service3Base
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
from pus_tc.syrlinks_hk_handler import SetIds
|
||||
from pus_tc.imtq import ImtqSetIds
|
||||
from config.object_ids import SYRLINKS_HANDLER, IMTQ_HANDLER_ID
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
def handle_user_hk_packet(object_id: bytes, set_id: int, hk_data: bytearray,
|
||||
service3_packet: Service3Base) -> Tuple[list, list, bytearray, int]:
|
||||
"""
|
||||
This function is called when a Service 3 Housekeeping packet is received.
|
||||
|
||||
Please note that the object IDs should be compared by value because direct comparison of
|
||||
enumerations does not work in Python. For example use:
|
||||
|
||||
if object_id.value == ObjectIds.TEST_OBJECT.value
|
||||
|
||||
to test equality based on the object ID list.
|
||||
|
||||
@param object_id:
|
||||
@param set_id:
|
||||
@param hk_data:
|
||||
@param service3_packet:
|
||||
@return: Expects a tuple, consisting of two lists, a bytearray and an integer
|
||||
The first list contains the header columns, the second list the list with
|
||||
the corresponding values. The bytearray is the validity buffer, which is usually appended
|
||||
at the end of the housekeeping packet. The last value is the number of parameters.
|
||||
"""
|
||||
if object_id == SYRLINKS_HANDLER:
|
||||
if set_id == SetIds.RX_REGISTERS_DATASET:
|
||||
return handle_syrlinks_rx_registers_dataset(hk_data)
|
||||
elif set_id == SetIds.TX_REGISTERS_DATASET:
|
||||
return handle_syrlinks_tx_registers_dataset(hk_data)
|
||||
else:
|
||||
LOGGER.info("Serive 3 TM: Syrlinks handler reply with unknown set id")
|
||||
return [], [], bytearray(), 0
|
||||
elif object_id == IMTQ_HANDLER_ID:
|
||||
if (set_id >= ImtqSetIds.POSITIVE_X_TEST) and (set_id <= ImtqSetIds.NEGATIVE_Z_TEST):
|
||||
return handle_self_test_data(hk_data)
|
||||
else:
|
||||
LOGGER.info("Serive 3 TM: Syrlinks handler reply with unknown set id")
|
||||
return [], [], bytearray(), 0
|
||||
else:
|
||||
LOGGER.info("Service 3 TM: Parsing for this SID has not been implemented.")
|
||||
return [], [], bytearray(), 0
|
||||
|
||||
|
||||
def handle_syrlinks_rx_registers_dataset(hk_data: bytearray) -> Tuple[list, list, bytearray, int]:
|
||||
hk_header = []
|
||||
hk_content = []
|
||||
validity_buffer = bytearray()
|
||||
hk_header = ["RX Status", "RX Sensitivity", "RX Frequency Shift", "RX IQ Power", "RX AGC Value", "RX Demod Eb",
|
||||
"RX Demod N0", "RX Datarate"]
|
||||
rx_status = hk_data[0]
|
||||
rx_sensitivity = struct.unpack('!I', hk_data[1:5])
|
||||
rx_frequency_shift = struct.unpack('!I', hk_data[5:9])
|
||||
rx_iq_power = struct.unpack('!H', hk_data[9:11])
|
||||
rx_agc_value = struct.unpack('!H', hk_data[11:13])
|
||||
rx_demod_eb = struct.unpack('!I', hk_data[13:17])
|
||||
rx_demod_n0 = struct.unpack('!I', hk_data[17:21])
|
||||
rx_data_rate = hk_data[21]
|
||||
hk_content = [rx_status, rx_sensitivity, rx_frequency_shift, rx_iq_power, rx_agc_value, rx_demod_eb, rx_demod_n0,
|
||||
rx_data_rate]
|
||||
return hk_header, hk_content, validity_buffer, 8
|
||||
|
||||
|
||||
def handle_syrlinks_tx_registers_dataset(hk_data: bytearray) -> Tuple[list, list, bytearray, int]:
|
||||
hk_header = []
|
||||
hk_content = []
|
||||
validity_buffer = bytearray()
|
||||
hk_header = ["TX Status", "TX Waveform", "TX AGC value"]
|
||||
tx_status = hk_data[0]
|
||||
tx_waveform = hk_data[1]
|
||||
tx_agc_value = struct.unpack('!H', hk_data[2:4])
|
||||
hk_content = [tx_status, tx_waveform, tx_agc_value]
|
||||
return hk_header, hk_content, validity_buffer, 3
|
||||
|
||||
|
||||
def handle_self_test_data(hk_data: bytearray) -> Tuple[list, list, bytearray, int]:
|
||||
hk_header = []
|
||||
hk_content = []
|
||||
validity_buffer = bytearray()
|
||||
hk_header = ["Init Err", "Init Raw Mag X [nT]", "Init Raw Mag Y [nT]", "Init Raw Mag Z [nT]", "Init Cal Mag X [nT]",
|
||||
"Init Cal Mag Y [nT]", "Init Cal Mag Z [nT]", "Init Coil X Current [mA]", "Init Coil Y Current [mA]",
|
||||
"Init Coil Z Current [mA]", "Init Coil X Temperature [°C]", "Init Coil Y Temperature [°C]",
|
||||
"Init Coil Z Temperature [°C]", "Err", "Raw Mag X [nT]", "Raw Mag Y [nT]", "Raw Mag Z [nT]",
|
||||
"Cal Mag X [nT]", "Cal Mag Y [nT]", "Cal Mag Z [nT]", "Coil X Current [mA]", "Coil Y Current [mA]",
|
||||
"Coil Z Current [mA]", "Coil X Temperature [°C]", "Coil Y Temperature [°C]", "Coil Z Temperature [°C]",
|
||||
"Fina Err", "Fina Raw Mag X [nT]", "Fina Raw Mag Y [nT]", "Fina Raw Mag Z [nT]", "Fina Cal Mag X [nT]",
|
||||
"Fina Cal Mag Y [nT]", "Fina Cal Mag Z [nT]", "Fina Coil X Current [mA]", "Fina Coil Y Current [mA]",
|
||||
"Fina Coil Z Current [mA]", "Fina Coil X Temperature [°C]", "Fina Coil Y Temperature [°C]",
|
||||
"Fina Coil Z Temperature [°C]"]
|
||||
# INIT step (no coil actuation)
|
||||
init_err = hk_data[0]
|
||||
init_raw_mag_x = struct.unpack('!f', hk_data[1:5])[0]
|
||||
init_raw_mag_y = struct.unpack('!f', hk_data[5:9])[0]
|
||||
init_raw_mag_z = struct.unpack('!f', hk_data[9:13])[0]
|
||||
init_cal_mag_x = struct.unpack('!f', hk_data[13:17])[0]
|
||||
init_cal_mag_y = struct.unpack('!f', hk_data[17:21])[0]
|
||||
init_cal_mag_z = struct.unpack('!f', hk_data[21:25])[0]
|
||||
init_coil_x_current = struct.unpack('!f', hk_data[25:29])[0]
|
||||
init_coil_y_current = struct.unpack('!f', hk_data[29:33])[0]
|
||||
init_coil_z_current = struct.unpack('!f', hk_data[33:37])[0]
|
||||
init_coil_x_temperature = struct.unpack('!H', hk_data[37:39])[0]
|
||||
init_coil_y_temperature = struct.unpack('!H', hk_data[39:41])[0]
|
||||
init_coil_z_temperature = struct.unpack('!H', hk_data[41:43])[0]
|
||||
|
||||
# Actuation step
|
||||
err = hk_data[43]
|
||||
raw_mag_x = struct.unpack('!f', hk_data[44:48])[0]
|
||||
raw_mag_y = struct.unpack('!f', hk_data[48:52])[0]
|
||||
raw_mag_z = struct.unpack('!f', hk_data[52:56])[0]
|
||||
cal_mag_x = struct.unpack('!f', hk_data[56:60])[0]
|
||||
cal_mag_y = struct.unpack('!f', hk_data[60:64])[0]
|
||||
cal_mag_z = struct.unpack('!f', hk_data[64:68])[0]
|
||||
coil_x_current = struct.unpack('!f', hk_data[68:72])[0]
|
||||
coil_y_current = struct.unpack('!f', hk_data[72:76])[0]
|
||||
coil_z_current = struct.unpack('!f', hk_data[76:80])[0]
|
||||
coil_x_temperature = struct.unpack('!H', hk_data[80:82])[0]
|
||||
coil_y_temperature = struct.unpack('!H', hk_data[82:84])[0]
|
||||
coil_z_temperature = struct.unpack('!H', hk_data[84:86])[0]
|
||||
|
||||
# FINA step (no coil actuation)
|
||||
fina_err = hk_data[86]
|
||||
fina_raw_mag_x = struct.unpack('!f', hk_data[87:91])[0]
|
||||
fina_raw_mag_y = struct.unpack('!f', hk_data[91:95])[0]
|
||||
fina_raw_mag_z = struct.unpack('!f', hk_data[95:99])[0]
|
||||
fina_cal_mag_x = struct.unpack('!f', hk_data[99:103])[0]
|
||||
fina_cal_mag_y = struct.unpack('!f', hk_data[103:107])[0]
|
||||
fina_cal_mag_z = struct.unpack('!f', hk_data[107:111])[0]
|
||||
fina_coil_x_current = struct.unpack('!f', hk_data[111:115])[0]
|
||||
fina_coil_y_current = struct.unpack('!f', hk_data[115:119])[0]
|
||||
fina_coil_z_current = struct.unpack('!f', hk_data[119:123])[0]
|
||||
fina_coil_x_temperature = struct.unpack('!H', hk_data[123:125])[0]
|
||||
fina_coil_y_temperature = struct.unpack('!H', hk_data[125:127])[0]
|
||||
fina_coil_z_temperature = struct.unpack('!H', hk_data[127:129])[0]
|
||||
|
||||
hk_content = [init_err, init_raw_mag_x, init_raw_mag_y, init_raw_mag_z, init_cal_mag_x, init_cal_mag_y,
|
||||
init_cal_mag_z, init_coil_x_current, init_coil_y_current, init_coil_z_current,
|
||||
init_coil_x_temperature, init_coil_y_temperature, init_coil_z_temperature, err, raw_mag_x,
|
||||
init_raw_mag_y, raw_mag_z, cal_mag_x, cal_mag_y, cal_mag_z, coil_x_current, coil_y_current,
|
||||
coil_z_current, coil_x_temperature, coil_y_temperature, coil_z_temperature, fina_err, fina_raw_mag_x,
|
||||
fina_raw_mag_y, fina_raw_mag_z, fina_cal_mag_x, fina_cal_mag_y, fina_cal_mag_z, fina_coil_x_current,
|
||||
fina_coil_y_current, fina_coil_z_current, fina_coil_x_temperature, fina_coil_y_temperature,
|
||||
fina_coil_z_temperature]
|
||||
|
||||
return hk_header, hk_content, validity_buffer, len(hk_header)
|
58
pus_tm/service_8_hook.py
Normal file
58
pus_tm/service_8_hook.py
Normal file
@@ -0,0 +1,58 @@
|
||||
import struct
|
||||
from typing import Tuple
|
||||
from config.object_ids import *
|
||||
from pus_tc.imtq import ImtqActionIds
|
||||
from pus_tc.ploc_mpsoc import PlocReplyIds
|
||||
|
||||
|
||||
def user_analyze_service_8_data(
|
||||
object_id: bytes, action_id: int, custom_data: bytearray) -> Tuple[list, list]:
|
||||
"""
|
||||
This function is called by the TMTC core if a Service 8 data reply (subservice 130)
|
||||
is received. The user can return a tuple of two lists, where the first list
|
||||
is a list of header strings to print and the second list is a list of values to print.
|
||||
The TMTC core will take care of printing both lists and logging them.
|
||||
|
||||
@param object_id:
|
||||
@param action_id:
|
||||
@param custom_data:
|
||||
@return:
|
||||
"""
|
||||
if object_id == PDU_2_HANDLER_ID:
|
||||
header_list = ['PDU2 Service 8 Reply']
|
||||
|
||||
data_string = str()
|
||||
for index in range(len(custom_data)):
|
||||
data_string += str(hex(custom_data[index])) + " , "
|
||||
data_string = data_string.rstrip()
|
||||
data_string = data_string.rstrip(',')
|
||||
data_string = data_string.rstrip()
|
||||
content_list = [data_string]
|
||||
elif object_id == IMTQ_HANDLER_ID:
|
||||
return handle_imtq_replies(action_id, custom_data)
|
||||
elif object_id == PLOC_MPSOC_ID:
|
||||
return handle_ploc_replies(action_id, custom_data)
|
||||
else:
|
||||
header_list = []
|
||||
content_list = []
|
||||
return header_list, content_list
|
||||
|
||||
|
||||
def handle_imtq_replies(action_id: int, custom_data: bytearray) -> Tuple[list, list]:
|
||||
header_list = []
|
||||
content_list = []
|
||||
if action_id == struct.unpack('!I', ImtqActionIds.get_commanded_dipole)[0]:
|
||||
header_list = ['Commanded X-Dipole', 'Commanded Y-Dipole', 'Commanded Z-Dipole']
|
||||
x_dipole = struct.unpack('!H', custom_data[:2])
|
||||
y_dipole = struct.unpack('!H', custom_data[2:4])
|
||||
z_dipole = struct.unpack('!H', custom_data[4:6])
|
||||
content_list = [x_dipole[0], y_dipole[0], z_dipole[0]]
|
||||
|
||||
|
||||
def handle_ploc_replies(action_id: int, custom_data: bytearray) -> Tuple[list, list]:
|
||||
header_list = []
|
||||
content_list = []
|
||||
if action_id == PlocReplyIds.tm_mem_read_report:
|
||||
header_list = ['PLOC Memory Address', 'PLOC Mem Len', 'PLOC Read Memory Data']
|
||||
content_list = [custom_data[:4], custom_data[4:6], custom_data[6:10]]
|
||||
return header_list, content_list
|
@@ -1,26 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers control of housekeeping handling (PUS service 3) to the
|
||||
developer
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
from typing import Tuple
|
||||
|
||||
from tmtc_core.pus_tm.obsw_tm_service_3 import Service3Base
|
||||
from tmtc_core.utility.tmtcc_logger import get_logger
|
||||
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
def handle_user_hk_packet(
|
||||
object_id: bytearray, hk_data: bytearray,
|
||||
service3_packet: Service3Base) -> Tuple[list, list, bytearray]:
|
||||
"""
|
||||
This function is called when a Service 3 Housekeeping packet is received.
|
||||
@param object_id:
|
||||
@param hk_data:
|
||||
@param service3_packet:
|
||||
@return:
|
||||
"""
|
||||
LOGGER.info("Service3TM: Parsing for this SID has not been implemented.")
|
||||
return [], [], bytearray()
|
@@ -1,26 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers control of TM parsing to the user
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
|
||||
from tmtc_core.pus_tm.tmtcc_pus_tm_base import PusTelemetry
|
||||
from tmtc_core.utility.tmtcc_logger import get_logger
|
||||
|
||||
from tmtc_core.pus_tm.tmtcc_tm_service1 import Service1TM
|
||||
from tmtc_core.pus_tm.tmtcc_tm_service5 import Service5TM
|
||||
from tmtc_core.pus_tm.tmtcc_tm_service17 import Service17TM
|
||||
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
def tm_user_factory_hook(raw_tm_packet: bytearray) -> PusTelemetry:
|
||||
service_type = raw_tm_packet[7]
|
||||
if service_type == 1:
|
||||
return Service1TM(raw_tm_packet)
|
||||
if service_type == 5:
|
||||
return Service5TM(raw_tm_packet)
|
||||
if service_type == 17:
|
||||
return Service17TM(raw_tm_packet)
|
||||
LOGGER.info("The service " + str(service_type) + " is not implemented in Telemetry Factory")
|
||||
return PusTelemetry(raw_tm_packet)
|
@@ -1,4 +1 @@
|
||||
crcmod>=1.7
|
||||
PyQt5>=5.15.1
|
||||
PyQt5-stubs>=5.14.2.2
|
||||
pyserial>=3.4
|
||||
tmtccmd>=1.0.0
|
||||
|
@@ -16,7 +16,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -26,11 +26,32 @@ limitations under the License.
|
||||
|
||||
@author R. Mueller
|
||||
"""
|
||||
from tmtc_core.tmtcc_runner import run_tmtc_client
|
||||
import sys
|
||||
|
||||
from config.hook_implementations import EiveHookObject
|
||||
from config.version import __version__
|
||||
from config.definitions import PUS_APID
|
||||
from pus_tm.factory_hook import ccsds_tm_handler
|
||||
try:
|
||||
from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander, add_ccsds_handler
|
||||
from tmtccmd.ccsds.handler import CcsdsTmHandler
|
||||
except ImportError as error:
|
||||
run_tmtc_commander = None
|
||||
initialize_tmtc_commander = None
|
||||
print(error)
|
||||
print("Python tmtccmd submodule could not be imported")
|
||||
print("Install with \"cd tmtccmd && python3 -m pip install -e .\" for interactive installation")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def main():
|
||||
run_tmtc_client(False)
|
||||
hook_obj = EiveHookObject()
|
||||
print(f"-- eive tmtc version {__version__}")
|
||||
initialize_tmtc_commander(hook_object=hook_obj)
|
||||
ccsds_handler = CcsdsTmHandler()
|
||||
ccsds_handler.add_tm_handler(apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50)
|
||||
add_ccsds_handler(ccsds_handler)
|
||||
run_tmtc_commander(False)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/python3
|
||||
"""
|
||||
@brief TMTC Commander entry point for GUI mode.
|
||||
@brief TMTC Commander entry point for command line mode.
|
||||
@details
|
||||
This client was developed by KSat for the SOURCE project to test the on-board software but
|
||||
has evolved into a more generic tool for satellite developers to perform TMTC (Telemetry and Telecommand)
|
||||
@@ -16,7 +16,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -26,11 +26,32 @@ limitations under the License.
|
||||
|
||||
@author R. Mueller
|
||||
"""
|
||||
from tmtc_core.tmtcc_runner import run_tmtc_client
|
||||
import sys
|
||||
|
||||
from config.hook_implementations import EiveHookObject
|
||||
from config.version import __version__
|
||||
from config.definitions import PUS_APID
|
||||
from pus_tm.factory_hook import ccsds_tm_handler
|
||||
try:
|
||||
from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander, add_ccsds_handler
|
||||
from tmtccmd.ccsds.handler import CcsdsTmHandler
|
||||
except ImportError as error:
|
||||
run_tmtc_commander = None
|
||||
initialize_tmtc_commander = None
|
||||
print(error)
|
||||
print("Python tmtccmd submodule could not be imported")
|
||||
print("Install with \"cd tmtccmd && python3 -m pip install -e .\" for interactive installation")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def main():
|
||||
run_tmtc_client(True)
|
||||
hook_obj = EiveHookObject()
|
||||
print(f"-- eive tmtc version {__version__}")
|
||||
initialize_tmtc_commander(hook_object=hook_obj)
|
||||
ccsds_handler = CcsdsTmHandler()
|
||||
ccsds_handler.add_tm_handler(apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50)
|
||||
add_ccsds_handler(ccsds_handler)
|
||||
run_tmtc_commander(use_gui=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Submodule tmtc_core deleted from bdb8d5533a
1
tmtccmd
Submodule
1
tmtccmd
Submodule
Submodule tmtccmd added at 1e234851ec
11
utility/args_parser.py
Normal file
11
utility/args_parser.py
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
|
||||
def parse_input_arguments_user(print_known_args: bool = False, print_unknown_args: bool = False):
|
||||
"""
|
||||
This function by default will build the default argument parser. A custom CLI parser can be
|
||||
built in this function if required.
|
||||
"""
|
||||
from tmtccmd.config.args import parse_default_input_arguments
|
||||
parse_default_input_arguments(
|
||||
print_known_args=print_known_args, print_unknown_args=print_unknown_args
|
||||
)
|
@@ -1,15 +0,0 @@
|
||||
"""
|
||||
@brief This file transfers control of the command line argument parsing to the user.
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
|
||||
|
||||
def parse_input_arguments_user(print_known_args: bool = False, print_unknown_args: bool = False):
|
||||
"""
|
||||
This function by default will build the default argument parser. A custom CLI parser can be
|
||||
built in this function if required.
|
||||
"""
|
||||
from tmtc_core.utility.tmtcc_core_args_parser import parse_default_input_arguments
|
||||
parse_default_input_arguments(print_known_args=print_known_args,
|
||||
print_unknown_args=print_unknown_args)
|
Reference in New Issue
Block a user