Compare commits
141 Commits
v1.7.1
...
f6a3f79220
Author | SHA1 | Date | |
---|---|---|---|
f6a3f79220 | |||
1d374230b3 | |||
aabbb129a6 | |||
904dc74075 | |||
46d7a15edf | |||
15ee13fa99 | |||
9068ebbfc0 | |||
6209bcc71e | |||
28082dca88 | |||
edcaf2e9c3 | |||
223ef1b833 | |||
8c05b4127b | |||
b2cc2354d4 | |||
72653e7f57 | |||
5976e65735 | |||
423f1fbb2c | |||
56f1ca2ef8 | |||
ae5a788f49 | |||
4325b8ccaa | |||
fc60231575 | |||
28429e3382 | |||
7b49babb1f | |||
56717935e6 | |||
ed7188e2ba | |||
726935f77b | |||
1a17658288 | |||
3b2caa7326 | |||
706f79a1f2 | |||
6d442f47e6 | |||
ba866a5f0a | |||
12a4a52d54 | |||
ee780738f9 | |||
47dbb62ebb | |||
90865496f5 | |||
38e00b405a | |||
28ab1316ce | |||
d968bb9125 | |||
62052c0d6c | |||
f065f11f52 | |||
4bf23fb764 | |||
af1e83cd66 | |||
82495ad785 | |||
bad6a42af7 | |||
d59433b66f | |||
53bf650838 | |||
f3a2e755fd | |||
58da80cb9e | |||
3f29dff606 | |||
a5d9fedc64 | |||
5c65390a8b | |||
6da94c73d0 | |||
9cdba610cd | |||
9d1cae0809 | |||
b3bc1fe28c | |||
dff569e93f | |||
ef2bfe3347 | |||
b0c0a186a0 | |||
d9968031d6 | |||
90f85b7dae | |||
cce04cc163 | |||
2f6681e3a0 | |||
27e5e6c7ae | |||
b2feb05fa9 | |||
d84c6a7e70 | |||
b1e89d4046 | |||
eb8d52607b | |||
96346461b4 | |||
abe71c0206 | |||
0360f62534 | |||
90b42e7de1 | |||
246a5eef5f | |||
c72eabca3e | |||
4e4d69f6d6 | |||
0f09809d21 | |||
b04a3361e7 | |||
9e15d2bce2 | |||
03d0cf6e09 | |||
48d781aaf1 | |||
9b176aebfa | |||
d2093dca5e | |||
ce5596f566 | |||
ccf38bbbef | |||
a0d586d753 | |||
a7f1ed904c | |||
28c2d2015c | |||
c125a62612 | |||
261eef449e | |||
573d2dca52 | |||
28e527b8f9 | |||
5c60914638 | |||
72b743f5ee | |||
5b2ff49555 | |||
5574fe91c7 | |||
84485a245b | |||
0a2f1b3feb | |||
95c5aa46d9 | |||
950adf36ed | |||
e5dc68c819 | |||
30bb3c8778 | |||
387a076a21 | |||
25f8543a8d | |||
5713bf0806 | |||
c7f5db0f53 | |||
0c99bc9d11 | |||
84656b90fc | |||
cc6dbd8ef9 | |||
3cd7de5649 | |||
f8b36a651d | |||
82c8090afd | |||
fac74219f0 | |||
3305e1d489 | |||
7c598f26a8 | |||
5ea6903881 | |||
6824e7d8c7 | |||
ca63149a67 | |||
f00cd8f6bd | |||
547b4b2137 | |||
e7d8199e67 | |||
98a1d0f856 | |||
36ae6a233c | |||
3e8626bfaf | |||
a226bf659e | |||
bc32472d88 | |||
4aebf4c0d9 | |||
477743f626 | |||
d782aa2715 | |||
93fdc0fc7f | |||
9a7d5f08d0 | |||
6fcd52daa6 | |||
1b1f26ac3a | |||
6601233f41 | |||
55ca910549 | |||
8b7331c210 | |||
31bc3d8689 | |||
7ffda5f9ee | |||
f2e95444c7 | |||
0b6bfdd23a | |||
389836c10f | |||
75ae2c786b | |||
6352a6f272 | |||
390081d00e |
9
.gitignore
vendored
9
.gitignore
vendored
@ -1,17 +1,10 @@
|
||||
__pycache__
|
||||
log
|
||||
/gps_log.txt
|
||||
|
||||
.idea/*
|
||||
!.idea/runConfigurations
|
||||
|
||||
*.json
|
||||
|
||||
/Lib
|
||||
/Scripts
|
||||
/pyvenv.cfg
|
||||
/bin
|
||||
/lib
|
||||
/lib64
|
||||
/share
|
||||
|
||||
/venv
|
||||
|
6
.gitmodules
vendored
6
.gitmodules
vendored
@ -1,3 +1,7 @@
|
||||
[submodule "tmtccmd"]
|
||||
path = tmtccmd
|
||||
url = https://github.com/rmspacefish/tmtccmd.git
|
||||
url = https://github.com/robamu-org/tmtccmd.git
|
||||
|
||||
[submodule "spacepackets"]
|
||||
path = spacepackets
|
||||
url = https://github.com/robamu-org/py-spacepackets.git
|
||||
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Service 3 UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<configuration default="false" name="ACU Test" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<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="-s 3 -p --hk" />
|
||||
<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" />
|
24
.idea/runConfigurations/GPS_0.xml
generated
Normal file
24
.idea/runConfigurations/GPS_0.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="GPS 0" 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 gps0 -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/GPS_1.xml
generated
Normal file
24
.idea/runConfigurations/GPS_1.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="GPS 1" 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 gps1 -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>
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient Heater Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="Heater Test" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Get Commanded Dipole" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="IMTQ Get Commanded Dipole" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
24
.idea/runConfigurations/IMTQ_Neg_X_Test.xml
generated
Normal file
24
.idea/runConfigurations/IMTQ_Neg_X_Test.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="IMTQ Neg X Test" 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 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>
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Neg Y Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="IMTQ Neg Y Test" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Neg Z Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="IMTQ Neg Z Test" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Pos X Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="IMTQ Pos X Test" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Pos Y Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="IMTQ Pos Y Test" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Pos Z Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="IMTQ Pos Z Test" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="IMTQ Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient P60 Dock Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<configuration default="false" name="P60 Dock Commanding" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
24
.idea/runConfigurations/PDU1_Commanding.xml
generated
Normal file
24
.idea/runConfigurations/PDU1_Commanding.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="PDU1 Commanding" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s pdu1 -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/PDU2_Commanding.xml
generated
Normal file
24
.idea/runConfigurations/PDU2_Commanding.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="PDU2 Commanding" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s pdu2 -l -t 6" />
|
||||
<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>
|
4
.idea/runConfigurations/PLOC_SUPV_Test.xml
generated
4
.idea/runConfigurations/PLOC_SUPV_Test.xml
generated
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="PLOC SUPV Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="PLOC SUPV Test" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<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="-c udp -s ploc_supv -l -t 6 --hk" />
|
||||
<option name="PARAMETERS" value="-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" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient PLOC Test UDP Flatsat" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="PLOC Test UDP Flatsat" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
24
.idea/runConfigurations/PLOC_Test_UDP_Local.xml
generated
Normal file
24
.idea/runConfigurations/PLOC_Test_UDP_Local.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="PLOC Test UDP Local" 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="-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>
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Service 17 UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<configuration default="false" name="Ping Command" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
6
.idea/runConfigurations/RW1_Test.xml
generated
6
.idea/runConfigurations/RW1_Test.xml
generated
@ -1,14 +1,14 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="RW1 Test" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="RW1 Test" 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="sftp://eive@[2001:7c0:2018:1099:babe:0:e1fe:f1a5]:22/bin/python3.8" />
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="false" />
|
||||
<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" />
|
||||
|
6
.idea/runConfigurations/RW2_Test_.xml
generated
6
.idea/runConfigurations/RW2_Test_.xml
generated
@ -1,14 +1,14 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="RW2 Test " type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="RW2 Test " 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="sftp://eive@[2001:7c0:2018:1099:babe:0:e1fe:f1a5]:22/bin/python3.8" />
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="false" />
|
||||
<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" />
|
||||
|
6
.idea/runConfigurations/RW3_Test_.xml
generated
6
.idea/runConfigurations/RW3_Test_.xml
generated
@ -1,14 +1,14 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="RW3 Test " type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="RW3 Test " 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="sftp://eive@[2001:7c0:2018:1099:babe:0:e1fe:f1a5]:22/bin/python3.8" />
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="false" />
|
||||
<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" />
|
||||
|
6
.idea/runConfigurations/RW4_Test_.xml
generated
6
.idea/runConfigurations/RW4_Test_.xml
generated
@ -1,14 +1,14 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="RW4 Test " type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="RW4 Test " 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="sftp://eive@[2001:7c0:2018:1099:babe:0:e1fe:f1a5]:22/bin/python3.8" />
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="false" />
|
||||
<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" />
|
||||
|
24
.idea/runConfigurations/Reboot_0_0.xml
generated
Normal file
24
.idea/runConfigurations/Reboot_0_0.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Reboot 0 0" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s core -o reboot_0_0 -t 4" />
|
||||
<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/Reboot_0_1.xml
generated
Normal file
24
.idea/runConfigurations/Reboot_0_1.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Reboot 0 1" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s core -o reboot_0_1 -t 4" />
|
||||
<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/Reboot_1_0.xml
generated
Normal file
24
.idea/runConfigurations/Reboot_1_0.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Reboot 1 0" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s core -o reboot_1_0 -t 4" />
|
||||
<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/Reboot_1_1.xml
generated
Normal file
24
.idea/runConfigurations/Reboot_1_1.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Reboot 1 1" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s core -o reboot_1_1 -t 4" />
|
||||
<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/Reboot_Prompt.xml
generated
Normal file
24
.idea/runConfigurations/Reboot_Prompt.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Reboot Prompt" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s core -o reboot -t 4" />
|
||||
<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/Reboot_Self.xml
generated
Normal file
24
.idea/runConfigurations/Reboot_Self.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Reboot Self" type="PythonConfigurationType" factoryName="Python" folderName="Core">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||
<option name="PARAMETERS" value="-s core -o reboot_self -t 4" />
|
||||
<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="tmtcclient ACU Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<configuration default="false" name="S/A Deployment Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<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="-s acu -l" />
|
||||
<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" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient Syrlinks Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="Syrlinks Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient TMP1075_1 Dock Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="TMP1075_1 Dock Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient TMP1075_2 Dock Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name="TMP1075_2 Dock Test UDP" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
18
.idea/runConfigurations/Unittests_in_spacepackets.xml
generated
Normal file
18
.idea/runConfigurations/Unittests_in_spacepackets.xml
generated
Normal file
@ -0,0 +1,18 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Unittests in spacepackets" type="tests" factoryName="Unittests">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/spacepackets/tests" />
|
||||
<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="_new_pattern" value="""" />
|
||||
<option name="_new_additionalArguments" value="""" />
|
||||
<option name="_new_target" value=""$PROJECT_DIR$/spacepackets/tests"" />
|
||||
<option name="_new_targetType" value=""PATH"" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
18
.idea/runConfigurations/Unittests_in_tmtccmd.xml
generated
Normal file
18
.idea/runConfigurations/Unittests_in_tmtccmd.xml
generated
Normal file
@ -0,0 +1,18 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Unittests in tmtccmd" type="tests" factoryName="Unittests">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/tmtccmd/src" />
|
||||
<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="_new_pattern" value="""" />
|
||||
<option name="_new_additionalArguments" value="""" />
|
||||
<option name="_new_target" value=""$PROJECT_DIR$/tmtccmd/src/tests"" />
|
||||
<option name="_new_targetType" value=""PATH"" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcclient IMTQ Command Dipole" type="PythonConfigurationType" factoryName="Python" folderName="UDP">
|
||||
<configuration default="false" name=" IMTQ Command Dipole" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Service 2 UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<configuration default="false" name="tmtcc Service 2" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Service 200 UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<configuration default="false" name="tmtcc Service 200" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
24
.idea/runConfigurations/tmtcc_Service_3.xml
generated
Normal file
24
.idea/runConfigurations/tmtcc_Service_3.xml
generated
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Service 3" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<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 3 --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 Service 8 UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<configuration default="false" name="tmtcc Service 8" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
@ -1,24 +0,0 @@
|
||||
<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_PDU1_Test_UDP.xml
generated
24
.idea/runConfigurations/tmtcclient_PDU1_Test_UDP.xml
generated
@ -1,24 +0,0 @@
|
||||
<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
24
.idea/runConfigurations/tmtcclient_PDU2_Test_UDP.xml
generated
@ -1,24 +0,0 @@
|
||||
<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>
|
@ -1,24 +0,0 @@
|
||||
<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>
|
@ -1,24 +0,0 @@
|
||||
<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>
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="tmtcc Listener Mode UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
||||
<configuration default="false" name="tmtccmd Listener Mode" type="PythonConfigurationType" factoryName="Python">
|
||||
<module name="tmtc" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
20
README.md
20
README.md
@ -1,5 +1,25 @@
|
||||
# TMTC Commander EIVE
|
||||
|
||||
# Run Linter
|
||||
|
||||
Can be used to quickly check validity of script. Install `flake8` first
|
||||
|
||||
```sh
|
||||
python3 -m pip install flake8
|
||||
```
|
||||
|
||||
or on Windows
|
||||
|
||||
```sh
|
||||
py -m pip install flake8
|
||||
```
|
||||
|
||||
and then run the `lint.py` script
|
||||
|
||||
```sh
|
||||
./lint.py
|
||||
```
|
||||
|
||||
# Set up virtual environment
|
||||
|
||||
## Linux
|
||||
|
@ -3,7 +3,7 @@
|
||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
||||
it to your needs.
|
||||
"""
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
def command_preparation_hook() -> PusTelecommand:
|
||||
|
@ -16,6 +16,7 @@ class CustomServiceList(enum.Enum):
|
||||
PDU1 = "pdu1"
|
||||
PDU2 = "pdu2"
|
||||
ACU = "acu"
|
||||
ACS = "acs"
|
||||
TMP1075_1 = "tmp1075_1"
|
||||
TMP1075_2 = "tmp1075_2"
|
||||
HEATER = "heater"
|
||||
@ -29,3 +30,11 @@ class CustomServiceList(enum.Enum):
|
||||
REACTION_WHEEL_4 = "reaction_wheel_4"
|
||||
RAD_SENSOR = "rad_sensor"
|
||||
PLOC_SUPV = "ploc_supv"
|
||||
PLOC_UPDATER = "ploc_updater"
|
||||
GPS_0 = "gps0"
|
||||
GPS_1 = "gps1"
|
||||
PLOC_MEMORY_DUMPER = "ploc_memory_dumper"
|
||||
CORE = 'core'
|
||||
STAR_TRACKER = 'star_tracker'
|
||||
CCSDS_HANDLER = 'ccsds_handler'
|
||||
PDEC_HANDLER = 'pdec_handler'
|
||||
|
@ -26,7 +26,7 @@ class CustomGlobalIds(enum.Enum):
|
||||
|
||||
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)
|
||||
gui=gui, tc_apid=PUS_APID, tm_apid=PUS_APID, com_if_id=CoreComInterfaces.TCPIP_UDP.value)
|
||||
|
||||
|
||||
def add_globals_post_args_parsing(args: argparse.Namespace, json_cfg_path: str):
|
||||
|
@ -3,7 +3,6 @@ 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
|
||||
@ -20,29 +19,162 @@ 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 = {
|
||||
|
||||
get_eive_service_op_code_dict(service_op_code_dict=service_op_code_dict)
|
||||
|
||||
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 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_ids=(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 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 ""
|
||||
|
||||
|
||||
def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||
from pus_tc.pdu1 import Pdu1OpCodes
|
||||
from pus_tc.pdu2 import Pdu2OpCodes
|
||||
from pus_tc.p60dock import P60OpCodes
|
||||
from gomspace.gomspace_common import GomspaceOpCodes
|
||||
from pus_tc.gps import GpsOpCodes
|
||||
op_code_dict = {
|
||||
'reboot': ('Reboot with Prompt', {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
'reboot_self': ('Reboot Self', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
||||
'reboot_0_0': ('Reboot 0 0', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
||||
'reboot_0_1': ('Reboot 0 1', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
||||
'reboot_1_0': ('Reboot 1 0', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
||||
'reboot_1_1': ('Reboot 1 1', {OpCodeDictKeys.TIMEOUT: 4.0}),
|
||||
}
|
||||
service_tuple = ('Core Controller', op_code_dict)
|
||||
service_op_code_dict[CustomServiceList.CORE.value] = service_tuple
|
||||
|
||||
op_code_dict = {
|
||||
GpsOpCodes.RESET_GNSS.value: ('Reset GPS', {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||
}
|
||||
service_tuple = ('GPS 0', op_code_dict)
|
||||
service_op_code_dict[CustomServiceList.GPS_0.value] = service_tuple
|
||||
service_op_code_dict[CustomServiceList.GPS_1.value] = service_tuple
|
||||
|
||||
op_code_dict = {
|
||||
"0": ("ACU Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_acu_tuple = ("ACU Devices", op_code_dict_srv_acu)
|
||||
service_tuple = ("ACU Devices", op_code_dict)
|
||||
service_op_code_dict[CustomServiceList.ACU.value] = service_tuple
|
||||
|
||||
op_code_dict_srv_tmp1075 = {
|
||||
op_code_dict = {
|
||||
"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)
|
||||
service_tuple = ("TMP1075 1", op_code_dict)
|
||||
service_op_code_dict[CustomServiceList.TMP1075_1.value] = service_tuple
|
||||
service_tuple = ("TMP1075 2", op_code_dict)
|
||||
service_op_code_dict[CustomServiceList.TMP1075_2.value] = service_tuple
|
||||
|
||||
op_code_dict_srv_p60 = {
|
||||
"0": ("P60 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
P60OpCodes.STACK_3V3_ON.value:
|
||||
("P60 Dock: Turn stack 3V3 on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
P60OpCodes.STACK_3V3_OFF.value:
|
||||
("P60 Dock: Turn stack 3V3 off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
("P60 Dock: Print Switches, Voltages, Currents", {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}),
|
||||
Pdu1OpCodes.TCS_BOARD_ON.value:
|
||||
("PDU1: Turn TCS board on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu1OpCodes.TCS_BOARD_OFF.value:
|
||||
("PDU1: Turn TCS board off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu1OpCodes.STAR_TRACKER_ON.value:
|
||||
("PDU1: Turn star tracker on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu1OpCodes.STAR_TRACKER_OFF.value:
|
||||
("PDU1: Turn star tracker off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu1OpCodes.SUS_NOMINAL_ON.value:
|
||||
("PDU1: Turn SUS nominal on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu1OpCodes.SUS_NOMINAL_OFF.value:
|
||||
("PDU1: Turn SUS nominal off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu1OpCodes.ACS_A_SIDE_ON.value:
|
||||
("PDU1: Turn ACS Side A on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu1OpCodes.ACS_A_SIDE_OFF.value:
|
||||
("PDU1: Turn ACS Side A off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
("PDU1: Print Switches, Voltages, Currents", {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}),
|
||||
Pdu2OpCodes.ACS_SIDE_B_ON.value:
|
||||
("PDU2: Turn ACS Side B on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu2OpCodes.ACS_SIDE_B_OFF.value:
|
||||
("PDU2: Turn ACS Side B off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu2OpCodes.SUS_REDUNDANT_ON.value:
|
||||
("PDU2: Turn SUS redundant on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu2OpCodes.SUS_REDUNDANT_OFF.value:
|
||||
("PDU2: Turn SUS redundant off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu2OpCodes.RW_ON.value:
|
||||
("PDU2: Turn reaction wheels on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu2OpCodes.RW_OFF.value:
|
||||
("PDU2: Turn reaction wheels off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
("PDU1: Print Switches, Voltages, Currents", {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||
}
|
||||
service_pdu2_tuple = ("PDU2 Device", op_code_dict_srv_pdu2)
|
||||
|
||||
@ -81,6 +213,11 @@ class EiveHookObject(TmTcHookBase):
|
||||
}
|
||||
service_rad_sensor_tuple = ("Radiation Sensor", op_code_dict_srv_rad_sensor)
|
||||
|
||||
op_code_dict_ploc_mem_dumper = {
|
||||
"0": ("PLOC Memory Dumper: MRAM dump", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_ploc_memory_dumper_tuple = ("Radiation Sensor", op_code_dict_ploc_mem_dumper)
|
||||
|
||||
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}),
|
||||
@ -95,15 +232,72 @@ class EiveHookObject(TmTcHookBase):
|
||||
"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}),
|
||||
"13": ("PLOC Supervisor: Request boot status report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"14": ("PLOC Supervisor: Update available", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"15": ("PLOC Supervisor: Watchdogs enable", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"16": ("PLOC Supervisor: Watchdog Configure Timeout", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"17": ("PLOC Supervisor: Enable latchup alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"18": ("PLOC Supervisor: Disable latchup alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"19": ("PLOC Supervisor: Auto calibrate alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"20": ("PLOC Supervisor: Set alert limit", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"21": ("PLOC Supervisor: Set alert irq filter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"22": ("PLOC Supervisor: Set ADC sweep period", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"23": ("PLOC Supervisor: Set ADC enabled channels", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"24": ("PLOC Supervisor: Set ADC window and stride", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"25": ("PLOC Supervisor: Set ADC threshold", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"26": ("PLOC Supervisor: Request latchup status report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"27": ("PLOC Supervisor: Copy ADC data to MRAM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"28": ("PLOC Supervisor: Enable/Disable NVM0/1/3", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"29": ("PLOC Supervisor: Select NVM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"30": ("PLOC Supervisor: Run auto EM tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"31": ("PLOC Supervisor: MRAM Wipe", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"33": ("PLOC Supervisor: Print CPU stats", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"34": ("PLOC Supervisor: Set debug verbosity", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"35": ("PLOC Supervisor: Set GPIO", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"36": ("PLOC Supervisor: Read GPIO", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"37": ("PLOC Supervisor: Restart supervisor", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"38": ("PLOC Supervisor: Factory reset clear all", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"39": ("PLOC Supervisor: Factory reset clear mirror entries",
|
||||
{OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"40": ("PLOC Supervisor: Factory reset clear circular entries",
|
||||
{OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"41": ("PLOC Supervisor: CAN loopback test", {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
|
||||
op_code_dict_srv_ploc_updater = {
|
||||
"0": ("Ploc Updater: Update uboot on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"1": ("Ploc Updater: Update bitstream on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"2": ("Ploc Updater: Update linux on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"3": ("Ploc Updater: Update application on partition A", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"4": ("Ploc Updater: Update uboot on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"5": ("Ploc Updater: Update bitstream on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"6": ("Ploc Updater: Update linux on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"7": ("Ploc Updater: Update application on partition B", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_ploc_updater_tuple = ("Ploc Updater", op_code_dict_srv_ploc_updater)
|
||||
|
||||
op_code_dict_srv_star_tracker = {
|
||||
"0": ("Star Tracker: Ping", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_star_tracker_tuple = ("Star tracker", op_code_dict_srv_star_tracker)
|
||||
|
||||
op_code_dict_srv_ccsds_handler = {
|
||||
"0": ("CCSDS Handler: Set low rate", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"1": ("CCSDS Handler: Set high rate", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"2": ("CCSDS Handler: Enable transmitter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"3": ("CCSDS Handler: Disable transmitter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_ccsds_handler_tuple = ("CCSDS Handler", op_code_dict_srv_ccsds_handler)
|
||||
|
||||
op_code_dict_srv_pdec_handler = {
|
||||
"0": ("PDEC Handler: Print CLCW", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
}
|
||||
service_pdec_handler_tuple = ("PDEC Handler", op_code_dict_srv_pdec_handler)
|
||||
|
||||
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.PDU2.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
|
||||
@ -112,74 +306,8 @@ class EiveHookObject(TmTcHookBase):
|
||||
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 ""
|
||||
service_op_code_dict[CustomServiceList.PLOC_UPDATER.value] = service_ploc_updater_tuple
|
||||
service_op_code_dict[CustomServiceList.STAR_TRACKER.value] = service_star_tracker_tuple
|
||||
service_op_code_dict[CustomServiceList.PLOC_MEMORY_DUMPER.value] = service_ploc_memory_dumper_tuple
|
||||
service_op_code_dict[CustomServiceList.CCSDS_HANDLER.value] = service_ccsds_handler_tuple
|
||||
service_op_code_dict[CustomServiceList.PDEC_HANDLER.value] = service_pdec_handler_tuple
|
||||
|
@ -5,27 +5,55 @@
|
||||
"""
|
||||
from typing import Dict
|
||||
|
||||
PUS_SERVICE_17_ID = bytes([0x53, 0x00, 0x00, 0x17])
|
||||
TEST_DEVICE_ID = bytes([0x54, 0x00, 0xAF, 0xFE])
|
||||
# Core Object IDs
|
||||
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
|
||||
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x10, 0xA2])
|
||||
|
||||
# Power Object IDs
|
||||
PCDU_HANDLER_ID = bytes([0x44, 0x20, 0x00, 0xA1])
|
||||
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])
|
||||
|
||||
# Thermal Object IDs
|
||||
HEATER_ID = bytes([0x44, 0x41, 0x00, 0xA4])
|
||||
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])
|
||||
|
||||
# Communication Object IDs
|
||||
SYRLINKS_HANDLER = bytes([0x44, 0x53, 0x00, 0xA3])
|
||||
|
||||
# ACS Object IDs
|
||||
MGM_0_HANDLER_ID = bytes([0x44, 0x12, 0x00, 0x06])
|
||||
MGM_1_HANDLER_ID = bytes([0x44, 0x12, 0x01, 0x07])
|
||||
MGM_2_HANDLER_ID = bytes([0x44, 0x12, 0x02, 0x08])
|
||||
MGM_3_HANDLER_ID = bytes([0x44, 0x12, 0x03, 0x09])
|
||||
GYRO_0_HANDLER_ID = bytes([0x44, 0x12, 0x00, 0x10])
|
||||
GYRO_1_HANDLER_ID = bytes([0x44, 0x12, 0x01, 0x11])
|
||||
GYRO_2_HANDLER_ID = bytes([0x44, 0x12, 0x02, 0x12])
|
||||
GYRO_3_HANDLER_ID = bytes([0x44, 0x12, 0x03, 0x13])
|
||||
GPS_HANDLER_0_ID = bytes([0x44, 0x13, 0x00, 0x45])
|
||||
GPS_HANDLER_1_ID = bytes([0x44, 0x13, 0x01, 0x46])
|
||||
RW1_ID = bytes([0x44, 0x12, 0x00, 0x47])
|
||||
RW2_ID = bytes([0x44, 0x12, 0x01, 0x48])
|
||||
RW3_ID = bytes([0x44, 0x12, 0x02, 0x49])
|
||||
RW4_ID = bytes([0x44, 0x12, 0x03, 0x50])
|
||||
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])
|
||||
|
||||
# Misc Object IDs
|
||||
PUS_SERVICE_17_ID = bytes([0x53, 0x00, 0x00, 0x17])
|
||||
TEST_DEVICE_ID = bytes([0x54, 0x00, 0xAF, 0xFE])
|
||||
CCSDS_HANDLER_ID = bytes([0x50, 0x00, 0x08, 0x00])
|
||||
PDEC_HANDLER_ID = bytes([0x50, 0x00, 0x07, 0x04])
|
||||
|
||||
# Payload Object IDs
|
||||
STAR_TRACKER_ID = bytes([0x44, 0x13, 0x00, 0x1])
|
||||
RAD_SENSOR_ID = bytes([0x44, 0x32, 0x00, 0xA5])
|
||||
PLOC_SUPV_ID = bytes([0x44, 0x33, 0x00, 0x16])
|
||||
PLOC_UPDATER_ID = bytes([0x44, 0x33, 0x00, 0x00])
|
||||
PLOC_MEMORY_DUMPER_ID = bytes([0x44, 0x33, 0x00, 0x01])
|
||||
PLOC_MPSOC_ID = bytes([0x44, 0x33, 0x00, 0x15])
|
||||
|
||||
|
||||
def get_object_ids() -> Dict[bytes, list]:
|
||||
@ -45,7 +73,11 @@ def get_object_ids() -> Dict[bytes, list]:
|
||||
RW2_ID: "Reaction Wheel 2",
|
||||
RW3_ID: "Reaction Wheel 3",
|
||||
RW4_ID: "Reaction Wheel 4",
|
||||
GPS_HANDLER_0_ID: "GPS 0",
|
||||
GPS_HANDLER_1_ID: "GPS 1",
|
||||
RAD_SENSOR_ID: "Radiation Sensor",
|
||||
PLOC_SUPV_ID: "PLOC Supervisor",
|
||||
CORE_CONTROLLER_ID: "Core Controller",
|
||||
CORE_CONTROLLER_ID: "CCSDS Handler",
|
||||
})
|
||||
return object_id_dict
|
||||
|
@ -1,6 +1,6 @@
|
||||
SW_NAME = "eive"
|
||||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 7
|
||||
VERSION_SUBMINOR = 1
|
||||
VERSION_MINOR = 8
|
||||
VERSION_SUBMINOR = 0
|
||||
|
||||
__version__ = "1.7.1"
|
||||
__version__ = "1.8.0"
|
||||
|
@ -6,15 +6,24 @@
|
||||
@author J. Meier
|
||||
@date 17.12.2020
|
||||
"""
|
||||
import enum
|
||||
|
||||
from tmtccmd.tc.service_8_functional_cmd import generate_action_command
|
||||
from tmtccmd.tc.definitions import PusTelecommand
|
||||
|
||||
|
||||
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 GomspaceDeviceActionIds(enum.IntEnum):
|
||||
PING = 1
|
||||
REBOOT = 4
|
||||
PARAM_GET = 0
|
||||
PARAM_SET = 255
|
||||
WDT_RESET = 9
|
||||
REQUEST_HK_TABLE = 16
|
||||
PRINT_SWITCH_V_I = 32
|
||||
|
||||
|
||||
class GomspaceOpCodes(enum.Enum):
|
||||
PRINT_SWITCH_V_I = "32"
|
||||
|
||||
|
||||
class TableIds:
|
||||
@ -37,8 +46,9 @@ class Channel:
|
||||
off = 0
|
||||
|
||||
|
||||
def pack_get_param_command(object_id: bytearray, table_id: int, memory_address: bytearray,
|
||||
parameter_size: int) -> bytearray:
|
||||
def pack_get_param_command(
|
||||
object_id: bytearray, table_id: int, memory_address: bytearray, parameter_size: int
|
||||
) -> PusTelecommand:
|
||||
""" 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
|
||||
@ -46,49 +56,54 @@ def pack_get_param_command(object_id: bytearray, table_id: int, memory_address:
|
||||
@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
|
||||
app_data = bytearray()
|
||||
app_data.append(table_id)
|
||||
app_data.extend(memory_address)
|
||||
app_data.append(parameter_size)
|
||||
return generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PARAM_GET, app_data=app_data
|
||||
)
|
||||
|
||||
|
||||
def pack_set_param_command(object_id: bytearray, memory_address: bytearray, parameter_size: int,
|
||||
parameter: int) -> bytearray:
|
||||
def pack_set_param_command(
|
||||
object_id: bytearray, memory_address: bytearray, parameter_size: int, parameter: int,
|
||||
ssc: int = 0
|
||||
) -> PusTelecommand:
|
||||
""" 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.
|
||||
: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.
|
||||
:param ssc:
|
||||
: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)
|
||||
action_id = GomspaceDeviceActionIds.PARAM_SET
|
||||
app_data = bytearray()
|
||||
app_data += memory_address
|
||||
app_data.append(parameter_size)
|
||||
if parameter_size == 1:
|
||||
command.append(parameter)
|
||||
app_data.append(parameter)
|
||||
elif parameter_size == 2:
|
||||
byte_one = 0xFF00 & parameter >> 8
|
||||
byte_two = 0xFF & parameter
|
||||
command.append(byte_one)
|
||||
command.append(byte_two)
|
||||
app_data.append(byte_one)
|
||||
app_data.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
|
||||
app_data.append(byte_one)
|
||||
app_data.append(byte_two)
|
||||
app_data.append(byte_three)
|
||||
app_data.append(byte_four)
|
||||
return generate_action_command(
|
||||
object_id=object_id, action_id=action_id, app_data=app_data, ssc=ssc
|
||||
)
|
||||
|
||||
|
||||
def pack_ping_command(object_id: bytearray, data: bytearray) -> bytearray:
|
||||
def pack_ping_command(object_id: bytearray, data: bytearray) -> PusTelecommand:
|
||||
"""" 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
|
||||
@ -96,37 +111,30 @@ def pack_ping_command(object_id: bytearray, data: bytearray) -> bytearray:
|
||||
@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
|
||||
return generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PING, app_data=data
|
||||
)
|
||||
|
||||
|
||||
def pack_gnd_wdt_reset_command(object_id: bytearray) -> bytearray:
|
||||
def pack_gnd_wdt_reset_command(object_id: bytearray) -> PusTelecommand:
|
||||
"""" 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
|
||||
return generate_action_command(object_id=object_id, action_id=GomspaceDeviceActionIds.WDT_RESET)
|
||||
|
||||
|
||||
def pack_reboot_command(object_id: bytearray) -> bytearray:
|
||||
def pack_reboot_command(object_id: bytearray) -> PusTelecommand:
|
||||
""" 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
|
||||
return generate_action_command(object_id=object_id, action_id=GomspaceDeviceActionIds.REBOOT)
|
||||
|
||||
|
||||
def pack_request_full_hk_table_command(object_id: bytearray) -> bytearray:
|
||||
def pack_request_full_hk_table_command(object_id: bytearray) -> PusTelecommand:
|
||||
""" 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
|
||||
return generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.REQUEST_HK_TABLE
|
||||
)
|
||||
|
13
lint.py
13
lint.py
@ -4,11 +4,20 @@ import sys
|
||||
|
||||
|
||||
def main():
|
||||
status = os.system("flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics")
|
||||
# Ignore folder created by venv
|
||||
exclude_dirs_flag = '--exclude bin,lib'
|
||||
additional_flags_both_steps = '--count --statistics'
|
||||
additional_flags_first_step = '--select=E9,F63,F7,F82 --show-source'
|
||||
flake8_first_step_cmd = \
|
||||
f'flake8 . {additional_flags_both_steps} {additional_flags_first_step} {exclude_dirs_flag}'
|
||||
status = os.system(flake8_first_step_cmd)
|
||||
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")
|
||||
flake8_second_step_cmd = \
|
||||
f'flake8 . {additional_flags_both_steps} --exit-zero --max-complexity=10 ' \
|
||||
f'--max-line-length=127 {exclude_dirs_flag}'
|
||||
os.system(flake8_second_step_cmd)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
33
pus_tc/acs.py
Normal file
33
pus_tc/acs.py
Normal file
@ -0,0 +1,33 @@
|
||||
import enum
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
from spacepackets.ecss.definitions import PusServices
|
||||
|
||||
from tmtccmd.tc.service_200_mode import pack_mode_data, Modes
|
||||
from tmtccmd.tc.packer import PusTelecommand
|
||||
from config.object_ids import MGM_0_HANDLER_ID, MGM_1_HANDLER_ID, MGM_2_HANDLER_ID, MGM_3_HANDLER_ID
|
||||
from pus_tc.pdu1 import pack_pdu1_commands, Pdu1OpCodes
|
||||
from pus_tc.pdu2 import pack_pdu2_commands, Pdu2OpCodes
|
||||
|
||||
|
||||
class AcsOpCodes(enum.Enum):
|
||||
ALL_ON = "0"
|
||||
ALL_OFF = "1"
|
||||
POWER_CYCLE = "2"
|
||||
# Switch on A side
|
||||
ON_MGM_0 = "12"
|
||||
ON_MGM_1 = "13"
|
||||
ON_GYRO_0 = "14"
|
||||
ON_GYRO_1 = "15"
|
||||
# Switch on B side
|
||||
ON_MGM_2 = "16"
|
||||
ON_MGM_3 = "17"
|
||||
ON_GYRO_2 = "18"
|
||||
ON_GYRO_3 = "19"
|
||||
|
||||
|
||||
def pack_acs_command(tc_queue: TcQueueT, op_code: str):
|
||||
if op_code == AcsOpCodes.ALL_ON:
|
||||
pass
|
||||
if op_code == AcsOpCodes.ON_MGM_0.value:
|
||||
app_data = pack_mode_data(object_id=MGM_0_HANDLER_ID, mode=Modes.ON, submode=0)
|
||||
# return PusTelecommand(service=PusServices.SERVICE_200_MODE, subservice=)
|
@ -5,9 +5,7 @@
|
||||
@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
|
||||
@ -53,73 +51,79 @@ class ACUHkTable:
|
||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0x74]), TableEntry.uint32_size)
|
||||
|
||||
|
||||
def pack_acu_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
def pack_acu_test_into(object_id: bytearray, tc_queue: TcQueueT):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing ACU"))
|
||||
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Enabling ACU connected to X1 slot (channel 0)"))
|
||||
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)
|
||||
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)
|
||||
# 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)
|
||||
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)
|
||||
# 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)
|
||||
# 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)
|
||||
# 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)
|
||||
# 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)
|
||||
# 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)
|
||||
# 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)
|
||||
# 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)
|
||||
# command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
|
54
pus_tc/ccsds_handler.py
Normal file
54
pus_tc/ccsds_handler.py
Normal file
@ -0,0 +1,54 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file ccsds_handler.py
|
||||
@brief Test commanding of CCSDS Handler
|
||||
@author J. Meier
|
||||
@date 20.11.2021
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
class CommandIds:
|
||||
# Configures input rate of syrlinks to 400 Khz (results in downlink rate of 200 kbps)
|
||||
SET_LOW_RATE = bytearray([0x0, 0x0, 0x0, 0x0])
|
||||
# Configures input rate of syrlinks to 2000 Khz (results in downlink rate of 1000 kbps)
|
||||
SET_HIGH_RATE = bytearray([0x0, 0x0, 0x0, 0x1])
|
||||
# Enables the syrlinks transmitter (by using RS485 enables lines)
|
||||
EN_TRANSMITTER = bytearray([0x0, 0x0, 0x0, 0x2])
|
||||
# Disables the syrlinks transmitter (by using RS485 enables lines)
|
||||
DIS_TRANSMITTER = bytearray([0x0, 0x0, 0x0, 0x3])
|
||||
|
||||
|
||||
def pack_ccsds_handler_test(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing ccsds handler with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if op_code == "0":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Set low rate"))
|
||||
command = object_id + CommandIds.SET_LOW_RATE
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "1":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Set high rate"))
|
||||
command = object_id + CommandIds.SET_HIGH_RATE
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "2":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Enables the transmitter"))
|
||||
command = object_id + CommandIds.EN_TRANSMITTER
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if op_code == "3":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Disables the transmitter"))
|
||||
command = object_id + CommandIds.DIS_TRANSMITTER
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
112
pus_tc/core.py
Normal file
112
pus_tc/core.py
Normal file
@ -0,0 +1,112 @@
|
||||
import enum
|
||||
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
from tmtccmd.tc.service_8_functional_cmd import generate_action_command
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
from config.object_ids import CORE_CONTROLLER_ID
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
class ActionIds(enum.IntEnum):
|
||||
REBOOT = 32
|
||||
|
||||
|
||||
class OpCodes(enum.Enum):
|
||||
REBOOT = 'reboot'
|
||||
REBOOT_SELF = 'reboot_self'
|
||||
REBOOT_0_0 = 'reboot_0_0'
|
||||
REBOOT_0_1 = 'reboot_0_1'
|
||||
REBOOT_1_0 = 'reboot_1_0'
|
||||
REBOOT_1_1 = 'reboot_1_1'
|
||||
|
||||
|
||||
class Chip(enum.IntEnum):
|
||||
CHIP_0 = 0
|
||||
CHIP_1 = 1
|
||||
NONE = 2
|
||||
|
||||
|
||||
class Copy(enum.IntEnum):
|
||||
COPY_0_NOM = 0
|
||||
COPY_1_GOLD = 1
|
||||
NONE = 2
|
||||
|
||||
|
||||
def pack_core_commands(tc_queue: TcQueueT, op_code: str):
|
||||
if op_code == OpCodes.REBOOT.value:
|
||||
reboot_self, chip_select, copy_select = determine_reboot_params()
|
||||
perform_reboot_cmd(
|
||||
tc_queue=tc_queue, reboot_self=reboot_self, chip=chip_select, copy=copy_select
|
||||
)
|
||||
elif op_code == OpCodes.REBOOT_SELF.value:
|
||||
perform_reboot_cmd(tc_queue=tc_queue, reboot_self=True)
|
||||
elif op_code == OpCodes.REBOOT_0_0.value:
|
||||
perform_reboot_cmd(
|
||||
tc_queue=tc_queue, reboot_self=False, chip=Chip.CHIP_0, copy=Copy.COPY_0_NOM
|
||||
)
|
||||
elif op_code == OpCodes.REBOOT_0_1.value:
|
||||
perform_reboot_cmd(
|
||||
tc_queue=tc_queue, reboot_self=False, chip=Chip.CHIP_0, copy=Copy.COPY_1_GOLD
|
||||
)
|
||||
elif op_code == OpCodes.REBOOT_1_0.value:
|
||||
perform_reboot_cmd(
|
||||
tc_queue=tc_queue, reboot_self=False, chip=Chip.CHIP_1, copy=Copy.COPY_0_NOM
|
||||
)
|
||||
elif op_code == OpCodes.REBOOT_1_1.value:
|
||||
perform_reboot_cmd(
|
||||
tc_queue=tc_queue, reboot_self=False, chip=Chip.CHIP_1, copy=Copy.COPY_1_GOLD
|
||||
)
|
||||
|
||||
|
||||
def determine_reboot_params() -> (bool, Chip, Copy):
|
||||
chip_select = -1
|
||||
copy_select = -1
|
||||
reboot_self = input('Reboot self? [y/n]: ')
|
||||
if reboot_self in ['y', 'yes', '1']:
|
||||
LOGGER.info('Rebooting currently running image')
|
||||
return True, chip_select, copy_select
|
||||
LOGGER.info('Rebooting image specified by chip and copy')
|
||||
while True:
|
||||
chip_select = input('Chip select [0/1]: ')
|
||||
if chip_select in ['0', '1']:
|
||||
if chip_select == '0':
|
||||
chip_select = Chip.CHIP_0
|
||||
else:
|
||||
chip_select = Chip.CHIP_1
|
||||
break
|
||||
else:
|
||||
LOGGER.warning('Invalid chip select value. Try again')
|
||||
while True:
|
||||
copy_select = input('Copy select [0/1]: ')
|
||||
if copy_select in ['0', '1']:
|
||||
if copy_select == '0':
|
||||
copy_select = Copy.COPY_0_NOM
|
||||
else:
|
||||
copy_select = Copy.COPY_1_GOLD
|
||||
break
|
||||
else:
|
||||
LOGGER.warning('Invalid copy select value. Try again')
|
||||
return False, chip_select, copy_select
|
||||
|
||||
|
||||
def perform_reboot_cmd(
|
||||
tc_queue: TcQueueT, reboot_self: bool, chip: Chip = Chip.NONE, copy: Copy = Copy.NONE
|
||||
):
|
||||
tc_data = bytearray()
|
||||
if reboot_self:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, 'Packing reboot command for current image'))
|
||||
tc_data.append(True)
|
||||
else:
|
||||
tc_data.append(False)
|
||||
tc_data.append(chip)
|
||||
tc_data.append(copy)
|
||||
tc_queue.append(
|
||||
(QueueCommands.PRINT, f'Packing reboot command for chip {chip} and copy {copy}')
|
||||
)
|
||||
action_cmd = generate_action_command(
|
||||
object_id=CORE_CONTROLLER_ID, action_id=ActionIds.REBOOT, app_data=tc_data, ssc=0
|
||||
)
|
||||
tc_queue.appendleft(action_cmd.pack_command_tuple())
|
||||
|
22
pus_tc/gps.py
Normal file
22
pus_tc/gps.py
Normal file
@ -0,0 +1,22 @@
|
||||
import enum
|
||||
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.definitions import TcQueueT
|
||||
from tmtccmd.tc.service_8_functional_cmd import generate_action_command
|
||||
|
||||
|
||||
from config.object_ids import GPS_HANDLER_1_ID, GPS_HANDLER_0_ID
|
||||
|
||||
|
||||
class GpsOpCodes(enum.Enum):
|
||||
RESET_GNSS = "5"
|
||||
|
||||
|
||||
def pack_gps_command(object_id: bytes, tc_queue: TcQueueT, op_code: str):
|
||||
if op_code == GpsOpCodes.RESET_GNSS.value:
|
||||
if object_id == GPS_HANDLER_0_ID:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Resetting GPS device 0"))
|
||||
elif object_id == GPS_HANDLER_1_ID:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Resetting GPS device 1"))
|
||||
cmd = generate_action_command(object_id=object_id, action_id=int(op_code))
|
||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
@ -7,7 +7,7 @@
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
class SwitchNumbers:
|
||||
|
@ -8,7 +8,7 @@
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tc.service_3_housekeeping import make_sid, generate_one_hk_command
|
||||
|
||||
|
||||
|
@ -7,10 +7,15 @@
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from gomspace.gomspace_common import *
|
||||
|
||||
|
||||
class P60OpCodes(enum.Enum):
|
||||
TEST = "0"
|
||||
STACK_3V3_ON = "1"
|
||||
STACK_3V3_OFF = "2"
|
||||
|
||||
|
||||
class P60DockTestProcedure:
|
||||
"""
|
||||
@brief Use this class to define the tests to perform for the P60Dock.
|
||||
@ -33,10 +38,19 @@ class P60DockTestProcedure:
|
||||
|
||||
|
||||
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
|
||||
out_en_0 = TableEntry(bytearray([0x00, 0x68]), TableEntry.uint8_size) # ACU VCC
|
||||
out_en_1 = TableEntry(bytearray([0x00, 0x69]), TableEntry.uint8_size) # PDU1 VCC
|
||||
out_en_2 = TableEntry(bytearray([0x00, 0x6A]), TableEntry.uint8_size) # unused
|
||||
out_en_3 = TableEntry(bytearray([0x00, 0x6B]), TableEntry.uint8_size) # PDU2 VCC
|
||||
out_en_4 = TableEntry(bytearray([0x00, 0x6C]), TableEntry.uint8_size) # ACU VBAT
|
||||
out_en_5 = TableEntry(bytearray([0x00, 0x6D]), TableEntry.uint8_size) # unused
|
||||
out_en_6 = TableEntry(bytearray([0x00, 0x6E]), TableEntry.uint8_size) # PDU1 VBAT
|
||||
out_en_7 = TableEntry(bytearray([0x00, 0x6F]), TableEntry.uint8_size) # PDU2 VBAT
|
||||
out_en_8 = TableEntry(bytearray([0x00, 0x70]), TableEntry.uint8_size) # Stack VBAT
|
||||
out_en_9 = TableEntry(bytearray([0x00, 0x71]), TableEntry.uint8_size) # Stack 3V3
|
||||
out_en_10 = TableEntry(bytearray([0x00, 0x72]), TableEntry.uint8_size) # Stack 5V
|
||||
out_en_11 = TableEntry(bytearray([0x00, 0x73]), TableEntry.uint8_size) # GS 3V3 (unused)
|
||||
out_en_12 = TableEntry(bytearray([0x00, 0x74]), TableEntry.uint8_size) # GS 5V (unused)
|
||||
# When channel consumes more than cur_lu_lim, channel is turned of immediately
|
||||
cur_lu_lim_0 = TableEntry(bytearray([0x00, 0xF8]), TableEntry.uint16_size)
|
||||
|
||||
@ -48,11 +62,34 @@ class P60DockHkTable:
|
||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0xA8]), TableEntry.uint32_size)
|
||||
|
||||
|
||||
def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
if op_code == P60OpCodes.STACK_3V3_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, P60DockConfigTable.out_en_9.parameter_address,
|
||||
P60DockConfigTable.out_en_9.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return
|
||||
if op_code == P60OpCodes.STACK_3V3_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 off"))
|
||||
command = pack_set_param_command(
|
||||
object_id, P60DockConfigTable.out_en_9.parameter_address,
|
||||
P60DockConfigTable.out_en_9.parameter_size, Channel.off
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Print Switches, Voltages, Currents"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return
|
||||
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)
|
||||
# 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"))
|
||||
@ -60,25 +97,25 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT
|
||||
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)
|
||||
# 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)
|
||||
# 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)
|
||||
# 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)
|
||||
# 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"))
|
||||
@ -86,14 +123,14 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT
|
||||
object_id, TableIds.hk, P60DockHkTable.temperature1.parameter_address,
|
||||
P60DockHkTable.temperature1.parameter_size
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
||||
# 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)
|
||||
# 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,
|
||||
@ -102,14 +139,14 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT
|
||||
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)
|
||||
# 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)
|
||||
# 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"))
|
||||
@ -118,7 +155,7 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT
|
||||
object_id, table_id_invalid, P60DockHkTable.temperature1.parameter_address,
|
||||
P60DockHkTable.temperature1.parameter_size
|
||||
)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
||||
# 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,
|
||||
@ -126,7 +163,7 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT
|
||||
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)
|
||||
# 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"))
|
||||
@ -134,7 +171,7 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT
|
||||
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)
|
||||
# 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(
|
||||
@ -145,7 +182,7 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT
|
||||
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)
|
||||
# command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
@ -155,7 +192,7 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT
|
||||
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)
|
||||
# command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
|
28
pus_tc/pdec_handler.py
Normal file
28
pus_tc/pdec_handler.py
Normal file
@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file pdec_handler.py
|
||||
@brief Test commanding of PDEC Handler
|
||||
@author J. Meier
|
||||
@date 22.11.2021
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
class CommandIds:
|
||||
# prints the clcw to the console. Useful for debugging
|
||||
PRINT_CLCW = bytearray([0x0, 0x0, 0x0, 0x0])
|
||||
|
||||
|
||||
def pack_pdec_handler_test(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing PDEC handler with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if op_code == "0":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDEC Handler: Print CLCW"))
|
||||
command = object_id + CommandIds.PRINT_CLCW
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
134
pus_tc/pdu1.py
134
pus_tc/pdu1.py
@ -1,19 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmtcc_tc_pdu1.py
|
||||
@brief PDU2 tests
|
||||
"""PDU2 is mounted on the X4 slot of the P60 dock
|
||||
@author J. Meier
|
||||
@date 17.12.2020
|
||||
"""
|
||||
import enum
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from gomspace.gomspace_common import *
|
||||
from pus_tc.p60dock import P60DockConfigTable
|
||||
from gomspace.gomspace_pdu_definitions import *
|
||||
|
||||
|
||||
class Pdu1OpCodes(enum.Enum):
|
||||
TESTS = "0"
|
||||
TCS_BOARD_ON = "1"
|
||||
TCS_BOARD_OFF = "2"
|
||||
STAR_TRACKER_ON = "3"
|
||||
STAR_TRACKER_OFF = "4"
|
||||
SUS_NOMINAL_ON = "5"
|
||||
SUS_NOMINAL_OFF = "6"
|
||||
ACS_A_SIDE_ON = "7"
|
||||
ACS_A_SIDE_OFF = "8"
|
||||
|
||||
|
||||
class PDU1TestProcedure:
|
||||
"""
|
||||
@brief Use this class to define the tests to perform for the PDU2.
|
||||
@ -27,49 +38,122 @@ class PDU1TestProcedure:
|
||||
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
|
||||
turn_channel_3_off = False
|
||||
|
||||
|
||||
def pack_pdu1_test_into(
|
||||
pdu1_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT
|
||||
):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing PDU1"))
|
||||
def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Commanding PDU1"))
|
||||
|
||||
if op_code == Pdu1OpCodes.TCS_BOARD_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn TCS board on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_0.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.TCS_BOARD_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn TCS board off"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_0.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.off
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.STAR_TRACKER_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.SUS_NOMINAL_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.on)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.STAR_TRACKER_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker off"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.SUS_NOMINAL_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal off"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.off
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.ACS_A_SIDE_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn ACS Side A on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_7.parameter_address,
|
||||
PDUConfigTable.out_en_7.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.ACS_A_SIDE_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn ACS Side A off"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_7.parameter_address,
|
||||
PDUConfigTable.out_en_7.parameter_size, Channel.off
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.SUS_NOMINAL_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu1OpCodes.SUS_NOMINAL_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal off"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.off
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Print Switches, Voltages, Currents"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
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)
|
||||
command = pack_ping_command(object_id, ping_data)
|
||||
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,
|
||||
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)
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.on
|
||||
)
|
||||
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)
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.off
|
||||
)
|
||||
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)
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_3.parameter_address,
|
||||
PDUConfigTable.out_en_3.parameter_size, Channel.on
|
||||
)
|
||||
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)
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_3.parameter_address,
|
||||
PDUConfigTable.out_en_3.parameter_size, Channel.off
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
121
pus_tc/pdu2.py
121
pus_tc/pdu2.py
@ -2,15 +2,23 @@
|
||||
"""
|
||||
@file tmtcc_tc_pdu2.py
|
||||
@brief PDU2 tests
|
||||
@details PDU2 is mounted on the X2 slot of the P60 dock
|
||||
@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 Pdu2OpCodes(enum.Enum):
|
||||
ACS_SIDE_B_ON = "1"
|
||||
ACS_SIDE_B_OFF = "2"
|
||||
SUS_REDUNDANT_ON = "3"
|
||||
SUS_REDUNDANT_OFF = "4"
|
||||
RW_ON = "5"
|
||||
RW_OFF = "6"
|
||||
|
||||
|
||||
class PDU2TestProcedure:
|
||||
@ -25,7 +33,7 @@ class PDU2TestProcedure:
|
||||
gnd_wdt_reset = False
|
||||
ping = False
|
||||
channel_2_off = False # Reaction wheels 5V
|
||||
read_temperature = True
|
||||
read_temperature = False
|
||||
read_channel_2_state = False # Reaction wheels 5V
|
||||
read_cur_lu_lim_0 = False # OBC
|
||||
channel_2_on = False # Reaction wheels 5V
|
||||
@ -35,71 +43,114 @@ class PDU2TestProcedure:
|
||||
request_hk_table = False
|
||||
|
||||
|
||||
def pack_pdu2_test_into(pdu2_object_id: bytearray, p60dock_object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
||||
def pack_pdu2_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> 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)
|
||||
if op_code == Pdu2OpCodes.ACS_SIDE_B_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn ACS Side B on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_7.parameter_address,
|
||||
PDUConfigTable.out_en_7.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return tc_queue
|
||||
if op_code == Pdu2OpCodes.ACS_SIDE_B_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn ACS Side B off"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_7.parameter_address,
|
||||
PDUConfigTable.out_en_7.parameter_size, Channel.off
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return tc_queue
|
||||
if op_code == Pdu2OpCodes.SUS_REDUNDANT_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn SUS redundant on"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.on)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.SUS_REDUNDANT_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn SUS redundant off"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.off)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.RW_ON.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn reaction wheels on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.RW_OFF.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn reaction wheels off"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Switches, Currents, Voltahes"))
|
||||
command = generate_action_command(
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||
)
|
||||
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)
|
||||
command = pack_reboot_command(object_id)
|
||||
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)
|
||||
command = pack_get_param_command(
|
||||
object_id, TableIds.hk, PDUHkTable.wdt_gnd_left.parameter_address,
|
||||
PDUHkTable.wdt_gnd_left.parameter_size
|
||||
)
|
||||
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)
|
||||
command = pack_gnd_wdt_reset_command(object_id)
|
||||
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)
|
||||
command = pack_ping_command(object_id, ping_data)
|
||||
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,
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT, "PDU2: Testing setting output channel 2 on (TCS Heater)")
|
||||
)
|
||||
command = pack_set_param_command(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)
|
||||
command = pack_get_param_command(
|
||||
object_id, TableIds.hk, PDUHkTable.temperature.parameter_address,
|
||||
PDUHkTable.temperature.parameter_size
|
||||
)
|
||||
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(
|
||||
(QueueCommands.PRINT, "PDU2: Reading output channel 2 state (TCS Heater)")
|
||||
)
|
||||
command = pack_get_param_command(
|
||||
object_id, TableIds.config, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size
|
||||
)
|
||||
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(
|
||||
(QueueCommands.PRINT, "PDU2: Reading current limit value of output channel 0 (OBC)")
|
||||
)
|
||||
command = pack_get_param_command(
|
||||
object_id, TableIds.config, PDUConfigTable.cur_lu_lim_0.parameter_address,
|
||||
PDUConfigTable.cur_lu_lim_0.parameter_size
|
||||
)
|
||||
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,
|
||||
command = pack_set_param_command(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)
|
||||
command = pack_request_full_hk_table_command(object_id)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
|
41
pus_tc/ploc_memory_dumper.py
Normal file
41
pus_tc/ploc_memory_dumper.py
Normal file
@ -0,0 +1,41 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file ploc_memory_dumper.py
|
||||
@brief This file implements the command to dump memory sectors of the PLOC. Memories of the PLOC which can be dumped
|
||||
are one MRAM, two flash memories and the SRAM.
|
||||
@author J. Meier
|
||||
@date 31.08.2021
|
||||
"""
|
||||
import struct
|
||||
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
class ActionIds:
|
||||
DUMP_MRAM = 1
|
||||
|
||||
|
||||
def pack_ploc_memory_dumper_cmd(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing PLOC memory dumper with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if op_code == "0":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Dump MRAM"))
|
||||
command = pack_mram_dump_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
|
||||
def pack_mram_dump_cmd(object_id: bytearray) -> bytearray:
|
||||
start = int(input("Start address: 0x"), 16)
|
||||
end = int(input("End address: 0x"), 16)
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', ActionIds.DUMP_MRAM)
|
||||
command = command + struct.pack('!I', start)
|
||||
command = command + struct.pack('!I', end)
|
||||
return command
|
@ -11,7 +11,7 @@ import struct
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
class PlocTestProcedure:
|
||||
|
@ -11,8 +11,20 @@ import struct
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
latchup_id_dict = {
|
||||
"0": "0.85V",
|
||||
"1": "1.8V",
|
||||
"2": "MISC",
|
||||
"3": "3.3V",
|
||||
"4": "NVM_4XO",
|
||||
"5": "MISSION",
|
||||
"6": "SAFECOTS"
|
||||
}
|
||||
|
||||
class SupvActionIds:
|
||||
HK_REPORT = 1
|
||||
@ -25,10 +37,42 @@ class SupvActionIds:
|
||||
RESET_MPSOC = 8
|
||||
SET_TIME_REF = 9
|
||||
DISABLE_HK = 10
|
||||
GET_BOOT_STATUS_REPORT = 11
|
||||
UPDATE_AVAILABLE = 12
|
||||
WATCHDOGS_ENABLE = 13
|
||||
WATCHDOGS_CONFIG_TIMEOUT = 14
|
||||
ENABLE_LATCHUP_ALERT = 15
|
||||
DISABLE_LATCHUP_ALERT = 16
|
||||
AUTO_CALIBRATE_ALERT = 17
|
||||
SET_ALERT_LIMIT = 18
|
||||
SET_ALERT_IRQ_FILTER = 19
|
||||
SET_ADC_SWEEP_PERIOD = 20
|
||||
SET_ADC_ENABLED_CHANNELS = 21
|
||||
SET_ADC_WINDOW_AND_STRIDE = 22
|
||||
SET_ADC_THRESHOLD = 23
|
||||
GET_LATCHUP_STATUS_REPORT = 24
|
||||
COPY_ADC_DATA_TO_MRAM = 25
|
||||
ENABLE_NVMS = 26
|
||||
SELECT_NVM = 27
|
||||
RUN_AUTO_EM_TESTS = 28
|
||||
WIPE_MRAM = 29
|
||||
DUMP_MRAM = 30
|
||||
SET_DBG_VERBOSITY = 31
|
||||
CAN_LOOPBACK_TEST = 32
|
||||
PRINT_CPU_STATS = 33
|
||||
SET_GPIO = 34
|
||||
READ_GPIO = 35
|
||||
RESTART_SUPERVISOR = 36
|
||||
FACTORY_RESET_CLEAR_ALL = 37
|
||||
REQUEST_LOGGING_DATA = 38
|
||||
UPDATE_IMAGE_DATA = 39
|
||||
FACTORY_RESET_CLEAR_MIRROR = 40
|
||||
FACTORY_RESET_CLEAR_CIRCULAR = 41
|
||||
|
||||
|
||||
class SupvHkIds:
|
||||
HK_REPORT = 52
|
||||
BOOT_STATUS_REPORT = 53
|
||||
|
||||
|
||||
def pack_ploc_supv_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
@ -91,7 +135,147 @@ def pack_ploc_supv_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code:
|
||||
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)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=29, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "13":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Request boot status report"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.GET_BOOT_STATUS_REPORT)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "14":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update available"))
|
||||
command = pack_update_available_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "15":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Watchdogs Enable"))
|
||||
command = pack_watchdogs_enable_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "16":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Watchdog configure timeout"))
|
||||
command = pack_watchdog_config_timeout_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "17":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Enable latchup alert"))
|
||||
command = pack_lachtup_alert_cmd(object_id, True)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=34, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "18":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Disable latchup alert"))
|
||||
command = pack_lachtup_alert_cmd(object_id, False)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=35, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "19":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Auto calibrate alert"))
|
||||
command = pack_auto_calibrate_alert_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=36, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "20":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set alert limit"))
|
||||
command = pack_set_alert_limit_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=37, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "21":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set alert irq filter"))
|
||||
command = pack_set_alert_irq_filter_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=38, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "22":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set ADC sweep period"))
|
||||
command = pack_set_adc_sweep_period_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=39, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "23":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set ADC enabled channels"))
|
||||
command = pack_set_adc_enabled_channels_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=40, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "24":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set ADC window and stride"))
|
||||
command = pack_set_adc_window_and_stride_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=41, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "25":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set ADC threshold"))
|
||||
command = pack_set_adc_threshold_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=42, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "26":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Request latchup status report"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.GET_LATCHUP_STATUS_REPORT)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=43, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "27":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Copy ADC data to MRAM"))
|
||||
command = object_id + struct.pack('!I', SupvActionIds.COPY_ADC_DATA_TO_MRAM)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=44, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "28":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Enalbe/Disable NVMs"))
|
||||
command = pack_enable_nvms_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "29":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Select NVM"))
|
||||
command = pack_select_nvm_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "30":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Run auto EM tests"))
|
||||
command = pack_auto_em_tests_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "31":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Wipe MRAM"))
|
||||
command = pack_mram_wipe_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=46, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "33":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Print CPU stats"))
|
||||
command = pack_print_cpu_stats_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=48, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "34":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set debug verbosity"))
|
||||
command = pack_set_debug_verbosity_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=49, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "35":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set GPIO command"))
|
||||
command = pack_set_gpio_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=50, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "36":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Read GPIO command"))
|
||||
command = pack_read_gpio_cmd(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=51, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "37":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Restart supervisor"))
|
||||
command = command = object_id + struct.pack('!I', SupvActionIds.RESTART_SUPERVISOR)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=52, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "38":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Factory reset clear all"))
|
||||
command = command = object_id + struct.pack('!I', SupvActionIds.FACTORY_RESET_CLEAR_ALL)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=53, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "39":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Factory reset clear mirror entries"))
|
||||
command = command = object_id + struct.pack('!I', SupvActionIds.FACTORY_RESET_CLEAR_MIRROR)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=54, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "40":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Factory reset clear circular entries"))
|
||||
command = command = object_id + struct.pack('!I', SupvActionIds.FACTORY_RESET_CLEAR_CIRCULAR)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=55, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
elif op_code == "41":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: CAN loopback test"))
|
||||
command = command = object_id + struct.pack('!I', SupvActionIds.CAN_LOOPBACK_TEST)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=56, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
return tc_queue
|
||||
@ -112,3 +296,273 @@ def pack_sel_boot_image_cmd(object_id: bytearray, mem: int, bp0: int, bp1: int,
|
||||
command = command + struct.pack('!B', bp1)
|
||||
command = command + struct.pack('!B', bp2)
|
||||
return command
|
||||
|
||||
|
||||
def pack_update_available_cmd(object_id: bytearray) -> bytearray:
|
||||
"""
|
||||
@brief This function packs the udpate availabe command.
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
"""
|
||||
image_select = 1
|
||||
image_partition = 0
|
||||
image_size = 222
|
||||
image_crc = 0x0
|
||||
number_of_packets = 150
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.UPDATE_AVAILABLE)
|
||||
command = command + struct.pack('!B', image_select)
|
||||
command = command + struct.pack('!B', image_partition)
|
||||
command = command + struct.pack('!I', image_size)
|
||||
command = command + struct.pack('!I', image_crc)
|
||||
command = command + struct.pack('!I', number_of_packets)
|
||||
return command
|
||||
|
||||
|
||||
def pack_watchdogs_enable_cmd(object_id: bytearray) -> bytearray:
|
||||
"""
|
||||
@brief This function packs the command to enable or disable watchdogs on the PLOC.
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
@note Enable = 1, Disable = 0
|
||||
"""
|
||||
watchdog_ps = 1
|
||||
watchdog_pl = 1
|
||||
watchdog_int = 0
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.WATCHDOGS_ENABLE)
|
||||
command = command + struct.pack('!B', watchdog_ps)
|
||||
command = command + struct.pack('!B', watchdog_pl)
|
||||
command = command + struct.pack('!B', watchdog_int)
|
||||
return command
|
||||
|
||||
|
||||
def pack_watchdog_config_timeout_cmd(object_id: bytearray) -> bytearray:
|
||||
"""
|
||||
@brief This function packs the command set the timeout of one of the three watchdogs of the PLOC.
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
"""
|
||||
watchdog = int(input("Specify watchdog (0 - PS, 1 - PL, 2 - INT):"))
|
||||
timeout = int(input("Specify timeout (1000 ms - 360000 ms):"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.WATCHDOGS_CONFIG_TIMEOUT)
|
||||
command = command + struct.pack('!B', watchdog)
|
||||
command = command + struct.pack('!I', timeout)
|
||||
return command
|
||||
|
||||
|
||||
def pack_lachtup_alert_cmd(object_id: bytearray, state: bool) -> bytearray:
|
||||
"""
|
||||
@brief This function packs the command to enable or disable a certain latchup alerts.
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
@param state True - enable latchup alert, False - disable latchup alert
|
||||
"""
|
||||
latchup_id = get_latchup_id()
|
||||
command = bytearray()
|
||||
if state:
|
||||
command = object_id + struct.pack('!I', SupvActionIds.ENABLE_LATCHUP_ALERT)
|
||||
else:
|
||||
command = object_id + struct.pack('!I', SupvActionIds.DISABLE_LATCHUP_ALERT)
|
||||
command = command + struct.pack('!B', latchup_id)
|
||||
return command
|
||||
|
||||
|
||||
def pack_auto_calibrate_alert_cmd(object_id: bytearray) -> bytearray:
|
||||
"""
|
||||
@brief This function packs the command to auto calibrate a latchup alert.
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
"""
|
||||
latchup_id = get_latchup_id()
|
||||
mg = int(input("Specify MG:"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.AUTO_CALIBRATE_ALERT)
|
||||
command = command + struct.pack('!B', latchup_id)
|
||||
command = command + struct.pack('!I', mg)
|
||||
return command
|
||||
|
||||
|
||||
def get_latchup_id() -> int:
|
||||
key_column_width = 10
|
||||
description_column_width = 50
|
||||
separator_width = key_column_width + description_column_width + 3
|
||||
separator_string = separator_width * "-"
|
||||
key_string = "Latchup ID".ljust(key_column_width)
|
||||
description_string = "Description".ljust(description_column_width)
|
||||
print(f"{key_string} | {description_string}")
|
||||
print(separator_string)
|
||||
for key in latchup_id_dict:
|
||||
key_string = key.ljust(key_column_width)
|
||||
description_string = latchup_id_dict[key].ljust(description_column_width)
|
||||
print(f"{key_string} | {description_string}")
|
||||
return int(input("Specify latchup ID:"))
|
||||
|
||||
|
||||
def pack_set_alert_limit_cmd(object_id: bytearray) -> bytearray:
|
||||
"""
|
||||
@brief This function packs the command to set the limit of a latchup alert.
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
"""
|
||||
latchup_id = get_latchup_id()
|
||||
dutycycle = int(input("Specify dutycycle:"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_ALERT_LIMIT)
|
||||
command = command + struct.pack('!B', latchup_id)
|
||||
command = command + struct.pack('!I', dutycycle)
|
||||
return command
|
||||
|
||||
|
||||
def pack_set_alert_irq_filter_cmd(object_id: bytearray) -> bytearray:
|
||||
"""
|
||||
@brief This function packs the command to configure the latchup alert irq filter.
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
"""
|
||||
latchup_id = get_latchup_id()
|
||||
tp = int(input("Specify filter type (TP):"))
|
||||
div = int(input("Specify clock divider (DIV):"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_ALERT_IRQ_FILTER)
|
||||
command = command + struct.pack('!B', latchup_id)
|
||||
command = command + struct.pack('!B', tp)
|
||||
command = command + struct.pack('!B', div)
|
||||
return command
|
||||
|
||||
|
||||
def pack_set_adc_sweep_period_cmd(object_id: bytearray) -> bytearray:
|
||||
"""
|
||||
@brief This function packs the command to set the limit of a latchup alert.
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
"""
|
||||
sweep_period = int(input("Specify sweep period (min 21 us):"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_ADC_SWEEP_PERIOD)
|
||||
command = command + struct.pack('!I', sweep_period)
|
||||
return command
|
||||
|
||||
|
||||
def pack_set_adc_enabled_channels_cmd(object_id: bytearray) -> bytearray:
|
||||
"""
|
||||
@brief This function packs the command to enable or disable channels of the ADC.
|
||||
@param object_id The object id of the PLOC supervisor handler.
|
||||
"""
|
||||
ch = int(input("Specify ch:"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_ADC_ENABLED_CHANNELS)
|
||||
command = command + struct.pack('!H', ch)
|
||||
return command
|
||||
|
||||
|
||||
def pack_set_adc_window_and_stride_cmd(object_id: bytearray) -> bytearray:
|
||||
window_size = int(input("Specify window size:"))
|
||||
striding_step_size = int(input("Specify striding step size:"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_ADC_WINDOW_AND_STRIDE)
|
||||
command = command + struct.pack('!H', window_size)
|
||||
command = command + struct.pack('!H', striding_step_size)
|
||||
return command
|
||||
|
||||
|
||||
def pack_set_adc_threshold_cmd(object_id: bytearray) -> bytearray:
|
||||
threshold = int(input("Specify threshold:"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_ADC_THRESHOLD)
|
||||
command = command + struct.pack('!I', threshold)
|
||||
return command
|
||||
|
||||
|
||||
def pack_enable_nvms_cmd(object_id: bytearray) -> bytearray:
|
||||
n01 = int(input("NVM0/1 (0 - off, 1 - on):"))
|
||||
n3 = int(input("NVM3 (0 - off, 1 - on):"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.ENABLE_NVMS)
|
||||
command = command + struct.pack('!B', n01)
|
||||
command = command + struct.pack('!B', n3)
|
||||
return command
|
||||
|
||||
|
||||
def pack_select_nvm_cmd(object_id: bytearray) -> bytearray:
|
||||
mem = int(input("Specify NVM (0 - NVM0, 1 - MVM1):"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SELECT_NVM)
|
||||
command = command + struct.pack('!B', mem)
|
||||
return command
|
||||
|
||||
|
||||
def pack_auto_em_tests_cmd(object_id: bytearray) -> bytearray:
|
||||
test = int(input("Specify test (1 - complete, 2 - short):"))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.RUN_AUTO_EM_TESTS)
|
||||
command = command + struct.pack('!B', test)
|
||||
return command
|
||||
|
||||
|
||||
def pack_mram_wipe_cmd(object_id: bytearray) -> bytearray:
|
||||
start = int(input("Start address: 0x"), 16)
|
||||
stop = int(input("Stop address: 0x"), 16)
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.WIPE_MRAM)
|
||||
command = command + struct.pack('!I', start)
|
||||
command = command + struct.pack('!I', stop)
|
||||
return command
|
||||
|
||||
|
||||
def pack_print_cpu_stats_cmd(object_id: bytearray) -> bytearray:
|
||||
en = 1
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.PRINT_CPU_STATS)
|
||||
command = command + struct.pack('!B', en)
|
||||
return command
|
||||
|
||||
|
||||
def pack_set_debug_verbosity_cmd(object_id: bytearray) -> bytearray:
|
||||
command = bytearray()
|
||||
verbosity = get_debug_verbosity()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_DBG_VERBOSITY)
|
||||
command = command + struct.pack('!B', verbosity)
|
||||
return command
|
||||
|
||||
|
||||
def get_debug_verbosity() -> int:
|
||||
tries = 0
|
||||
while tries < 3:
|
||||
try:
|
||||
print("Debug verbosity options")
|
||||
verbosity_options_dict = {
|
||||
0: "None",
|
||||
1: "Error",
|
||||
2: "Warn",
|
||||
3: "Info",
|
||||
}
|
||||
print("{:<6} | {}".format('Key', 'Description'))
|
||||
for entry in verbosity_options_dict.items():
|
||||
print("{:<6} | {}".format(entry[0], entry[1]))
|
||||
verbosity = int(input("Specify verbosity key: "))
|
||||
if verbosity > len(verbosity_options_dict) - 1:
|
||||
raise ValueError
|
||||
return verbosity
|
||||
except ValueError:
|
||||
LOGGER.warning("Invalid verbosity key specified")
|
||||
tries = tries + 1
|
||||
LOGGER.error("get_debug_verbosity: Exceeded max tries to input verbosity key")
|
||||
quit()
|
||||
|
||||
|
||||
def pack_set_gpio_cmd(object_id: bytearray) -> bytearray:
|
||||
port = int(input("Specify port: "))
|
||||
pin = int(input("Specify pin: "))
|
||||
val = int(input("Specify val: "))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.SET_GPIO)
|
||||
command = command + struct.pack('!B', port)
|
||||
command = command + struct.pack('!B', pin)
|
||||
command = command + struct.pack('!B', val)
|
||||
return command
|
||||
|
||||
|
||||
def pack_read_gpio_cmd(object_id: bytearray) -> bytearray:
|
||||
port = int(input("Specify port: "))
|
||||
pin = int(input("Specify pin: "))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', SupvActionIds.READ_GPIO)
|
||||
command = command + struct.pack('!B', port)
|
||||
command = command + struct.pack('!B', pin)
|
||||
return command
|
||||
|
||||
|
||||
|
104
pus_tc/ploc_upater.py
Normal file
104
pus_tc/ploc_upater.py
Normal file
@ -0,0 +1,104 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file ploc_udpater.py
|
||||
@brief Commands to initiate update transfer to ploc supervisor. This only updates the software of the MPSoC, it is not
|
||||
possible to update the software of the supervisor.
|
||||
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 spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
latchup_id_dict = {
|
||||
"0": "0.85V",
|
||||
"1": "1.8V",
|
||||
"2": "MISC",
|
||||
"3": "3.3V",
|
||||
"4": "NVM_4XO",
|
||||
"5": "MISSION",
|
||||
"6": "SAFECOTS"
|
||||
}
|
||||
|
||||
|
||||
class UpdaterActionIds:
|
||||
UPDATE_A_UBOOT = 0
|
||||
UPDATE_A_BITSTREAM = 1
|
||||
UPDATE_A_LINUX = 2
|
||||
UPDATE_A_APP_SW = 3
|
||||
UPDATE_B_UBOOT = 4
|
||||
UPDATE_B_BITSTREAM = 5
|
||||
UPDATE_B_LINUX = 6
|
||||
UPDATE_B_LINUX = 7
|
||||
|
||||
|
||||
class ImagePathDefs:
|
||||
imageAuboot = "/mnt/sd0/ploc/updateAuboot.bin"
|
||||
imageAbitsream = "/mnt/sd0/ploc/updateAbitstream.bin"
|
||||
imageAlinux = "/mnt/sd0/ploc/updateAlinux.bin"
|
||||
imageAappsw = "/mnt/sd0/ploc/updateAappsw.bin"
|
||||
imageBuboot = "/mnt/sd0/ploc/updateBuboot.bin"
|
||||
imageBbitsream = "/mnt/sd0/ploc/updateBbitstream.bin"
|
||||
imageBlinux = "/mnt/sd0/ploc/updateBlinux.bin"
|
||||
imageBappsw = "/mnt/sd0/ploc/updateBappsw.bin"
|
||||
|
||||
|
||||
def pack_ploc_updater_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Testing PLOC updater with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if op_code == "0":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update uboot on partition A"))
|
||||
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_A_UBOOT) + \
|
||||
bytearray(ImagePathDefs.imageAuboot, 'utf-8')
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "1":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update bitstream on parition A"))
|
||||
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_A_BITSTREAM) + \
|
||||
bytearray(ImagePathDefs.imageAbitsream, 'utf-8')
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "2":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update linux on partition A"))
|
||||
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_A_LINUX) + \
|
||||
bytearray(ImagePathDefs.imageAlinux, 'utf-8')
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "3":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update application on partition A"))
|
||||
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_A_APP_SW) + \
|
||||
bytearray(ImagePathDefs.imageAappsw, 'utf-8')
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "4":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update uboot on partition B"))
|
||||
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_B_UBOOT) + \
|
||||
bytearray(ImagePathDefs.imageBuboot, 'utf-8')
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "5":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update bitstream on parition B"))
|
||||
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_B_BITSTREAM) + \
|
||||
bytearray(ImagePathDefs.imageBbitsream, 'utf-8')
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "6":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update linux on partition B"))
|
||||
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_B_LINUX) + \
|
||||
bytearray(ImagePathDefs.imageBlinux, 'utf-8')
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "7":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Update application on partition B"))
|
||||
command = object_id + struct.pack('!I', UpdaterActionIds.UPDATE_B_APP_SW) + \
|
||||
bytearray(ImagePathDefs.imageBappsw, 'utf-8')
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
@ -9,7 +9,7 @@ import struct
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from pus_tc.service_200_mode import pack_mode_data
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ import struct
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from pus_tc.service_200_mode import pack_mode_data
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
@date 02.05.2020
|
||||
"""
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from spacepackets.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
|
||||
|
39
pus_tc/star_tracker.py
Normal file
39
pus_tc/star_tracker.py
Normal file
@ -0,0 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file star_tracker.py
|
||||
@brief Star tracker commanding
|
||||
@author J. Meier
|
||||
@date 14.08.2021
|
||||
"""
|
||||
import struct
|
||||
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
|
||||
|
||||
class StarTrackerActionIds:
|
||||
PING = 0
|
||||
REQ_TEMPERATURE = 25
|
||||
|
||||
|
||||
def pack_star_tracker_commands_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
||||
tc_queue.appendleft(
|
||||
(QueueCommands.PRINT,
|
||||
"Generate command for star tracker with object id: 0x" + object_id.hex())
|
||||
)
|
||||
|
||||
if op_code == "0":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "Star tracker: Ping"))
|
||||
command = pack_ping_command(object_id)
|
||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
|
||||
def pack_ping_command(object_id: bytearray) -> bytearray:
|
||||
data = int(input("Specify ping data: "))
|
||||
command = bytearray()
|
||||
command = object_id + struct.pack('!I', StarTrackerActionIds.PING)
|
||||
command = command + struct.pack('!I', data)
|
||||
return command
|
@ -1,9 +1,5 @@
|
||||
"""Hook function which packs telecommands based on service and operation code string
|
||||
"""
|
||||
@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
|
||||
@ -12,12 +8,12 @@ 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 tmtccmd.pus.service_17_test import pack_service_17_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.pdu2 import pack_pdu2_commands
|
||||
from pus_tc.pdu1 import pack_pdu1_commands
|
||||
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
|
||||
@ -26,10 +22,19 @@ 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 pus_tc.ploc_upater import pack_ploc_updater_test_into
|
||||
from pus_tc.ploc_memory_dumper import pack_ploc_memory_dumper_cmd
|
||||
from pus_tc.ccsds_handler import pack_ccsds_handler_test
|
||||
from pus_tc.core import pack_core_commands
|
||||
from pus_tc.star_tracker import pack_star_tracker_commands_into
|
||||
from pus_tc.gps import pack_gps_command
|
||||
from pus_tc.acs import pack_acs_command
|
||||
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
|
||||
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, PLOC_UPDATER_ID, \
|
||||
STAR_TRACKER_ID, PLOC_MEMORY_DUMPER_ID, GPS_HANDLER_0_ID, GPS_HANDLER_1_ID, CCSDS_HANDLER_ID, \
|
||||
PDEC_HANDLER_ID
|
||||
|
||||
|
||||
LOGGER = get_console_logger()
|
||||
@ -39,24 +44,18 @@ def pack_service_queue_user(service: Union[str, int], op_code: str, service_queu
|
||||
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())
|
||||
return service_queue.appendleft(pack_service_17_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)
|
||||
return pack_p60dock_test_into(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
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
|
||||
)
|
||||
object_id = PDU_1_HANDLER_ID
|
||||
return pack_pdu1_commands(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
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
|
||||
)
|
||||
object_id = PDU_2_HANDLER_ID
|
||||
return pack_pdu2_commands(object_id=object_id, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.ACU.value:
|
||||
object_id = ACU_HANDLER_ID
|
||||
return pack_acu_test_into(object_id=object_id, tc_queue=service_queue)
|
||||
@ -89,11 +88,41 @@ def pack_service_queue_user(service: Union[str, int], op_code: str, service_queu
|
||||
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)
|
||||
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)
|
||||
|
||||
return pack_ploc_supv_test_into(
|
||||
object_id=object_id, tc_queue=service_queue, op_code=op_code
|
||||
)
|
||||
if service == CustomServiceList.PLOC_UPDATER.value:
|
||||
object_id = PLOC_UPDATER_ID
|
||||
return pack_ploc_updater_test_into(
|
||||
object_id=object_id, tc_queue=service_queue, op_code=op_code
|
||||
)
|
||||
if service == CustomServiceList.STAR_TRACKER.value:
|
||||
object_id = STAR_TRACKER_ID
|
||||
return pack_star_tracker_commands_into(
|
||||
object_id=object_id, tc_queue=service_queue, op_code=op_code
|
||||
)
|
||||
if service == CustomServiceList.CORE.value:
|
||||
return pack_core_commands(tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.PLOC_MEMORY_DUMPER.value:
|
||||
object_id = PLOC_MEMORY_DUMPER_ID
|
||||
return pack_ploc_memory_dumper_cmd(
|
||||
object_id=object_id, tc_queue=service_queue, op_code=op_code
|
||||
)
|
||||
if service == CustomServiceList.ACS.value:
|
||||
return pack_acs_command(tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.GPS_0.value:
|
||||
return pack_gps_command(object_id=GPS_HANDLER_0_ID, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.GPS_1.value:
|
||||
return pack_gps_command(object_id=GPS_HANDLER_1_ID, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.CCSDS_HANDLER.value:
|
||||
return pack_ccsds_handler_test(object_id=CCSDS_HANDLER_ID, tc_queue=service_queue, op_code=op_code)
|
||||
if service == CustomServiceList.PDEC_HANDLER.value:
|
||||
return pack_ccsds_handler_test(object_id=PDEC_HANDLER_ID, tc_queue=service_queue, op_code=op_code)
|
||||
LOGGER.warning("Invalid Service !")
|
||||
|
||||
|
||||
@ -102,5 +131,5 @@ def create_total_tc_queue_user() -> TcQueueT:
|
||||
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())
|
||||
tc_queue.appendleft(pack_service_17_ping_command(ssc=1700).pack_command_tuple())
|
||||
return tc_queue
|
||||
|
@ -8,7 +8,7 @@
|
||||
from tmtccmd.config.definitions import QueueCommands
|
||||
|
||||
from tmtccmd.tc.packer import TcQueueT
|
||||
from tmtccmd.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from pus_tc.service_200_mode import pack_mode_data
|
||||
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
it to your needs.
|
||||
"""
|
||||
from tmtccmd.tm.service_8_functional_cmd import Service8TM
|
||||
from tmtccmd.ecss.tm import PusTelemetry
|
||||
from spacepackets.ecss.tm import PusTelemetry
|
||||
from tmtccmd.utility.logger import get_console_logger
|
||||
|
||||
from tmtccmd.tm.service_1_verification import Service1TM
|
||||
from tmtccmd.pus.service_1_verification import Service1TMExtended
|
||||
from tmtccmd.pus.service_17_test import Service17TMExtended
|
||||
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
|
||||
@ -27,16 +27,16 @@ 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)
|
||||
tm_packet = Service1TMExtended.unpack(raw_telemetry=raw_tm_packet)
|
||||
if service_type == 3:
|
||||
tm_packet = Service3TM(raw_tm_packet)
|
||||
tm_packet = Service3TM.unpack(raw_telemetry=raw_tm_packet, custom_hk_handling=False)
|
||||
if service_type == 5:
|
||||
tm_packet = Service5TM(raw_tm_packet)
|
||||
tm_packet = Service5TM.unpack(raw_telemetry=raw_tm_packet)
|
||||
if service_type == 8:
|
||||
tm_packet = Service8TM(raw_tm_packet)
|
||||
tm_packet = Service8TM.unpack(raw_telemetry=raw_tm_packet)
|
||||
if service_type == 17:
|
||||
tm_packet = Service17TM(raw_tm_packet)
|
||||
tm_packet = Service17TMExtended.unpack(raw_telemetry=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)
|
||||
tm_packet = PusTelemetry.unpack(raw_telemetry=raw_tm_packet)
|
||||
tmtc_printer.print_telemetry(packet_if=tm_packet, info_if=tm_packet, print_raw_tm=False)
|
||||
|
@ -1,40 +1,22 @@
|
||||
"""
|
||||
@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.
|
||||
"""
|
||||
"""HK Handling for EIVE OBSW"""
|
||||
import struct
|
||||
import os
|
||||
import datetime
|
||||
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
|
||||
from config.object_ids import SYRLINKS_HANDLER, IMTQ_HANDLER_ID, GPS_HANDLER_0_ID, GPS_HANDLER_1_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.
|
||||
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.
|
||||
"""
|
||||
if object_id == SYRLINKS_HANDLER:
|
||||
if set_id == SetIds.RX_REGISTERS_DATASET:
|
||||
@ -50,6 +32,8 @@ def handle_user_hk_packet(object_id: bytes, set_id: int, hk_data: bytearray,
|
||||
else:
|
||||
LOGGER.info("Serive 3 TM: Syrlinks handler reply with unknown set id")
|
||||
return [], [], bytearray(), 0
|
||||
elif object_id == GPS_HANDLER_0_ID or object_id == GPS_HANDLER_1_ID:
|
||||
return handle_gps_data(hk_data=hk_data)
|
||||
else:
|
||||
LOGGER.info("Service 3 TM: Parsing for this SID has not been implemented.")
|
||||
return [], [], bytearray(), 0
|
||||
@ -90,16 +74,21 @@ def handle_self_test_data(hk_data: bytearray) -> Tuple[list, list, bytearray, in
|
||||
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]",
|
||||
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]"]
|
||||
"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]
|
||||
@ -145,13 +134,65 @@ def handle_self_test_data(hk_data: bytearray) -> Tuple[list, list, bytearray, in
|
||||
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,
|
||||
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]
|
||||
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)
|
||||
|
||||
|
||||
def handle_gps_data(hk_data: bytearray) -> Tuple[list, list, bytearray, int]:
|
||||
LOGGER.info(f'Received GPS data, HK data length {len(hk_data)}')
|
||||
var_index = 0
|
||||
header_array = []
|
||||
content_array = []
|
||||
latitude = struct.unpack('!d', hk_data[0:8])[0]
|
||||
header_array.append('Latitude')
|
||||
content_array.append(latitude)
|
||||
longitude = struct.unpack('!d', hk_data[8:16])[0]
|
||||
header_array.append('Longitude')
|
||||
content_array.append(longitude)
|
||||
altitude = struct.unpack('!d', hk_data[16:24])[0]
|
||||
header_array.append('Altitude')
|
||||
content_array.append(altitude)
|
||||
fix_mode = hk_data[24]
|
||||
header_array.append('Fix Mode')
|
||||
content_array.append(fix_mode)
|
||||
sat_in_use = hk_data[25]
|
||||
header_array.append('Sats in Use')
|
||||
content_array.append(sat_in_use)
|
||||
year = struct.unpack('!H', hk_data[26:28])[0]
|
||||
month = hk_data[28]
|
||||
day = hk_data[29]
|
||||
hours = hk_data[30]
|
||||
minutes = hk_data[31]
|
||||
seconds = hk_data[32]
|
||||
header_array.append('Date')
|
||||
date_string = f'{day}.{month}.{year} {hours}:{minutes}:{seconds}'
|
||||
content_array.append(date_string)
|
||||
unix_seconds = struct.unpack('!I', hk_data[33:37])[0]
|
||||
header_array.append('Unix Seconds')
|
||||
content_array.append(unix_seconds)
|
||||
var_index += 13
|
||||
if not os.path.isfile('gps_log.txt'):
|
||||
with open("gps_log.txt", "w") as gps_file:
|
||||
gps_file.write(
|
||||
'Time, Latitude [deg], Longitude [deg], Altitude [m], Fix Mode, Sats in Use, '
|
||||
'Date, Unix Seconds\n'
|
||||
)
|
||||
with open("gps_log.txt", "a") as gps_file:
|
||||
gps_file.write(
|
||||
f'{datetime.datetime.now()}, {latitude}, {longitude}, {altitude}, '
|
||||
f'{fix_mode}, {sat_in_use}, {date_string}, {unix_seconds}\n'
|
||||
)
|
||||
validity_buffer = hk_data[37:39]
|
||||
return header_array, content_array, validity_buffer, var_index
|
||||
|
@ -3,6 +3,7 @@ from typing import Tuple
|
||||
from config.object_ids import *
|
||||
from pus_tc.imtq import ImtqActionIds
|
||||
from pus_tc.ploc_mpsoc import PlocReplyIds
|
||||
from pus_tc.ploc_supervisor import SupvActionIds
|
||||
|
||||
|
||||
def user_analyze_service_8_data(
|
||||
@ -32,6 +33,8 @@ def user_analyze_service_8_data(
|
||||
return handle_imtq_replies(action_id, custom_data)
|
||||
elif object_id == PLOC_MPSOC_ID:
|
||||
return handle_ploc_replies(action_id, custom_data)
|
||||
elif object_id == PLOC_SUPV_ID:
|
||||
return handle_supervisor_replies(action_id, custom_data)
|
||||
else:
|
||||
header_list = []
|
||||
content_list = []
|
||||
@ -56,3 +59,12 @@ def handle_ploc_replies(action_id: int, custom_data: bytearray) -> Tuple[list, l
|
||||
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
|
||||
|
||||
|
||||
def handle_supervisor_replies(action_id: int, custom_data: bytearray) -> Tuple[list, list]:
|
||||
header_list = []
|
||||
content_list = []
|
||||
if action_id == SupvActionIds.DUMP_MRAM:
|
||||
header_list = ['MRAM Dump']
|
||||
content_list = [custom_data[:len(custom_data)]]
|
||||
return header_list, content_list
|
||||
|
1
spacepackets
Submodule
1
spacepackets
Submodule
Submodule spacepackets added at 464274a91c
39
tmtc_client_cli.py
Normal file → Executable file
39
tmtc_client_cli.py
Normal file → Executable file
@ -27,26 +27,43 @@ limitations under the License.
|
||||
@author R. Mueller
|
||||
"""
|
||||
import sys
|
||||
try:
|
||||
from tmtccmd.runner import initialize_tmtc_commander, run_tmtc_commander, add_ccsds_handler
|
||||
from tmtccmd.ccsds.handler import CcsdsTmHandler
|
||||
from tmtccmd.utility.logger import TMTC_LOGGER_NAME
|
||||
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 .[gui]\" for interactive installation'
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
import spacepackets
|
||||
from spacepackets.log import set_custom_console_logger_name
|
||||
except ImportError as error:
|
||||
print(error)
|
||||
print('Python spacepackets module could not be imported')
|
||||
print(
|
||||
'Install with \"cd spacepackets && python3 -m pip intall -e .\" for interative installation'
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
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():
|
||||
hook_obj = EiveHookObject()
|
||||
print(f"-- eive tmtc version {__version__}")
|
||||
print(f'-- eive tmtc version {__version__} --')
|
||||
print(f'-- spacepackets version {spacepackets.__version__} --')
|
||||
set_custom_console_logger_name(logger_name=TMTC_LOGGER_NAME)
|
||||
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)
|
||||
|
2
tmtc_client_gui.py
Normal file → Executable file
2
tmtc_client_gui.py
Normal file → Executable file
@ -35,6 +35,7 @@ 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
|
||||
import spacepackets
|
||||
except ImportError as error:
|
||||
run_tmtc_commander = None
|
||||
initialize_tmtc_commander = None
|
||||
@ -47,6 +48,7 @@ except ImportError as error:
|
||||
def main():
|
||||
hook_obj = EiveHookObject()
|
||||
print(f"-- eive tmtc version {__version__}")
|
||||
print(f'-- spacepackets version {spacepackets.__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)
|
||||
|
2
tmtccmd
2
tmtccmd
Submodule tmtccmd updated: 1e234851ec...bfa459ccc3
Reference in New Issue
Block a user