Merge remote-tracking branch 'origin/main' into mueller/syrlinks-proc
This commit is contained in:
commit
abc3d6bd62
5
.gitignore
vendored
5
.gitignore
vendored
@ -5,4 +5,7 @@ __pycache__
|
|||||||
log
|
log
|
||||||
/gps_log.txt
|
/gps_log.txt
|
||||||
/config/*.json
|
/config/*.json
|
||||||
tmtc_conf.json
|
|
||||||
|
/scex_conf.json
|
||||||
|
/tmtc_conf.json
|
||||||
|
/seqcnt.txt
|
||||||
|
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,7 +1,7 @@
|
|||||||
[submodule "tmtccmd"]
|
[submodule "tmtccmd"]
|
||||||
path = tmtccmd
|
path = deps/tmtccmd
|
||||||
url = https://github.com/robamu-org/tmtccmd.git
|
url = https://github.com/robamu-org/tmtccmd.git
|
||||||
|
|
||||||
[submodule "spacepackets"]
|
[submodule "spacepackets"]
|
||||||
path = spacepackets
|
path = deps/spacepackets
|
||||||
url = https://github.com/robamu-org/py-spacepackets.git
|
url = https://github.com/robamu-org/py-spacepackets.git
|
||||||
|
@ -6,14 +6,14 @@
|
|||||||
<envs>
|
<envs>
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
</envs>
|
</envs>
|
||||||
<option name="SDK_HOME" value="C:\Users\jakob\AppData\Local\Programs\Python\Python39\python.exe" />
|
<option name="SDK_HOME" value="" />
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
<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_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s acu -l -t 6" />
|
<option name="PARAMETERS" value="-s acu -l -d 6" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s bpx -o hk -t 6 --hk" />
|
<option name="PARAMETERS" value="-s bpx -o hk -d 6" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
<option name="REDIRECT_INPUT" value="false" />
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
<option name="INPUT_FILE" value="" />
|
<option name="INPUT_FILE" value="" />
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s bpx -t 6 --hk" />
|
<option name="PARAMETERS" value="-s bpx -d 6 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s bpx -o rst_boot_cnt -t 6" />
|
<option name="PARAMETERS" value="-s bpx -o rst_boot_cnt -d 6" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s gps0 -l" />
|
<option name="PARAMETERS" value="-s gps0 -l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s gps1 -l" />
|
<option name="PARAMETERS" value="-s gps1 -l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s heater -o 0 -l" />
|
<option name="PARAMETERS" value="-s heater -o 0 -l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-c udp -s imtq -o 8 -l -t 4 --hk" />
|
<option name="PARAMETERS" value="-c udp -s imtq -o 8 -l -d 4 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s imtq -o 2 -l -t 4 --hk" />
|
<option name="PARAMETERS" value="-s imtq -o 2 -l -d 4 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-c udp -s imtq -o 4 -l -t 4 --hk" />
|
<option name="PARAMETERS" value="-s imtq -o 4 -l -d 4 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-c udp -s imtq -o 6 -l -t 4 --hk" />
|
<option name="PARAMETERS" value="-s imtq -o 6 -l -d 4 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-c udp -s imtq -o 1 -l -t 4 --hk" />
|
<option name="PARAMETERS" value="-s imtq -o 1 -l -d 4 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-c udp -s imtq -o 3 -l -t 4 --hk" />
|
<option name="PARAMETERS" value="-s imtq -o 3 -l -d 4 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-c udp -s imtq -o 5 -l -t 4 --hk" />
|
<option name="PARAMETERS" value="-c udp -s imtq -o 5 -l -d 4 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s imtq -l -t 4" />
|
<option name="PARAMETERS" value="-m seqcmd -c udp -s imtq -l -d 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
24
.run/MGM Disable HK.run.xml
Normal file
24
.run/MGM Disable HK.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="MGM Disable HK" type="PythonConfigurationType" factoryName="Python" folderName="ACS">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s acs-ctrl -o disable-mgm-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
.run/MGM Enable HK.run.xml
Normal file
24
.run/MGM Enable HK.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="MGM Enable HK" type="PythonConfigurationType" factoryName="Python" folderName="ACS">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s acs-ctrl -o enable-mgm-hk -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
.run/MGM HK Once.run.xml
Normal file
24
.run/MGM HK Once.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="MGM HK Once" type="PythonConfigurationType" factoryName="Python" folderName="ACS">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s acs-ctrl -o req-mgm-hk -d 5" />
|
||||||
|
<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>
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s p60dock -l" />
|
<option name="PARAMETERS" value="-s p60dock -l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s pdu1 -t 6" />
|
<option name="PARAMETERS" value="-s pdu1 -d 6" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s pdu2 -l -t 6" />
|
<option name="PARAMETERS" value="-s pdu2 -l -d 6" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
24
.run/PLOC SUPV Normal.run.xml
Normal file
24
.run/PLOC SUPV Normal.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="PLOC SUPV Normal" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="tmtc -s ploc_supv -o nml" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
24
.run/PLOC SUPV On.run.xml
Normal file
24
.run/PLOC SUPV On.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="PLOC SUPV On" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="tmtc -s ploc_supv -o on" />
|
||||||
|
<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>
|
46
.run/PLOC SUPV.run.xml
Normal file
46
.run/PLOC SUPV.run.xml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="PLOC SUPV" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="tmtc -s ploc_supv -d 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>
|
||||||
|
<configuration default="false" name="PLOC SUPV" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="tmtc -s ploc_supv -d 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>
|
@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="PLOC MPSoC" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
<configuration default="false" name="PLOC MPSoC" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
|
||||||
<module name="tmtc" />
|
<module name="tmtc" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s ploc_mpsoc -t 6" />
|
<option name="PARAMETERS" value="-s ploc_mpsoc -d 6" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="PLOC SUPV" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
<configuration default="false" name="PLOC SUPV" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
|
||||||
<module name="tmtc" />
|
<module name="tmtc" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s ploc_supv -t 6" />
|
<option name="PARAMETERS" value="-s ploc_supv -d 6" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="tmtccmd Listener Mode" type="PythonConfigurationType" factoryName="Python">
|
<configuration default="false" name="Ping Command" type="PythonConfigurationType" factoryName="Python">
|
||||||
<module name="tmtc" />
|
<module name="tmtc" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-m listener --hk" />
|
<option name="PARAMETERS" value="tmtc -s test -o ping -d 3" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s reaction_wheel_1 -l -t 8 --hk" />
|
<option name="PARAMETERS" value="-s reaction_wheel_1 -l -d 8 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s reaction_wheel_2 -l -t 6 --hk" />
|
<option name="PARAMETERS" value="-s reaction_wheel_2 -l -d 6 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s reaction_wheel_3 -l -t 6 --hk" />
|
<option name="PARAMETERS" value="-s reaction_wheel_3 -l -d 6 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s reaction_wheel_4 -l -t 12 --hk" />
|
<option name="PARAMETERS" value="-s reaction_wheel_4 -l -d 12 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
||||||
<option name="PARAMETERS" value="-s core -o reboot_0_0 -t 4" />
|
<option name="PARAMETERS" value="-s core -o reboot_0_0 -d 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s core -o reboot_0_1 -t 4" />
|
<option name="PARAMETERS" value="-s core -o reboot_0_1 -d 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s core -o reboot_1_0 -t 4" />
|
<option name="PARAMETERS" value="-s core -o reboot_1_0 -d 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s core -o reboot_1_1 -t 4" />
|
<option name="PARAMETERS" value="-s core -o reboot_1_1 -d 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s core -o reboot -t 4" />
|
<option name="PARAMETERS" value="-s core -o reboot -d 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s core -o reboot_self -t 4" />
|
<option name="PARAMETERS" value="-s core -o reboot_self -d 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Service 17" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
<configuration default="false" name="SCEX " type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||||
<module name="tmtc" />
|
<module name="tmtc" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s 17" />
|
<option name="PARAMETERS" value="-s scex" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Ping Command" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
<configuration default="false" name="SCEX Ping" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||||
<module name="tmtc" />
|
<module name="tmtc" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
||||||
<option name="PARAMETERS" value="-s 17 -o 0 -t 3" />
|
<option name="PARAMETERS" value="-s scex -o ping" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
24
.run/SCEX oneCell.run.xml
Normal file
24
.run/SCEX oneCell.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="SCEX oneCell" type="PythonConfigurationType" factoryName="Python" folderName="Devices">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s scex -o 4 -d 4" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s sa_depl -o 0 -l" />
|
<option name="PARAMETERS" value="-s sa_depl -o 0 -l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s star_tracker -l -t 6" />
|
<option name="PARAMETERS" value="-s star_tracker -l -d 6" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s syrlinks -t 6" />
|
<option name="PARAMETERS" value="-s syrlinks -d 6" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-m 3 -c 2 -s SYRLINKS -l --hk" />
|
<option name="PARAMETERS" value="-m 3 -c 2 -s SYRLINKS -l --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-m 3 -c 2 -s TMP1075_1 -l" />
|
<option name="PARAMETERS" value="-m 3 -c 2 -s TMP1075_1 -l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-m 1 -c 2 -s TMP1075_2 -l" />
|
<option name="PARAMETERS" value="-m 1 -c 2 -s TMP1075_2 -l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
<component name="ProjectRunConfigurationManager">
|
||||||
<configuration default="false" name="Service 17 w Listener" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
<configuration default="false" name="TV Test Oneshot" type="PythonConfigurationType" factoryName="Python" folderName="TV">
|
||||||
<module name="tmtc" />
|
<module name="tmtc" />
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
<option name="PARENT_ENVS" value="true" />
|
<option name="PARENT_ENVS" value="true" />
|
||||||
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s 17 -l" />
|
<option name="PARAMETERS" value="-s proc" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
24
.run/Test Service w Listener.run.xml
Normal file
24
.run/Test Service w Listener.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Test Service w Listener" 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$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s test -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
.run/Test Service.run.xml
Normal file
24
.run/Test Service.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="Test Service" 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$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-s test" />
|
||||||
|
<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,18 +0,0 @@
|
|||||||
<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>
|
|
@ -1,18 +0,0 @@
|
|||||||
<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/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$/tmtccmd/src/tests"" />
|
|
||||||
<option name="_new_targetType" value=""PATH"" />
|
|
||||||
<method v="2" />
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-c udp -s imtq -o 7 -l -t 4 --hk" />
|
<option name="PARAMETERS" value="-c udp -s imtq -o 7 -l -d 4 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s ccsds_handler -l -t 8 --hk" />
|
<option name="PARAMETERS" value="-s ccsds_handler -l -t 8 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s pdec_handler -l -t 8 --hk" />
|
<option name="PARAMETERS" value="-s pdec_handler -l -t 8 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
24
.run/tmtc listener.run.xml
Normal file
24
.run/tmtc listener.run.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="tmtc listener" type="PythonConfigurationType" factoryName="Python">
|
||||||
|
<module name="tmtc" />
|
||||||
|
<option name="INTERPRETER_OPTIONS" value="" />
|
||||||
|
<option name="PARENT_ENVS" value="true" />
|
||||||
|
<envs>
|
||||||
|
<env name="PYTHONUNBUFFERED" value="1" />
|
||||||
|
</envs>
|
||||||
|
<option name="SDK_HOME" value="" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||||
|
<option name="IS_MODULE_SDK" value="true" />
|
||||||
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
|
<option name="PARAMETERS" value="-l" />
|
||||||
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
<option name="REDIRECT_INPUT" value="false" />
|
||||||
|
<option name="INPUT_FILE" value="" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s 2 -t 4" />
|
<option name="PARAMETERS" value="-s 2 -d 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s 200 -o 0 -t 4" />
|
<option name="PARAMETERS" value="-s 200 -o 0 -d 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s 3 --hk" />
|
<option name="PARAMETERS" value="-s 3 --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-s 8 -t 8" />
|
<option name="PARAMETERS" value="-s 8 -d 8" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="" />
|
<option name="PARAMETERS" value="-d 6" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="-h" />
|
<option name="PARAMETERS" value="-h" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcgui.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
|
||||||
<option name="PARAMETERS" value="" />
|
<option name="PARAMETERS" value="-g" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
18
CHANGELOG.md
18
CHANGELOG.md
@ -10,9 +10,25 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
# [v1.12.0]
|
# [v1.13.0]
|
||||||
|
|
||||||
|
- Major Update for `tmtccmd` and `spacepackets` dependencies which improves user API significantly.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/102
|
||||||
|
- Add commands to request MGM HK or enable/disable periodic HK for it
|
||||||
|
- Update power commands: Extend param get and set to all
|
||||||
|
gomspace devices.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/108
|
||||||
|
- Update PLOC supervisor commands
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/107
|
||||||
|
|
||||||
|
# [v1.12.0] 05.07.2022
|
||||||
|
|
||||||
|
- Update GPS HK Parsing
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/86
|
||||||
|
- PL PCDU HK Parsing
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/87
|
||||||
- Add full regular reboot command
|
- Add full regular reboot command
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/85
|
||||||
- Add Rad Sensor HK parsing
|
- Add Rad Sensor HK parsing
|
||||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/81
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-tmtc/pulls/81
|
||||||
- Add procedures, parser functions and general application functionalities
|
- Add procedures, parser functions and general application functionalities
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
"""
|
|
||||||
@brief This file exposes hook functions to the user.
|
|
||||||
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
|
||||||
it to your needs.
|
|
||||||
"""
|
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
|
||||||
|
|
||||||
|
|
||||||
def command_preparation_hook() -> PusTelecommand:
|
|
||||||
"""
|
|
||||||
Can be used to pack user-defined commands by generating and returning a PusTelecommand
|
|
||||||
class instance
|
|
||||||
"""
|
|
||||||
return PusTelecommand(service=17, subservice=1, ssc=20)
|
|
@ -5,7 +5,7 @@
|
|||||||
"""
|
"""
|
||||||
import enum
|
import enum
|
||||||
|
|
||||||
from tmtccmd.core.backend import TmTcHandler
|
from tmtccmd import CcsdsTmtcBackend
|
||||||
from tmtccmd.logging import get_console_logger
|
from tmtccmd.logging import get_console_logger
|
||||||
|
|
||||||
LOGGER = get_console_logger()
|
LOGGER = get_console_logger()
|
||||||
@ -15,5 +15,5 @@ class CustomModeList(enum.IntEnum):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def custom_mode_operation(tmtc_backend: TmTcHandler, mode: int):
|
def custom_mode_operation(_tmtc_backend: CcsdsTmtcBackend, _mode: int):
|
||||||
pass
|
pass
|
||||||
|
@ -11,11 +11,14 @@ PUS_APID = 0x65
|
|||||||
SPACE_PACKET_IDS = (0x08 << 8 | PUS_APID,)
|
SPACE_PACKET_IDS = (0x08 << 8 | PUS_APID,)
|
||||||
|
|
||||||
|
|
||||||
class CustomServiceList(enum.Enum):
|
class CustomServiceList(str, enum.Enum):
|
||||||
|
value: str
|
||||||
|
|
||||||
TEST_DEVICE = "test"
|
TEST_DEVICE = "test"
|
||||||
P60DOCK = "p60dock"
|
P60DOCK = "p60dock"
|
||||||
PDU1 = "pdu1"
|
PDU1 = "pdu1"
|
||||||
PDU2 = "pdu2"
|
PDU2 = "pdu2"
|
||||||
|
POWER = "power"
|
||||||
ACU = "acu"
|
ACU = "acu"
|
||||||
ACS = "acs"
|
ACS = "acs"
|
||||||
BPX_BATTERY = "bpx"
|
BPX_BATTERY = "bpx"
|
||||||
@ -34,8 +37,7 @@ class CustomServiceList(enum.Enum):
|
|||||||
REACTION_WHEEL_4 = "rw-4"
|
REACTION_WHEEL_4 = "rw-4"
|
||||||
RW_ASSEMBLY = "rw-ass"
|
RW_ASSEMBLY = "rw-ass"
|
||||||
RAD_SENSOR = "rad_sensor"
|
RAD_SENSOR = "rad_sensor"
|
||||||
GPS_0 = "gps0"
|
GPS_CTRL = "gnss-ctrl"
|
||||||
GPS_1 = "gps1"
|
|
||||||
PLOC_MEMORY_DUMPER = "ploc_memory_dumper"
|
PLOC_MEMORY_DUMPER = "ploc_memory_dumper"
|
||||||
CORE = "core"
|
CORE = "core"
|
||||||
STAR_TRACKER = "star_tracker"
|
STAR_TRACKER = "star_tracker"
|
||||||
@ -43,11 +45,14 @@ class CustomServiceList(enum.Enum):
|
|||||||
PDEC_HANDLER = "pdec_handler"
|
PDEC_HANDLER = "pdec_handler"
|
||||||
STR_IMG_HELPER = "str_img_helper"
|
STR_IMG_HELPER = "str_img_helper"
|
||||||
SYRLINKS = "syrlinks"
|
SYRLINKS = "syrlinks"
|
||||||
|
ACS_CTRL = "acs-ctrl"
|
||||||
ACS_ASS = "acs-ass"
|
ACS_ASS = "acs-ass"
|
||||||
SUS_ASS = "sus-ass"
|
SUS_ASS = "sus-ass"
|
||||||
|
TCS = "tcs"
|
||||||
TCS_ASS = "tcs-ass"
|
TCS_ASS = "tcs-ass"
|
||||||
TIME = "time"
|
TIME = "time"
|
||||||
PROCEDURE = "proc"
|
PROCEDURE = "proc"
|
||||||
RTD = "rtd"
|
RTD = "rtd"
|
||||||
TVTTESTPROCEDURE = "tvtestproc"
|
TVTTESTPROCEDURE = "tvtestproc"
|
||||||
CONTROLLERS = "controllers"
|
CONTROLLERS = "controllers"
|
||||||
|
SCEX = "scex"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||||
2200;0x0898;STORE_SEND_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2200;0x0898;STORE_SEND_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2201;0x0899;STORE_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2201;0x0899;STORE_WRITE_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
2202;0x089a;STORE_SEND_READ_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
2202;0x089a;STORE_SEND_READ_FAILED;LOW;;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
@ -77,7 +78,7 @@
|
|||||||
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
8901;0x22c5;CLOCK_SET_FAILURE;LOW;;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||||
9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
9700;0x25e4;TEST;INFO;;fsfw/src/fsfw/pus/Service17Test.h
|
9700;0x25e4;TEST;INFO;;fsfw/src/fsfw/pus/Service17Test.h
|
||||||
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw/hal/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
|
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;;fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
|
||||||
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
||||||
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
|
||||||
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
|
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;;mission/devices/devicedefinitions/powerDefinitions.h
|
||||||
@ -127,6 +128,8 @@
|
|||||||
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/obc/PdecHandler.h
|
12402;0x3072;INVALID_FAR;HIGH;Read invalid FAR from PDEC after startup;linux/obc/PdecHandler.h
|
||||||
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/obc/PdecHandler.h
|
12403;0x3073;CARRIER_LOCK;INFO;Carrier lock detected;linux/obc/PdecHandler.h
|
||||||
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/obc/PdecHandler.h
|
12404;0x3074;BIT_LOCK_PDEC;INFO;Bit lock detected (data valid);linux/obc/PdecHandler.h
|
||||||
|
12405;0x3075;LOST_CARRIER_LOCK_PDEC;INFO;Lost carrier lock;linux/obc/PdecHandler.h
|
||||||
|
12406;0x3076;LOST_BIT_LOCK_PDEC;INFO;Lost bit lock;linux/obc/PdecHandler.h
|
||||||
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
|
12500;0x30d4;IMAGE_UPLOAD_FAILED;LOW;Image upload failed;linux/devices/startracker/StrHelper.h
|
||||||
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
|
12501;0x30d5;IMAGE_DOWNLOAD_FAILED;LOW;Image download failed;linux/devices/startracker/StrHelper.h
|
||||||
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
|
12502;0x30d6;IMAGE_UPLOAD_SUCCESSFUL;LOW;Uploading image to star tracker was successfulop;linux/devices/startracker/StrHelper.h
|
||||||
@ -156,6 +159,8 @@
|
|||||||
12609;0x3141;MPSOC_ACK_INVALID_APID;LOW;Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
|
12609;0x3141;MPSOC_ACK_INVALID_APID;LOW;Expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
|
||||||
12610;0x3142;MPSOC_EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
|
12610;0x3142;MPSOC_EXE_INVALID_APID;LOW;Expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of MPSoC;linux/devices/ploc/PlocMPSoCHelper.h
|
||||||
12611;0x3143;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux/devices/ploc/PlocMPSoCHelper.h
|
12611;0x3143;MPSOC_HELPER_SEQ_CNT_MISMATCH;LOW;Received sequence count does not match expected sequence count P1: Expected sequence count P2: Received sequence count;linux/devices/ploc/PlocMPSoCHelper.h
|
||||||
|
12612;0x3144;MPSOC_TM_SIZE_ERROR;LOW;;linux/devices/ploc/PlocMPSoCHelper.h
|
||||||
|
12613;0x3145;MPSOC_TM_CRC_MISSMATCH;LOW;;linux/devices/ploc/PlocMPSoCHelper.h
|
||||||
12700;0x319c;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission/devices/PayloadPcduHandler.h
|
12700;0x319c;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission/devices/PayloadPcduHandler.h
|
||||||
12701;0x319d;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
12701;0x319d;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||||
12702;0x319e;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
12702;0x319e;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission/devices/PayloadPcduHandler.h
|
||||||
@ -189,18 +194,23 @@
|
|||||||
13605;0x3525;SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL;LOW;Requesting event buffer was successful;linux/devices/ploc/PlocSupvHelper.h
|
13605;0x3525;SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL;LOW;Requesting event buffer was successful;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13606;0x3526;SUPV_EVENT_BUFFER_REQUEST_FAILED;LOW;Requesting event buffer failed;linux/devices/ploc/PlocSupvHelper.h
|
13606;0x3526;SUPV_EVENT_BUFFER_REQUEST_FAILED;LOW;Requesting event buffer failed;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13607;0x3527;SUPV_EVENT_BUFFER_REQUEST_TERMINATED;LOW;Terminated event buffer request by command P1: Number of packets read before process was terminated;linux/devices/ploc/PlocSupvHelper.h
|
13607;0x3527;SUPV_EVENT_BUFFER_REQUEST_TERMINATED;LOW;Terminated event buffer request by command P1: Number of packets read before process was terminated;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13608;0x3528;SUPV_SENDING_COMMAND_FAILED;LOW;;linux/devices/ploc/PlocSupvHelper.h
|
13608;0x3528;SUPV_MEM_CHECK_OK;INFO;;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13609;0x3529;SUPV_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13609;0x3529;SUPV_MEM_CHECK_FAIL;INFO;;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13610;0x352a;SUPV_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13616;0x3530;SUPV_SENDING_COMMAND_FAILED;LOW;;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13611;0x352b;SUPV_MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocSupvHelper.h
|
13617;0x3531;SUPV_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13612;0x352c;SUPV_MISSING_EXE;LOW;Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13618;0x3532;SUPV_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13613;0x352d;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13619;0x3533;SUPV_MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13614;0x352e;SUPV_EXE_FAILURE_REPORT;LOW;Execution report failure P1:;linux/devices/ploc/PlocSupvHelper.h
|
13620;0x3534;SUPV_MISSING_EXE;LOW;Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13615;0x352f;SUPV_ACK_INVALID_APID;LOW;Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13621;0x3535;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13616;0x3530;SUPV_EXE_INVALID_APID;LOW;Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13622;0x3536;SUPV_EXE_FAILURE_REPORT;LOW;Execution report failure P1:;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13617;0x3531;ACK_RECEPTION_FAILURE;LOW;Failed to receive acknowledgment report P1: Return value P2: Apid of command for which the reception of the acknowledgment report failed;linux/devices/ploc/PlocSupvHelper.h
|
13623;0x3537;SUPV_ACK_INVALID_APID;LOW;Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13618;0x3532;EXE_RECEPTION_FAILURE;LOW;Failed to receive execution report P1: Return value P2: Apid of command for which the reception of the execution report failed;linux/devices/ploc/PlocSupvHelper.h
|
13624;0x3538;SUPV_EXE_INVALID_APID;LOW;Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13619;0x3533;WRITE_MEMORY_FAILED;LOW;Update procedure failed when sending packet with number P1 P1: Packet number for which the memory write command fails;linux/devices/ploc/PlocSupvHelper.h
|
13625;0x3539;ACK_RECEPTION_FAILURE;LOW;Failed to receive acknowledgment report P1: Return value P2: Apid of command for which the reception of the acknowledgment report failed;linux/devices/ploc/PlocSupvHelper.h
|
||||||
|
13626;0x353a;EXE_RECEPTION_FAILURE;LOW;Failed to receive execution report P1: Return value P2: Apid of command for which the reception of the execution report failed;linux/devices/ploc/PlocSupvHelper.h
|
||||||
|
13627;0x353b;WRITE_MEMORY_FAILED;LOW;Update procedure failed when sending packet. P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written;linux/devices/ploc/PlocSupvHelper.h
|
||||||
|
13628;0x353c;SUPV_REPLY_SIZE_MISSMATCH;LOW;;linux/devices/ploc/PlocSupvHelper.h
|
||||||
|
13629;0x353d;SUPV_REPLY_CRC_MISSMATCH;LOW;;linux/devices/ploc/PlocSupvHelper.h
|
||||||
|
13630;0x353e;SUPV_UPDATE_PROGRESS;INFO;Will be triggered every 5 percent of the update progress. P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written;linux/devices/ploc/PlocSupvHelper.h
|
||||||
13700;0x3584;ALLOC_FAILURE;MEDIUM;;bsp_q7s/core/CoreController.h
|
13700;0x3584;ALLOC_FAILURE;MEDIUM;;bsp_q7s/core/CoreController.h
|
||||||
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||||
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
||||||
|
|
44
config/hook.py
Normal file
44
config/hook.py
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
from config.definitions import SPACE_PACKET_IDS
|
||||||
|
from tmtccmd import TmTcCfgHookBase, CcsdsTmtcBackend
|
||||||
|
from tmtccmd.com_if import ComInterface
|
||||||
|
from tmtccmd.config import TmtcDefinitionWrapper
|
||||||
|
|
||||||
|
from config.retvals import get_retval_dict
|
||||||
|
from pus_tc.cmd_definitions import get_eive_service_op_code_dict
|
||||||
|
from tmtccmd.util import ObjectIdDictT, RetvalDictT
|
||||||
|
|
||||||
|
|
||||||
|
class EiveHookObject(TmTcCfgHookBase):
|
||||||
|
def __init__(self, json_cfg_path: str):
|
||||||
|
super().__init__(json_cfg_path=json_cfg_path)
|
||||||
|
|
||||||
|
def get_tmtc_definitions(self) -> TmtcDefinitionWrapper:
|
||||||
|
return get_eive_service_op_code_dict()
|
||||||
|
|
||||||
|
def assign_communication_interface(self, com_if_key: str) -> Optional[ComInterface]:
|
||||||
|
from tmtccmd.config.com_if import (
|
||||||
|
create_com_interface_default,
|
||||||
|
create_com_interface_cfg_default,
|
||||||
|
)
|
||||||
|
|
||||||
|
cfg = create_com_interface_cfg_default(
|
||||||
|
com_if_key=com_if_key,
|
||||||
|
json_cfg_path=self.json_cfg_path,
|
||||||
|
space_packet_ids=SPACE_PACKET_IDS,
|
||||||
|
)
|
||||||
|
return create_com_interface_default(cfg)
|
||||||
|
|
||||||
|
def perform_mode_operation(self, tmtc_backend: CcsdsTmtcBackend, mode: int):
|
||||||
|
from config.custom_mode_op import custom_mode_operation
|
||||||
|
|
||||||
|
custom_mode_operation(tmtc_backend, mode)
|
||||||
|
|
||||||
|
def get_object_ids(self) -> ObjectIdDictT:
|
||||||
|
from config.object_ids import get_object_ids
|
||||||
|
|
||||||
|
return get_object_ids()
|
||||||
|
|
||||||
|
def get_retval_dict(self) -> RetvalDictT:
|
||||||
|
return get_retval_dict()
|
@ -1,54 +0,0 @@
|
|||||||
from typing import Union
|
|
||||||
|
|
||||||
from config.definitions import SPACE_PACKET_IDS
|
|
||||||
from tmtccmd.config.definitions import (
|
|
||||||
ServiceOpCodeDictT,
|
|
||||||
)
|
|
||||||
from tmtccmd.tc.definitions import TcQueueT
|
|
||||||
from tmtccmd.utility.retval import RetvalDictT
|
|
||||||
from tmtccmd.utility.obj_id import ObjectIdDictT
|
|
||||||
from tmtccmd.com_if.com_interface_base import CommunicationInterface
|
|
||||||
from tmtccmd.core.backend import TmTcHandler
|
|
||||||
from tmtccmd.config.hook import TmTcHookBase
|
|
||||||
|
|
||||||
from config.retvals import get_retval_dict
|
|
||||||
from pus_tc.cmd_definitions import get_eive_service_op_code_dict
|
|
||||||
|
|
||||||
|
|
||||||
class EiveHookObject(TmTcHookBase):
|
|
||||||
def __init__(self, json_cfg_path: str):
|
|
||||||
super().__init__(json_cfg_path=json_cfg_path)
|
|
||||||
|
|
||||||
def get_service_op_code_dictionary(self) -> ServiceOpCodeDictT:
|
|
||||||
return get_eive_service_op_code_dict()
|
|
||||||
|
|
||||||
def assign_communication_interface(
|
|
||||||
self, com_if_key: str
|
|
||||||
) -> Union[CommunicationInterface, None]:
|
|
||||||
from tmtccmd.config.com_if import create_communication_interface_default
|
|
||||||
|
|
||||||
return create_communication_interface_default(
|
|
||||||
com_if_key=com_if_key,
|
|
||||||
json_cfg_path=self.json_cfg_path,
|
|
||||||
space_packet_ids=SPACE_PACKET_IDS,
|
|
||||||
)
|
|
||||||
|
|
||||||
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) -> ObjectIdDictT:
|
|
||||||
from config.object_ids import get_object_ids
|
|
||||||
|
|
||||||
return get_object_ids()
|
|
||||||
|
|
||||||
def get_retval_dict(self) -> RetvalDictT:
|
|
||||||
return get_retval_dict()
|
|
@ -4,7 +4,7 @@
|
|||||||
it to your needs.
|
it to your needs.
|
||||||
"""
|
"""
|
||||||
import os.path
|
import os.path
|
||||||
from tmtccmd.utility.obj_id import ObjectIdDictT
|
from tmtccmd.util.obj_id import ObjectIdDictT
|
||||||
from tmtccmd.fsfw import parse_fsfw_objects_csv
|
from tmtccmd.fsfw import parse_fsfw_objects_csv
|
||||||
from tmtccmd.logging import get_console_logger
|
from tmtccmd.logging import get_console_logger
|
||||||
|
|
||||||
@ -15,7 +15,6 @@ __OBJECT_ID_DICT = None
|
|||||||
|
|
||||||
|
|
||||||
# Core Object IDs
|
# Core Object IDs
|
||||||
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
|
|
||||||
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
|
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
|
||||||
|
|
||||||
# Power Object IDs
|
# Power Object IDs
|
||||||
@ -25,6 +24,7 @@ PDU_1_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x01])
|
|||||||
PDU_2_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x02])
|
PDU_2_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x02])
|
||||||
ACU_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x03])
|
ACU_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x03])
|
||||||
BPX_HANDLER_ID = bytes([0x44, 0x26, 0x00, 0x00])
|
BPX_HANDLER_ID = bytes([0x44, 0x26, 0x00, 0x00])
|
||||||
|
SCEX_HANDLER_ID = bytes([0x44, 0x33, 0x00, 0x32])
|
||||||
|
|
||||||
# Thermal Object IDs
|
# Thermal Object IDs
|
||||||
THERMAL_CONTROLLER_ID = bytes([0x43, 0x40, 0x00, 0x01])
|
THERMAL_CONTROLLER_ID = bytes([0x43, 0x40, 0x00, 0x01])
|
||||||
@ -45,7 +45,6 @@ GYRO_1_L3G_HANDLER_ID = bytes([0x44, 0x12, 0x01, 0x11])
|
|||||||
GYRO_2_ADIS_HANDLER_ID = bytes([0x44, 0x12, 0x02, 0x12])
|
GYRO_2_ADIS_HANDLER_ID = bytes([0x44, 0x12, 0x02, 0x12])
|
||||||
GYRO_3_L3G_HANDLER_ID = bytes([0x44, 0x12, 0x03, 0x13])
|
GYRO_3_L3G_HANDLER_ID = bytes([0x44, 0x12, 0x03, 0x13])
|
||||||
GPS_CONTROLLER = bytes([0x44, 0x13, 0x00, 0x45])
|
GPS_CONTROLLER = bytes([0x44, 0x13, 0x00, 0x45])
|
||||||
GPS_HANDLER_1_ID = bytes([0x44, 0x13, 0x01, 0x46])
|
|
||||||
RW1_ID = bytes([0x44, 0x12, 0x00, 0x47])
|
RW1_ID = bytes([0x44, 0x12, 0x00, 0x47])
|
||||||
RW2_ID = bytes([0x44, 0x12, 0x01, 0x48])
|
RW2_ID = bytes([0x44, 0x12, 0x01, 0x48])
|
||||||
RW3_ID = bytes([0x44, 0x12, 0x02, 0x49])
|
RW3_ID = bytes([0x44, 0x12, 0x02, 0x49])
|
||||||
@ -128,6 +127,11 @@ SUS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x02])
|
|||||||
TCS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x03])
|
TCS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x03])
|
||||||
RW_ASSEMBLY = bytes([0x73, 0x00, 0x00, 0x04])
|
RW_ASSEMBLY = bytes([0x73, 0x00, 0x00, 0x04])
|
||||||
|
|
||||||
|
# Controllers
|
||||||
|
TCS_CONTROLLER = bytes([0x43, 0x40, 0x00, 0x01])
|
||||||
|
ACS_CONTROLLER = bytes([0x43, 0x00, 0x00, 0x02])
|
||||||
|
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
|
||||||
|
|
||||||
|
|
||||||
def get_object_ids() -> ObjectIdDictT:
|
def get_object_ids() -> ObjectIdDictT:
|
||||||
global __OBJECT_ID_DICT
|
global __OBJECT_ID_DICT
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
0x00005060;P60DOCK_TEST_TASK
|
0x00005060;P60DOCK_TEST_TASK
|
||||||
|
0x43000002;ACS_CONTROLLER
|
||||||
0x43000003;CORE_CONTROLLER
|
0x43000003;CORE_CONTROLLER
|
||||||
0x43100002;ACS_CONTROLLER
|
|
||||||
0x43400001;THERMAL_CONTROLLER
|
0x43400001;THERMAL_CONTROLLER
|
||||||
0x44120006;MGM_0_LIS3_HANDLER
|
0x44120006;MGM_0_LIS3_HANDLER
|
||||||
0x44120010;GYRO_0_ADIS_HANDLER
|
0x44120010;GYRO_0_ADIS_HANDLER
|
||||||
@ -106,10 +106,12 @@
|
|||||||
0x534f0200;TM_STORE
|
0x534f0200;TM_STORE
|
||||||
0x534f0300;IPC_STORE
|
0x534f0300;IPC_STORE
|
||||||
0x53500010;TIME_STAMPER
|
0x53500010;TIME_STAMPER
|
||||||
|
0x53500020;VERIFICATION_REPORTER
|
||||||
0x53ffffff;FSFW_OBJECTS_END
|
0x53ffffff;FSFW_OBJECTS_END
|
||||||
0x54000010;SPI_TEST
|
0x54000010;SPI_TEST
|
||||||
0x54000020;UART_TEST
|
0x54000020;UART_TEST
|
||||||
0x54000030;I2C_TEST
|
0x54000030;I2C_TEST
|
||||||
|
0x54000040;DUMMY_COM_IF
|
||||||
0x5400AFFE;DUMMY_HANDLER
|
0x5400AFFE;DUMMY_HANDLER
|
||||||
0x5400CAFE;DUMMY_INTERFACE
|
0x5400CAFE;DUMMY_INTERFACE
|
||||||
0x54123456;LIBGPIOD_TEST
|
0x54123456;LIBGPIOD_TEST
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
1
deps/spacepackets
vendored
Submodule
1
deps/spacepackets
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit da2859688bc36ac258f0d75edbc2768761f34f31
|
1
deps/tmtccmd
vendored
Submodule
1
deps/tmtccmd
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 30129ee38f0d1627ae0cb1a327a39ab4e3e2795f
|
@ -7,10 +7,13 @@
|
|||||||
@date 17.12.2020
|
@date 17.12.2020
|
||||||
"""
|
"""
|
||||||
import enum
|
import enum
|
||||||
|
import struct
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
from spacepackets.ecss import PusTelecommand
|
||||||
from tmtccmd.tc.definitions import PusTelecommand
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.utility import ObjectId
|
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||||
|
from tmtccmd.util import ObjectIdU32
|
||||||
|
|
||||||
|
|
||||||
class GomspaceDeviceActionIds(enum.IntEnum):
|
class GomspaceDeviceActionIds(enum.IntEnum):
|
||||||
@ -26,15 +29,21 @@ class GomspaceDeviceActionIds(enum.IntEnum):
|
|||||||
|
|
||||||
class GomspaceOpCodes:
|
class GomspaceOpCodes:
|
||||||
# Request HK
|
# Request HK
|
||||||
REQUEST_CORE_HK_ONCE = ["hk-core", "128"]
|
REQUEST_CORE_HK_ONCE = ["hk_core", "128"]
|
||||||
REQUEST_AUX_HK_ONCE = ["hk-aux", "129"]
|
REQUEST_AUX_HK_ONCE = ["hk_aux", "129"]
|
||||||
PRINT_SWITCH_V_I = ["print-switch-vi", "130"]
|
PRINT_SWITCH_V_I = ["print-switch-vi", "130"]
|
||||||
PRINT_LATCHUPS = ["print-latchups", "131"]
|
PRINT_LATCHUPS = ["print-latchups", "131"]
|
||||||
|
GET_PARAM = ["get_param", "132"]
|
||||||
|
SET_PARAM = ["set_param", "133"]
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class GsInfo:
|
||||||
REQUEST_CORE_HK_ONCE = "Requesting Core HK once"
|
REQUEST_CORE_HK_ONCE = "Requesting Core HK once"
|
||||||
REQUEST_AUX_HK_ONCE = "Requesting Aux HK once"
|
REQUEST_AUX_HK_ONCE = "Requesting Aux HK once"
|
||||||
|
PRINT_SWITCH_V_I = "Print Switch V I Info"
|
||||||
|
PRINT_LATCHUPS = "Print latchups"
|
||||||
|
GET_PARAMETER = "Get parameter"
|
||||||
|
SET_PARAMETER = "Set parameter"
|
||||||
|
|
||||||
|
|
||||||
class SetIds:
|
class SetIds:
|
||||||
@ -69,29 +78,35 @@ class Channel:
|
|||||||
|
|
||||||
|
|
||||||
def pack_get_param_command(
|
def pack_get_param_command(
|
||||||
object_id: bytes, table_id: int, memory_address: bytearray, parameter_size: int
|
object_id: bytes,
|
||||||
|
table_id: int,
|
||||||
|
memory_address: Union[int, bytes],
|
||||||
|
parameter_size: int,
|
||||||
) -> PusTelecommand:
|
) -> PusTelecommand:
|
||||||
"""Function to generate a command to retrieve parameters like the temperature from a gomspace device.
|
"""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 object_id: The object id of the gomspace device handler.
|
||||||
@param table_id: The table id of the gomspace device
|
@param table_id: The table id of the gomspace device
|
||||||
@param memory_address: Address offset within table of the value to read.
|
@param memory_address: Address offset within table of the value to read.
|
||||||
@param parameter_size: Size of the value to read. E.g. temperature is uint16_t and thus parameter_size is 2
|
@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.
|
@return: The command as bytearray.
|
||||||
"""
|
"""
|
||||||
app_data = bytearray()
|
app_data = struct.pack("!B", table_id)
|
||||||
app_data.append(table_id)
|
if isinstance(memory_address, int):
|
||||||
app_data.extend(memory_address)
|
app_data += struct.pack("!H", memory_address)
|
||||||
app_data.append(parameter_size)
|
else:
|
||||||
return generate_action_command(
|
app_data += memory_address
|
||||||
|
app_data += struct.pack("!B", parameter_size)
|
||||||
|
return make_fsfw_action_cmd(
|
||||||
object_id=object_id,
|
object_id=object_id,
|
||||||
action_id=GomspaceDeviceActionIds.PARAM_GET,
|
action_id=GomspaceDeviceActionIds.PARAM_GET,
|
||||||
app_data=app_data,
|
user_data=app_data,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_set_param_command(
|
def pack_set_param_command(
|
||||||
object_id: bytes,
|
object_id: bytes,
|
||||||
memory_address: bytearray,
|
memory_address: bytes,
|
||||||
parameter_size: int,
|
parameter_size: int,
|
||||||
parameter: int,
|
parameter: int,
|
||||||
ssc: int = 0,
|
ssc: int = 0,
|
||||||
@ -112,10 +127,7 @@ def pack_set_param_command(
|
|||||||
if parameter_size == 1:
|
if parameter_size == 1:
|
||||||
app_data.append(parameter)
|
app_data.append(parameter)
|
||||||
elif parameter_size == 2:
|
elif parameter_size == 2:
|
||||||
byte_one = 0xFF00 & parameter >> 8
|
app_data += struct.pack("!H", parameter)
|
||||||
byte_two = 0xFF & parameter
|
|
||||||
app_data.append(byte_one)
|
|
||||||
app_data.append(byte_two)
|
|
||||||
elif parameter_size == 4:
|
elif parameter_size == 4:
|
||||||
byte_one = 0xFF000000 & parameter >> 24
|
byte_one = 0xFF000000 & parameter >> 24
|
||||||
byte_two = 0xFF0000 & parameter >> 16
|
byte_two = 0xFF0000 & parameter >> 16
|
||||||
@ -125,12 +137,35 @@ def pack_set_param_command(
|
|||||||
app_data.append(byte_two)
|
app_data.append(byte_two)
|
||||||
app_data.append(byte_three)
|
app_data.append(byte_three)
|
||||||
app_data.append(byte_four)
|
app_data.append(byte_four)
|
||||||
return generate_action_command(
|
return make_fsfw_action_cmd(
|
||||||
object_id=object_id, action_id=action_id, app_data=app_data, ssc=ssc
|
object_id=object_id, action_id=action_id, user_data=app_data
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_ping_command(object_id: ObjectId, data: bytearray) -> PusTelecommand:
|
def prompt_and_pack_get_param_command(q: DefaultPusQueueHelper, object_id: ObjectIdU32):
|
||||||
|
table_id = int(input("Specify table ID: "))
|
||||||
|
memory_address = int(input("Specify memory address: 0x"), 16)
|
||||||
|
parameter_size = int(input("Specify parameter size: "))
|
||||||
|
q.add_pus_tc(
|
||||||
|
pack_get_param_command(
|
||||||
|
object_id.as_bytes, table_id, memory_address, parameter_size
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def prompt_and_pack_set_param_command(q: DefaultPusQueueHelper, object_id: ObjectIdU32):
|
||||||
|
memory_address = int(input("Specify memory address: 0x"), 16)
|
||||||
|
memory_address = struct.pack("!H", memory_address)
|
||||||
|
parameter_size = int(input("Specify parameter size: "))
|
||||||
|
parameter = int(input("Specify parameter: "))
|
||||||
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
|
object_id.as_bytes, memory_address, parameter_size, parameter
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_ping_command(object_id: ObjectIdU32, data: bytearray) -> PusTelecommand:
|
||||||
""" " Function to generate the command to ping a gomspace device
|
""" " Function to generate the command to ping a gomspace device
|
||||||
@param object_id Object Id of the gomspace device handler.
|
@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
|
@param data Bytearray containing the bytes to send to the gomspace device. For now the on board software
|
||||||
@ -138,36 +173,36 @@ def pack_ping_command(object_id: ObjectId, data: bytearray) -> PusTelecommand:
|
|||||||
@note The ping request sends the specified data to a gompsace device. These
|
@note The ping request sends the specified data to a gompsace device. These
|
||||||
data are simply copied by the device and then sent back.
|
data are simply copied by the device and then sent back.
|
||||||
"""
|
"""
|
||||||
return generate_action_command(
|
return make_fsfw_action_cmd(
|
||||||
object_id=object_id.as_bytes,
|
object_id=object_id.as_bytes,
|
||||||
action_id=GomspaceDeviceActionIds.PING,
|
action_id=GomspaceDeviceActionIds.PING,
|
||||||
app_data=data,
|
user_data=data,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_gnd_wdt_reset_command(object_id: ObjectId) -> PusTelecommand:
|
def pack_gnd_wdt_reset_command(object_id: ObjectIdU32) -> PusTelecommand:
|
||||||
""" " Function to generate the command to reset the watchdog of a gomspace device.
|
""" " Function to generate the command to reset the watchdog of a gomspace device.
|
||||||
@param object_id Object Id of the gomspace device handler.
|
@param object_id Object Id of the gomspace device handler.
|
||||||
"""
|
"""
|
||||||
return generate_action_command(
|
return make_fsfw_action_cmd(
|
||||||
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.WDT_RESET
|
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.WDT_RESET
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_reboot_command(object_id: ObjectId) -> PusTelecommand:
|
def pack_reboot_command(object_id: ObjectIdU32) -> PusTelecommand:
|
||||||
"""Function to generate the command which triggers a reboot of a gomspace device
|
"""Function to generate the command which triggers a reboot of a gomspace device
|
||||||
@param object_id The object id of the gomspace device handler.
|
@param object_id The object id of the gomspace device handler.
|
||||||
"""
|
"""
|
||||||
return generate_action_command(
|
return make_fsfw_action_cmd(
|
||||||
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.REBOOT
|
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.REBOOT
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_request_full_hk_table_command(object_id: ObjectId) -> PusTelecommand:
|
def pack_request_full_hk_table_command(object_id: ObjectIdU32) -> PusTelecommand:
|
||||||
"""Function to generate the command to request the full housekeeping table from a gomspace
|
"""Function to generate the command to request the full housekeeping table from a gomspace
|
||||||
device.
|
device.
|
||||||
@param object_id The object id of the gomspace device handler.
|
@param object_id The object id of the gomspace device handler.
|
||||||
"""
|
"""
|
||||||
return generate_action_command(
|
return make_fsfw_action_cmd(
|
||||||
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.REQUEST_HK_TABLE
|
object_id=object_id.as_bytes, action_id=GomspaceDeviceActionIds.REQUEST_HK_TABLE
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from gomspace.gomspace_common import TableEntry
|
from gomspace.gomspace_common import TableEntry
|
||||||
|
|
||||||
|
|
||||||
class PDUConfigTable:
|
class PduConfigTable:
|
||||||
out_en_0 = TableEntry(bytearray([0x00, 0x48]), TableEntry.uint8_size)
|
out_en_0 = TableEntry(bytearray([0x00, 0x48]), TableEntry.uint8_size)
|
||||||
out_en_1 = TableEntry(bytearray([0x00, 0x49]), TableEntry.uint8_size)
|
out_en_1 = TableEntry(bytearray([0x00, 0x49]), TableEntry.uint8_size)
|
||||||
out_en_2 = TableEntry(bytearray([0x00, 0x4A]), TableEntry.uint8_size)
|
out_en_2 = TableEntry(bytearray([0x00, 0x4A]), TableEntry.uint8_size)
|
||||||
@ -15,7 +15,20 @@ class PDUConfigTable:
|
|||||||
cur_lu_lim_0 = TableEntry(bytearray([0x00, 0xB8]), TableEntry.uint16_size)
|
cur_lu_lim_0 = TableEntry(bytearray([0x00, 0xB8]), TableEntry.uint16_size)
|
||||||
|
|
||||||
|
|
||||||
class PDUHkTable:
|
PDU_CONFIG_LIST = [
|
||||||
|
PduConfigTable.out_en_0,
|
||||||
|
PduConfigTable.out_en_1,
|
||||||
|
PduConfigTable.out_en_2,
|
||||||
|
PduConfigTable.out_en_3,
|
||||||
|
PduConfigTable.out_en_4,
|
||||||
|
PduConfigTable.out_en_5,
|
||||||
|
PduConfigTable.out_en_6,
|
||||||
|
PduConfigTable.out_en_7,
|
||||||
|
PduConfigTable.out_en_8,
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class PduHkTable:
|
||||||
temperature = TableEntry(bytearray([0x00, 0x28]), TableEntry.uint16_size)
|
temperature = TableEntry(bytearray([0x00, 0x28]), TableEntry.uint16_size)
|
||||||
# Ground WDT value (remaining seconds until reboot)
|
# Ground WDT value (remaining seconds until reboot)
|
||||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0x80]), TableEntry.uint32_size)
|
wdt_gnd_left = TableEntry(bytearray([0x00, 0x80]), TableEntry.uint32_size)
|
||||||
|
@ -1,622 +1,282 @@
|
|||||||
from pus_tc.system.proc import add_proc_cmds
|
|
||||||
from tmtccmd.config import (
|
|
||||||
add_op_code_entry,
|
|
||||||
add_service_op_code_entry,
|
|
||||||
generate_op_code_options,
|
|
||||||
ServiceOpCodeDictT,
|
|
||||||
OpCodeDictKeys,
|
|
||||||
)
|
|
||||||
from tmtccmd.config.globals import get_default_service_op_code_dict
|
|
||||||
|
|
||||||
from pus_tc.devs.gps import GpsOpCodes
|
|
||||||
from pus_tc.devs.pcdu import add_pcdu_cmds
|
|
||||||
from pus_tc.devs.plpcdu import add_pl_pcdu_cmds
|
|
||||||
from pus_tc.devs.rad_sensor import add_rad_sens_cmds
|
|
||||||
from pus_tc.system.core import add_core_controller_definitions
|
|
||||||
from pus_tc.devs.heater import add_heater_cmds
|
|
||||||
from pus_tc.devs.rtd import specify_rtd_cmds
|
|
||||||
from pus_tc.devs.reaction_wheels import add_rw_cmds
|
|
||||||
from pus_tc.devs.bpx_batt import BpxOpCodes
|
from pus_tc.devs.bpx_batt import BpxOpCodes
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry, CoreServiceList
|
||||||
|
from tmtccmd.config.tmtc import (
|
||||||
def get_eive_service_op_code_dict() -> ServiceOpCodeDictT:
|
tmtc_definitions_provider,
|
||||||
service_op_code_dict = get_default_service_op_code_dict()
|
call_all_definitions_providers,
|
||||||
add_bpx_cmd_definitions(cmd_dict=service_op_code_dict)
|
|
||||||
add_core_controller_definitions(cmd_dict=service_op_code_dict)
|
|
||||||
add_pl_pcdu_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_pcdu_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
specify_rtd_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_imtq_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_rad_sens_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_rw_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_ploc_mpsoc_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_ploc_supv_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_system_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_time_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_syrlinks_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_gps_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_str_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_ccsds_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_pdec_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_heater_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_tmp_sens_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
add_proc_cmds(cmd_dict=service_op_code_dict)
|
|
||||||
return service_op_code_dict
|
|
||||||
|
|
||||||
|
|
||||||
def add_tmp_sens_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
op_code_dict = {
|
|
||||||
"0": ("TMP1075 Tests", {OpCodeDictKeys.TIMEOUT: 2.2}),
|
|
||||||
}
|
|
||||||
service_tuple = ("TMP1075 1", op_code_dict)
|
|
||||||
cmd_dict[CustomServiceList.TMP1075_1.value] = service_tuple
|
|
||||||
service_tuple = ("TMP1075 2", op_code_dict)
|
|
||||||
cmd_dict[CustomServiceList.TMP1075_2.value] = service_tuple
|
|
||||||
|
|
||||||
|
|
||||||
def add_pdec_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
op_code_dict_srv_pdec_handler = {
|
|
||||||
"0": ("PDEC Handler: Print CLCW", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("PDEC Handler: Print PDEC monitor", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_pdec_handler_tuple = ("PDEC Handler", op_code_dict_srv_pdec_handler)
|
|
||||||
cmd_dict[CustomServiceList.PDEC_HANDLER.value] = service_pdec_handler_tuple
|
|
||||||
|
|
||||||
|
|
||||||
def add_ccsds_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
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}),
|
|
||||||
"4": ("CCSDS Handler: Set arbitrary bitrate", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": (
|
|
||||||
"CCSDS Handler: Enable tx clock manipulator",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"6": (
|
|
||||||
"CCSDS Handler: Disable tx clock manipulator",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"7": (
|
|
||||||
"CCSDS Handler: Update tx data on rising edge",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"8": (
|
|
||||||
"CCSDS Handler: Update tx data on falling edge",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
}
|
|
||||||
service_ccsds_handler_tuple = ("CCSDS Handler", op_code_dict_srv_ccsds_handler)
|
|
||||||
cmd_dict[CustomServiceList.CCSDS_HANDLER.value] = service_ccsds_handler_tuple
|
|
||||||
|
|
||||||
|
|
||||||
def add_gps_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
op_code_dict = {
|
|
||||||
GpsOpCodes.RESET_GNSS.value: ("Reset GPS", {OpCodeDictKeys.TIMEOUT: 2.0})
|
|
||||||
}
|
|
||||||
service_tuple = ("GPS 0", op_code_dict)
|
|
||||||
cmd_dict[CustomServiceList.GPS_0.value] = service_tuple
|
|
||||||
cmd_dict[CustomServiceList.GPS_1.value] = service_tuple
|
|
||||||
|
|
||||||
|
|
||||||
def add_str_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
op_code_dict_srv_star_tracker = {
|
|
||||||
"0": (
|
|
||||||
"Star Tracker: Mode On, Submode Bootloader",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"1": ("Star Tracker: Mode On, Submode Firmware", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("Star Tracker: Mode Normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("Star Tracker: Mode Off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("Star Tracker: Mode Raw", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("Star Tracker: Ping", {OpCodeDictKeys.TIMEOUT: 5.0}),
|
|
||||||
"6": (
|
|
||||||
"Star Tracker: Switch to bootloader program",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"7": ("Star Tracker: Request temperature", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"8": ("Star Tracker: Request version", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"9": ("Star Tracker: Request interface", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"10": ("Star Tracker: Request power", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"11": (
|
|
||||||
"Star Tracker: Set subscription parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"12": (
|
|
||||||
"Star Tracker: Boot image (requires bootloader mode)",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"13": ("Star Tracker: Request time", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"14": ("Star Tracker: Request solution", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"15": ("Star Tracker: Upload image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"16": ("Star Tracker: Download image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"17": ("Star Tracker: Set limit parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"18": ("Star Tracker: Set tracking parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"19": ("Star Tracker: Set mounting parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"20": ("Star Tracker: Set camera parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"22": (
|
|
||||||
"Star Tracker: Set centroiding parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"23": ("Star Tracker: Set LISA parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"24": ("Star Tracker: Set matching parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"25": (
|
|
||||||
"Star Tracker: Set validation parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"26": ("Star Tracker: Set algo parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"27": ("Star Tracker: Take image", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"28": ("Star Tracker: Stop str helper", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"30": (
|
|
||||||
"Star Tracker: Set name of download image",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"31": ("Star Tracker: Request histogram", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"32": ("Star Tracker: Request contrast", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"33": ("Star Tracker: Set json filename", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"35": ("Star Tracker: Flash read", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"36": ("Star Tracker: Set flash read filename", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"37": ("Star Tracker: Get checksum", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"49": ("Star Tracker: Request camera parameter", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"50": ("Star Tracker: Request limits", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"51": (
|
|
||||||
"Star Tracker: Set image processor parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"52": (
|
|
||||||
"Star Tracker: (EGSE only) Load camera ground config ",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"53": (
|
|
||||||
"Star Tracker: (EGSE only) Load camera flight config",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"54": (
|
|
||||||
"Star Tracker: Request log level parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"55": (
|
|
||||||
"Star Tracker: Request mounting parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"56": (
|
|
||||||
"Star Tracker: Request image processor parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"57": (
|
|
||||||
"Star Tracker: Request centroiding parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"58": ("Star Tracker: Request lisa parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"59": (
|
|
||||||
"Star Tracker: Request matching parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"60": (
|
|
||||||
"Star Tracker: Request tracking parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"61": (
|
|
||||||
"Star Tracker: Request validation parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"62": ("Star Tracker: Request algo parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"63": (
|
|
||||||
"Star Tracker: Request subscription parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"64": (
|
|
||||||
"Star Tracker: Request log subscription parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"65": (
|
|
||||||
"Star Tracker: Request debug camera parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"66": ("Star Tracker: Set log level parameters", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"67": (
|
|
||||||
"Star Tracker: Set log subscription parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"68": (
|
|
||||||
"Star Tracker: Set debug camera parameters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"69": ("Star Tracker: Firmware update", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"70": (
|
|
||||||
"Star Tracker: Disable timestamp generation",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"71": (
|
|
||||||
"Star Tracker: Enable timestamp generation",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
}
|
|
||||||
service_star_tracker_tuple = ("Star tracker", op_code_dict_srv_star_tracker)
|
|
||||||
cmd_dict[CustomServiceList.STAR_TRACKER.value] = service_star_tracker_tuple
|
|
||||||
|
|
||||||
|
|
||||||
def add_syrlinks_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
op_code_dict_srv_syrlinks_handler = {
|
|
||||||
"0": ("Syrlinks Handler: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("Syrlinks Handler: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("Syrlinks Handler: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("Syrlinks Handler: Set TX standby", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("Syrlinks Handler: Set TX modulation", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("Syrlinks Handler: Set TX carrier wave", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"6": ("Syrlinks Handler: Read TX status", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"7": ("Syrlinks Handler: Read TX waveform", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"8": (
|
|
||||||
"Syrlinks Handler: Read TX AGC value high byte ",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"9": (
|
|
||||||
"Syrlinks Handler: Read TX AGC value low byte ",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"12": (
|
|
||||||
"Syrlinks Handler: Write LCL config",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"13": (
|
|
||||||
"Syrlinks Handler: Read RX status registers",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"14": (
|
|
||||||
"Syrlinks Handler: Read LCL config register",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"15": (
|
|
||||||
"Syrlinks Handler: Set waveform OQPSK",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"16": (
|
|
||||||
"Syrlinks Handler: Set waveform BPSK",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"17": (
|
|
||||||
"Syrlinks Handler: Set second config",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"18": (
|
|
||||||
"Syrlinks Handler: Enable debug output",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"19": (
|
|
||||||
"Syrlinks Handler: Disable debug output",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
}
|
|
||||||
service_syrlinks_handler_tuple = (
|
|
||||||
"Syrlinks Handler",
|
|
||||||
op_code_dict_srv_syrlinks_handler,
|
|
||||||
)
|
)
|
||||||
cmd_dict[CustomServiceList.SYRLINKS.value] = service_syrlinks_handler_tuple
|
from tmtccmd.config.globals import get_default_tmtc_defs
|
||||||
|
|
||||||
|
|
||||||
def add_bpx_cmd_definitions(cmd_dict: ServiceOpCodeDictT):
|
def get_eive_service_op_code_dict() -> TmtcDefinitionWrapper:
|
||||||
op_code_dict = dict()
|
"""Call all registered TMTC definition providers. They were registered using
|
||||||
add_op_code_entry(
|
the :py:func:`tmtc_definitions_provider` decorator.
|
||||||
op_code_dict=op_code_dict, keys=BpxOpCodes.HK, info="Request BPX HK"
|
"""
|
||||||
|
def_wrapper = get_default_tmtc_defs()
|
||||||
|
srv_5 = OpCodeEntry()
|
||||||
|
srv_5.add("0", "Event Test")
|
||||||
|
def_wrapper.add_service(
|
||||||
|
name=CoreServiceList.SERVICE_5.value,
|
||||||
|
info="PUS Service 5 Event",
|
||||||
|
op_code_entry=srv_5,
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
srv_17 = OpCodeEntry()
|
||||||
op_code_dict=op_code_dict, keys=BpxOpCodes.RST_BOOT_CNT, info="Reset Boot Count"
|
srv_17.add("0", "Ping Test")
|
||||||
|
def_wrapper.add_service(
|
||||||
|
name=CoreServiceList.SERVICE_17_ALT,
|
||||||
|
info="PUS Service 17 Test",
|
||||||
|
op_code_entry=srv_17,
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
call_all_definitions_providers(def_wrapper)
|
||||||
op_code_dict=op_code_dict,
|
return def_wrapper
|
||||||
keys=BpxOpCodes.REQUEST_CFG,
|
|
||||||
info="Request Configuration Struct (Step 1)",
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_tmp_sens_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add("0", "TMP1075 Tests")
|
||||||
|
defs.add_service(CustomServiceList.TMP1075_1.value, "TMP1075 1", oce)
|
||||||
|
defs.add_service(CustomServiceList.TMP1075_2.value, "TMP1075 2", oce)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_pdec_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add("0", "PDEC Handler: Print CLCW")
|
||||||
|
oce.add("1", "PDEC Handler: Print PDEC monitor")
|
||||||
|
defs.add_service(CustomServiceList.PDEC_HANDLER.value, "PDEC Handler", oce)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_ccsds_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add("0", "CCSDS Handler: Set low rate")
|
||||||
|
oce.add("1", "CCSDS Handler: Set high rate")
|
||||||
|
oce.add("2", "CCSDS Handler: Enable transmitter")
|
||||||
|
oce.add("3", "CCSDS Handler: Disable transmitter")
|
||||||
|
oce.add("4", "CCSDS Handler: Set arbitrary bitrate")
|
||||||
|
oce.add("5", "CCSDS Handler: Enable tx clock manipulator")
|
||||||
|
oce.add("6", "CCSDS Handler: Disable tx clock manipulator")
|
||||||
|
oce.add("7", "CCSDS Handler: Update tx data on rising edge")
|
||||||
|
oce.add("8", "CCSDS Handler: Update tx data on falling edge")
|
||||||
|
defs.add_service(CustomServiceList.CCSDS_HANDLER.value, "CCSDS Handler", oce)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_str_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add("0", "Star Tracker: Mode On, Submode Bootloader")
|
||||||
|
oce.add("1", "Star Tracker: Mode On, Submode Firmware")
|
||||||
|
oce.add("2", "Star Tracker: Mode Normal")
|
||||||
|
oce.add("3", "Star Tracker: Mode Off")
|
||||||
|
oce.add("4", "Star Tracker: Mode Raw")
|
||||||
|
oce.add("5", "Star Tracker: Ping")
|
||||||
|
oce.add("6", "Star Tracker: Switch to bootloader program")
|
||||||
|
oce.add("7", "Star Tracker: Request temperature")
|
||||||
|
oce.add("8", "Star Tracker: Request version")
|
||||||
|
oce.add("9", "Star Tracker: Request interface")
|
||||||
|
oce.add("10", "Star Tracker: Request power")
|
||||||
|
oce.add("11", "Star Tracker: Set subscription parameters")
|
||||||
|
oce.add("12", "Star Tracker: Boot image (requires bootloader mode)")
|
||||||
|
oce.add("13", "Star Tracker: Request time")
|
||||||
|
oce.add("14", "Star Tracker: Request solution")
|
||||||
|
oce.add("15", "Star Tracker: Upload image")
|
||||||
|
oce.add("16", "Star Tracker: Download image")
|
||||||
|
oce.add("17", "Star Tracker: Set limit parameters")
|
||||||
|
oce.add("17", "Star Tracker: Set limit parameters")
|
||||||
|
oce.add("18", "Star Tracker: Set tracking parameters")
|
||||||
|
oce.add("19", "Star Tracker: Set mounting parameters")
|
||||||
|
oce.add("20", "Star Tracker: Set camera parameters")
|
||||||
|
oce.add("22", "Star Tracker: Set centroiding parameters")
|
||||||
|
oce.add("23", "Star Tracker: Set LISA parameters")
|
||||||
|
oce.add("24", "Star Tracker: Set matching parameters")
|
||||||
|
oce.add("25", "Star Tracker: Set validation parameters")
|
||||||
|
oce.add("26", "Star Tracker: Set algo parameters")
|
||||||
|
oce.add("27", "Star Tracker: Take image")
|
||||||
|
oce.add("28", "Star Tracker: Stop str helper")
|
||||||
|
oce.add("30", "Star Tracker: Set name of download image")
|
||||||
|
oce.add("31", "Star Tracker: Request histogram")
|
||||||
|
oce.add("32", "Star Tracker: Request contrast")
|
||||||
|
oce.add("33", "Star Tracker: Set json filename")
|
||||||
|
oce.add("35", "Star Tracker: Flash read")
|
||||||
|
oce.add("36", "Star Tracker: Set flash read filename")
|
||||||
|
oce.add("37", "Star Tracker: Get checksum")
|
||||||
|
oce.add("49", "Star Tracker: Request camera parameter")
|
||||||
|
oce.add("50", "Star Tracker: Request limits")
|
||||||
|
oce.add("51", "Star Tracker: Set image processor parameters")
|
||||||
|
oce.add("52", "Star Tracker: (EGSE only) Load camera ground config")
|
||||||
|
oce.add("53", "Star Tracker: (EGSE only) Load camera flight config")
|
||||||
|
oce.add("54", "Star Tracker: Request log level parameters")
|
||||||
|
oce.add("55", "Star Tracker: Request mounting parameters")
|
||||||
|
oce.add("56", "Star Tracker: Request image processor parameters")
|
||||||
|
oce.add("57", "Star Tracker: Request centroiding parameters")
|
||||||
|
oce.add("58", "Star Tracker: Request lisa parameters")
|
||||||
|
oce.add("59", "Star Tracker: Request matching parameters")
|
||||||
|
oce.add("60", "Star Tracker: Request tracking parameters")
|
||||||
|
oce.add("61", "Star Tracker: Request validation parameters")
|
||||||
|
oce.add("62", "Star Tracker: Request algo parameters")
|
||||||
|
oce.add("63", "Star Tracker: Request subscription parameters")
|
||||||
|
oce.add("64", "Star Tracker: Request log subscription parameters")
|
||||||
|
oce.add("65", "Star Tracker: Request debug camera parameters")
|
||||||
|
oce.add("66", "Star Tracker: Set log level parameters")
|
||||||
|
oce.add("67", "Star Tracker: Set log subscription parameters")
|
||||||
|
oce.add("68", "Star Tracker: Set debug camera parameters")
|
||||||
|
oce.add("69", "Star Tracker: Firmware update")
|
||||||
|
oce.add("70", "Star Tracker: Disable timestamp generation")
|
||||||
|
oce.add("71", "Star Tracker: Enable timestamp generation")
|
||||||
|
defs.add_service(CustomServiceList.STAR_TRACKER.value, "Star Tracker", oce)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_syrlinks_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add("0", "Syrlinks Handler: Set mode off")
|
||||||
|
oce.add("1", "Syrlinks Handler: Set mode on")
|
||||||
|
oce.add("2", "Syrlinks Handler: Set mode normal")
|
||||||
|
oce.add("3", "Syrlinks Handler: Set TX standby")
|
||||||
|
oce.add("4", "Syrlinks Handler: Set TX modulation")
|
||||||
|
oce.add("5", "Syrlinks Handler: Set TX carrier wave")
|
||||||
|
oce.add("6", "Syrlinks Handler: Read TX status")
|
||||||
|
oce.add("7", "Syrlinks Handler: Read TX waveform")
|
||||||
|
oce.add("8", "Syrlinks Handler: Read TX AGC value high byte")
|
||||||
|
oce.add("9", "Syrlinks Handler: Read TX AGC value low byte")
|
||||||
|
oce.add("12", "Syrlinks Handler: Write LCL config")
|
||||||
|
oce.add("13", "Syrlinks Handler: Read RX status registers")
|
||||||
|
oce.add("14", "Syrlinks Handler: Read LCL config register")
|
||||||
|
oce.add("15", "Syrlinks Handler: Set waveform OQPSK")
|
||||||
|
oce.add("16", "Syrlinks Handler: Set waveform BPSK")
|
||||||
|
oce.add("17", "Syrlinks Handler: Set second config")
|
||||||
|
oce.add("18", "Syrlinks Handler: Enable debug output")
|
||||||
|
oce.add("19", "Syrlinks Handler: Disable debug output")
|
||||||
|
defs.add_service(CustomServiceList.SYRLINKS.value, "Syrlinks Handler", oce)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_bpx_cmd_definitions(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add(keys=BpxOpCodes.HK, info="Request BPX HK")
|
||||||
|
oce.add(keys=BpxOpCodes.RST_BOOT_CNT, info="Reset Boot Count")
|
||||||
|
oce.add(keys=BpxOpCodes.REQUEST_CFG, info="Request Configuration Struct (Step 1)")
|
||||||
|
oce.add(
|
||||||
|
keys=BpxOpCodes.REQUEST_CFG_HK, info="Request Configuration Struct HK (Step 2)"
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(keys=BpxOpCodes.REBOOT, info="Reboot Command")
|
||||||
op_code_dict=op_code_dict,
|
defs.add_service(
|
||||||
keys=BpxOpCodes.REQUEST_CFG_HK,
|
|
||||||
info="Request Configuration Struct HK (Step 2)",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict, keys=BpxOpCodes.REBOOT, info="Reboot Command"
|
|
||||||
)
|
|
||||||
add_service_op_code_entry(
|
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.BPX_BATTERY.value,
|
name=CustomServiceList.BPX_BATTERY.value,
|
||||||
info="BPX Battery Handler",
|
info="BPX Battery Handler",
|
||||||
op_code_entry=op_code_dict,
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def add_time_cmds(cmd_dict: ServiceOpCodeDictT):
|
@tmtc_definitions_provider
|
||||||
|
def add_time_cmds(defs: TmtcDefinitionWrapper):
|
||||||
from pus_tc.system.time import OpCodes, Info
|
from pus_tc.system.time import OpCodes, Info
|
||||||
|
|
||||||
op_code_dict = dict()
|
oce = OpCodeEntry()
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.SET_CURRENT_TIME,
|
keys=OpCodes.SET_CURRENT_TIME,
|
||||||
info=Info.SET_CURRENT_TIME,
|
info=Info.SET_CURRENT_TIME,
|
||||||
)
|
)
|
||||||
add_service_op_code_entry(
|
defs.add_service(
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.TIME.value,
|
name=CustomServiceList.TIME.value,
|
||||||
info="Time Service",
|
info="Time Service",
|
||||||
op_code_entry=op_code_dict,
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def add_imtq_cmds(cmd_dict: ServiceOpCodeDictT):
|
@tmtc_definitions_provider
|
||||||
op_code_dict_srv_imtq = {
|
def add_imtq_cmds(defs: TmtcDefinitionWrapper):
|
||||||
"0": ("Mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce = OpCodeEntry()
|
||||||
"1": ("Mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("0", "Mode Off")
|
||||||
"2": ("Mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("1", "Mode On")
|
||||||
"3": ("IMTQ perform pos X self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("2", "Mode Normal")
|
||||||
"4": ("IMTQ perform neg X self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("3", "IMTQ perform pos X self test")
|
||||||
"5": ("IMTQ perform pos Y self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("4", "IMTQ perform neg X self test")
|
||||||
"6": ("IMTQ perform neg Y self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("5", "IMTQ perform pos Y self test")
|
||||||
"7": ("IMTQ perform pos Z self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("6", "IMTQ perform neg Y self test")
|
||||||
"8": ("IMTQ perform neg Z self test", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("7", "IMTQ perform pos Z self test")
|
||||||
"9": ("IMTQ command dipole", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("8", "IMTQ perform neg Z self test")
|
||||||
"10": ("IMTQ get commanded dipole", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("9", "IMTQ command dipole")
|
||||||
"11": ("IMTQ get engineering hk set", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
oce.add("10", "IMTQ get commanded dipole")
|
||||||
"12": (
|
oce.add("11", "IMTQ get engineering hk set")
|
||||||
"IMTQ get calibrated MTM measurement one shot",
|
oce.add("12", "IMTQ get calibrated MTM measurement one shot")
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
oce.add("13", "IMTQ get raw MTM measurement one shot")
|
||||||
),
|
defs.add_service(CustomServiceList.IMTQ.value, "IMQT Device", oce)
|
||||||
"13": ("IMTQ get raw MTM measurement one shot", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_imtq_tuple = ("IMTQ Device", op_code_dict_srv_imtq)
|
|
||||||
cmd_dict[CustomServiceList.IMTQ.value] = service_imtq_tuple
|
|
||||||
|
|
||||||
|
|
||||||
def add_ploc_mpsoc_cmds(cmd_dict: ServiceOpCodeDictT):
|
@tmtc_definitions_provider
|
||||||
op_code_dict_srv_ploc_mpsoc = {
|
def add_system_cmds(defs: TmtcDefinitionWrapper):
|
||||||
"0": ("Ploc MPSoC: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("Ploc MPSoC: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("Ploc MPSoC: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("Ploc MPSoC: Memory write", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"4": ("Ploc MPSoC: Memory read", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("Ploc MPSoC: Flash write", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"6": ("Ploc MPSoC: Flash delete", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"7": ("Ploc MPSoC: Replay start", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"8": ("Ploc MPSoC: Replay stop", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"9": ("Ploc MPSoC: Downlink pwr on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"10": ("Ploc MPSoC: Downlink pwr off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"11": ("Ploc MPSoC: Replay write sequence", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"12": ("Ploc MPSoC: OBSW reset sequence count", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"13": ("Ploc MPSoC: Read DEADBEEF address", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"14": ("Ploc MPSoC: Mode replay", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"15": ("Ploc MPSoC: Mode idle", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"16": ("Ploc MPSoC: Tc cam command send", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"17": ("Ploc MPSoC: Set UART TX tristate", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"18": ("Ploc MPSoC: Relesase UART TX", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_ploc_mpsoc_tuple = ("Ploc MPSoC", op_code_dict_srv_ploc_mpsoc)
|
|
||||||
cmd_dict[CustomServiceList.PLOC_MPSOC.value] = service_ploc_mpsoc_tuple
|
|
||||||
|
|
||||||
|
|
||||||
def add_ploc_supv_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
op_code_dict_ploc_mem_dumper = {
|
|
||||||
"0": ("PLOC Memory Dumper: MRAM dump", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_ploc_memory_dumper_tuple = (
|
|
||||||
"PLOC Memory Dumper",
|
|
||||||
op_code_dict_ploc_mem_dumper,
|
|
||||||
)
|
|
||||||
|
|
||||||
op_code_dict_srv_ploc_supv = {
|
|
||||||
"0": ("PLOC Supervisor: Set mode off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"1": ("PLOC Supervisor: Set mode on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"2": ("PLOC Supervisor: Set mode normal", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"3": ("PLOC Supervisor: Get HK Report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"5": ("PLOC Supervisor: Start MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"6": ("PLOC Supervisor: Shutdown MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"7": (
|
|
||||||
"PLOC Supervisor: Select MPSoC boot image",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"8": ("PLOC Supervisor: Set max restart tries", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"9": ("PLOC Supervisor: Reset MPSoC", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"10": ("PLOC Supervisor: Set time reference", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"11": ("PLOC Supervisor: Set boot timeout", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"12": ("PLOC Supervisor: Disable Hk", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"13": (
|
|
||||||
"PLOC Supervisor: Request boot status report",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"17": ("PLOC Supervisor: Enable latchup alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"18": ("PLOC Supervisor: Disable latchup alert", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"20": ("PLOC Supervisor: Set alert limit", {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}),
|
|
||||||
"30": ("PLOC Supervisor: Run auto EM tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"31": ("PLOC Supervisor: MRAM Wipe", {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},
|
|
||||||
),
|
|
||||||
"42": ("PLOC Supervisor: Perform update", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"43": (
|
|
||||||
"PLOC Supervisor: Terminate supervisor process",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"44": ("PLOC Supervisor: Start MPSoC quiet", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"45": ("PLOC Supervisor: Set shutdown timeout", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"46": ("PLOC Supervisor: Factory flash", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"47": ("PLOC Supervisor: Enable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"48": ("PLOC Supervisor: Disable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"51": (
|
|
||||||
"PLOC Supervisor: Logging request event buffers",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"52": (
|
|
||||||
"PLOC Supervisor: Logging clear counters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"53": ("PLOC Supervisor: Logging set topic", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"54": (
|
|
||||||
"PLOC Supervisor: Logging request counters",
|
|
||||||
{OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
),
|
|
||||||
"55": ("PLOC Supervisor: Request ADC Report", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"56": ("PLOC Supervisor: Reset PL", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"57": ("PLOC Supervisor: Enable NVMs", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
"58": ("PLOC Supervisor: Continue update", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
|
||||||
}
|
|
||||||
service_ploc_supv_tuple = ("PLOC Supervisor", op_code_dict_srv_ploc_supv)
|
|
||||||
cmd_dict[CustomServiceList.PLOC_SUPV.value] = service_ploc_supv_tuple
|
|
||||||
cmd_dict[
|
|
||||||
CustomServiceList.PLOC_MEMORY_DUMPER.value
|
|
||||||
] = service_ploc_memory_dumper_tuple
|
|
||||||
|
|
||||||
|
|
||||||
def add_system_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
from pus_tc.system.acs import AcsOpCodes, SusOpCodes
|
from pus_tc.system.acs import AcsOpCodes, SusOpCodes
|
||||||
import pus_tc.system.tcs as tcs
|
|
||||||
import pus_tc.system.controllers as controllers
|
import pus_tc.system.controllers as controllers
|
||||||
|
|
||||||
default_opts = generate_op_code_options(
|
oce = OpCodeEntry()
|
||||||
enter_listener_mode=False, custom_timeout=8.0
|
oce.add(
|
||||||
)
|
|
||||||
op_code_dict = dict()
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=AcsOpCodes.ACS_ASS_A_SIDE,
|
keys=AcsOpCodes.ACS_ASS_A_SIDE,
|
||||||
info="Switch to ACS board A side",
|
info="Switch to ACS board A side",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=AcsOpCodes.ACS_ASS_B_SIDE,
|
keys=AcsOpCodes.ACS_ASS_B_SIDE,
|
||||||
info="Switch to ACS board B side",
|
info="Switch to ACS board B side",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=AcsOpCodes.ACS_ASS_DUAL_MODE,
|
keys=AcsOpCodes.ACS_ASS_DUAL_MODE,
|
||||||
info="Switch to ACS board dual mode",
|
info="Switch to ACS board dual mode",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=AcsOpCodes.ACS_ASS_A_ON,
|
keys=AcsOpCodes.ACS_ASS_A_ON,
|
||||||
info="Switch ACS board A side on",
|
info="Switch ACS board A side on",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=AcsOpCodes.ACS_ASS_B_ON,
|
keys=AcsOpCodes.ACS_ASS_B_ON,
|
||||||
info="Switch ACS board B side on",
|
info="Switch ACS board B side on",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=AcsOpCodes.ACS_ASS_DUAL_ON,
|
keys=AcsOpCodes.ACS_ASS_DUAL_ON,
|
||||||
info="Switch ACS board dual mode on",
|
info="Switch ACS board dual mode on",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=AcsOpCodes.ACS_ASS_OFF,
|
keys=AcsOpCodes.ACS_ASS_OFF,
|
||||||
info="Switch off ACS board",
|
info="Switch off ACS board",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_service_op_code_entry(
|
defs.add_service(
|
||||||
srv_op_code_dict=cmd_dict,
|
name=CustomServiceList.ACS_ASS.value, info="ACS Assemblies", op_code_entry=oce
|
||||||
name=CustomServiceList.ACS_ASS.value,
|
|
||||||
info="ACS Assemblies",
|
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
op_code_dict = dict()
|
oce = OpCodeEntry()
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=SusOpCodes.SUS_ASS_NOM_SIDE,
|
keys=SusOpCodes.SUS_ASS_NOM_SIDE,
|
||||||
info="Switch SUS board to nominal side",
|
info="Switch SUS board to nominal side",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=SusOpCodes.SUS_ASS_RED_SIDE,
|
keys=SusOpCodes.SUS_ASS_RED_SIDE,
|
||||||
info="Switch SUS board to redundant side",
|
info="Switch SUS board to redundant side",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=SusOpCodes.SUS_ASS_OFF,
|
keys=SusOpCodes.SUS_ASS_OFF,
|
||||||
info="Switch off SUS board",
|
info="Switch off SUS board",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=SusOpCodes.SUS_ASS_DUAL_MODE,
|
keys=SusOpCodes.SUS_ASS_DUAL_MODE,
|
||||||
info="Switch SUS board to dual mode",
|
info="Switch SUS board to dual mode",
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_service_op_code_entry(
|
defs.add_service(
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.SUS_ASS.value,
|
name=CustomServiceList.SUS_ASS.value,
|
||||||
info="SUS Assembly",
|
info="SUS Assembly",
|
||||||
op_code_entry=op_code_dict,
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
|
|
||||||
op_code_dict = dict()
|
oce = OpCodeEntry()
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=tcs.OpCodes.TCS_BOARD_ASS_NORMAL,
|
|
||||||
info=tcs.Info.TCS_BOARD_ASS_NORMAL,
|
|
||||||
options=default_opts,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=tcs.OpCodes.TCS_BOARD_ASS_OFF,
|
|
||||||
info=tcs.Info.TCS_BOARD_ASS_OFF,
|
|
||||||
options=default_opts,
|
|
||||||
)
|
|
||||||
add_service_op_code_entry(
|
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.TCS_ASS.value,
|
|
||||||
info="TCS Board Assembly",
|
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
)
|
|
||||||
|
|
||||||
op_code_dict = dict()
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=controllers.OpCodes.THERMAL_CONTROLLER,
|
keys=controllers.OpCodes.THERMAL_CONTROLLER,
|
||||||
info=controllers.Info.THERMAL_CONTROLLER,
|
info=controllers.Info.THERMAL_CONTROLLER,
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=controllers.OpCodes.CORE_CONTROLLER,
|
keys=controllers.OpCodes.CORE_CONTROLLER,
|
||||||
info=controllers.Info.CORE_CONTROLLER,
|
info=controllers.Info.CORE_CONTROLLER,
|
||||||
options=default_opts,
|
|
||||||
)
|
)
|
||||||
add_service_op_code_entry(
|
defs.add_service(
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.CONTROLLERS.value,
|
name=CustomServiceList.CONTROLLERS.value,
|
||||||
info="Controllers",
|
info="Controllers",
|
||||||
op_code_entry=op_code_dict,
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
from . import power
|
@ -3,10 +3,13 @@
|
|||||||
@author J. Meier, R. Mueller
|
@author J. Meier, R. Mueller
|
||||||
@date 21.12.2020
|
@date 21.12.2020
|
||||||
"""
|
"""
|
||||||
|
import struct
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from tmtccmd.config import add_op_code_entry, add_service_op_code_entry
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
from tmtccmd.config.definitions import QueueCommands, ServiceOpCodeDictT
|
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
make_sid,
|
make_sid,
|
||||||
generate_one_diag_command,
|
generate_one_diag_command,
|
||||||
@ -14,11 +17,11 @@ from tmtccmd.tc.pus_3_fsfw_hk import (
|
|||||||
)
|
)
|
||||||
import gomspace.gomspace_common as gs
|
import gomspace.gomspace_common as gs
|
||||||
from gomspace.gomspace_common import GomspaceOpCodes
|
from gomspace.gomspace_common import GomspaceOpCodes
|
||||||
from gomspace.gomspace_common import Info as GsInfo
|
from gomspace.gomspace_common import GsInfo as GsInfo
|
||||||
from config.object_ids import ACU_HANDLER_ID
|
from config.object_ids import ACU_HANDLER_ID
|
||||||
from pus_tc.devs.p60dock import P60DockConfigTable
|
from pus_tc.devs.p60dock import P60DockConfigTable
|
||||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||||
from tmtccmd.utility import ObjectId
|
from tmtccmd.util import ObjectIdU32
|
||||||
|
|
||||||
|
|
||||||
class ACUConfigTable:
|
class ACUConfigTable:
|
||||||
@ -46,60 +49,62 @@ class Info:
|
|||||||
TEST = "ACU Test"
|
TEST = "ACU Test"
|
||||||
|
|
||||||
|
|
||||||
def add_acu_cmds(cmd_dict: ServiceOpCodeDictT):
|
@tmtc_definitions_provider
|
||||||
op_code_dict = dict()
|
def add_acu_cmds(defs: TmtcDefinitionWrapper):
|
||||||
add_op_code_entry(
|
oce = OpCodeEntry()
|
||||||
op_code_dict=op_code_dict,
|
oce.add(
|
||||||
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
||||||
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
||||||
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
||||||
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
||||||
)
|
)
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, keys=OpCodes.TEST, info=Info.TEST)
|
oce.add(
|
||||||
add_service_op_code_entry(
|
keys=GomspaceOpCodes.GET_PARAM,
|
||||||
srv_op_code_dict=cmd_dict,
|
info=GsInfo.GET_PARAMETER,
|
||||||
op_code_entry=op_code_dict,
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.SET_PARAM,
|
||||||
|
info=GsInfo.SET_PARAMETER,
|
||||||
|
)
|
||||||
|
oce.add(keys=OpCodes.TEST, info=Info.TEST)
|
||||||
|
defs.add_service(
|
||||||
name=CustomServiceList.ACU.value,
|
name=CustomServiceList.ACU.value,
|
||||||
info="ACU Device",
|
info="ACU Device",
|
||||||
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_acu_commands(
|
def pack_acu_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
||||||
object_id: ObjectId, tc_queue: TcQueueT, op_code: str
|
q.add_log_cmd("Handling ACU command")
|
||||||
) -> TcQueueT:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Handling ACU command"))
|
|
||||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Print channel stats"))
|
q.add_log_cmd("ACU: Print channel stats")
|
||||||
command = generate_action_command(
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
object_id=object_id.as_bytes,
|
object_id=object_id.as_bytes,
|
||||||
action_id=gs.GomspaceDeviceActionIds.PRINT_SWITCH_V_I,
|
action_id=gs.GomspaceDeviceActionIds.PRINT_SWITCH_V_I,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd(f"ACU: {GsInfo.REQUEST_CORE_HK_ONCE}")
|
||||||
(QueueCommands.PRINT, f"PDU1: {GsInfo.REQUEST_CORE_HK_ONCE}")
|
|
||||||
)
|
|
||||||
hk_sid = make_sid(object_id=object_id.as_bytes, set_id=gs.SetIds.ACU_CORE)
|
hk_sid = make_sid(object_id=object_id.as_bytes, set_id=gs.SetIds.ACU_CORE)
|
||||||
command = generate_one_diag_command(sid=hk_sid, ssc=0)
|
q.add_pus_tc(generate_one_diag_command(sid=hk_sid))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd(f"ACU: {GsInfo.REQUEST_AUX_HK_ONCE}")
|
||||||
(QueueCommands.PRINT, f"PDU1: {GsInfo.REQUEST_AUX_HK_ONCE}")
|
|
||||||
)
|
|
||||||
hk_sid = make_sid(object_id=object_id.as_bytes, set_id=gs.SetIds.ACU_AUX)
|
hk_sid = make_sid(object_id=object_id.as_bytes, set_id=gs.SetIds.ACU_AUX)
|
||||||
command = generate_one_hk_command(sid=hk_sid, ssc=0)
|
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
if op_code in GomspaceOpCodes.GET_PARAM:
|
||||||
pack_test_cmds(object_id=object_id, tc_queue=tc_queue)
|
q.add_log_cmd(f"ACU: {GsInfo.GET_PARAMETER}")
|
||||||
|
gs.prompt_and_pack_get_param_command(q, object_id)
|
||||||
return tc_queue
|
if op_code in GomspaceOpCodes.SET_PARAM:
|
||||||
|
q.add_log_cmd(f"ACU: {GsInfo.SET_PARAMETER}")
|
||||||
|
gs.prompt_and_pack_set_param_command(q, object_id)
|
||||||
|
pack_test_cmds(object_id=object_id, q=q)
|
||||||
|
|
||||||
|
|
||||||
class ACUTestProcedure:
|
class ACUTestProcedure:
|
||||||
@ -125,91 +130,84 @@ class ACUTestProcedure:
|
|||||||
off = False
|
off = False
|
||||||
|
|
||||||
|
|
||||||
def pack_test_cmds(object_id: ObjectId, tc_queue: TcQueueT):
|
def pack_test_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper):
|
||||||
if ACUTestProcedure.all or ACUTestProcedure.reboot:
|
if ACUTestProcedure.all or ACUTestProcedure.reboot:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reboot"))
|
q.add_log_cmd("ACU: Reboot")
|
||||||
command = gs.pack_reboot_command(object_id)
|
q.add_pus_tc(gs.pack_reboot_command(object_id))
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if ACUTestProcedure.all or ACUTestProcedure.read_gnd_wdt:
|
if ACUTestProcedure.all or ACUTestProcedure.read_gnd_wdt:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("ACU: Reading ground watchdog timer value")
|
||||||
(QueueCommands.PRINT, "ACU: Reading ground watchdog timer value")
|
q.add_pus_tc(
|
||||||
)
|
gs.pack_get_param_command(
|
||||||
command = gs.pack_get_param_command(
|
|
||||||
object_id.as_bytes,
|
object_id.as_bytes,
|
||||||
gs.TableIds.hk,
|
gs.TableIds.hk,
|
||||||
ACUHkTable.wdt_gnd_left.parameter_address,
|
ACUHkTable.wdt_gnd_left.parameter_address,
|
||||||
ACUHkTable.wdt_gnd_left.parameter_size,
|
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:
|
if ACUTestProcedure.all or ACUTestProcedure.gnd_wdt_reset:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Testing ground watchdog reset"))
|
q.add_log_cmd("ACU: Testing ground watchdog reset")
|
||||||
command = gs.pack_gnd_wdt_reset_command(object_id)
|
q.add_pus_tc(gs.pack_gnd_wdt_reset_command(object_id))
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if ACUTestProcedure.all or ACUTestProcedure.ping:
|
if ACUTestProcedure.all or ACUTestProcedure.ping:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Ping Test"))
|
q.add_log_cmd("ACU: Ping Test")
|
||||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||||
command = gs.pack_ping_command(object_id, ping_data)
|
q.add_pus_tc(gs.pack_ping_command(object_id, ping_data))
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if ACUTestProcedure.all or ACUTestProcedure.read_temperature3:
|
if ACUTestProcedure.all or ACUTestProcedure.read_temperature3:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading temperature 3"))
|
q.add_log_cmd("ACU: Reading temperature 3")
|
||||||
command = gs.pack_get_param_command(
|
q.add_pus_tc(
|
||||||
|
gs.pack_get_param_command(
|
||||||
object_id.as_bytes,
|
object_id.as_bytes,
|
||||||
gs.TableIds.hk,
|
gs.TableIds.hk,
|
||||||
ACUHkTable.temperature3.parameter_address,
|
ACUHkTable.temperature3.parameter_address,
|
||||||
ACUHkTable.temperature3.parameter_size,
|
ACUHkTable.temperature3.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if ACUTestProcedure.all or ACUTestProcedure.read_vboost:
|
if ACUTestProcedure.all or ACUTestProcedure.read_vboost:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vboost value"))
|
q.add_log_cmd("ACU: Reading vboost value")
|
||||||
command = gs.pack_get_param_command(
|
q.add_pus_tc(
|
||||||
|
gs.pack_get_param_command(
|
||||||
object_id.as_bytes,
|
object_id.as_bytes,
|
||||||
gs.TableIds.config,
|
gs.TableIds.config,
|
||||||
ACUConfigTable.vboost.parameter_address,
|
ACUConfigTable.vboost.parameter_address,
|
||||||
ACUConfigTable.vboost.parameter_size,
|
ACUConfigTable.vboost.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if ACUTestProcedure.all or ACUTestProcedure.read_vbat_max_hi:
|
if ACUTestProcedure.all or ACUTestProcedure.read_vbat_max_hi:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vbat_max_hi"))
|
q.add_log_cmd("ACU: Reading vbat_max_hi")
|
||||||
command = gs.pack_get_param_command(
|
q.add_pus_tc(
|
||||||
|
gs.pack_get_param_command(
|
||||||
object_id.as_bytes,
|
object_id.as_bytes,
|
||||||
gs.TableIds.config,
|
gs.TableIds.config,
|
||||||
ACUConfigTable.vbat_max_hi.parameter_address,
|
ACUConfigTable.vbat_max_hi.parameter_address,
|
||||||
ACUConfigTable.vbat_max_hi.parameter_size,
|
ACUConfigTable.vbat_max_hi.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if ACUTestProcedure.all or ACUTestProcedure.read_vbat_max_lo:
|
if ACUTestProcedure.all or ACUTestProcedure.read_vbat_max_lo:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading vbat_max_lo"))
|
q.add_log_cmd("ACU: Reading vbat_max_lo")
|
||||||
command = gs.pack_get_param_command(
|
q.add_pus_tc(
|
||||||
|
gs.pack_get_param_command(
|
||||||
object_id.as_bytes,
|
object_id.as_bytes,
|
||||||
gs.TableIds.config,
|
gs.TableIds.config,
|
||||||
ACUConfigTable.vbat_max_lo.parameter_address,
|
ACUConfigTable.vbat_max_lo.parameter_address,
|
||||||
ACUConfigTable.vbat_max_lo.parameter_size,
|
ACUConfigTable.vbat_max_lo.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if ACUTestProcedure.all or ACUTestProcedure.read_ov_mode:
|
if ACUTestProcedure.all or ACUTestProcedure.read_ov_mode:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "ACU: Reading ov_mode"))
|
q.add_log_cmd("ACU: Reading ov_mode")
|
||||||
command = gs.pack_get_param_command(
|
q.add_pus_tc(
|
||||||
|
gs.pack_get_param_command(
|
||||||
object_id.as_bytes,
|
object_id.as_bytes,
|
||||||
gs.TableIds.config,
|
gs.TableIds.config,
|
||||||
ACUConfigTable.ov_mode.parameter_address,
|
ACUConfigTable.ov_mode.parameter_address,
|
||||||
ACUConfigTable.ov_mode.parameter_size,
|
ACUConfigTable.ov_mode.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if ACUTestProcedure.all or ACUTestProcedure.off:
|
if ACUTestProcedure.all or ACUTestProcedure.off:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning off ACU"))
|
q.add_log_cmd("P60 Dock: Turning off ACU")
|
||||||
command = gs.pack_set_param_command(
|
q.add_pus_tc(
|
||||||
|
gs.pack_set_param_command(
|
||||||
ACU_HANDLER_ID,
|
ACU_HANDLER_ID,
|
||||||
P60DockConfigTable.out_en_0.parameter_address,
|
P60DockConfigTable.out_en_0.parameter_address,
|
||||||
P60DockConfigTable.out_en_0.parameter_size,
|
P60DockConfigTable.out_en_0.parameter_size,
|
||||||
gs.Channel.off,
|
gs.Channel.off,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
from tmtccmd.tc.definitions import TcQueueT, QueueCommands
|
from config.definitions import CustomServiceList
|
||||||
from config.object_ids import BPX_HANDLER_ID
|
from config.object_ids import BPX_HANDLER_ID
|
||||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
from tmtccmd import DefaultProcedureInfo, TcHandlerBase
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper, service_provider
|
||||||
|
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||||
|
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
||||||
|
|
||||||
|
|
||||||
@ -24,33 +27,36 @@ class BpxOpCodes:
|
|||||||
REBOOT = ["4", "reboot"]
|
REBOOT = ["4", "reboot"]
|
||||||
|
|
||||||
|
|
||||||
def pack_bpx_commands(tc_queue: TcQueueT, op_code: str):
|
@service_provider(CustomServiceList.BPX_BATTERY.value)
|
||||||
|
def pack_bpx_commands(p: ServiceProviderParams):
|
||||||
|
op_code = p.op_code
|
||||||
|
q = p.queue_helper
|
||||||
if op_code in BpxOpCodes.HK:
|
if op_code in BpxOpCodes.HK:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Requesting BPX battery HK set"))
|
q.add_log_cmd("Requesting BPX battery HK set")
|
||||||
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetIds.GET_HK_SET)
|
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetIds.GET_HK_SET)
|
||||||
cmd = generate_one_hk_command(sid=sid, ssc=0)
|
q.add_pus_tc(generate_one_hk_command(sid=sid))
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
|
||||||
if op_code in BpxOpCodes.RST_BOOT_CNT:
|
if op_code in BpxOpCodes.RST_BOOT_CNT:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Resetting reboot counters"))
|
q.add_log_cmd("Resetting reboot counters")
|
||||||
cmd = generate_action_command(
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.RESET_COUNTERS
|
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.RESET_COUNTERS
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
)
|
||||||
if op_code in BpxOpCodes.REQUEST_CFG:
|
if op_code in BpxOpCodes.REQUEST_CFG:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Requesting configuration struct"))
|
q.add_log_cmd("Requesting configuration struct")
|
||||||
cmd = generate_action_command(
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.GET_CFG
|
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.GET_CFG
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
)
|
||||||
if op_code in BpxOpCodes.REQUEST_CFG_HK:
|
if op_code in BpxOpCodes.REQUEST_CFG_HK:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Requesting configuration struct HK"))
|
q.add_log_cmd("Requesting configuration struct HK")
|
||||||
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetIds.GET_CFG_SET)
|
sid = make_sid(object_id=BPX_HANDLER_ID, set_id=BpxSetIds.GET_CFG_SET)
|
||||||
cmd = generate_one_hk_command(sid=sid, ssc=0)
|
q.add_pus_tc(generate_one_hk_command(sid=sid))
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
|
||||||
if op_code in BpxOpCodes.REBOOT:
|
if op_code in BpxOpCodes.REBOOT:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Rebooting BPX battery"))
|
q.add_log_cmd("Rebooting BPX battery")
|
||||||
cmd = generate_action_command(
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.REBOOT
|
object_id=BPX_HANDLER_ID, action_id=BpxActionIds.REBOOT
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
)
|
||||||
pass
|
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
"""
|
"""
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
from spacepackets.ecss.tc import PusTelecommand
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
|
from tmtccmd.util import ObjectIdU32
|
||||||
|
|
||||||
|
|
||||||
class CommandIds:
|
class CommandIds:
|
||||||
@ -33,83 +33,48 @@ class CommandIds:
|
|||||||
|
|
||||||
|
|
||||||
def pack_ccsds_handler_test(
|
def pack_ccsds_handler_test(
|
||||||
object_id: bytearray, tc_queue: TcQueueT, op_code: str
|
object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str
|
||||||
) -> TcQueueT:
|
):
|
||||||
tc_queue.appendleft(
|
obyt = object_id.as_bytes
|
||||||
(
|
q.add_log_cmd(f"Testing CCSDS handler with object id: {object_id.as_hex_string}")
|
||||||
QueueCommands.PRINT,
|
|
||||||
"Testing CCSDS handler with object id: 0x" + object_id.hex(),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == "0":
|
if op_code == "0":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Set low rate"))
|
q.add_log_cmd("CCSDS Handler: Set low rate")
|
||||||
command = object_id + struct.pack("!I", CommandIds.SET_LOW_RATE)
|
command = obyt + struct.pack("!I", CommandIds.SET_LOW_RATE)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "1":
|
if op_code == "1":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "CCSDS Handler: Set high rate"))
|
q.add_log_cmd("CCSDS Handler: Set high rate")
|
||||||
command = object_id + struct.pack("!I", CommandIds.SET_HIGH_RATE)
|
command = obyt + struct.pack("!I", CommandIds.SET_HIGH_RATE)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "2":
|
if op_code == "2":
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("CCSDS Handler: Enables the transmitter")
|
||||||
(QueueCommands.PRINT, "CCSDS Handler: Enables the transmitter")
|
command = obyt + struct.pack("!I", CommandIds.EN_TRANSMITTER)
|
||||||
)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
command = object_id + struct.pack("!I", CommandIds.EN_TRANSMITTER)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "3":
|
if op_code == "3":
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("CCSDS Handler: Disables the transmitter")
|
||||||
(QueueCommands.PRINT, "CCSDS Handler: Disables the transmitter")
|
command = obyt + struct.pack("!I", CommandIds.DIS_TRANSMITTER)
|
||||||
)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
command = object_id + struct.pack("!I", CommandIds.DIS_TRANSMITTER)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "4":
|
if op_code == "4":
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("CCSDS Handler: Set arbitrary bitrate")
|
||||||
(QueueCommands.PRINT, "CCSDS Handler: Set arbitrary bitrate")
|
|
||||||
)
|
|
||||||
bitrate = int(input("Specify bit rate (bps): "))
|
bitrate = int(input("Specify bit rate (bps): "))
|
||||||
command = (
|
command = (
|
||||||
object_id
|
obyt
|
||||||
+ struct.pack("!I", CommandIds.ARBITRARY_BITRATE)
|
+ struct.pack("!I", CommandIds.ARBITRARY_BITRATE)
|
||||||
+ struct.pack("!I", bitrate)
|
+ struct.pack("!I", bitrate)
|
||||||
)
|
)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "5":
|
if op_code == "5":
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("CCSDS Handler: Enable tx clock manipulator")
|
||||||
(QueueCommands.PRINT, "CCSDS Handler: Enable tx clock manipulator")
|
command = obyt + struct.pack("!I", CommandIds.ENABLE_TX_CLK_MANIPULATOR)
|
||||||
)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
command = object_id + struct.pack("!I", CommandIds.ENABLE_TX_CLK_MANIPULATOR)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "6":
|
if op_code == "6":
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("CCSDS Handler: Disable tx clock manipulator")
|
||||||
(QueueCommands.PRINT, "CCSDS Handler: Disable tx clock manipulator")
|
command = obyt + struct.pack("!I", CommandIds.DISABLE_TX_CLK_MANIPULATOR)
|
||||||
)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
command = object_id + struct.pack("!I", CommandIds.DISABLE_TX_CLK_MANIPULATOR)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "7":
|
if op_code == "7":
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("CCSDS Handler: Update tx data on rising edge of tx clock")
|
||||||
(
|
command = obyt + struct.pack("!I", CommandIds.UPDATE_ON_RISING_EDGE)
|
||||||
QueueCommands.PRINT,
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
"CCSDS Handler: Update tx data on rising edge of tx clock",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
command = object_id + struct.pack("!I", CommandIds.UPDATE_ON_RISING_EDGE)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "8":
|
if op_code == "8":
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("CCSDS Handler: Update tx data on falling edge of tx clock")
|
||||||
(
|
command = obyt + struct.pack("!I", CommandIds.UPDATE_ON_FALLING_EDGE)
|
||||||
QueueCommands.PRINT,
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
"CCSDS Handler: Update tx data on falling edge of tx clock",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
command = object_id + struct.pack("!I", CommandIds.UPDATE_ON_FALLING_EDGE)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
return tc_queue
|
|
||||||
|
472
pus_tc/devs/common_power.py
Normal file
472
pus_tc/devs/common_power.py
Normal file
@ -0,0 +1,472 @@
|
|||||||
|
import enum
|
||||||
|
import struct
|
||||||
|
|
||||||
|
from config.object_ids import PDU_1_HANDLER_ID, PDU_2_HANDLER_ID
|
||||||
|
from gomspace.gomspace_common import (
|
||||||
|
pack_set_param_command,
|
||||||
|
Channel,
|
||||||
|
GomspaceOpCodes,
|
||||||
|
GsInfo,
|
||||||
|
SetIds,
|
||||||
|
GomspaceDeviceActionIds,
|
||||||
|
)
|
||||||
|
from gomspace.gomspace_pdu_definitions import PDU_CONFIG_LIST
|
||||||
|
from pus_tm.defs import PrintWrapper
|
||||||
|
from tmtccmd.config import OpCodeEntry
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
|
make_sid,
|
||||||
|
generate_one_diag_command,
|
||||||
|
generate_one_hk_command,
|
||||||
|
)
|
||||||
|
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||||
|
|
||||||
|
|
||||||
|
class Pdu1ChIndex(enum.IntEnum):
|
||||||
|
TCS = 0
|
||||||
|
SYRLINKS = 1
|
||||||
|
STR = 2
|
||||||
|
MGT = 3
|
||||||
|
SUS_N = 4
|
||||||
|
SCEX = 5
|
||||||
|
PLOC = 6
|
||||||
|
ACS_A = 7
|
||||||
|
|
||||||
|
|
||||||
|
class Pdu1InfoBase:
|
||||||
|
TCS = "Switch TCS Board"
|
||||||
|
SYRLINKS = "Switch Syrlinks (COM)"
|
||||||
|
STR = "Switch Startracker"
|
||||||
|
MGT = "Switch Magnetorquer"
|
||||||
|
SUS_N = "Switch Sun Sensor Board Nominal"
|
||||||
|
SCEX = "Switch Solar Cell Experiment"
|
||||||
|
PLOC = "Switch Payload On-Board Computer"
|
||||||
|
ACS_A = "Switch ACS Board A-Side"
|
||||||
|
|
||||||
|
|
||||||
|
class Pdu2InfoBase:
|
||||||
|
PL_PCDU_BAT_NOM = "Switch PL PCDU Nominal Battery Channel"
|
||||||
|
RW = "Switch Reaction Wheel"
|
||||||
|
HEATER = "Switch Heater"
|
||||||
|
SUS_R = "Switch Sun Sensor Board Redundant"
|
||||||
|
SOLAR_ARRAY_DEPL = "Switch Solar Array Deployment"
|
||||||
|
PL_PCDU_BAT_RED = "Switch PL PCDU Redundant Battery Channel"
|
||||||
|
ACS_B = "Switch ACS Board B-Side"
|
||||||
|
PL_CAM = "Switch Payload Camera"
|
||||||
|
|
||||||
|
|
||||||
|
class PowerInfo:
|
||||||
|
INFO_CORE = "Core Information"
|
||||||
|
INFO_AUX = "Auxiliary Information"
|
||||||
|
INFO_ALL = "All Information"
|
||||||
|
|
||||||
|
|
||||||
|
class Pdu2ChIndex(enum.IntEnum):
|
||||||
|
PL_PCDU_BAT_NOM = 1
|
||||||
|
RW = 2
|
||||||
|
HEATER = 3
|
||||||
|
SUS_R = 4
|
||||||
|
SOLAR_ARRAY_DEPL = 5
|
||||||
|
PL_PCDU_BAT_RED = 6
|
||||||
|
ACS_B = 7
|
||||||
|
PL_CAM = 8
|
||||||
|
|
||||||
|
|
||||||
|
class PowerOpCodes:
|
||||||
|
# PDU 1
|
||||||
|
TCS_ON = ["tcs-on"]
|
||||||
|
TCS_OFF = ["tcs-off"]
|
||||||
|
SYRLINKS_ON = ["syrlinks-on"]
|
||||||
|
SYRLINKS_OFF = ["syrlinks-off"]
|
||||||
|
STAR_TRACKER_ON = ["str-on"]
|
||||||
|
STAR_TRACKER_OFF = ["str-off"]
|
||||||
|
MGT_ON = ["mgt-on"]
|
||||||
|
MGT_OFF = ["mgt-off"]
|
||||||
|
SUS_N_ON = ["sus-nom-on"]
|
||||||
|
SUS_N_OFF = ["sus-nom-off"]
|
||||||
|
SCEX_ON = ["scex-on"]
|
||||||
|
SCEX_OFF = ["scex-off"]
|
||||||
|
PLOC_ON = ["ploc-on"]
|
||||||
|
PLOC_OFF = ["ploc-off"]
|
||||||
|
ACS_A_ON = ["acs-a-on"]
|
||||||
|
ACS_A_OFF = ["acs-a-off"]
|
||||||
|
|
||||||
|
# PDU 2
|
||||||
|
PL_PCDU_VBAT_NOM_ON = ["plpcdu-vbat-nom-on"]
|
||||||
|
PL_PCDU_VBAT_NOM_OFF = ["plpcdu-vbat-nom-off"]
|
||||||
|
RW_ON = ["rw-on"]
|
||||||
|
RW_OFF = ["rw-off"]
|
||||||
|
HEATER_ON = ["heater-on"]
|
||||||
|
HEATER_OFF = ["heater-off"]
|
||||||
|
SUS_R_ON = ["sus-red-on"]
|
||||||
|
SUS_R_OFF = ["sus-red-off"]
|
||||||
|
SOLAR_ARRAY_DEPL_ON = ["sa-depl-on"]
|
||||||
|
SOLAR_ARRAY_DEPL_OFF = ["sa-depl-off"]
|
||||||
|
PL_PCDU_VBAT_RED_ON = ["plpcdu-vbat-red-on"]
|
||||||
|
PL_PCDU_VBAT_RED_OFF = ["plpcdu-vbat-red-off"]
|
||||||
|
ACS_B_ON = ["acs-b-on"]
|
||||||
|
ACS_B_OFF = ["acs-b-off"]
|
||||||
|
PL_CAM_ON = ["cam-on"]
|
||||||
|
PL_CAM_OFF = ["cam-off"]
|
||||||
|
|
||||||
|
INFO_CORE = ["info"]
|
||||||
|
INFO_AUX = ["info-aux"]
|
||||||
|
INFO_ALL = ["info-all"]
|
||||||
|
|
||||||
|
|
||||||
|
def info_on_pdu1(base: str) -> str:
|
||||||
|
return "PDU1: " + base + " on"
|
||||||
|
|
||||||
|
|
||||||
|
def info_off_pdu1(base: str) -> str:
|
||||||
|
return "PDU1: " + base + " off"
|
||||||
|
|
||||||
|
|
||||||
|
def info_on_pdu2(base: str) -> str:
|
||||||
|
return "PDU2: " + base + " on"
|
||||||
|
|
||||||
|
|
||||||
|
def info_off_pdu2(base: str) -> str:
|
||||||
|
return "PDU2: " + base + " off"
|
||||||
|
|
||||||
|
|
||||||
|
def add_pdu1_common_defs(oce: OpCodeEntry):
|
||||||
|
oce.add(keys=PowerOpCodes.TCS_ON, info=info_on_pdu1(Pdu1InfoBase.TCS))
|
||||||
|
oce.add(keys=PowerOpCodes.TCS_OFF, info=info_off_pdu1(Pdu1InfoBase.TCS))
|
||||||
|
oce.add(keys=PowerOpCodes.STAR_TRACKER_ON, info=info_on_pdu1(Pdu1InfoBase.STR))
|
||||||
|
oce.add(keys=PowerOpCodes.STAR_TRACKER_OFF, info=info_off_pdu1(Pdu1InfoBase.STR))
|
||||||
|
oce.add(keys=PowerOpCodes.SUS_N_ON, info=info_on_pdu1(Pdu1InfoBase.SUS_N))
|
||||||
|
oce.add(keys=PowerOpCodes.SUS_N_OFF, info=info_off_pdu1(Pdu1InfoBase.SUS_N))
|
||||||
|
oce.add(keys=PowerOpCodes.ACS_A_ON, info=info_on_pdu1(Pdu1InfoBase.ACS_A))
|
||||||
|
oce.add(keys=PowerOpCodes.ACS_A_OFF, info=info_off_pdu1(Pdu1InfoBase.ACS_A))
|
||||||
|
oce.add(keys=PowerOpCodes.SYRLINKS_ON, info=info_on_pdu1(Pdu1InfoBase.SYRLINKS))
|
||||||
|
oce.add(keys=PowerOpCodes.SYRLINKS_OFF, info=info_off_pdu1(Pdu1InfoBase.SYRLINKS))
|
||||||
|
oce.add(keys=PowerOpCodes.MGT_ON, info=info_on_pdu1(Pdu1InfoBase.MGT))
|
||||||
|
oce.add(keys=PowerOpCodes.MGT_OFF, info=info_off_pdu1(Pdu1InfoBase.MGT))
|
||||||
|
oce.add(keys=PowerOpCodes.PLOC_ON, info=info_on_pdu1(Pdu1InfoBase.PLOC))
|
||||||
|
oce.add(keys=PowerOpCodes.PLOC_OFF, info=info_off_pdu1(Pdu1InfoBase.PLOC))
|
||||||
|
oce.add(keys=PowerOpCodes.SCEX_ON, info=info_on_pdu1(Pdu1InfoBase.SCEX))
|
||||||
|
oce.add(keys=PowerOpCodes.SCEX_OFF, info=info_off_pdu1(Pdu1InfoBase.SCEX))
|
||||||
|
|
||||||
|
|
||||||
|
def add_pdu2_common_defs(oce: OpCodeEntry):
|
||||||
|
oce.add(keys=PowerOpCodes.ACS_B_ON, info=info_on_pdu2(Pdu2InfoBase.ACS_B))
|
||||||
|
oce.add(keys=PowerOpCodes.ACS_B_OFF, info=info_off_pdu2(Pdu2InfoBase.ACS_B))
|
||||||
|
oce.add(keys=PowerOpCodes.SUS_R_ON, info=info_on_pdu2(Pdu2InfoBase.SUS_R))
|
||||||
|
oce.add(keys=PowerOpCodes.SUS_R_OFF, info=info_off_pdu2(Pdu2InfoBase.SUS_R))
|
||||||
|
oce.add(keys=PowerOpCodes.RW_ON, info=info_on_pdu2(Pdu2InfoBase.RW))
|
||||||
|
oce.add(keys=PowerOpCodes.RW_OFF, info=info_off_pdu2(Pdu2InfoBase.RW))
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.PL_PCDU_VBAT_NOM_ON,
|
||||||
|
info=info_on_pdu2(Pdu2InfoBase.PL_PCDU_BAT_NOM),
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.PL_PCDU_VBAT_NOM_OFF,
|
||||||
|
info=info_off_pdu2(Pdu2InfoBase.PL_PCDU_BAT_NOM),
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.PL_PCDU_VBAT_RED_ON,
|
||||||
|
info=info_on_pdu2(Pdu2InfoBase.PL_PCDU_BAT_RED),
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.PL_PCDU_VBAT_RED_OFF,
|
||||||
|
info=info_off_pdu2(Pdu2InfoBase.PL_PCDU_BAT_RED),
|
||||||
|
)
|
||||||
|
oce.add(keys=PowerOpCodes.HEATER_ON, info=info_on_pdu2(Pdu2InfoBase.HEATER))
|
||||||
|
oce.add(keys=PowerOpCodes.HEATER_OFF, info=info_off_pdu2(Pdu2InfoBase.HEATER))
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.SOLAR_ARRAY_DEPL_ON,
|
||||||
|
info=info_on_pdu2(Pdu2InfoBase.SOLAR_ARRAY_DEPL),
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=PowerOpCodes.SOLAR_ARRAY_DEPL_OFF,
|
||||||
|
info=info_off_pdu2(Pdu2InfoBase.SOLAR_ARRAY_DEPL),
|
||||||
|
)
|
||||||
|
oce.add(keys=PowerOpCodes.PL_CAM_ON, info=info_on_pdu2(Pdu2InfoBase.PL_CAM))
|
||||||
|
oce.add(keys=PowerOpCodes.PL_CAM_OFF, info=info_off_pdu2(Pdu2InfoBase.PL_CAM))
|
||||||
|
|
||||||
|
|
||||||
|
def pdu1_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
if op_code in PowerOpCodes.TCS_ON:
|
||||||
|
tcs_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.TCS_OFF:
|
||||||
|
tcs_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SYRLINKS_ON:
|
||||||
|
syrlinks_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SYRLINKS_OFF:
|
||||||
|
syrlinks_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.STAR_TRACKER_ON:
|
||||||
|
startracker_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.STAR_TRACKER_OFF:
|
||||||
|
startracker_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.MGT_ON:
|
||||||
|
mgt_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.MGT_OFF:
|
||||||
|
mgt_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SUS_N_ON:
|
||||||
|
sun_sensor_nominal_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SUS_N_OFF:
|
||||||
|
sun_sensor_nominal_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SCEX_ON:
|
||||||
|
solar_cell_experiment_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SCEX_OFF:
|
||||||
|
solar_cell_experiment_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PLOC_ON:
|
||||||
|
ploc_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PLOC_OFF:
|
||||||
|
ploc_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.ACS_A_ON:
|
||||||
|
acs_board_a_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.ACS_A_OFF:
|
||||||
|
acs_board_a_off_cmd(q)
|
||||||
|
|
||||||
|
|
||||||
|
def pdu2_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
if op_code in PowerOpCodes.PL_PCDU_VBAT_NOM_ON:
|
||||||
|
pl_pcdu_bat_nom_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PL_PCDU_VBAT_NOM_OFF:
|
||||||
|
pl_pcdu_bat_nom_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.RW_ON:
|
||||||
|
reaction_wheel_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.RW_OFF:
|
||||||
|
reaction_wheel_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.HEATER_ON:
|
||||||
|
heater_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.HEATER_OFF:
|
||||||
|
heater_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SUS_R_ON:
|
||||||
|
sus_red_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SUS_R_OFF:
|
||||||
|
sus_red_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SOLAR_ARRAY_DEPL_ON:
|
||||||
|
solar_array_deployment_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.SOLAR_ARRAY_DEPL_OFF:
|
||||||
|
solar_array_deployment_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PL_PCDU_VBAT_RED_ON:
|
||||||
|
pl_pcdu_bat_red_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PL_PCDU_VBAT_RED_OFF:
|
||||||
|
pl_pcdu_bat_nom_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.ACS_B_ON:
|
||||||
|
acs_board_b_side_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.ACS_B_OFF:
|
||||||
|
acs_board_b_side_off_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PL_CAM_ON:
|
||||||
|
payload_camera_on_cmd(q)
|
||||||
|
elif op_code in PowerOpCodes.PL_CAM_OFF:
|
||||||
|
payload_camera_off_cmd(q)
|
||||||
|
|
||||||
|
|
||||||
|
def pdu1_req_hk_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
||||||
|
q.add_log_cmd(f"PDU1: {GsInfo.REQUEST_CORE_HK_ONCE}")
|
||||||
|
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1_CORE)
|
||||||
|
q.add_pus_tc(generate_one_diag_command(sid=hk_sid))
|
||||||
|
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
||||||
|
q.add_log_cmd(f"PDU1: {GsInfo.REQUEST_AUX_HK_ONCE}")
|
||||||
|
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1_AUX)
|
||||||
|
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
|
||||||
|
|
||||||
|
|
||||||
|
def pdu2_req_hk_cmds(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
||||||
|
q.add_log_cmd(f"PDU2: {GsInfo.REQUEST_CORE_HK_ONCE}")
|
||||||
|
hk_sid = make_sid(object_id=PDU_2_HANDLER_ID, set_id=SetIds.PDU_2_CORE)
|
||||||
|
q.add_pus_tc(generate_one_diag_command(sid=hk_sid))
|
||||||
|
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
||||||
|
q.add_log_cmd(f"PDU2: {GsInfo.REQUEST_AUX_HK_ONCE}")
|
||||||
|
hk_sid = make_sid(object_id=PDU_2_HANDLER_ID, set_id=SetIds.PDU_2_AUX)
|
||||||
|
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
|
||||||
|
|
||||||
|
|
||||||
|
def tcs_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.TCS, Pdu1ChIndex.TCS)
|
||||||
|
|
||||||
|
|
||||||
|
def tcs_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.TCS, Pdu1ChIndex.TCS)
|
||||||
|
|
||||||
|
|
||||||
|
def syrlinks_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SYRLINKS, Pdu1ChIndex.SYRLINKS)
|
||||||
|
|
||||||
|
|
||||||
|
def syrlinks_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SYRLINKS, Pdu1ChIndex.SYRLINKS)
|
||||||
|
|
||||||
|
|
||||||
|
def startracker_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.STR, Pdu1ChIndex.STR)
|
||||||
|
|
||||||
|
|
||||||
|
def startracker_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.STR, Pdu1ChIndex.STR)
|
||||||
|
|
||||||
|
|
||||||
|
def mgt_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.MGT, Pdu1ChIndex.MGT)
|
||||||
|
|
||||||
|
|
||||||
|
def mgt_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.MGT, Pdu1ChIndex.MGT)
|
||||||
|
|
||||||
|
|
||||||
|
def sun_sensor_nominal_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SUS_N, Pdu1ChIndex.SUS_N)
|
||||||
|
|
||||||
|
|
||||||
|
def sun_sensor_nominal_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SUS_N, Pdu1ChIndex.SUS_N)
|
||||||
|
|
||||||
|
|
||||||
|
def solar_cell_experiment_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SCEX, Pdu1ChIndex.SCEX)
|
||||||
|
|
||||||
|
|
||||||
|
def solar_cell_experiment_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.SCEX, Pdu1ChIndex.SCEX)
|
||||||
|
|
||||||
|
|
||||||
|
def ploc_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.PLOC, Pdu1ChIndex.PLOC)
|
||||||
|
|
||||||
|
|
||||||
|
def ploc_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.PLOC, Pdu1ChIndex.PLOC)
|
||||||
|
|
||||||
|
|
||||||
|
def acs_board_a_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.ACS_A, Pdu1ChIndex.ACS_A)
|
||||||
|
|
||||||
|
|
||||||
|
def acs_board_a_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_1_HANDLER_ID, q, Pdu1InfoBase.ACS_A, Pdu1ChIndex.ACS_A)
|
||||||
|
|
||||||
|
|
||||||
|
def pl_pcdu_bat_nom_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_PCDU_BAT_NOM, Pdu2ChIndex.PL_PCDU_BAT_NOM
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def pl_pcdu_bat_nom_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_PCDU_BAT_NOM, Pdu2ChIndex.PL_PCDU_BAT_NOM
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def reaction_wheel_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.RW, Pdu2ChIndex.RW)
|
||||||
|
|
||||||
|
|
||||||
|
def reaction_wheel_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.RW, Pdu2ChIndex.RW)
|
||||||
|
|
||||||
|
|
||||||
|
def heater_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.HEATER, Pdu2ChIndex.HEATER)
|
||||||
|
|
||||||
|
|
||||||
|
def heater_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.HEATER, Pdu2ChIndex.HEATER)
|
||||||
|
|
||||||
|
|
||||||
|
def sus_red_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.SUS_R, Pdu2ChIndex.SUS_R)
|
||||||
|
|
||||||
|
|
||||||
|
def sus_red_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.SUS_R, Pdu2ChIndex.SUS_R)
|
||||||
|
|
||||||
|
|
||||||
|
def solar_array_deployment_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.SOLAR_ARRAY_DEPL, Pdu2ChIndex.SOLAR_ARRAY_DEPL
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def solar_array_deployment_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.SOLAR_ARRAY_DEPL, Pdu2ChIndex.SOLAR_ARRAY_DEPL
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def pl_pcdu_bat_red_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_PCDU_BAT_RED, Pdu2ChIndex.PL_PCDU_BAT_RED
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def pl_pcdu_bat_red_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(
|
||||||
|
PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_PCDU_BAT_RED, Pdu2ChIndex.PL_PCDU_BAT_RED
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def acs_board_b_side_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.ACS_B, Pdu2ChIndex.ACS_B)
|
||||||
|
|
||||||
|
|
||||||
|
def acs_board_b_side_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.ACS_B, Pdu2ChIndex.ACS_B)
|
||||||
|
|
||||||
|
|
||||||
|
def payload_camera_on_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_on_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_CAM, Pdu2ChIndex.PL_CAM)
|
||||||
|
|
||||||
|
|
||||||
|
def payload_camera_off_cmd(q: DefaultPusQueueHelper):
|
||||||
|
generic_off_cmd(PDU_2_HANDLER_ID, q, Pdu2InfoBase.PL_CAM, Pdu2ChIndex.PL_CAM)
|
||||||
|
|
||||||
|
|
||||||
|
def generic_on_cmd(
|
||||||
|
object_id: bytes, q: DefaultPusQueueHelper, info_str: str, out_idx: int
|
||||||
|
):
|
||||||
|
q.add_log_cmd(info_str + " on")
|
||||||
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
|
object_id,
|
||||||
|
PDU_CONFIG_LIST[out_idx].parameter_address,
|
||||||
|
PDU_CONFIG_LIST[out_idx].parameter_size,
|
||||||
|
Channel.on,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def generic_off_cmd(
|
||||||
|
object_id: bytes, q: DefaultPusQueueHelper, info_str: str, out_idx: int
|
||||||
|
):
|
||||||
|
q.add_log_cmd(info_str + " off")
|
||||||
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
|
object_id,
|
||||||
|
PDU_CONFIG_LIST[out_idx].parameter_address,
|
||||||
|
PDU_CONFIG_LIST[out_idx].parameter_size,
|
||||||
|
Channel.off,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def handle_get_param_data_reply(
|
||||||
|
action_id: int, pw: PrintWrapper, custom_data: bytearray
|
||||||
|
):
|
||||||
|
if action_id == GomspaceDeviceActionIds.PARAM_GET:
|
||||||
|
header_list = [
|
||||||
|
"Gomspace action ID",
|
||||||
|
"Table ID",
|
||||||
|
"Memory Address",
|
||||||
|
"Payload length",
|
||||||
|
"Payload",
|
||||||
|
]
|
||||||
|
fmt_str = "!BBHH"
|
||||||
|
(action, table_id, address, payload_length) = struct.unpack(
|
||||||
|
fmt_str, custom_data[:6]
|
||||||
|
)
|
||||||
|
content_list = [
|
||||||
|
action,
|
||||||
|
table_id,
|
||||||
|
hex(address),
|
||||||
|
payload_length,
|
||||||
|
"0x" + custom_data[6:].hex(),
|
||||||
|
]
|
||||||
|
pw.dlog(f"{header_list}")
|
||||||
|
pw.dlog(f"{content_list}")
|
@ -1,26 +1,48 @@
|
|||||||
import enum
|
import enum
|
||||||
|
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
from config.definitions import CustomServiceList
|
||||||
from tmtccmd.tc.definitions import TcQueueT
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
|
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
||||||
|
from tmtccmd.logging import get_console_logger
|
||||||
|
|
||||||
|
|
||||||
from config.object_ids import GPS_HANDLER_1_ID, GPS_CONTROLLER
|
LOGGER = get_console_logger()
|
||||||
|
|
||||||
|
|
||||||
class GpsOpCodes(enum.Enum):
|
class OpCodes:
|
||||||
RESET_GNSS = "5"
|
REQ_OS_HK = ["0", "hk-os"]
|
||||||
|
RESET_GNSS = ["5", "reset"]
|
||||||
|
|
||||||
|
|
||||||
|
class Info:
|
||||||
|
REQ_OS_HK = "Request One-Shot HK"
|
||||||
|
RESET_GNSS = "Reset GNSS using reset pin"
|
||||||
|
|
||||||
|
|
||||||
class SetIds:
|
class SetIds:
|
||||||
HK = 0
|
HK = 0
|
||||||
|
|
||||||
|
|
||||||
def pack_gps_command(object_id: bytes, tc_queue: TcQueueT, op_code: str):
|
@tmtc_definitions_provider
|
||||||
if op_code == GpsOpCodes.RESET_GNSS.value:
|
def add_gps_cmds(defs: TmtcDefinitionWrapper):
|
||||||
if object_id == GPS_CONTROLLER:
|
oce = OpCodeEntry()
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Resetting GPS device 0"))
|
oce.add(keys=OpCodes.RESET_GNSS, info=Info.RESET_GNSS)
|
||||||
elif object_id == GPS_HANDLER_1_ID:
|
oce.add(keys=OpCodes.REQ_OS_HK, info=Info.REQ_OS_HK)
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Resetting GPS device 1"))
|
defs.add_service(
|
||||||
cmd = generate_action_command(object_id=object_id, action_id=int(op_code))
|
name=CustomServiceList.GPS_CTRL.value,
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
info="GPS/GNSS Controller",
|
||||||
|
op_code_entry=oce,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def pack_gps_command(object_id: bytes, q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
if op_code in OpCodes.RESET_GNSS:
|
||||||
|
# TODO: This needs to be re-implemented
|
||||||
|
LOGGER.warning("Reset pin handling needs to be re-implemented")
|
||||||
|
if op_code in OpCodes.REQ_OS_HK:
|
||||||
|
q.add_log_cmd(f"GMSS: {Info.REQ_OS_HK}")
|
||||||
|
q.add_pus_tc(
|
||||||
|
generate_one_hk_command(sid=make_sid(object_id=object_id, set_id=SetIds.HK))
|
||||||
|
)
|
||||||
|
@ -7,16 +7,16 @@ import enum
|
|||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from config.object_ids import get_object_ids
|
from config.object_ids import get_object_ids
|
||||||
from tmtccmd.utility.obj_id import ObjectId
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
from tmtccmd.config.definitions import QueueCommands, ServiceOpCodeDictT
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
|
from tmtccmd.util.obj_id import ObjectIdU32
|
||||||
from tmtccmd.tc.pus_201_fsfw_health import (
|
from tmtccmd.tc.pus_201_fsfw_health import (
|
||||||
pack_set_health_cmd_data,
|
pack_set_health_cmd_data,
|
||||||
FsfwHealth,
|
FsfwHealth,
|
||||||
Subservices,
|
Subservices,
|
||||||
)
|
)
|
||||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||||
from tmtccmd.config.globals import add_service_op_code_entry, add_op_code_entry
|
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
from spacepackets.ecss.tc import PusTelecommand
|
||||||
|
|
||||||
|
|
||||||
@ -54,37 +54,23 @@ class ActionIds(enum.IntEnum):
|
|||||||
SWITCH_HEATER = 0
|
SWITCH_HEATER = 0
|
||||||
|
|
||||||
|
|
||||||
def add_heater_cmds(cmd_dict: ServiceOpCodeDictT):
|
@tmtc_definitions_provider
|
||||||
op_code_dict = dict()
|
def add_heater_cmds(defs: TmtcDefinitionWrapper):
|
||||||
add_op_code_entry(
|
oce = OpCodeEntry()
|
||||||
op_code_dict=op_code_dict, keys=OpCodes.HEATER_CMD, info=Info.HEATER_CMD
|
oce.add(keys=OpCodes.HEATER_CMD, info=Info.HEATER_CMD)
|
||||||
)
|
oce.add(keys=OpCodes.HEATER_HEALTHY_CMD, info=Info.HEATER_HEALTHY_CMD)
|
||||||
add_op_code_entry(
|
oce.add(keys=OpCodes.HEATER_EXT_CTRL, info=Info.HEATER_EXT_CTRL)
|
||||||
op_code_dict=op_code_dict,
|
oce.add(keys=OpCodes.HEATER_FAULTY_CMD, info=Info.HEATER_FAULTY_CMD)
|
||||||
keys=OpCodes.HEATER_HEALTHY_CMD,
|
defs.add_service(
|
||||||
info=Info.HEATER_HEALTHY_CMD,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.HEATER_EXT_CTRL,
|
|
||||||
info=Info.HEATER_EXT_CTRL,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.HEATER_FAULTY_CMD,
|
|
||||||
info=Info.HEATER_FAULTY_CMD,
|
|
||||||
)
|
|
||||||
add_service_op_code_entry(
|
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.HEATER.value,
|
name=CustomServiceList.HEATER.value,
|
||||||
info="Heater Device",
|
info="Heater Device",
|
||||||
op_code_entry=op_code_dict,
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_heater_cmds(object_id: bytearray, op_code: str, tc_queue: TcQueueT):
|
def pack_heater_cmds(object_id: bytearray, op_code: str, q: DefaultPusQueueHelper):
|
||||||
if op_code in OpCodes.HEATER_CMD:
|
if op_code in OpCodes.HEATER_CMD:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Heater Switching"))
|
q.add_log_cmd("Heater Switching")
|
||||||
heater_number = prompt_heater()
|
heater_number = prompt_heater()
|
||||||
while True:
|
while True:
|
||||||
action = input("Turn switch on or off? (0 - off, 1 - on): ")
|
action = input("Turn switch on or off? (0 - off, 1 - on): ")
|
||||||
@ -101,14 +87,13 @@ def pack_heater_cmds(object_id: bytearray, op_code: str, tc_queue: TcQueueT):
|
|||||||
else:
|
else:
|
||||||
act_str = "off"
|
act_str = "off"
|
||||||
debug_string = f"Switching heater {heater_number} {act_str}"
|
debug_string = f"Switching heater {heater_number} {act_str}"
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, debug_string))
|
q.add_log_cmd(debug_string)
|
||||||
command = pack_switch_heater_command(object_id, heater_number, action)
|
q.add_pus_tc(pack_switch_heater_command(object_id, heater_number, action))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in OpCodes.HEATER_EXT_CTRL:
|
if op_code in OpCodes.HEATER_EXT_CTRL:
|
||||||
heater_number = prompt_heater()
|
heater_number = prompt_heater()
|
||||||
obj_id = heater_idx_to_obj(heater_number)
|
obj_id = heater_idx_to_obj(heater_number)
|
||||||
health_cmd(
|
health_cmd(
|
||||||
tc_queue=tc_queue,
|
q=q,
|
||||||
object_id=obj_id,
|
object_id=obj_id,
|
||||||
health=FsfwHealth.EXTERNAL_CTRL,
|
health=FsfwHealth.EXTERNAL_CTRL,
|
||||||
health_str="External Control",
|
health_str="External Control",
|
||||||
@ -118,7 +103,7 @@ def pack_heater_cmds(object_id: bytearray, op_code: str, tc_queue: TcQueueT):
|
|||||||
heater_number = prompt_heater()
|
heater_number = prompt_heater()
|
||||||
obj_id = heater_idx_to_obj(heater_number)
|
obj_id = heater_idx_to_obj(heater_number)
|
||||||
health_cmd(
|
health_cmd(
|
||||||
tc_queue=tc_queue,
|
q=q,
|
||||||
object_id=obj_id,
|
object_id=obj_id,
|
||||||
health=FsfwHealth.FAULTY,
|
health=FsfwHealth.FAULTY,
|
||||||
health_str="Faulty",
|
health_str="Faulty",
|
||||||
@ -128,7 +113,7 @@ def pack_heater_cmds(object_id: bytearray, op_code: str, tc_queue: TcQueueT):
|
|||||||
heater_number = prompt_heater()
|
heater_number = prompt_heater()
|
||||||
obj_id = heater_idx_to_obj(heater_number)
|
obj_id = heater_idx_to_obj(heater_number)
|
||||||
health_cmd(
|
health_cmd(
|
||||||
tc_queue=tc_queue,
|
q=q,
|
||||||
object_id=obj_id,
|
object_id=obj_id,
|
||||||
health=FsfwHealth.HEALTHY,
|
health=FsfwHealth.HEALTHY,
|
||||||
health_str="Healthy",
|
health_str="Healthy",
|
||||||
@ -136,7 +121,7 @@ def pack_heater_cmds(object_id: bytearray, op_code: str, tc_queue: TcQueueT):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def heater_idx_to_obj(heater: int) -> ObjectId:
|
def heater_idx_to_obj(heater: int) -> ObjectIdU32:
|
||||||
from config.object_ids import (
|
from config.object_ids import (
|
||||||
HEATER_0_OBC_BRD,
|
HEATER_0_OBC_BRD,
|
||||||
HEATER_1_PLOC_PROC_BRD,
|
HEATER_1_PLOC_PROC_BRD,
|
||||||
@ -161,7 +146,7 @@ def heater_idx_to_obj(heater: int) -> ObjectId:
|
|||||||
obj_dict = get_object_ids()
|
obj_dict = get_object_ids()
|
||||||
obj_id_obj = obj_dict.get(obj_id_array[heater])
|
obj_id_obj = obj_dict.get(obj_id_array[heater])
|
||||||
if obj_id_obj is None:
|
if obj_id_obj is None:
|
||||||
return ObjectId.from_bytes(obj_id_array[heater])
|
return ObjectIdU32.from_bytes(obj_id_array[heater])
|
||||||
return obj_id_obj
|
return obj_id_obj
|
||||||
|
|
||||||
|
|
||||||
@ -188,23 +173,19 @@ def prompt_heater() -> int:
|
|||||||
|
|
||||||
|
|
||||||
def health_cmd(
|
def health_cmd(
|
||||||
tc_queue: TcQueueT,
|
q: DefaultPusQueueHelper,
|
||||||
heater_idx: int,
|
heater_idx: int,
|
||||||
object_id: ObjectId,
|
object_id: ObjectIdU32,
|
||||||
health: FsfwHealth,
|
health: FsfwHealth,
|
||||||
health_str: str,
|
health_str: str,
|
||||||
):
|
):
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd(f"Setting Heater {heater_idx} {object_id} to {health_str}")
|
||||||
(
|
|
||||||
QueueCommands.PRINT,
|
|
||||||
f"Setting Heater {heater_idx} {object_id} to {health_str}",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
app_data = pack_set_health_cmd_data(object_id=object_id.as_bytes, health=health)
|
app_data = pack_set_health_cmd_data(object_id=object_id.as_bytes, health=health)
|
||||||
cmd = PusTelecommand(
|
q.add_pus_tc(
|
||||||
|
PusTelecommand(
|
||||||
service=201, subservice=Subservices.TC_SET_HEALTH, app_data=app_data
|
service=201, subservice=Subservices.TC_SET_HEALTH, app_data=app_data
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_switch_heater_command(
|
def pack_switch_heater_command(
|
||||||
@ -219,6 +200,6 @@ def pack_switch_heater_command(
|
|||||||
command.append(switch_nr)
|
command.append(switch_nr)
|
||||||
command.append(switch_action)
|
command.append(switch_action)
|
||||||
command.append(COMMAND_SOURCE_PARAM_EXTERNAL)
|
command.append(COMMAND_SOURCE_PARAM_EXTERNAL)
|
||||||
return generate_action_command(
|
return make_fsfw_action_cmd(
|
||||||
object_id=object_id, action_id=ActionIds.SWITCH_HEATER, app_data=command
|
object_id=object_id, action_id=ActionIds.SWITCH_HEATER, user_data=command
|
||||||
)
|
)
|
||||||
|
@ -5,16 +5,17 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 25.03.2021
|
@date 25.03.2021
|
||||||
"""
|
"""
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
import struct
|
||||||
|
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
from spacepackets.ecss.tc import PusTelecommand
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
make_sid,
|
make_sid,
|
||||||
generate_one_diag_command,
|
generate_one_diag_command,
|
||||||
generate_one_hk_command,
|
generate_one_hk_command,
|
||||||
)
|
)
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
|
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
|
||||||
|
from tmtccmd.util import ObjectIdU32
|
||||||
|
|
||||||
|
|
||||||
class ImtqSetIds:
|
class ImtqSetIds:
|
||||||
@ -38,233 +39,149 @@ class ImtqActionIds:
|
|||||||
perform_negative_y_test = bytearray([0x0, 0x0, 0x0, 0x0A])
|
perform_negative_y_test = bytearray([0x0, 0x0, 0x0, 0x0A])
|
||||||
perform_positive_z_test = bytearray([0x0, 0x0, 0x0, 0x0B])
|
perform_positive_z_test = bytearray([0x0, 0x0, 0x0, 0x0B])
|
||||||
perform_negative_z_test = bytearray([0x0, 0x0, 0x0, 0x0C])
|
perform_negative_z_test = bytearray([0x0, 0x0, 0x0, 0x0C])
|
||||||
# Initiates the reading of the last performed self test. After sending this command the results can be downlinked
|
# Initiates the reading of the last performed self test. After sending this command the results
|
||||||
# via the housekeeping service by using the appropriate set ids listed above.
|
# can be downlinked via the housekeeping service by using the appropriate set ids listed above.
|
||||||
read_self_test_results = bytearray([0x0, 0x0, 0x0, 0x0D])
|
read_self_test_results = bytearray([0x0, 0x0, 0x0, 0x0D])
|
||||||
|
|
||||||
|
|
||||||
def pack_imtq_test_into(
|
def pack_imtq_test_into(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
||||||
object_id: bytearray, tc_queue: TcQueueT, op_code: str
|
q.add_log_cmd(
|
||||||
) -> TcQueueT:
|
f"Testing ISIS IMTQ handler with object id: {object_id.as_hex_string}"
|
||||||
tc_queue.appendleft(
|
|
||||||
(
|
|
||||||
QueueCommands.PRINT,
|
|
||||||
"Testing ISIS IMTQ handler with object id: 0x" + object_id.hex(),
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if op_code == "0":
|
if op_code == "0":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Set mode off"))
|
q.add_log_cmd("IMTQ: Set mode off")
|
||||||
command = pack_mode_data(object_id, Modes.OFF, 0)
|
command = pack_mode_data(object_id.as_bytes, Modes.OFF, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=9, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "1":
|
if op_code == "1":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Set mode on"))
|
q.add_log_cmd("IMTQ: Set mode on")
|
||||||
command = pack_mode_data(object_id, Modes.ON, 0)
|
command = pack_mode_data(object_id.as_bytes, Modes.ON, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "2":
|
if op_code == "2":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Mode Normal"))
|
q.add_log_cmd("IMTQ: Mode Normal")
|
||||||
command = pack_mode_data(object_id, Modes.NORMAL, 0)
|
command = pack_mode_data(object_id.as_bytes, Modes.NORMAL, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=11, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "3":
|
if op_code == "3":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform positive x self test"))
|
q.add_log_cmd("IMTQ: Perform positive x self test")
|
||||||
command = object_id + ImtqActionIds.perform_positive_x_test
|
command = object_id.as_bytes + ImtqActionIds.perform_positive_x_test
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("IMTQ: Initiate reading of positive x self test results")
|
||||||
(
|
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||||
QueueCommands.PRINT,
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
"IMTQ: Initiate reading of positive x self test results",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
command = object_id + ImtqActionIds.read_self_test_results
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("IMTQ: Request dataset with positive x self test results")
|
||||||
(
|
sid = make_sid(object_id.as_bytes, ImtqSetIds.POSITIVE_X_TEST)
|
||||||
QueueCommands.PRINT,
|
q.add_pus_tc(generate_one_hk_command(sid))
|
||||||
"IMTQ: Request dataset with positive x self test results",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
sid = make_sid(object_id, ImtqSetIds.POSITIVE_X_TEST)
|
|
||||||
command = generate_one_hk_command(sid, 24)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code == "4":
|
if op_code == "4":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform negative x self test"))
|
q.add_log_cmd("IMTQ: Perform negative x self test")
|
||||||
command = object_id + ImtqActionIds.perform_negative_x_test
|
command = object_id.as_bytes + ImtqActionIds.perform_negative_x_test
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=25, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
q.add_log_cmd("IMTQ: Initiate reading of negative x self test results")
|
||||||
|
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||||
tc_queue.appendleft(
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
(
|
q.add_log_cmd("IMTQ: Request dataset with negative x self test results")
|
||||||
QueueCommands.PRINT,
|
sid = make_sid(object_id.as_bytes, ImtqSetIds.NEGATIVE_X_TEST)
|
||||||
"IMTQ: Initiate reading of negative x self test results",
|
q.add_pus_tc(generate_one_hk_command(sid))
|
||||||
)
|
|
||||||
)
|
|
||||||
command = object_id + ImtqActionIds.read_self_test_results
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(
|
|
||||||
QueueCommands.PRINT,
|
|
||||||
"IMTQ: Request dataset with negative x self test results",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
sid = make_sid(object_id, ImtqSetIds.NEGATIVE_X_TEST)
|
|
||||||
command = generate_one_hk_command(sid, 27)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code == "5":
|
if op_code == "5":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform positive y self test"))
|
q.add_log_cmd("IMTQ: Perform positive y self test")
|
||||||
command = object_id + ImtqActionIds.perform_positive_y_test
|
command = object_id.as_bytes + ImtqActionIds.perform_positive_y_test
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
q.add_log_cmd("IMTQ: Initiate reading of positive y self test results")
|
||||||
|
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||||
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
|
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("IMTQ: Request dataset with positive y self test results")
|
||||||
(
|
sid = make_sid(object_id.as_bytes, ImtqSetIds.POSITIVE_Y_TEST)
|
||||||
QueueCommands.PRINT,
|
q.add_pus_tc(generate_one_hk_command(sid))
|
||||||
"IMTQ: Initiate reading of positive y self test results",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
command = object_id + ImtqActionIds.read_self_test_results
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=29, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(
|
|
||||||
QueueCommands.PRINT,
|
|
||||||
"IMTQ: Request dataset with positive y self test results",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
sid = make_sid(object_id, ImtqSetIds.POSITIVE_Y_TEST)
|
|
||||||
command = generate_one_hk_command(sid, 30)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code == "6":
|
if op_code == "6":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform negative y self test"))
|
q.add_log_cmd("IMTQ: Perform negative y self test")
|
||||||
command = object_id + ImtqActionIds.perform_negative_y_test
|
command = object_id.as_bytes + ImtqActionIds.perform_negative_y_test
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("IMTQ: Initiate reading of negative y self test results")
|
||||||
(
|
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||||
QueueCommands.PRINT,
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
"IMTQ: Initiate reading of negative y self test results",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
command = object_id + ImtqActionIds.read_self_test_results
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("IMTQ: Request dataset with negative y self test results")
|
||||||
(
|
sid = make_sid(object_id.as_bytes, ImtqSetIds.NEGATIVE_Y_TEST)
|
||||||
QueueCommands.PRINT,
|
q.add_pus_tc(generate_one_hk_command(sid))
|
||||||
"IMTQ: Request dataset with negative y self test results",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
sid = make_sid(object_id, ImtqSetIds.NEGATIVE_Y_TEST)
|
|
||||||
command = generate_one_hk_command(sid, 33)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code == "7":
|
if op_code == "7":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform positive z self test"))
|
q.add_log_cmd("IMTQ: Perform positive z self test")
|
||||||
command = object_id + ImtqActionIds.perform_positive_z_test
|
command = object_id.as_bytes + ImtqActionIds.perform_positive_z_test
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=34, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("IMTQ: Initiate reading of positive z self test results")
|
||||||
(
|
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||||
QueueCommands.PRINT,
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
"IMTQ: Initiate reading of positive z self test results",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
command = object_id + ImtqActionIds.read_self_test_results
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=35, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("IMTQ: Request dataset with positive z self test results")
|
||||||
(
|
sid = make_sid(object_id.as_bytes, ImtqSetIds.POSITIVE_Y_TEST)
|
||||||
QueueCommands.PRINT,
|
q.add_pus_tc(generate_one_hk_command(sid))
|
||||||
"IMTQ: Request dataset with positive z self test results",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
sid = make_sid(object_id, ImtqSetIds.POSITIVE_Y_TEST)
|
|
||||||
command = generate_one_hk_command(sid, 36)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code == "8":
|
if op_code == "8":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Perform negative z self test"))
|
q.add_log_cmd("IMTQ: Perform negative z self test")
|
||||||
command = object_id + ImtqActionIds.perform_negative_z_test
|
command = object_id.as_bytes + ImtqActionIds.perform_negative_z_test
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=35, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
q.add_log_cmd("IMTQ: Initiate reading of negative z self test results")
|
||||||
|
command = object_id.as_bytes + ImtqActionIds.read_self_test_results
|
||||||
tc_queue.appendleft(
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
(
|
q.add_log_cmd("IMTQ: Request dataset with negative z self test results")
|
||||||
QueueCommands.PRINT,
|
sid = make_sid(object_id.as_bytes, ImtqSetIds.NEGATIVE_Z_TEST)
|
||||||
"IMTQ: Initiate reading of negative z self test results",
|
q.add_pus_tc(generate_one_hk_command(sid))
|
||||||
)
|
|
||||||
)
|
|
||||||
command = object_id + ImtqActionIds.read_self_test_results
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=36, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(
|
|
||||||
QueueCommands.PRINT,
|
|
||||||
"IMTQ: Request dataset with negative z self test results",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
sid = make_sid(object_id, ImtqSetIds.NEGATIVE_Z_TEST)
|
|
||||||
command = generate_one_hk_command(sid, 37)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code == "9":
|
if op_code == "9":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Commanding dipole"))
|
q.add_log_cmd("IMTQ: Commanding dipole")
|
||||||
x_dipole = 0
|
x_dipole = 0
|
||||||
y_dipole = 0
|
y_dipole = 0
|
||||||
z_dipole = 0
|
z_dipole = 0
|
||||||
duration = 0 # ms
|
duration = 0 # ms
|
||||||
command = pack_dipole_command(object_id, x_dipole, y_dipole, z_dipole, duration)
|
q.add_pus_tc(
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
pack_dipole_command(
|
||||||
|
object_id.as_bytes, x_dipole, y_dipole, z_dipole, duration
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
if op_code == "10":
|
if op_code == "10":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Get commanded dipole"))
|
q.add_log_cmd("IMTQ: Get commanded dipole")
|
||||||
command = object_id + ImtqActionIds.get_commanded_dipole
|
command = object_id.as_bytes + ImtqActionIds.get_commanded_dipole
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code == "11":
|
if op_code == "11":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Get engineering hk set"))
|
q.add_log_cmd("IMTQ: Get engineering hk set")
|
||||||
command = generate_one_diag_command(
|
q.add_pus_tc(
|
||||||
sid=make_sid(object_id=object_id, set_id=ImtqSetIds.ENG_HK_SET), ssc=0
|
generate_one_diag_command(
|
||||||
|
sid=make_sid(object_id=object_id.as_bytes, set_id=ImtqSetIds.ENG_HK_SET)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code == "12":
|
if op_code == "12":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Get calibrated MTM hk set"))
|
q.add_log_cmd("IMTQ: Get calibrated MTM hk set")
|
||||||
command = generate_one_diag_command(
|
q.add_pus_tc(
|
||||||
sid=make_sid(object_id=object_id, set_id=ImtqSetIds.CAL_MTM_SET), ssc=0
|
generate_one_diag_command(
|
||||||
|
sid=make_sid(
|
||||||
|
object_id=object_id.as_bytes, set_id=ImtqSetIds.CAL_MTM_SET
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code == "13":
|
if op_code == "13":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "IMTQ: Get raw MTM hk set"))
|
q.add_log_cmd("IMTQ: Get raw MTM hk set")
|
||||||
command = generate_one_diag_command(
|
q.add_pus_tc(
|
||||||
sid=make_sid(object_id=object_id, set_id=ImtqSetIds.RAW_MTM_SET), ssc=0
|
generate_one_diag_command(
|
||||||
|
sid=make_sid(
|
||||||
|
object_id=object_id.as_bytes, set_id=ImtqSetIds.RAW_MTM_SET
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
return tc_queue
|
|
||||||
|
|
||||||
|
|
||||||
def pack_dipole_command(
|
def pack_dipole_command(
|
||||||
object_id: bytearray, x_dipole: int, y_dipole: int, z_dipole: int, duration: int
|
object_id: bytes, x_dipole: int, y_dipole: int, z_dipole: int, duration: int
|
||||||
) -> PusTelecommand:
|
) -> PusTelecommand:
|
||||||
"""This function packs the command causing the ISIS IMTQ to generate a dipole.
|
"""This function packs the command causing the ISIS IMTQ to generate a dipole.
|
||||||
@param object_id The object id of the IMTQ handler.
|
@param object_id The object id of the IMTQ handler.
|
||||||
@ -276,11 +193,10 @@ def pack_dipole_command(
|
|||||||
command is sent.
|
command is sent.
|
||||||
"""
|
"""
|
||||||
action_id = ImtqActionIds.start_actuation_dipole
|
action_id = ImtqActionIds.start_actuation_dipole
|
||||||
command = bytearray()
|
|
||||||
command = object_id + action_id
|
command = object_id + action_id
|
||||||
command.extend(x_dipole.to_bytes(length=2, byteorder="big"))
|
command += struct.pack("!h", x_dipole)
|
||||||
command.extend(y_dipole.to_bytes(length=2, byteorder="big"))
|
command += struct.pack("!h", y_dipole)
|
||||||
command.extend(z_dipole.to_bytes(length=2, byteorder="big"))
|
command += struct.pack("!h", z_dipole)
|
||||||
command.extend(duration.to_bytes(length=2, byteorder="big"))
|
command += struct.pack("!h", duration)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, app_data=command)
|
||||||
return command
|
return command
|
||||||
|
@ -5,15 +5,25 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 13.12.2020
|
@date 13.12.2020
|
||||||
"""
|
"""
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
from gomspace.gomspace_common import (
|
||||||
generate_one_hk_command,
|
GsInfo,
|
||||||
make_sid,
|
GomspaceOpCodes,
|
||||||
generate_one_diag_command,
|
TableEntry,
|
||||||
|
Channel,
|
||||||
|
pack_set_param_command,
|
||||||
|
TableIds,
|
||||||
|
pack_get_param_command,
|
||||||
|
pack_gnd_wdt_reset_command,
|
||||||
|
pack_ping_command,
|
||||||
|
GomspaceDeviceActionIds,
|
||||||
|
pack_reboot_command,
|
||||||
|
SetIds,
|
||||||
)
|
)
|
||||||
from gomspace.gomspace_common import *
|
|
||||||
from config.object_ids import P60_DOCK_HANDLER
|
from config.object_ids import P60_DOCK_HANDLER
|
||||||
|
from tmtccmd.tc.pus_8_funccmd import make_fsfw_action_cmd
|
||||||
|
from tmtccmd.util import ObjectIdU32
|
||||||
|
|
||||||
|
|
||||||
class P60OpCodes:
|
class P60OpCodes:
|
||||||
@ -24,7 +34,7 @@ class P60OpCodes:
|
|||||||
TEST = ["test", "0"]
|
TEST = ["test", "0"]
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class P60Info:
|
||||||
PREFIX = "P60 Dock"
|
PREFIX = "P60 Dock"
|
||||||
STACK_3V3_ON = f"{PREFIX}: Turn Stack 3V3 on"
|
STACK_3V3_ON = f"{PREFIX}: Turn Stack 3V3 on"
|
||||||
STACK_3V3_OFF = f"{PREFIX}: Turn Stack 3V3 off"
|
STACK_3V3_OFF = f"{PREFIX}: Turn Stack 3V3 off"
|
||||||
@ -87,240 +97,193 @@ class P60DockHkTable:
|
|||||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0xA8]), TableEntry.uint32_size)
|
wdt_gnd_left = TableEntry(bytearray([0x00, 0xA8]), TableEntry.uint32_size)
|
||||||
|
|
||||||
|
|
||||||
def pack_p60dock_cmds(object_id: ObjectId, tc_queue: TcQueueT, op_code: str):
|
def pack_p60dock_cmds(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
||||||
objb = object_id.as_bytes
|
objb = object_id.as_bytes
|
||||||
if op_code in P60OpCodes.STACK_3V3_ON:
|
if op_code in P60OpCodes.STACK_3V3_ON:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, Info.STACK_3V3_ON))
|
q.add_log_cmd(P60Info.STACK_3V3_ON)
|
||||||
command = pack_set_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
P60DockConfigTable.out_en_9.parameter_address,
|
P60DockConfigTable.out_en_9.parameter_address,
|
||||||
P60DockConfigTable.out_en_9.parameter_size,
|
P60DockConfigTable.out_en_9.parameter_size,
|
||||||
Channel.on,
|
Channel.on,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if op_code in P60OpCodes.STACK_3V3_OFF:
|
if op_code in P60OpCodes.STACK_3V3_OFF:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, Info.STACK_3V3_OFF))
|
q.add_log_cmd(P60Info.STACK_3V3_OFF)
|
||||||
command = pack_set_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
P60DockConfigTable.out_en_9.parameter_address,
|
P60DockConfigTable.out_en_9.parameter_address,
|
||||||
P60DockConfigTable.out_en_9.parameter_size,
|
P60DockConfigTable.out_en_9.parameter_size,
|
||||||
Channel.off,
|
Channel.off,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if op_code in P60OpCodes.STACK_5V_ON:
|
if op_code in P60OpCodes.STACK_5V_ON:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, Info.STACK_5V_ON))
|
q.add_log_cmd(P60Info.STACK_5V_ON)
|
||||||
command = pack_set_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
P60DockConfigTable.out_en_10.parameter_address,
|
P60DockConfigTable.out_en_10.parameter_address,
|
||||||
P60DockConfigTable.out_en_10.parameter_size,
|
P60DockConfigTable.out_en_10.parameter_size,
|
||||||
Channel.on,
|
Channel.on,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if op_code in P60OpCodes.STACK_5V_OFF:
|
if op_code in P60OpCodes.STACK_5V_OFF:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, Info.STACK_5V_OFF))
|
q.add_log_cmd(P60Info.STACK_5V_OFF)
|
||||||
command = pack_set_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
P60DockConfigTable.out_en_10.parameter_address,
|
P60DockConfigTable.out_en_10.parameter_address,
|
||||||
P60DockConfigTable.out_en_10.parameter_size,
|
P60DockConfigTable.out_en_10.parameter_size,
|
||||||
Channel.off,
|
Channel.off,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("P60 Dock: Requesting HK Core HK Once")
|
||||||
(QueueCommands.PRINT, "P60 Dock: Requesting HK Core HK Once")
|
|
||||||
)
|
|
||||||
hk_sid = make_sid(object_id=P60_DOCK_HANDLER, set_id=SetIds.P60_CORE)
|
hk_sid = make_sid(object_id=P60_DOCK_HANDLER, set_id=SetIds.P60_CORE)
|
||||||
command = generate_one_hk_command(sid=hk_sid, ssc=0)
|
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("P60 Dock: Requesting HK Aux HK Once")
|
||||||
(QueueCommands.PRINT, "P60 Dock: Requesting HK Aux HK Once")
|
|
||||||
)
|
|
||||||
hk_sid = make_sid(object_id=P60_DOCK_HANDLER, set_id=SetIds.P60_AUX)
|
hk_sid = make_sid(object_id=P60_DOCK_HANDLER, set_id=SetIds.P60_AUX)
|
||||||
command = generate_one_hk_command(sid=hk_sid, ssc=0)
|
q.add_pus_tc(generate_one_hk_command(sid=hk_sid))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("P60 Dock: Print Switches, Voltages, Currents")
|
||||||
(QueueCommands.PRINT, "P60 Dock: Print Switches, Voltages, Currents")
|
q.add_pus_tc(
|
||||||
)
|
make_fsfw_action_cmd(
|
||||||
command = generate_action_command(
|
|
||||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Print Latchups"))
|
q.add_log_cmd("P60 Dock: Print Latchups")
|
||||||
command = generate_action_command(
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.reboot:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reboot"))
|
|
||||||
command = pack_reboot_command(object_id)
|
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.read_gnd_wdt:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "P60 Dock: Reading ground watchdog timer value")
|
|
||||||
)
|
)
|
||||||
command = pack_get_param_command(
|
if P60DockTestProcedure.all or P60DockTestProcedure.reboot:
|
||||||
|
q.add_log_cmd("P60 Dock: Reboot")
|
||||||
|
q.add_pus_tc(pack_reboot_command(object_id))
|
||||||
|
if P60DockTestProcedure.all or P60DockTestProcedure.read_gnd_wdt:
|
||||||
|
q.add_log_cmd("P60 Dock: Reading ground watchdog timer value")
|
||||||
|
q.add_pus_tc(
|
||||||
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.hk,
|
TableIds.hk,
|
||||||
P60DockHkTable.wdt_gnd_left.parameter_address,
|
P60DockHkTable.wdt_gnd_left.parameter_address,
|
||||||
P60DockHkTable.wdt_gnd_left.parameter_size,
|
P60DockHkTable.wdt_gnd_left.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.gnd_wdt_reset:
|
if P60DockTestProcedure.all or P60DockTestProcedure.gnd_wdt_reset:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("P60 Dock: Testing ground watchdog reset")
|
||||||
(QueueCommands.PRINT, "P60 Dock: Testing ground watchdog reset")
|
q.add_pus_tc(pack_gnd_wdt_reset_command(object_id))
|
||||||
)
|
|
||||||
command = pack_gnd_wdt_reset_command(object_id)
|
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.ping:
|
if P60DockTestProcedure.all or P60DockTestProcedure.ping:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Ping"))
|
q.add_log_cmd("P60 Dock: Ping")
|
||||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||||
command = pack_ping_command(object_id, ping_data)
|
q.add_pus_tc(pack_ping_command(object_id, ping_data))
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_off:
|
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_off:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("P60 Dock: Testing setting output channel 3 off")
|
||||||
(QueueCommands.PRINT, "P60 Dock: Testing setting output channel 3 off")
|
|
||||||
)
|
|
||||||
parameter = 0 # set channel off
|
parameter = 0 # set channel off
|
||||||
command = pack_set_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
P60DockConfigTable.out_en_3.parameter_address,
|
P60DockConfigTable.out_en_3.parameter_address,
|
||||||
P60DockConfigTable.out_en_3.parameter_size,
|
P60DockConfigTable.out_en_3.parameter_size,
|
||||||
parameter,
|
parameter,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.read_temperature1:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "P60 Dock: Testing temperature reading")
|
|
||||||
)
|
)
|
||||||
command = pack_get_param_command(
|
if P60DockTestProcedure.all or P60DockTestProcedure.read_temperature1:
|
||||||
|
q.add_log_cmd("P60 Dock: Testing temperature reading")
|
||||||
|
q.add_pus_tc(
|
||||||
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.hk,
|
TableIds.hk,
|
||||||
P60DockHkTable.temperature1.parameter_address,
|
P60DockHkTable.temperature1.parameter_address,
|
||||||
P60DockHkTable.temperature1.parameter_size,
|
P60DockHkTable.temperature1.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_on:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "P60 Dock: Testing Output Channel 3 state (PDU2)")
|
|
||||||
)
|
)
|
||||||
command = pack_get_param_command(
|
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_on:
|
||||||
|
q.add_log_cmd("P60 Dock: Testing Output Channel 3 state (PDU2)")
|
||||||
|
q.add_pus_tc(
|
||||||
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.config,
|
TableIds.config,
|
||||||
P60DockConfigTable.out_en_3.parameter_address,
|
P60DockConfigTable.out_en_3.parameter_address,
|
||||||
P60DockConfigTable.out_en_3.parameter_size,
|
P60DockConfigTable.out_en_3.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=25, app_data=command)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.read_cur_lu_lim_0:
|
if P60DockTestProcedure.all or P60DockTestProcedure.read_cur_lu_lim_0:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("P60 Dock: Reading current limit value of output channel 0")
|
||||||
(
|
q.add_pus_tc(
|
||||||
QueueCommands.PRINT,
|
pack_get_param_command(
|
||||||
"P60 Dock: Reading current limit value of output channel 0",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
command = pack_get_param_command(
|
|
||||||
objb,
|
objb,
|
||||||
TableIds.config,
|
TableIds.config,
|
||||||
P60DockConfigTable.cur_lu_lim_0.parameter_address,
|
P60DockConfigTable.cur_lu_lim_0.parameter_address,
|
||||||
P60DockConfigTable.cur_lu_lim_0.parameter_size,
|
P60DockConfigTable.cur_lu_lim_0.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_on:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "P60 Dock: Testing setting output channel 3 on")
|
|
||||||
)
|
)
|
||||||
|
if P60DockTestProcedure.all or P60DockTestProcedure.channel_3_on:
|
||||||
|
q.add_log_cmd("P60 Dock: Testing setting output channel 3 on")
|
||||||
parameter = 1 # set channel on
|
parameter = 1 # set channel on
|
||||||
command = pack_set_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
P60DockConfigTable.out_en_3.parameter_address,
|
P60DockConfigTable.out_en_3.parameter_address,
|
||||||
P60DockConfigTable.out_en_3.parameter_size,
|
P60DockConfigTable.out_en_3.parameter_size,
|
||||||
parameter,
|
parameter,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_table_id_test:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "P60 Dock: Testing invalid table id handling")
|
|
||||||
)
|
)
|
||||||
|
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_table_id_test:
|
||||||
|
q.add_log_cmd("P60 Dock: Testing invalid table id handling")
|
||||||
table_id_invalid = 5
|
table_id_invalid = 5
|
||||||
command = pack_get_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
table_id_invalid,
|
table_id_invalid,
|
||||||
P60DockHkTable.temperature1.parameter_address,
|
P60DockHkTable.temperature1.parameter_address,
|
||||||
P60DockHkTable.temperature1.parameter_size,
|
P60DockHkTable.temperature1.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_address_test:
|
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_address_test:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("P60 Dock: Testing invalid address handling in get param command")
|
||||||
(
|
|
||||||
QueueCommands.PRINT,
|
|
||||||
"P60 Dock: Testing invalid address handling in get param command",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
invalid_address = bytearray([0x01, 0xF4])
|
invalid_address = bytearray([0x01, 0xF4])
|
||||||
command = pack_get_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.hk,
|
TableIds.hk,
|
||||||
invalid_address,
|
invalid_address,
|
||||||
P60DockHkTable.temperature1.parameter_size,
|
P60DockHkTable.temperature1.parameter_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=29, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(
|
|
||||||
QueueCommands.PRINT,
|
|
||||||
"P60 Dock: Testing invalid address handling in set param command",
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
q.add_log_cmd("P60 Dock: Testing invalid address handling in set param command")
|
||||||
invalid_address = bytearray([0x01, 0xF4])
|
invalid_address = bytearray([0x01, 0xF4])
|
||||||
parameter_size = 2
|
parameter_size = 2
|
||||||
parameter = 1
|
parameter = 1
|
||||||
command = pack_set_param_command(
|
q.add_pus_tc(
|
||||||
objb, invalid_address, parameter_size, parameter
|
pack_set_param_command(objb, invalid_address, parameter_size, parameter)
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_parameter_size_test:
|
if P60DockTestProcedure.all or P60DockTestProcedure.invalid_parameter_size_test:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd(
|
||||||
(
|
"P60 Dock: Testing handling of invalid parameter sizes in get-param command"
|
||||||
QueueCommands.PRINT,
|
|
||||||
"P60 Dock: Testing handling of invalid parameter sizes in get-param command",
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
invalid_size = 5
|
invalid_size = 5
|
||||||
command = pack_get_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.hk,
|
TableIds.hk,
|
||||||
P60DockHkTable.temperature1.parameter_address,
|
P60DockHkTable.temperature1.parameter_address,
|
||||||
invalid_size,
|
invalid_size,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(
|
|
||||||
QueueCommands.PRINT,
|
|
||||||
"P60 Dock: Testing handling of invalid parameter size in set-param command",
|
|
||||||
)
|
)
|
||||||
|
q.add_log_cmd(
|
||||||
|
"P60 Dock: Testing handling of invalid parameter size in set-param command"
|
||||||
)
|
)
|
||||||
parameter = 1
|
parameter = 1
|
||||||
command = pack_set_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
P60DockConfigTable.out_en_3.parameter_address,
|
P60DockConfigTable.out_en_3.parameter_address,
|
||||||
invalid_size,
|
invalid_size,
|
||||||
parameter,
|
parameter,
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
return tc_queue
|
|
||||||
|
@ -1,297 +0,0 @@
|
|||||||
from config.definitions import CustomServiceList
|
|
||||||
from tmtccmd.config import (
|
|
||||||
ServiceOpCodeDictT,
|
|
||||||
add_op_code_entry,
|
|
||||||
add_service_op_code_entry,
|
|
||||||
OpCodeDictKeys,
|
|
||||||
)
|
|
||||||
|
|
||||||
from pus_tc.devs.p60dock import P60OpCodes, GomspaceOpCodes, Info
|
|
||||||
from pus_tc.devs.pdu1 import Pdu1OpCodes
|
|
||||||
from pus_tc.devs.pdu2 import Pdu2OpCodes
|
|
||||||
from pus_tc.devs.acu import add_acu_cmds
|
|
||||||
from gomspace.gomspace_common import Info as GsInfo
|
|
||||||
|
|
||||||
|
|
||||||
def add_p60_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
op_code_dict = dict()
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=P60OpCodes.STACK_3V3_ON,
|
|
||||||
info=Info.STACK_3V3_ON,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=P60OpCodes.STACK_3V3_OFF,
|
|
||||||
info=Info.STACK_3V3_OFF,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=P60OpCodes.STACK_5V_ON,
|
|
||||||
info=Info.STACK_5V_ON,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=P60OpCodes.STACK_5V_OFF,
|
|
||||||
info=Info.STACK_5V_OFF,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
|
||||||
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
|
||||||
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
|
||||||
info="P60 Dock: Print Switches, Voltages, Currents",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.PRINT_LATCHUPS,
|
|
||||||
info="P60 Dock: Print Latchups",
|
|
||||||
)
|
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, keys=P60OpCodes.TEST, info="P60 Tests")
|
|
||||||
add_service_op_code_entry(
|
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.P60DOCK.value,
|
|
||||||
info="P60 Device",
|
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def add_pdu1_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
op_code_dict = dict()
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.TCS_BOARD_OFF.value,
|
|
||||||
info="PDU1: Turn TCS board off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.STAR_TRACKER_ON.value,
|
|
||||||
info="PDU1: Turn star tracker on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.STAR_TRACKER_OFF.value,
|
|
||||||
info="PDU1: Turn star tracker off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.SUS_NOMINAL_ON.value,
|
|
||||||
info="PDU1: Turn SUS nominal on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.SUS_NOMINAL_OFF.value,
|
|
||||||
info="PDU1: Turn SUS nominal off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.ACS_A_SIDE_ON.value,
|
|
||||||
info="PDU1: Turn ACS A side on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.ACS_A_SIDE_OFF.value,
|
|
||||||
info="PDU1: Turn ACS A side off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.SYRLINKS_ON.value,
|
|
||||||
info="PDU1: Turn Syrlinks on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.SYRLINKS_OFF.value,
|
|
||||||
info="PDU1: Turn Syrlinks off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.MGT_ON.value,
|
|
||||||
info="PDU1: Turn MGT on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.MGT_OFF.value,
|
|
||||||
info="PDU1: Turn MGT off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.PLOC_ON.value,
|
|
||||||
info="PDU1: Turn PLOC on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.PLOC_OFF.value,
|
|
||||||
info="PDU1: Turn PLOC off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.SCEX_ON.value,
|
|
||||||
info="PDU1: Turn Solar Cell Experiment on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.SCEX_OFF.value,
|
|
||||||
info="PDU1: Turn Solar Cell Experiment off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
|
||||||
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
|
||||||
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
|
||||||
info="PDU1: Print Switches, Voltages, Currents",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu1OpCodes.TCS_BOARD_ON.value,
|
|
||||||
info="PDU1: Turn TCS board on",
|
|
||||||
)
|
|
||||||
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.PRINT_LATCHUPS,
|
|
||||||
info="PDU1: Print Latchups",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict, keys=Pdu1OpCodes.TESTS.value, info="PDU1 Tests"
|
|
||||||
)
|
|
||||||
add_service_op_code_entry(
|
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.PDU1.value,
|
|
||||||
info="PDU1 Device",
|
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def add_pdu2_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
op_code_dict = dict()
|
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, keys="0", info="PDU2 Tests")
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.ACS_SIDE_B_ON.value,
|
|
||||||
info="PDU2: Turn ACS Side B on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.ACS_SIDE_B_OFF.value,
|
|
||||||
info="PDU2: Turn ACS Side B off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.SUS_REDUNDANT_ON.value,
|
|
||||||
info="PDU2: Turn SUS redundant on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.SUS_REDUNDANT_OFF.value,
|
|
||||||
info="PDU2: Turn SUS redundant off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.RW_ON.value,
|
|
||||||
info="PDU2: Turn reaction wheels on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.RW_OFF.value,
|
|
||||||
info="PDU2: Turn reaction wheels off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_NOM_ON.value,
|
|
||||||
info="PDU2: PL PCDU Switch Channel Nominal (1) on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_NOM_OFF.value,
|
|
||||||
info="PDU2: PL PCDU Switch Channel Nominal (1) off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_RED_ON.value,
|
|
||||||
info="PDU2: PL PCDU Switch Channel Redundant (1) on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.PL_PCDU_VBAT_RED_OFF.value,
|
|
||||||
info="PDU2: PL PCDU Switch Channel Redundant (1) off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.TCS_HEATER_IN_ON.value,
|
|
||||||
info="PDU2: Switch TCS Heater Input on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.TCS_HEATER_IN_OFF.value,
|
|
||||||
info="PDU2: Switch TCS Heater Input off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.SOLAR_ARRAY_DEPL_ON.value,
|
|
||||||
info="PDU2: Switch Solar Array Deployment On",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.SOLAR_ARRAY_DEPL_OFF.value,
|
|
||||||
info="PDU2: Switch Solar Array Deployment Off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.PL_CAMERA_ON.value,
|
|
||||||
info="PDU2: Turn payload camera on",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=Pdu2OpCodes.PL_CAMERA_OFF.value,
|
|
||||||
info="PDU2: Turn payload camera off",
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
|
||||||
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
|
||||||
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
|
||||||
info="PDU2: Print Switches, Voltages, Currents",
|
|
||||||
options={OpCodeDictKeys.TIMEOUT: 2.0},
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=GomspaceOpCodes.PRINT_LATCHUPS,
|
|
||||||
info="PDU2: Print Latchups",
|
|
||||||
)
|
|
||||||
add_service_op_code_entry(
|
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name="pdu2",
|
|
||||||
info="PDU2 Device",
|
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def add_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
|
||||||
add_p60_cmds(cmd_dict)
|
|
||||||
add_pdu1_cmds(cmd_dict)
|
|
||||||
add_pdu2_cmds(cmd_dict)
|
|
||||||
add_acu_cmds(cmd_dict)
|
|
@ -5,9 +5,8 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 22.11.2021
|
@date 22.11.2021
|
||||||
"""
|
"""
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
from spacepackets.ecss.tc import PusTelecommand
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
|
|
||||||
|
|
||||||
class CommandIds:
|
class CommandIds:
|
||||||
@ -17,24 +16,15 @@ class CommandIds:
|
|||||||
PRINT_PDEC_MON = bytearray([0x0, 0x0, 0x0, 0x1])
|
PRINT_PDEC_MON = bytearray([0x0, 0x0, 0x0, 0x1])
|
||||||
|
|
||||||
|
|
||||||
def pack_pdec_handler_test(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
def pack_pdec_handler_test(
|
||||||
tc_queue.appendleft(
|
object_id: bytearray, q: DefaultPusQueueHelper, op_code: str
|
||||||
(
|
):
|
||||||
QueueCommands.PRINT,
|
q.add_log_cmd(f"Testing PDEC handler with object id: {object_id.hex()}")
|
||||||
"Testing PDEC handler with object id: 0x" + object_id.hex(),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if op_code == "0":
|
if op_code == "0":
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDEC Handler: Print CLCW"))
|
q.add_log_cmd("PDEC Handler: Print CLCW")
|
||||||
command = object_id + CommandIds.PRINT_CLCW
|
command = object_id + CommandIds.PRINT_CLCW
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code == "1":
|
if op_code == "1":
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("PDEC Handler: Print PDEC monitor register")
|
||||||
(QueueCommands.PRINT, "PDEC Handler: Print PDEC monitor register")
|
|
||||||
)
|
|
||||||
command = object_id + CommandIds.PRINT_PDEC_MON
|
command = object_id + CommandIds.PRINT_PDEC_MON
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""PDU2 is mounted on the X2 slot of the P60 dock
|
"""PDU1 is mounted on the X2 slot of the P60 dock
|
||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 17.12.2020
|
@date 17.12.2020
|
||||||
"""
|
"""
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
import gomspace.gomspace_common as gs
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
from pus_tc.devs.common_power import pdu1_cmds, pdu1_req_hk_cmds
|
||||||
|
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
generate_one_hk_command,
|
generate_one_hk_command,
|
||||||
make_sid,
|
make_sid,
|
||||||
@ -15,28 +17,6 @@ from gomspace.gomspace_pdu_definitions import *
|
|||||||
from config.object_ids import PDU_1_HANDLER_ID
|
from config.object_ids import PDU_1_HANDLER_ID
|
||||||
|
|
||||||
|
|
||||||
class Pdu1OpCodes(enum.Enum):
|
|
||||||
TCS_BOARD_ON = "0"
|
|
||||||
TCS_BOARD_OFF = "1"
|
|
||||||
STAR_TRACKER_ON = "2"
|
|
||||||
STAR_TRACKER_OFF = "3"
|
|
||||||
SUS_NOMINAL_ON = "4"
|
|
||||||
SUS_NOMINAL_OFF = "5"
|
|
||||||
ACS_A_SIDE_ON = "6"
|
|
||||||
ACS_A_SIDE_OFF = "7"
|
|
||||||
SYRLINKS_ON = "8"
|
|
||||||
SYRLINKS_OFF = "9"
|
|
||||||
MGT_ON = "10"
|
|
||||||
MGT_OFF = "11"
|
|
||||||
# Solar Cell Experiment
|
|
||||||
SCEX_ON = "12"
|
|
||||||
SCEX_OFF = "13"
|
|
||||||
PLOC_ON = "14"
|
|
||||||
PLOC_OFF = "15"
|
|
||||||
|
|
||||||
TESTS = "32"
|
|
||||||
|
|
||||||
|
|
||||||
class PDU1TestProcedure:
|
class PDU1TestProcedure:
|
||||||
"""
|
"""
|
||||||
@brief Use this class to define the tests to perform for the PDU2.
|
@brief Use this class to define the tests to perform for the PDU2.
|
||||||
@ -54,241 +34,82 @@ class PDU1TestProcedure:
|
|||||||
turn_channel_3_off = False
|
turn_channel_3_off = False
|
||||||
|
|
||||||
|
|
||||||
def pack_pdu1_commands(object_id: ObjectId, tc_queue: TcQueueT, op_code: str):
|
def pack_pdu1_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Commanding PDU1"))
|
q.add_log_cmd("Commanding PDU1")
|
||||||
objb = object_id.as_bytes
|
objb = object_id.as_bytes
|
||||||
if op_code == Pdu1OpCodes.TCS_BOARD_ON.value:
|
pdu1_cmds(q, op_code)
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn TCS board on"))
|
pdu1_req_hk_cmds(q, op_code)
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_0.parameter_address,
|
|
||||||
PDUConfigTable.out_en_0.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(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_0.parameter_address,
|
|
||||||
PDUConfigTable.out_en_0.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(
|
|
||||||
objb,
|
|
||||||
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.STAR_TRACKER_OFF.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn star tracker off"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
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_ON.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
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(
|
|
||||||
objb,
|
|
||||||
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(
|
|
||||||
objb,
|
|
||||||
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(
|
|
||||||
objb,
|
|
||||||
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_OFF.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal off"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
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.SCEX_ON.value:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PDU1: Turn Solar Cell Experiment on")
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_5.parameter_address,
|
|
||||||
PDUConfigTable.out_en_5.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu1OpCodes.SCEX_OFF.value:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PDU1: Turn Solar Cell Experiment off")
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_5.parameter_address,
|
|
||||||
PDUConfigTable.out_en_5.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu1OpCodes.SYRLINKS_ON.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Syrlinks on"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_1.parameter_address,
|
|
||||||
PDUConfigTable.out_en_1.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu1OpCodes.SYRLINKS_OFF.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn Syrlinks off"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_1.parameter_address,
|
|
||||||
PDUConfigTable.out_en_1.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu1OpCodes.MGT_ON.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn MGT on"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu1OpCodes.MGT_OFF.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn MGT off"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu1OpCodes.PLOC_ON.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn PLOC on"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_6.parameter_address,
|
|
||||||
PDUConfigTable.out_en_6.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu1OpCodes.PLOC_OFF.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn PLOC off"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_6.parameter_address,
|
|
||||||
PDUConfigTable.out_en_6.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"PDU1: {Info.REQUEST_CORE_HK_ONCE}"))
|
|
||||||
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1_CORE)
|
|
||||||
command = generate_one_diag_command(sid=hk_sid, ssc=0)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"PDU1: {Info.REQUEST_AUX_HK_ONCE}"))
|
|
||||||
hk_sid = make_sid(object_id=PDU_1_HANDLER_ID, set_id=SetIds.PDU_1_AUX)
|
|
||||||
command = generate_one_hk_command(sid=hk_sid, ssc=0)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("PDU1: Print Switches, Voltages, Currents")
|
||||||
(QueueCommands.PRINT, "PDU1: Print Switches, Voltages, Currents")
|
q.add_pus_tc(
|
||||||
)
|
make_fsfw_action_cmd(
|
||||||
command = generate_action_command(
|
|
||||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Print Latchups"))
|
q.add_log_cmd("PDU1: Print Latchups")
|
||||||
command = generate_action_command(
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
|
if op_code in GomspaceOpCodes.SET_PARAM:
|
||||||
|
q.add_log_cmd(f"PDU1: {GsInfo.SET_PARAMETER}")
|
||||||
|
prompt_and_pack_set_param_command(q, object_id)
|
||||||
|
if op_code in GomspaceOpCodes.GET_PARAM:
|
||||||
|
q.add_log_cmd(f"PDU1: {GsInfo.GET_PARAMETER}")
|
||||||
|
gs.prompt_and_pack_get_param_command(q, object_id)
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
|
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))
|
q.add_log_cmd("PDU1: Ping Test")
|
||||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||||
command = pack_ping_command(object_id, ping_data)
|
q.add_pus_tc(pack_ping_command(object_id, ping_data))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.read_temperature:
|
if PDU1TestProcedure.all or PDU1TestProcedure.read_temperature:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Testing temperature reading"))
|
q.add_log_cmd("PDU1: Testing temperature reading")
|
||||||
command = pack_get_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.hk,
|
TableIds.hk,
|
||||||
PDUHkTable.temperature.parameter_address,
|
PduHkTable.temperature.parameter_address,
|
||||||
PDUHkTable.temperature.parameter_size,
|
PduHkTable.temperature.parameter_size,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_on:
|
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_on:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("PDU1: Turn channel 2 on (Star Tracker)")
|
||||||
(QueueCommands.PRINT, "PDU1: Turn channel 2 on (Star Tracker)")
|
q.add_pus_tc(
|
||||||
)
|
pack_set_param_command(
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
PduConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
PduConfigTable.out_en_2.parameter_size,
|
||||||
Channel.on,
|
Channel.on,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_off:
|
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_2_off:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("PDU1: Turn channel 2 off (Star Tracker)")
|
||||||
(QueueCommands.PRINT, "PDU1: Turn channel 2 off (Star Tracker)")
|
q.add_pus_tc(
|
||||||
)
|
pack_set_param_command(
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
PduConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
PduConfigTable.out_en_2.parameter_size,
|
||||||
Channel.off,
|
Channel.off,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_on:
|
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_on:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 3 on (MTQ)"))
|
q.add_log_cmd("PDU1: Turn channel 3 on (MTQ)")
|
||||||
command = pack_set_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
PduConfigTable.out_en_3.parameter_address,
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
PduConfigTable.out_en_3.parameter_size,
|
||||||
Channel.on,
|
Channel.on,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_off:
|
if PDU1TestProcedure.all or PDU1TestProcedure.turn_channel_3_off:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn channel 3 off (MTQ)"))
|
q.add_log_cmd("PDU1: Turn channel 3 off (MTQ)")
|
||||||
command = pack_set_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_set_param_command(
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
PduConfigTable.out_en_3.parameter_address,
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
PduConfigTable.out_en_3.parameter_size,
|
||||||
Channel.off,
|
Channel.off,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
|
@ -6,37 +6,9 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 17.12.2020
|
@date 17.12.2020
|
||||||
"""
|
"""
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
from pus_tc.devs.common_power import pdu2_cmds, pdu2_req_hk_cmds
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
|
||||||
generate_one_hk_command,
|
|
||||||
generate_one_diag_command,
|
|
||||||
make_sid,
|
|
||||||
)
|
|
||||||
from gomspace.gomspace_common import *
|
from gomspace.gomspace_common import *
|
||||||
from gomspace.gomspace_pdu_definitions import *
|
from gomspace.gomspace_pdu_definitions import *
|
||||||
from config.object_ids import PDU_2_HANDLER_ID
|
|
||||||
|
|
||||||
|
|
||||||
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"
|
|
||||||
PL_PCDU_VBAT_NOM_ON = "7"
|
|
||||||
PL_PCDU_VBAT_NOM_OFF = "8"
|
|
||||||
PL_PCDU_VBAT_RED_ON = "9"
|
|
||||||
PL_PCDU_VBAT_RED_OFF = "10"
|
|
||||||
TCS_HEATER_IN_ON = "11"
|
|
||||||
TCS_HEATER_IN_OFF = "12"
|
|
||||||
SOLAR_ARRAY_DEPL_ON = "13"
|
|
||||||
SOLAR_ARRAY_DEPL_OFF = "14"
|
|
||||||
PL_CAMERA_ON = "15"
|
|
||||||
PL_CAMERA_OFF = "16"
|
|
||||||
# There is not really a point of the on command, the SW can not be commanded if the OBC is off
|
|
||||||
Q7S_OFF = "32"
|
|
||||||
|
|
||||||
|
|
||||||
class PDU2TestProcedure:
|
class PDU2TestProcedure:
|
||||||
@ -66,288 +38,101 @@ class PDU2TestProcedure:
|
|||||||
request_hk_table = False
|
request_hk_table = False
|
||||||
|
|
||||||
|
|
||||||
def pack_pdu2_commands(object_id: ObjectId, tc_queue: TcQueueT, op_code: str):
|
def pack_pdu2_commands(object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str):
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing PDU2"))
|
q.add_log_cmd("Testing PDU2")
|
||||||
objb = object_id.as_bytes
|
objb = object_id.as_bytes
|
||||||
if op_code == Pdu2OpCodes.ACS_SIDE_B_ON.value:
|
pdu2_cmds(q, op_code)
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn ACS Side B on"))
|
pdu2_req_hk_cmds(q, op_code)
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
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(
|
|
||||||
objb,
|
|
||||||
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.Q7S_OFF.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "Turning off Q7S OBC"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_0.parameter_address,
|
|
||||||
PDUConfigTable.out_en_0.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.SUS_REDUNDANT_ON.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn SUS redundant on"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
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(
|
|
||||||
objb,
|
|
||||||
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(
|
|
||||||
objb,
|
|
||||||
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(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_NOM_ON.value:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PDU2: Turn PDU2 PL PCDU Channel 1 on")
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_1.parameter_address,
|
|
||||||
PDUConfigTable.out_en_1.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_NOM_OFF.value:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PDU2: Turn PDU2 PL PCDU Channel 1 off")
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_1.parameter_address,
|
|
||||||
PDUConfigTable.out_en_1.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_RED_ON.value:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PDU2: Turn PDU2 PL PCDU Channel 6 on")
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_6.parameter_address,
|
|
||||||
PDUConfigTable.out_en_6.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.PL_PCDU_VBAT_RED_OFF.value:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PDU2: Turn PDU2 PL PCDU Channel 6 off")
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_6.parameter_address,
|
|
||||||
PDUConfigTable.out_en_6.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.TCS_HEATER_IN_ON.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn TCS Heater Input on"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.TCS_HEATER_IN_OFF.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn TCS Heater Input off"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_3.parameter_address,
|
|
||||||
PDUConfigTable.out_en_3.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.SOLAR_ARRAY_DEPL_ON.value:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PDU2: Turn Solar Array Deployment On")
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_5.parameter_address,
|
|
||||||
PDUConfigTable.out_en_5.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.SOLAR_ARRAY_DEPL_OFF.value:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PDU2: Turn Solar Array Deployment Off")
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_5.parameter_address,
|
|
||||||
PDUConfigTable.out_en_5.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.PL_CAMERA_ON.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn payload camera on"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_8.parameter_address,
|
|
||||||
PDUConfigTable.out_en_8.parameter_size,
|
|
||||||
Channel.on,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == Pdu2OpCodes.PL_CAMERA_OFF.value:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn payload camera off"))
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
|
||||||
PDUConfigTable.out_en_8.parameter_address,
|
|
||||||
PDUConfigTable.out_en_8.parameter_size,
|
|
||||||
Channel.off,
|
|
||||||
)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in GomspaceOpCodes.REQUEST_CORE_HK_ONCE:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"PDU2: {Info.REQUEST_CORE_HK_ONCE}"))
|
|
||||||
hk_sid = make_sid(object_id=PDU_2_HANDLER_ID, set_id=SetIds.PDU_2_CORE)
|
|
||||||
command = generate_one_diag_command(sid=hk_sid, ssc=0)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in GomspaceOpCodes.REQUEST_AUX_HK_ONCE:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"PDU2: {Info.REQUEST_AUX_HK_ONCE}"))
|
|
||||||
hk_sid = make_sid(object_id=PDU_2_HANDLER_ID, set_id=SetIds.PDU_2_AUX)
|
|
||||||
command = generate_one_hk_command(sid=hk_sid, ssc=0)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd(f"PDU2: {GsInfo.PRINT_SWITCH_V_I}")
|
||||||
(QueueCommands.PRINT, "PDU2: Print Switches, Currents, Voltahes")
|
q.add_pus_tc(
|
||||||
)
|
make_fsfw_action_cmd(
|
||||||
command = generate_action_command(
|
|
||||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
if op_code in GomspaceOpCodes.PRINT_LATCHUPS:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Latchups"))
|
q.add_log_cmd("PDU2: Print Latchups")
|
||||||
command = generate_action_command(
|
q.add_pus_tc(
|
||||||
|
make_fsfw_action_cmd(
|
||||||
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
object_id=objb, action_id=GomspaceDeviceActionIds.PRINT_LATCHUPS
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.reboot:
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Reboot"))
|
|
||||||
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(
|
if op_code in GomspaceOpCodes.SET_PARAM:
|
||||||
|
q.add_log_cmd(f"PDU2: {GsInfo.SET_PARAMETER}")
|
||||||
|
prompt_and_pack_set_param_command(q, object_id)
|
||||||
|
if op_code in GomspaceOpCodes.GET_PARAM:
|
||||||
|
q.add_log_cmd(f"PDU2: {GsInfo.GET_PARAMETER}")
|
||||||
|
prompt_and_pack_get_param_command(q, object_id)
|
||||||
|
if PDU2TestProcedure.all or PDU2TestProcedure.reboot:
|
||||||
|
q.add_log_cmd("PDU2: Reboot")
|
||||||
|
q.add_pus_tc(pack_reboot_command(object_id))
|
||||||
|
if PDU2TestProcedure.all or PDU2TestProcedure.read_gnd_wdt:
|
||||||
|
q.add_log_cmd("PDU2: Reading ground watchdog timer value")
|
||||||
|
q.add_pus_tc(
|
||||||
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.hk,
|
TableIds.hk,
|
||||||
PDUHkTable.wdt_gnd_left.parameter_address,
|
PduHkTable.wdt_gnd_left.parameter_address,
|
||||||
PDUHkTable.wdt_gnd_left.parameter_size,
|
PduHkTable.wdt_gnd_left.parameter_size,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.gnd_wdt_reset:
|
if PDU2TestProcedure.all or PDU2TestProcedure.gnd_wdt_reset:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("PDU2: Testing ground watchdog reset")
|
||||||
(QueueCommands.PRINT, "PDU2: Testing ground watchdog reset")
|
q.add_pus_tc(pack_gnd_wdt_reset_command(object_id))
|
||||||
)
|
|
||||||
command = pack_gnd_wdt_reset_command(object_id)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.ping:
|
if PDU2TestProcedure.all or PDU2TestProcedure.ping:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Ping Test"))
|
q.add_log_cmd("PDU2: Ping Test")
|
||||||
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
ping_data = bytearray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
|
||||||
command = pack_ping_command(object_id, ping_data)
|
q.add_pus_tc(pack_ping_command(object_id, ping_data))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.channel_2_on:
|
if PDU2TestProcedure.all or PDU2TestProcedure.channel_2_on:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("PDU2: Testing setting output channel 2 on (TCS Heater)")
|
||||||
(
|
q.add_pus_tc(
|
||||||
QueueCommands.PRINT,
|
pack_set_param_command(
|
||||||
"PDU2: Testing setting output channel 2 on (TCS Heater)",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
PduConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
PduConfigTable.out_en_2.parameter_size,
|
||||||
Channel.on,
|
Channel.on,
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
)
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.read_temperature:
|
if PDU2TestProcedure.all or PDU2TestProcedure.read_temperature:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Testing temperature reading"))
|
q.add_log_cmd("PDU2: Testing temperature reading")
|
||||||
command = pack_get_param_command(
|
q.add_pus_tc(
|
||||||
|
pack_get_param_command(
|
||||||
objb,
|
objb,
|
||||||
TableIds.hk,
|
TableIds.hk,
|
||||||
PDUHkTable.temperature.parameter_address,
|
PduHkTable.temperature.parameter_address,
|
||||||
PDUHkTable.temperature.parameter_size,
|
PduHkTable.temperature.parameter_size,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.read_channel_2_state:
|
if PDU2TestProcedure.all or PDU2TestProcedure.read_channel_2_state:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("PDU2: Reading output channel 2 state (TCS Heater)")
|
||||||
(QueueCommands.PRINT, "PDU2: Reading output channel 2 state (TCS Heater)")
|
q.add_pus_tc(
|
||||||
)
|
pack_get_param_command(
|
||||||
command = pack_get_param_command(
|
|
||||||
objb,
|
objb,
|
||||||
TableIds.config,
|
TableIds.config,
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
PduConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
PduConfigTable.out_en_2.parameter_size,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.read_cur_lu_lim_0:
|
if PDU2TestProcedure.all or PDU2TestProcedure.read_cur_lu_lim_0:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("PDU2: Reading current limit value of output channel 0 (OBC)")
|
||||||
(
|
q.add_pus_tc(
|
||||||
QueueCommands.PRINT,
|
pack_get_param_command(
|
||||||
"PDU2: Reading current limit value of output channel 0 (OBC)",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
command = pack_get_param_command(
|
|
||||||
objb,
|
objb,
|
||||||
TableIds.config,
|
TableIds.config,
|
||||||
PDUConfigTable.cur_lu_lim_0.parameter_address,
|
PduConfigTable.cur_lu_lim_0.parameter_address,
|
||||||
PDUConfigTable.cur_lu_lim_0.parameter_size,
|
PduConfigTable.cur_lu_lim_0.parameter_size,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if PDU2TestProcedure.all or PDU2TestProcedure.channel_2_off:
|
if PDU2TestProcedure.all or PDU2TestProcedure.channel_2_off:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd("PDU2: Testing setting output channel 2 off")
|
||||||
(QueueCommands.PRINT, "PDU2: Testing setting output channel 2 off")
|
q.add_pus_tc(
|
||||||
)
|
pack_set_param_command(
|
||||||
command = pack_set_param_command(
|
|
||||||
objb,
|
objb,
|
||||||
PDUConfigTable.out_en_2.parameter_address,
|
PduConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size,
|
PduConfigTable.out_en_2.parameter_size,
|
||||||
Channel.off,
|
Channel.off,
|
||||||
)
|
)
|
||||||
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(object_id)
|
if PDU2TestProcedure.all or PDU2TestProcedure.request_hk_table:
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
q.add_log_cmd("PDU2: Requesting housekeeping table")
|
||||||
|
q.add_pus_tc(pack_request_full_hk_table_command(object_id))
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
# -*- 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):
|
|
||||||
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
|
|
@ -1,316 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
@file ploc_mpsoc.py
|
|
||||||
@brief Tests for commanding the MPSoC of the PLOC.
|
|
||||||
The MPSoC is programmed by the ILH.
|
|
||||||
@author J. Meier
|
|
||||||
@date 06.03.2021
|
|
||||||
"""
|
|
||||||
import struct
|
|
||||||
import enum
|
|
||||||
|
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
|
||||||
from tmtccmd.logging import get_console_logger
|
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
|
||||||
from utility.input_helper import InputHelper
|
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
|
|
||||||
|
|
||||||
LOGGER = get_console_logger()
|
|
||||||
|
|
||||||
MANUAL_INPUT = "1"
|
|
||||||
|
|
||||||
flash_write_file_dict = {
|
|
||||||
MANUAL_INPUT: ["manual input", ""],
|
|
||||||
"2": ["/mnt/sd0/ploc/mpsoc/flash_write.bin", "/mnt/sd0/ploc/mpsoc/flash_write.bin"],
|
|
||||||
}
|
|
||||||
|
|
||||||
mpsoc_file_dict = {
|
|
||||||
MANUAL_INPUT: ["manual input", ""],
|
|
||||||
"2": ["0:/flash", "0:/flash"],
|
|
||||||
}
|
|
||||||
|
|
||||||
sequence_file_dict = {
|
|
||||||
MANUAL_INPUT: ["manual input", ""],
|
|
||||||
"2": ["0:/EM16/231", "0:/EM16/231"],
|
|
||||||
"3": ["0:/EQ04/E-75", "0:/EQ04/E-75"],
|
|
||||||
}
|
|
||||||
|
|
||||||
CARRIAGE_RETURN = 0xD
|
|
||||||
|
|
||||||
|
|
||||||
class CommandIds(enum.IntEnum):
|
|
||||||
TC_MEM_WRITE = 1
|
|
||||||
TC_MEM_READ = 2
|
|
||||||
FLASH_WRITE = 9
|
|
||||||
TC_FLASH_DELETE = 10
|
|
||||||
TC_REPLAY_START = 11
|
|
||||||
TC_REPLAY_STOP = 12
|
|
||||||
TC_REPLAY_WRITE_SEQUENCE = 13
|
|
||||||
TC_DOWNLINK_PWR_ON = 14
|
|
||||||
TC_DOWNLINK_PWR_OFF = 15
|
|
||||||
OBSW_RESET_SEQ_COUNT = 50
|
|
||||||
TC_MODE_REPLAY = 16
|
|
||||||
TC_CAM_CMD_SEND = 17
|
|
||||||
TC_MODE_IDLE = 18
|
|
||||||
SET_UART_TX_TRISTATE = 20
|
|
||||||
RELEASE_UART_TX = 21
|
|
||||||
|
|
||||||
|
|
||||||
class MemAddresses(enum.IntEnum):
|
|
||||||
DEADBEEF = 0x40000004
|
|
||||||
|
|
||||||
|
|
||||||
class PlocReplyIds(enum.IntEnum):
|
|
||||||
TM_MEM_READ_RPT = 6
|
|
||||||
TM_CAM_CMD_RPT = 19
|
|
||||||
|
|
||||||
|
|
||||||
def pack_ploc_mpsoc_commands(
|
|
||||||
object_id: bytearray, tc_queue: TcQueueT, op_code: str
|
|
||||||
) -> TcQueueT:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(
|
|
||||||
QueueCommands.PRINT,
|
|
||||||
"Generate command for PLOC MPSoC with object id: 0x" + object_id.hex(),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
if op_code == "0":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Set mode off"))
|
|
||||||
command = pack_mode_data(object_id, Modes.OFF, 0)
|
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=9, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "1":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Set mode on"))
|
|
||||||
command = pack_mode_data(object_id, Modes.ON, 0)
|
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "2":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Mode Normal"))
|
|
||||||
command = pack_mode_data(object_id, Modes.NORMAL, 0)
|
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=11, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "3":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: TC mem write test"))
|
|
||||||
memory_address = int(
|
|
||||||
input("PLOC MPSoC: Tc Mem Write: Type memory address: 0x"), 16
|
|
||||||
)
|
|
||||||
memory_data = int(input("PLOC MPSoC: Tc Mem Write: Type memory data: 0x"), 16)
|
|
||||||
# TODO: implement variable length mem write command
|
|
||||||
mem_len = 1 # 1 32-bit word
|
|
||||||
command = generate_write_mem_command(
|
|
||||||
object_id, memory_address, memory_data, mem_len
|
|
||||||
)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "4":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: TC mem read test"))
|
|
||||||
command = prepare_mem_read_command(object_id)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=21, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "5":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Flash write"))
|
|
||||||
command = prepare_flash_write_cmd(object_id)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "6":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Flash delete"))
|
|
||||||
command = prepare_flash_delete_cmd(object_id)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "7":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Replay start"))
|
|
||||||
command = prepare_replay_start_cmd(object_id)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "8":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Replay stop"))
|
|
||||||
command = object_id + struct.pack("!I", CommandIds.TC_REPLAY_STOP)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=25, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "9":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Downlink pwr on"))
|
|
||||||
command = prepare_downlink_pwr_on_cmd(object_id)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "10":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Downlink pwr off"))
|
|
||||||
command = object_id + struct.pack("!I", CommandIds.TC_DOWNLINK_PWR_OFF)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "11":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Replay write sequence"))
|
|
||||||
command = prepare_replay_write_sequence_cmd(object_id)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "12":
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PLOC MPSoC: Reset OBSW sequence count")
|
|
||||||
)
|
|
||||||
command = object_id + struct.pack("!I", CommandIds.OBSW_RESET_SEQ_COUNT)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "13":
|
|
||||||
num_words = 1
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Read DEADBEEF address"))
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", CommandIds.TC_MEM_READ)
|
|
||||||
+ struct.pack("!I", MemAddresses.DEADBEEF)
|
|
||||||
+ struct.pack("!H", num_words)
|
|
||||||
)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=29, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "14":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Tc mode replay"))
|
|
||||||
command = object_id + struct.pack("!I", CommandIds.TC_MODE_REPLAY)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=30, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "15":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Tc mode idle"))
|
|
||||||
command = object_id + struct.pack("!I", CommandIds.TC_MODE_IDLE)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=31, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "16":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Tc cam command send"))
|
|
||||||
cam_cmd = input("Specify cam command string: ")
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", CommandIds.TC_CAM_CMD_SEND)
|
|
||||||
+ bytearray(cam_cmd, "utf-8")
|
|
||||||
)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=32, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "17":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Set UART TX tristate"))
|
|
||||||
command = object_id + struct.pack("!I", CommandIds.SET_UART_TX_TRISTATE)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "18":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC MPSoC: Release UART TX"))
|
|
||||||
command = object_id + struct.pack("!I", CommandIds.RELEASE_UART_TX)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=33, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
return tc_queue
|
|
||||||
|
|
||||||
|
|
||||||
def generate_write_mem_command(
|
|
||||||
object_id: bytearray, memory_address: int, memory_data: int, mem_len: int
|
|
||||||
) -> bytearray:
|
|
||||||
"""This function generates the command to write to a memory address within the PLOC
|
|
||||||
@param object_id The object id of the PlocHandler
|
|
||||||
@param memory_address The PLOC memory address where to write to.
|
|
||||||
@param memory_data The data to write to the memory address specified by the bytearray memory_address.
|
|
||||||
"""
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", CommandIds.TC_MEM_WRITE)
|
|
||||||
+ struct.pack("!I", memory_address)
|
|
||||||
+ struct.pack("!H", mem_len)
|
|
||||||
+ struct.pack("!I", memory_data)
|
|
||||||
)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def prepare_mem_read_command(object_id: bytearray) -> bytearray:
|
|
||||||
memory_address = int(input("PLOC MPSoC Tc Mem Read: Type memory address: 0x"), 16)
|
|
||||||
num_words = int(input("PLOC MPSoC specify number of words (32-bit) to read: "))
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", CommandIds.TC_MEM_READ)
|
|
||||||
+ struct.pack("!I", memory_address)
|
|
||||||
+ struct.pack("!H", num_words)
|
|
||||||
)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def prepare_flash_write_cmd(object_id: bytearray) -> bytearray:
|
|
||||||
obcFile = get_obc_file()
|
|
||||||
mpsocFile = get_mpsoc_file()
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", CommandIds.FLASH_WRITE)
|
|
||||||
+ bytearray(obcFile, "utf-8")
|
|
||||||
+ bytearray(mpsocFile, "utf-8")
|
|
||||||
)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def prepare_flash_delete_cmd(object_id: bytearray) -> bytearray:
|
|
||||||
file = get_mpsoc_file()
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", CommandIds.TC_FLASH_DELETE)
|
|
||||||
+ bytearray(file, "utf-8")
|
|
||||||
)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def prepare_replay_start_cmd(object_id: bytearray) -> bytearray:
|
|
||||||
replay = int(input("Specify replay mode (0 - once, 1 - repeated): "))
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", CommandIds.TC_REPLAY_START)
|
|
||||||
+ struct.pack("!B", replay)
|
|
||||||
)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def prepare_downlink_pwr_on_cmd(object_id: bytearray) -> bytearray:
|
|
||||||
mode = int(input("Specify JESD mode (0 - 5): "))
|
|
||||||
lane_rate = int(input("Specify lane rate (0 - 9): "))
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", CommandIds.TC_DOWNLINK_PWR_ON)
|
|
||||||
+ struct.pack("!B", mode)
|
|
||||||
+ struct.pack("!B", lane_rate)
|
|
||||||
)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def prepare_replay_write_sequence_cmd(object_id: bytearray) -> bytearray:
|
|
||||||
null_terminator = 0
|
|
||||||
use_decoding = int(input("Use decoding (set to 1): "))
|
|
||||||
file = get_sequence_file()
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", CommandIds.TC_REPLAY_WRITE_SEQUENCE)
|
|
||||||
+ struct.pack("!B", use_decoding)
|
|
||||||
+ bytearray(file, "utf-8")
|
|
||||||
)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def get_obc_file() -> str:
|
|
||||||
LOGGER.info("Specify OBC file ")
|
|
||||||
input_helper = InputHelper(flash_write_file_dict)
|
|
||||||
key = input_helper.get_key()
|
|
||||||
if key == MANUAL_INPUT:
|
|
||||||
file = input("Ploc MPSoC: Specify absolute name of flash file: ")
|
|
||||||
else:
|
|
||||||
file = flash_write_file_dict[key][1]
|
|
||||||
return file
|
|
||||||
|
|
||||||
|
|
||||||
def get_mpsoc_file() -> str:
|
|
||||||
LOGGER.info("Specify MPSoC file")
|
|
||||||
input_helper = InputHelper(mpsoc_file_dict)
|
|
||||||
key = input_helper.get_key()
|
|
||||||
if key == MANUAL_INPUT:
|
|
||||||
file = input("Ploc MPSoC: Specify absolute name file: ")
|
|
||||||
else:
|
|
||||||
file = mpsoc_file_dict[key][1]
|
|
||||||
return file
|
|
||||||
|
|
||||||
|
|
||||||
def get_sequence_file() -> str:
|
|
||||||
LOGGER.info("Specify sequence file")
|
|
||||||
input_helper = InputHelper(sequence_file_dict)
|
|
||||||
key = input_helper.get_key()
|
|
||||||
if key == MANUAL_INPUT:
|
|
||||||
file = input("Ploc MPSoC: Specify absolute name file: ")
|
|
||||||
else:
|
|
||||||
file = sequence_file_dict[key][1]
|
|
||||||
return file
|
|
@ -1,672 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
|
||||||
@file ploc_supervisor.py
|
|
||||||
@brief Tests for commanding the supervisor of the PLOC.
|
|
||||||
The supervisor is programmed by Thales.
|
|
||||||
@author J. Meier
|
|
||||||
@date 10.07.2021
|
|
||||||
"""
|
|
||||||
import struct
|
|
||||||
|
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
|
||||||
from tmtccmd.logging import get_console_logger
|
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
|
|
||||||
from utility.input_helper import InputHelper
|
|
||||||
|
|
||||||
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",
|
|
||||||
}
|
|
||||||
|
|
||||||
MANUAL_INPUT = "1"
|
|
||||||
|
|
||||||
update_file_dict = {
|
|
||||||
MANUAL_INPUT: ["manual input", ""],
|
|
||||||
"2": ["/mnt/sd0/ploc/supervisor/update.bin", "/mnt/sd0/ploc/supervisor/update.bin"],
|
|
||||||
"3": [
|
|
||||||
"/mnt/sd0/ploc/supervisor/update-large.bin",
|
|
||||||
"/mnt/sd0/ploc/supervisor/update-large.bin",
|
|
||||||
],
|
|
||||||
"4": [
|
|
||||||
"/mnt/sd0/ploc/supervisor/update-small.bin",
|
|
||||||
"/mnt/sd0/ploc/supervisor/update-small.bin",
|
|
||||||
],
|
|
||||||
"5": [
|
|
||||||
"/mnt/sd0/ploc/supervisor/mpsoc-uart-working.bin",
|
|
||||||
"/mnt/sd0/ploc/supervisor/mpsoc-uart-working.bin",
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
event_buffer_path_dict = {
|
|
||||||
MANUAL_INPUT: ["manual input", ""],
|
|
||||||
"2": ["/mnt/sd0/ploc/supervisor", "/mnt/sd0/ploc/supervisor"],
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class SupvActionIds:
|
|
||||||
HK_REPORT = 1
|
|
||||||
START_MPSOC = 3
|
|
||||||
SHUTWOWN_MPSOC = 4
|
|
||||||
SEL_MPSOC_BOOT_IMAGE = 5
|
|
||||||
SET_BOOT_TIMEOUT = 6
|
|
||||||
SET_MAX_RESTART_TRIES = 7
|
|
||||||
RESET_MPSOC = 8
|
|
||||||
SET_TIME_REF = 9
|
|
||||||
DISABLE_HK = 10
|
|
||||||
GET_BOOT_STATUS_REPORT = 11
|
|
||||||
UPDATE_AVAILABLE = 12
|
|
||||||
ENABLE_LATCHUP_ALERT = 15
|
|
||||||
DISABLE_LATCHUP_ALERT = 16
|
|
||||||
SET_ALERT_LIMIT = 18
|
|
||||||
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
|
|
||||||
SELECT_NVM = 27
|
|
||||||
RUN_AUTO_EM_TESTS = 28
|
|
||||||
WIPE_MRAM = 29
|
|
||||||
DUMP_MRAM = 30
|
|
||||||
SET_GPIO = 34
|
|
||||||
READ_GPIO = 35
|
|
||||||
RESTART_SUPERVISOR = 36
|
|
||||||
FACTORY_RESET_CLEAR_ALL = 37
|
|
||||||
LOGGING_REQUEST_COUNTERS = 38
|
|
||||||
UPDATE_IMAGE_DATA = 39
|
|
||||||
FACTORY_RESET_CLEAR_MIRROR = 40
|
|
||||||
FACTORY_RESET_CLEAR_CIRCULAR = 41
|
|
||||||
START_MPSOC_QUIET = 45
|
|
||||||
SET_SHUTDOWN_TIMEOUT = 46
|
|
||||||
FACTORY_FLASH = 47
|
|
||||||
PERFORM_UPDATE = 48
|
|
||||||
TERMINATE_SUPV_HELPER = 49
|
|
||||||
ENABLE_AUTO_TM = 50
|
|
||||||
DISABLE_AUTO_TM = 51
|
|
||||||
LOGGING_REQUEST_EVENT_BUFFERS = 54
|
|
||||||
LOGGING_CLEAR_COUNTERS = 55
|
|
||||||
LOGGING_SET_TOPIC = 56
|
|
||||||
REQUEST_ADC_REPORT = 57
|
|
||||||
RESET_PL = 58
|
|
||||||
ENABLE_NVMS = 59
|
|
||||||
CONTINUE_UPDATE = 60
|
|
||||||
|
|
||||||
|
|
||||||
class SupvHkIds:
|
|
||||||
HK_REPORT = 52
|
|
||||||
BOOT_STATUS_REPORT = 53
|
|
||||||
|
|
||||||
|
|
||||||
def pack_ploc_supv_commands(
|
|
||||||
object_id: bytearray, tc_queue: TcQueueT, op_code: str
|
|
||||||
) -> TcQueueT:
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(
|
|
||||||
QueueCommands.PRINT,
|
|
||||||
"Testing PLOC Supervisor with object id: 0x" + object_id.hex(),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
if op_code == "0":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set mode off"))
|
|
||||||
command = pack_mode_data(object_id, Modes.OFF, 0)
|
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=9, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "1":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set mode on"))
|
|
||||||
command = pack_mode_data(object_id, Modes.ON, 0)
|
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=10, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "2":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Mode Normal"))
|
|
||||||
command = pack_mode_data(object_id, Modes.NORMAL, 0)
|
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=11, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code == "3":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: TC Get Hk Report"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.HK_REPORT)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "5":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Start MPSoC"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.START_MPSOC)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=22, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "6":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Shutdown MPSoC"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.SHUTWOWN_MPSOC)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "7":
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PLOC Supervisor: Select MPSoC boot image")
|
|
||||||
)
|
|
||||||
mem = int(input("MEM (NVM0 - 0 or NVM1 - 1): "))
|
|
||||||
bp0 = int(input("BP0 (0 or 1): "))
|
|
||||||
bp1 = int(input("BP1 (0 or 1): "))
|
|
||||||
bp2 = int(input("BP2 (0 or 1): "))
|
|
||||||
command = pack_sel_boot_image_cmd(object_id, mem, bp0, bp1, bp2)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=24, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "8":
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PLOC Supervisor: Set max restart tries")
|
|
||||||
)
|
|
||||||
restart_tries = int(input("Specify maximum restart tries: "))
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", SupvActionIds.SET_MAX_RESTART_TRIES)
|
|
||||||
+ struct.pack("!B", restart_tries)
|
|
||||||
)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=25, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "9":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Reset MPSoC"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.RESET_MPSOC)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=26, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "10":
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PLOC Supervisor: Set time reference")
|
|
||||||
)
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.SET_TIME_REF)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=27, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "11":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set boot timeout"))
|
|
||||||
boot_timeout = int(input("Specify boot timeout [ms]: "))
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", SupvActionIds.SET_BOOT_TIMEOUT)
|
|
||||||
+ struct.pack("!I", boot_timeout)
|
|
||||||
)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=28, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "12":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Disable HK"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.DISABLE_HK)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=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 == "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 == "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 == "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 == "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 == "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 = 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 = 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 = 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 = 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 == "42":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Perform update"))
|
|
||||||
command = pack_update_command(object_id)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=57, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "43":
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PLOC Supervisor: Terminate supervisor process")
|
|
||||||
)
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.TERMINATE_SUPV_HELPER)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=58, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "44":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Start MPSoC quiet"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.START_MPSOC_QUIET)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=59, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "45":
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PLOC Supervisor: Set shutdown timeout")
|
|
||||||
)
|
|
||||||
command = pack_set_shutdown_timeout_command(object_id)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=60, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "46":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Factory flash"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.FACTORY_FLASH)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=61, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "47":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Enable auto TM"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.ENABLE_AUTO_TM)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=62, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "48":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Disable auto TM"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.DISABLE_AUTO_TM)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=63, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "51":
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PLOC Supervisor: Logging request event buffers")
|
|
||||||
)
|
|
||||||
command = pack_logging_buffer_request(object_id)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=66, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "52":
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PLOC Supervisor: Logging clear counters")
|
|
||||||
)
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.LOGGING_CLEAR_COUNTERS)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=67, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "53":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Logging set topic"))
|
|
||||||
command = pack_logging_set_topic(object_id)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=68, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "54":
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PLOC Supervisor: Logging request counters")
|
|
||||||
)
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.LOGGING_REQUEST_COUNTERS)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=69, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "55":
|
|
||||||
tc_queue.appendleft(
|
|
||||||
(QueueCommands.PRINT, "PLOC Supervisor: Request ADC report")
|
|
||||||
)
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.REQUEST_ADC_REPORT)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=70, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "56":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Reset PL"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.RESET_PL)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=71, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "57":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Enable NVMs"))
|
|
||||||
nvm01 = int(input("Enable (1) or disable(0) NVM 0 and 1: "))
|
|
||||||
nvm3 = int(input("Enable (1) or disable(0) NVM 3: "))
|
|
||||||
command = (
|
|
||||||
object_id
|
|
||||||
+ struct.pack("!I", SupvActionIds.ENABLE_NVMS)
|
|
||||||
+ struct.pack("B", nvm01)
|
|
||||||
+ struct.pack("B", nvm3)
|
|
||||||
)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=72, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
elif op_code == "58":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Continue update"))
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.CONTINUE_UPDATE)
|
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=73, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
return tc_queue
|
|
||||||
|
|
||||||
|
|
||||||
def pack_sel_boot_image_cmd(
|
|
||||||
object_id: bytearray, mem: int, bp0: int, bp1: int, bp2: int
|
|
||||||
) -> bytearray:
|
|
||||||
"""This function can be used to generate the command to select the image from which the MPSoC will boot
|
|
||||||
@param object_id The object id of the PLOC supervisor handler.
|
|
||||||
@param mem The memory from which the MPSoC shall boot (NVM0 - 0, NVM1 - 1)
|
|
||||||
@param bp0 Partition pin 0
|
|
||||||
@param bp1 Partition pin 1
|
|
||||||
@param bp2 Partition pin 2
|
|
||||||
"""
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.SEL_MPSOC_BOOT_IMAGE)
|
|
||||||
command = command + struct.pack("!B", mem)
|
|
||||||
command = command + struct.pack("!B", bp0)
|
|
||||||
command = command + struct.pack("!B", bp1)
|
|
||||||
command = command + struct.pack("!B", bp2)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
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 = 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_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: 0x"), 16)
|
|
||||||
cmd = object_id + struct.pack("!I", SupvActionIds.SET_ADC_ENABLED_CHANNELS)
|
|
||||||
cmd = cmd + struct.pack("!H", ch)
|
|
||||||
return cmd
|
|
||||||
|
|
||||||
|
|
||||||
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_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_update_command(object_id: bytearray) -> bytearray:
|
|
||||||
command = bytearray()
|
|
||||||
memory_id = int(input("Specify memory ID: "))
|
|
||||||
start_address = int(input("Specify start address: 0x"), 16)
|
|
||||||
update_file = get_update_file()
|
|
||||||
command += object_id
|
|
||||||
command += struct.pack("!I", SupvActionIds.PERFORM_UPDATE)
|
|
||||||
command += bytearray(update_file, "utf-8")
|
|
||||||
# Adding null terminator
|
|
||||||
command += struct.pack("!B", 0)
|
|
||||||
command += struct.pack("!B", memory_id)
|
|
||||||
command += struct.pack("!I", start_address)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def pack_set_shutdown_timeout_command(object_id: bytearray) -> bytearray:
|
|
||||||
command = bytearray()
|
|
||||||
command += object_id
|
|
||||||
command += struct.pack("!I", SupvActionIds.SET_SHUTDOWN_TIMEOUT)
|
|
||||||
timeout = int(input("Specify shutdown timeout (ms): "))
|
|
||||||
command += struct.pack("!I", timeout)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def pack_logging_buffer_request(object_id: bytearray) -> bytearray:
|
|
||||||
command = bytearray()
|
|
||||||
command += object_id
|
|
||||||
command += struct.pack("!I", SupvActionIds.LOGGING_REQUEST_EVENT_BUFFERS)
|
|
||||||
path = get_event_buffer_path()
|
|
||||||
command += bytearray(path, "utf-8")
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def pack_set_gpio_cmd(object_id: bytearray) -> bytearray:
|
|
||||||
port = int(input("Specify port: 0x"), 16)
|
|
||||||
pin = int(input("Specify pin: 0x"), 16)
|
|
||||||
val = int(input("Specify val: 0x"), 16)
|
|
||||||
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: 0x"), 16)
|
|
||||||
pin = int(input("Specify pin: 0x"), 16)
|
|
||||||
command = object_id + struct.pack("!I", SupvActionIds.READ_GPIO)
|
|
||||||
command = command + struct.pack("!B", port)
|
|
||||||
command = command + struct.pack("!B", pin)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def pack_logging_set_topic(objetc_id: bytearray) -> bytearray:
|
|
||||||
command = objetc_id + struct.pack("!I", SupvActionIds.LOGGING_SET_TOPIC)
|
|
||||||
tpc = int(input("Specify logging topic: "))
|
|
||||||
command += struct.pack("!B", tpc)
|
|
||||||
return command
|
|
||||||
|
|
||||||
|
|
||||||
def get_update_file() -> str:
|
|
||||||
LOGGER.info("Specify update file ")
|
|
||||||
input_helper = InputHelper(update_file_dict)
|
|
||||||
key = input_helper.get_key()
|
|
||||||
if key == MANUAL_INPUT:
|
|
||||||
file = input("Ploc Supervisor: Specify absolute name of update file: ")
|
|
||||||
else:
|
|
||||||
file = update_file_dict[key][1]
|
|
||||||
return file
|
|
||||||
|
|
||||||
|
|
||||||
def get_event_buffer_path() -> str:
|
|
||||||
LOGGER.info("Specify path where to store event buffer file ")
|
|
||||||
input_helper = InputHelper(event_buffer_path_dict)
|
|
||||||
key = input_helper.get_key()
|
|
||||||
if key == MANUAL_INPUT:
|
|
||||||
file = input("Ploc Supervisor: Specify path: ")
|
|
||||||
else:
|
|
||||||
file = event_buffer_path_dict[key][1]
|
|
||||||
return file
|
|
@ -4,13 +4,14 @@ import time
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from tmtccmd.config import (
|
from tmtccmd.config import TmtcDefinitionWrapper
|
||||||
QueueCommands,
|
|
||||||
ServiceOpCodeDictT,
|
from tmtccmd.config.tmtc import OpCodeEntry, tmtc_definitions_provider
|
||||||
add_op_code_entry,
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
add_service_op_code_entry,
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
|
make_sid,
|
||||||
|
generate_one_diag_command,
|
||||||
)
|
)
|
||||||
from tmtccmd.tc.definitions import TcQueueT
|
|
||||||
from tmtccmd.tc.pus_11_tc_sched import (
|
from tmtccmd.tc.pus_11_tc_sched import (
|
||||||
generate_enable_tc_sched_cmd,
|
generate_enable_tc_sched_cmd,
|
||||||
generate_time_tagged_cmd,
|
generate_time_tagged_cmd,
|
||||||
@ -39,16 +40,19 @@ class OpCodes:
|
|||||||
NORMAL_MPA = ["8", "nml-mpa"]
|
NORMAL_MPA = ["8", "nml-mpa"]
|
||||||
NORMAL_HPA = ["9", "nml-hpa"]
|
NORMAL_HPA = ["9", "nml-hpa"]
|
||||||
|
|
||||||
INJECT_SSR_TO_DRO_FAILURE = ["15", "inject-ssr-dro-fault"]
|
REQ_OS_HK = ["8", "hk-os"]
|
||||||
INJECT_DRO_TO_X8_FAILURE = ["16", "inject-dro-x8-fault"]
|
|
||||||
INJECT_X8_TO_TX_FAILURE = ["17", "inject-x8-tx-fault"]
|
INJECT_SSR_TO_DRO_FAILURE = ["10", "inject-ssr-dro-fault"]
|
||||||
INJECT_TX_TO_MPA_FAILURE = ["18", "inject-tx-mpa-fault"]
|
INJECT_DRO_TO_X8_FAILURE = ["11", "inject-dro-x8-fault"]
|
||||||
INJECT_MPA_TO_HPA_FAILURE = ["19", "inject-mpa-hpa-fault"]
|
INJECT_X8_TO_TX_FAILURE = ["12", "inject-x8-tx-fault"]
|
||||||
INJECT_ALL_ON_FAILURE = ["20", "inject-all-on-fault"]
|
INJECT_TX_TO_MPA_FAILURE = ["13", "inject-tx-mpa-fault"]
|
||||||
|
INJECT_MPA_TO_HPA_FAILURE = ["14", "inject-mpa-hpa-fault"]
|
||||||
|
INJECT_ALL_ON_FAILURE = ["15", "inject-all-on-fault"]
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class Info:
|
||||||
NORMAL = "PL PCDU ADC modules normal"
|
NORMAL = "PL PCDU ADC modules normal"
|
||||||
|
SWITCH_HPA_ON_PROC = "Switch HPA on procedure"
|
||||||
SWITCH_ON = "Switching PL PCDU on"
|
SWITCH_ON = "Switching PL PCDU on"
|
||||||
SWITCH_OFF = "Switching PL PCDU off"
|
SWITCH_OFF = "Switching PL PCDU off"
|
||||||
NORMAL_SSR = f"{NORMAL}, SSR on"
|
NORMAL_SSR = f"{NORMAL}, SSR on"
|
||||||
@ -57,8 +61,11 @@ class Info:
|
|||||||
NORMAL_TX = f"{NORMAL}, TX on"
|
NORMAL_TX = f"{NORMAL}, TX on"
|
||||||
NORMAL_MPA = f"{NORMAL}, MPA on"
|
NORMAL_MPA = f"{NORMAL}, MPA on"
|
||||||
NORMAL_HPA = f"{NORMAL}, HPA on"
|
NORMAL_HPA = f"{NORMAL}, HPA on"
|
||||||
|
REQ_OS_HK = "Request One Shot HK"
|
||||||
|
|
||||||
SWITCH_HPA_ON_PROC = "Full Procedure to switch HPA on"
|
|
||||||
|
class SetIds(enum.IntEnum):
|
||||||
|
ADC = 0
|
||||||
|
|
||||||
|
|
||||||
class NormalSubmodesMask(enum.IntEnum):
|
class NormalSubmodesMask(enum.IntEnum):
|
||||||
@ -108,99 +115,51 @@ class ParamIds(enum.IntEnum):
|
|||||||
INJECT_ALL_ON_FAILURE = 35
|
INJECT_ALL_ON_FAILURE = 35
|
||||||
|
|
||||||
|
|
||||||
def add_pl_pcdu_cmds(cmd_dict: ServiceOpCodeDictT):
|
@tmtc_definitions_provider
|
||||||
op_code_dict = dict()
|
def add_pl_pcdu_cmds(defs: TmtcDefinitionWrapper):
|
||||||
add_op_code_entry(
|
oce = OpCodeEntry()
|
||||||
op_code_dict=op_code_dict,
|
oce.add(keys=OpCodes.SWITCH_HPA_ON_PROC, info=Info.SWITCH_HPA_ON_PROC)
|
||||||
keys=OpCodes.SWITCH_HPA_ON_PROC,
|
oce.add(keys=OpCodes.SWITCH_ON, info=Info.SWITCH_ON)
|
||||||
info=Info.SWITCH_HPA_ON_PROC,
|
oce.add(keys=OpCodes.SWITCH_OFF, info=Info.SWITCH_OFF)
|
||||||
)
|
oce.add(keys=OpCodes.NORMAL_SSR, info=Info.NORMAL_SSR)
|
||||||
add_op_code_entry(
|
oce.add(keys=OpCodes.NORMAL_DRO, info=Info.NORMAL_DRO)
|
||||||
op_code_dict=op_code_dict, keys=OpCodes.SWITCH_ON, info=Info.SWITCH_ON
|
oce.add(keys=OpCodes.NORMAL_X8, info=Info.NORMAL_X8)
|
||||||
)
|
oce.add(keys=OpCodes.NORMAL_TX, info=Info.NORMAL_TX)
|
||||||
add_op_code_entry(
|
oce.add(keys=OpCodes.NORMAL_MPA, info=Info.NORMAL_MPA)
|
||||||
op_code_dict=op_code_dict, keys=OpCodes.SWITCH_OFF, info=Info.SWITCH_OFF
|
oce.add(keys=OpCodes.NORMAL_HPA, info=Info.NORMAL_HPA)
|
||||||
)
|
oce.add(keys=OpCodes.REQ_OS_HK, info=Info.REQ_OS_HK)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.NORMAL_SSR,
|
|
||||||
info=Info.NORMAL_SSR,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.NORMAL_DRO,
|
|
||||||
info=Info.NORMAL_DRO,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.NORMAL_X8,
|
|
||||||
info=Info.NORMAL_X8,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.NORMAL_TX,
|
|
||||||
info=Info.NORMAL_TX,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.NORMAL_MPA,
|
|
||||||
info=Info.NORMAL_MPA,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.NORMAL_HPA,
|
|
||||||
info=Info.NORMAL_HPA,
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.INJECT_SSR_TO_DRO_FAILURE,
|
keys=OpCodes.INJECT_SSR_TO_DRO_FAILURE,
|
||||||
info="Inject failure SSR to DRO transition",
|
info="Inject failure SSR to DRO transition",
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.INJECT_DRO_TO_X8_FAILURE,
|
keys=OpCodes.INJECT_DRO_TO_X8_FAILURE,
|
||||||
info="Inject failure in DRO to X8 transition",
|
info="Inject failure in DRO to X8 transition",
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.INJECT_X8_TO_TX_FAILURE,
|
keys=OpCodes.INJECT_X8_TO_TX_FAILURE,
|
||||||
info="Inject failure in X8 to TX transition",
|
info="Inject failure in X8 to TX transition",
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.INJECT_TX_TO_MPA_FAILURE,
|
keys=OpCodes.INJECT_TX_TO_MPA_FAILURE,
|
||||||
info="Inject failure in TX to MPA transition",
|
info="Inject failure in TX to MPA transition",
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(
|
||||||
op_code_dict=op_code_dict,
|
|
||||||
keys=OpCodes.INJECT_MPA_TO_HPA_FAILURE,
|
keys=OpCodes.INJECT_MPA_TO_HPA_FAILURE,
|
||||||
info="Inject failure in MPA to HPA transition",
|
info="Inject failure in MPA to HPA transition",
|
||||||
)
|
)
|
||||||
add_op_code_entry(
|
oce.add(keys=OpCodes.INJECT_ALL_ON_FAILURE, info="Inject failure in all on mode")
|
||||||
op_code_dict=op_code_dict,
|
defs.add_service(CustomServiceList.PL_PCDU.value, "PL PCDU", oce)
|
||||||
keys=OpCodes.INJECT_ALL_ON_FAILURE,
|
|
||||||
info="Inject failure in all on mode",
|
|
||||||
)
|
|
||||||
add_service_op_code_entry(
|
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.PL_PCDU.value,
|
|
||||||
info="PL PCDU",
|
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
def pack_pl_pcdu_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||||
if op_code in OpCodes.SWITCH_ON:
|
if op_code in OpCodes.SWITCH_ON:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(q=q, info=Info.SWITCH_ON, mode=Modes.ON, submode=0)
|
||||||
tc_queue=tc_queue, info=Info.SWITCH_ON, mode=Modes.ON, submode=0
|
|
||||||
)
|
|
||||||
if op_code in OpCodes.SWITCH_OFF:
|
if op_code in OpCodes.SWITCH_OFF:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(q=q, info=Info.SWITCH_OFF, mode=Modes.OFF, submode=0)
|
||||||
tc_queue=tc_queue, info=Info.SWITCH_OFF, mode=Modes.OFF, submode=0
|
|
||||||
)
|
|
||||||
if op_code in OpCodes.NORMAL_SSR:
|
if op_code in OpCodes.NORMAL_SSR:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
q=q,
|
||||||
info=Info.NORMAL_SSR,
|
info=Info.NORMAL_SSR,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=submode_mask_to_submode(
|
submode=submode_mask_to_submode(
|
||||||
@ -209,58 +168,63 @@ def pack_pl_pcdu_commands(tc_queue: TcQueueT, op_code: str):
|
|||||||
)
|
)
|
||||||
if op_code in OpCodes.NORMAL_DRO:
|
if op_code in OpCodes.NORMAL_DRO:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
q=q,
|
||||||
info=Info.NORMAL_DRO,
|
info=Info.NORMAL_DRO,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=submode_mask_to_submode(NormalSubmodesMask.DRO_ON),
|
submode=submode_mask_to_submode(NormalSubmodesMask.DRO_ON),
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.NORMAL_X8:
|
if op_code in OpCodes.NORMAL_X8:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
q=q,
|
||||||
info=Info.NORMAL_X8,
|
info=Info.NORMAL_X8,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=submode_mask_to_submode(NormalSubmodesMask.X8_ON),
|
submode=submode_mask_to_submode(NormalSubmodesMask.X8_ON),
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.NORMAL_TX:
|
if op_code in OpCodes.NORMAL_TX:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
q=q,
|
||||||
info=Info.NORMAL_TX,
|
info=Info.NORMAL_TX,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=submode_mask_to_submode(NormalSubmodesMask.TX_ON),
|
submode=submode_mask_to_submode(NormalSubmodesMask.TX_ON),
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.NORMAL_MPA:
|
if op_code in OpCodes.NORMAL_MPA:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
q=q,
|
||||||
info=Info.NORMAL_MPA,
|
info=Info.NORMAL_MPA,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=submode_mask_to_submode(NormalSubmodesMask.MPA_ON),
|
submode=submode_mask_to_submode(NormalSubmodesMask.MPA_ON),
|
||||||
)
|
)
|
||||||
if op_code in OpCodes.NORMAL_HPA:
|
if op_code in OpCodes.NORMAL_HPA:
|
||||||
pack_pl_pcdu_mode_cmd(
|
pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue=tc_queue,
|
q=q,
|
||||||
info=Info.NORMAL_HPA,
|
info=Info.NORMAL_HPA,
|
||||||
mode=Modes.NORMAL,
|
mode=Modes.NORMAL,
|
||||||
submode=submode_mask_to_submode(NormalSubmodesMask.HPA_ON),
|
submode=submode_mask_to_submode(NormalSubmodesMask.HPA_ON),
|
||||||
)
|
)
|
||||||
|
if op_code in OpCodes.REQ_OS_HK:
|
||||||
|
q.add_log_cmd(f"PL PCDU: {Info.REQ_OS_HK}")
|
||||||
|
q.add_pus_tc(
|
||||||
|
generate_one_diag_command(
|
||||||
|
sid=make_sid(object_id=PL_PCDU_ID, set_id=SetIds.ADC)
|
||||||
|
)
|
||||||
|
)
|
||||||
if op_code in OpCodes.SWITCH_HPA_ON_PROC:
|
if op_code in OpCodes.SWITCH_HPA_ON_PROC:
|
||||||
hpa_on_procedure(tc_queue)
|
hpa_on_procedure(q)
|
||||||
if op_code in OpCodes.INJECT_ALL_ON_FAILURE:
|
if op_code in OpCodes.INJECT_ALL_ON_FAILURE:
|
||||||
pack_failure_injection_cmd(
|
pack_failure_injection_cmd(
|
||||||
tc_queue=tc_queue,
|
q=q,
|
||||||
param_id=ParamIds.INJECT_ALL_ON_FAILURE,
|
param_id=ParamIds.INJECT_ALL_ON_FAILURE,
|
||||||
print_str="All On",
|
print_str="All On",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def hpa_on_procedure(tc_queue: TcQueueT):
|
def hpa_on_procedure(q: DefaultPusQueueHelper):
|
||||||
delay_dro_to_x8 = request_wait_time()
|
delay_dro_to_x8 = request_wait_time()
|
||||||
if delay_dro_to_x8 is None:
|
if delay_dro_to_x8 is None:
|
||||||
delay_dro_to_x8 = 900
|
delay_dro_to_x8 = 900
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd(
|
||||||
(
|
f"Starting procedure to switch on PL PCDU HPA with DRO to X8 "
|
||||||
QueueCommands.PRINT,
|
f"delay of {delay_dro_to_x8} seconds"
|
||||||
f"Starting procedure to switch on PL PCDU HPA with DRO to X8 delay of {delay_dro_to_x8} seconds",
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
pl_pcdu_on = PusTelecommand(
|
pl_pcdu_on = PusTelecommand(
|
||||||
service=200,
|
service=200,
|
||||||
@ -325,54 +289,53 @@ def hpa_on_procedure(tc_queue: TcQueueT):
|
|||||||
)
|
)
|
||||||
current_time = time.time()
|
current_time = time.time()
|
||||||
|
|
||||||
enb_sched = generate_enable_tc_sched_cmd(ssc=0)
|
enb_sched = generate_enable_tc_sched_cmd()
|
||||||
|
|
||||||
sched_time = current_time + 10
|
sched_time = int(round(current_time + 10))
|
||||||
tc_queue.appendleft(enb_sched.pack_command_tuple())
|
q.add_pus_tc(enb_sched)
|
||||||
tagged_on_cmd = generate_time_tagged_cmd(
|
tagged_on_cmd = generate_time_tagged_cmd(
|
||||||
release_time=struct.pack("!I", sched_time),
|
release_time=struct.pack("!I", sched_time),
|
||||||
tc_to_insert=pl_pcdu_on,
|
tc_to_insert=pl_pcdu_on,
|
||||||
ssc=1,
|
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(tagged_on_cmd.pack_command_tuple())
|
q.add_pus_tc(tagged_on_cmd)
|
||||||
|
|
||||||
sched_time += 5
|
sched_time += 5
|
||||||
tagged_ssr_cmd = generate_time_tagged_cmd(
|
tagged_ssr_cmd = generate_time_tagged_cmd(
|
||||||
release_time=struct.pack("!I", sched_time),
|
release_time=struct.pack("!I", sched_time),
|
||||||
tc_to_insert=ssr_on,
|
tc_to_insert=ssr_on,
|
||||||
ssc=2,
|
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(tagged_ssr_cmd.pack_command_tuple())
|
q.add_pus_tc(tagged_ssr_cmd)
|
||||||
|
|
||||||
sched_time += 5
|
sched_time += 5
|
||||||
tagged_dro_cmd = generate_time_tagged_cmd(
|
tagged_dro_cmd = generate_time_tagged_cmd(
|
||||||
release_time=struct.pack("!I", sched_time), tc_to_insert=dro_on, ssc=3
|
release_time=struct.pack("!I", sched_time), tc_to_insert=dro_on
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(tagged_dro_cmd.pack_command_tuple())
|
q.add_pus_tc(tagged_dro_cmd)
|
||||||
|
|
||||||
sched_time += delay_dro_to_x8
|
sched_time += delay_dro_to_x8
|
||||||
|
sched_time = int(round(sched_time))
|
||||||
tagged_x8_cmd = generate_time_tagged_cmd(
|
tagged_x8_cmd = generate_time_tagged_cmd(
|
||||||
release_time=struct.pack("!I", sched_time), tc_to_insert=x8_on, ssc=4
|
release_time=struct.pack("!I", sched_time), tc_to_insert=x8_on
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(tagged_x8_cmd.pack_command_tuple())
|
q.add_pus_tc(tagged_x8_cmd)
|
||||||
|
|
||||||
sched_time += 5
|
sched_time += 5
|
||||||
tagged_tx_cmd = generate_time_tagged_cmd(
|
tagged_tx_cmd = generate_time_tagged_cmd(
|
||||||
release_time=struct.pack("!I", sched_time), tc_to_insert=tx_on, ssc=5
|
release_time=struct.pack("!I", sched_time), tc_to_insert=tx_on
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(tagged_tx_cmd.pack_command_tuple())
|
q.add_pus_tc(tagged_tx_cmd)
|
||||||
|
|
||||||
sched_time += 5
|
sched_time += 5
|
||||||
tagged_mpa_cmd = generate_time_tagged_cmd(
|
tagged_mpa_cmd = generate_time_tagged_cmd(
|
||||||
release_time=struct.pack("!I", sched_time), tc_to_insert=mpa_on, ssc=6
|
release_time=struct.pack("!I", sched_time), tc_to_insert=mpa_on
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(tagged_mpa_cmd.pack_command_tuple())
|
q.add_pus_tc(tagged_mpa_cmd)
|
||||||
|
|
||||||
sched_time += 5
|
sched_time += 5
|
||||||
tagged_hpa_cmd = generate_time_tagged_cmd(
|
tagged_hpa_cmd = generate_time_tagged_cmd(
|
||||||
release_time=struct.pack("!I", sched_time), tc_to_insert=hpa_on, ssc=7
|
release_time=struct.pack("!I", sched_time), tc_to_insert=hpa_on
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(tagged_hpa_cmd.pack_command_tuple())
|
q.add_pus_tc(tagged_hpa_cmd)
|
||||||
|
|
||||||
|
|
||||||
def request_wait_time() -> Optional[float]:
|
def request_wait_time() -> Optional[float]:
|
||||||
@ -430,11 +393,9 @@ def submode_mask_to_submode(on_tgt: NormalSubmodesMask) -> int:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_wait_time_cmd(tc_queue: TcQueueT, param_id: int, print_str: str):
|
def pack_wait_time_cmd(q: DefaultPusQueueHelper, param_id: int, print_str: str):
|
||||||
wait_time = request_wait_time()
|
wait_time = request_wait_time()
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd(f"Updating {print_str} wait time to {wait_time}")
|
||||||
(QueueCommands.PRINT, f"Updating {print_str} wait time to {wait_time}")
|
|
||||||
)
|
|
||||||
if wait_time is None:
|
if wait_time is None:
|
||||||
return
|
return
|
||||||
param_data = pack_scalar_double_param_app_data(
|
param_data = pack_scalar_double_param_app_data(
|
||||||
@ -443,28 +404,24 @@ def pack_wait_time_cmd(tc_queue: TcQueueT, param_id: int, print_str: str):
|
|||||||
unique_id=param_id,
|
unique_id=param_id,
|
||||||
parameter=wait_time,
|
parameter=wait_time,
|
||||||
)
|
)
|
||||||
cmd = pack_fsfw_load_param_cmd(ssc=0, app_data=param_data)
|
q.add_pus_tc(pack_fsfw_load_param_cmd(app_data=param_data))
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
|
||||||
|
|
||||||
|
|
||||||
def pack_failure_injection_cmd(tc_queue: TcQueueT, param_id: int, print_str: str):
|
def pack_failure_injection_cmd(q: DefaultPusQueueHelper, param_id: int, print_str: str):
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"Inserting {print_str} error"))
|
q.add_log_cmd(f"Inserting {print_str} error")
|
||||||
param_data = pack_boolean_parameter_app_data(
|
param_data = pack_boolean_parameter_app_data(
|
||||||
object_id=PL_PCDU_ID, domain_id=0, unique_id=param_id, parameter=True
|
object_id=PL_PCDU_ID, domain_id=0, unique_id=param_id, parameter=True
|
||||||
)
|
)
|
||||||
cmd = pack_fsfw_load_param_cmd(ssc=0, app_data=param_data)
|
q.add_pus_tc(pack_fsfw_load_param_cmd(app_data=param_data))
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
|
||||||
|
|
||||||
|
|
||||||
def pack_pl_pcdu_mode_cmd(tc_queue: TcQueueT, info: str, mode: Modes, submode: int):
|
def pack_pl_pcdu_mode_cmd(
|
||||||
tc_queue.appendleft(
|
q: DefaultPusQueueHelper, info: str, mode: Modes, submode: int
|
||||||
(
|
):
|
||||||
QueueCommands.PRINT,
|
q.add_log_cmd(info)
|
||||||
info,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
mode_data = pack_mode_data(object_id=PL_PCDU_ID, mode=mode, submode=submode)
|
mode_data = pack_mode_data(object_id=PL_PCDU_ID, mode=mode, submode=submode)
|
||||||
mode_cmd = PusTelecommand(
|
q.add_pus_tc(
|
||||||
|
PusTelecommand(
|
||||||
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=mode_data
|
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=mode_data
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(mode_cmd.pack_command_tuple())
|
)
|
||||||
|
133
pus_tc/devs/power.py
Normal file
133
pus_tc/devs/power.py
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
from gomspace.gomspace_common import GsInfo
|
||||||
|
from pus_tc.devs.common_power import (
|
||||||
|
PowerOpCodes,
|
||||||
|
add_pdu1_common_defs,
|
||||||
|
add_pdu2_common_defs,
|
||||||
|
PowerInfo,
|
||||||
|
pdu1_cmds,
|
||||||
|
pdu2_cmds,
|
||||||
|
pdu1_req_hk_cmds,
|
||||||
|
pdu2_req_hk_cmds,
|
||||||
|
)
|
||||||
|
from config.definitions import CustomServiceList
|
||||||
|
from tmtccmd import get_console_logger
|
||||||
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
|
||||||
|
from pus_tc.devs.p60dock import P60OpCodes, GomspaceOpCodes, P60Info
|
||||||
|
from pus_tc.devs.acu import add_acu_cmds
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
|
|
||||||
|
|
||||||
|
LOGGER = get_console_logger()
|
||||||
|
|
||||||
|
|
||||||
|
def pack_power_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||||
|
pdu1_cmds(q, op_code)
|
||||||
|
pdu2_cmds(q, op_code)
|
||||||
|
if op_code in PowerOpCodes.INFO_CORE:
|
||||||
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
q.add_wait_seconds(3.0)
|
||||||
|
elif op_code in PowerOpCodes.INFO_AUX:
|
||||||
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
q.add_wait_seconds(3.0)
|
||||||
|
elif op_code in PowerOpCodes.INFO_ALL:
|
||||||
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_CORE_HK_ONCE[0])
|
||||||
|
pdu1_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
pdu2_req_hk_cmds(q, GomspaceOpCodes.REQUEST_AUX_HK_ONCE[0])
|
||||||
|
q.add_wait_seconds(3.0)
|
||||||
|
if q.empty():
|
||||||
|
LOGGER.info(f"Queue is empty, no stack for op code {op_code}")
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_p60_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add(keys=P60OpCodes.STACK_3V3_ON, info=P60Info.STACK_3V3_ON)
|
||||||
|
oce.add(keys=P60OpCodes.STACK_3V3_OFF, info=P60Info.STACK_3V3_OFF)
|
||||||
|
oce.add(keys=P60OpCodes.STACK_5V_ON, info=P60Info.STACK_5V_ON)
|
||||||
|
oce.add(keys=P60OpCodes.STACK_5V_OFF, info=P60Info.STACK_5V_OFF)
|
||||||
|
add_gomspace_cmds(oce)
|
||||||
|
oce.add(keys=P60OpCodes.TEST, info="P60 Tests")
|
||||||
|
defs.add_service(
|
||||||
|
name=CustomServiceList.P60DOCK.value, info="P60 Device", op_code_entry=oce
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_power_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
add_pdu1_common_defs(oce)
|
||||||
|
add_pdu2_common_defs(oce)
|
||||||
|
oce.add(keys=PowerOpCodes.INFO_ALL, info=PowerInfo.INFO_ALL)
|
||||||
|
oce.add(keys=PowerOpCodes.INFO_CORE, info=PowerInfo.INFO_CORE)
|
||||||
|
oce.add(keys=PowerOpCodes.INFO_AUX, info=PowerInfo.INFO_AUX)
|
||||||
|
defs.add_service(
|
||||||
|
name=CustomServiceList.POWER.value,
|
||||||
|
info="Power Subsystem",
|
||||||
|
op_code_entry=oce,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
add_pdu1_common_defs(oce)
|
||||||
|
add_gomspace_cmds(oce)
|
||||||
|
oce.add(keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE, info=GsInfo.REQUEST_CORE_HK_ONCE)
|
||||||
|
oce.add(keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE, info=GsInfo.REQUEST_AUX_HK_ONCE)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
||||||
|
info="PDU1: Print Switches, Voltages, Currents",
|
||||||
|
)
|
||||||
|
oce.add(keys=GomspaceOpCodes.GET_PARAM, info=GsInfo.GET_PARAMETER)
|
||||||
|
|
||||||
|
defs.add_service(
|
||||||
|
name=CustomServiceList.PDU1.value,
|
||||||
|
info="PDU1 Device",
|
||||||
|
op_code_entry=oce,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_pdu2_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
add_pdu2_common_defs(oce)
|
||||||
|
add_gomspace_cmds(oce)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.PRINT_SWITCH_V_I,
|
||||||
|
info="PDU2: Print Switches, Voltages, Currents",
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.PRINT_LATCHUPS,
|
||||||
|
info="PDU2: Print Latchups",
|
||||||
|
)
|
||||||
|
defs.add_service(
|
||||||
|
name="pdu2",
|
||||||
|
info="PDU2 Device",
|
||||||
|
op_code_entry=oce,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def add_gomspace_cmds(oce: OpCodeEntry):
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
||||||
|
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
||||||
|
)
|
||||||
|
oce.add(
|
||||||
|
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
||||||
|
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
||||||
|
)
|
||||||
|
oce.add(keys=GomspaceOpCodes.GET_PARAM, info=GsInfo.GET_PARAMETER)
|
||||||
|
oce.add(keys=GomspaceOpCodes.PRINT_LATCHUPS, info=GsInfo.PRINT_LATCHUPS)
|
||||||
|
oce.add(keys=GomspaceOpCodes.SET_PARAM, info=GsInfo.SET_PARAMETER)
|
||||||
|
|
||||||
|
|
||||||
|
def add_pcdu_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
add_p60_cmds(defs)
|
||||||
|
add_pdu1_cmds(defs)
|
||||||
|
add_pdu2_cmds(defs)
|
||||||
|
add_acu_cmds(defs)
|
@ -8,14 +8,14 @@
|
|||||||
import struct
|
import struct
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from tmtccmd.config import add_op_code_entry, add_service_op_code_entry
|
|
||||||
from tmtccmd.config.definitions import QueueCommands, ServiceOpCodeDictT, OpCodeDictKeys
|
|
||||||
|
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
from spacepackets.ecss.tc import PusTelecommand
|
||||||
from pus_tc.service_200_mode import pack_mode_data, Modes
|
from pus_tc.service_200_mode import pack_mode_data, Modes
|
||||||
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
from tmtccmd.tc.pus_3_fsfw_hk import generate_one_hk_command, make_sid
|
||||||
from tmtccmd.utility import ObjectId
|
from tmtccmd.util import ObjectIdU32
|
||||||
|
|
||||||
|
|
||||||
class SetIds:
|
class SetIds:
|
||||||
@ -47,64 +47,53 @@ class CommandIds:
|
|||||||
DISABLE_DEBUG_OUTPUT = 5
|
DISABLE_DEBUG_OUTPUT = 5
|
||||||
|
|
||||||
|
|
||||||
def add_rad_sens_cmds(cmd_dict: ServiceOpCodeDictT):
|
@tmtc_definitions_provider
|
||||||
|
def add_rad_sens_cmds(defs: TmtcDefinitionWrapper):
|
||||||
op_code_dict = dict()
|
oce = OpCodeEntry()
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, info=Info.ON, keys=OpCodes.ON)
|
oce.add(info=Info.ON, keys=OpCodes.ON)
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, info=Info.OFF, keys=OpCodes.OFF)
|
oce.add(info=Info.OFF, keys=OpCodes.OFF)
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, info=Info.NORMAL, keys=OpCodes.NORMAL)
|
oce.add(info=Info.NORMAL, keys=OpCodes.NORMAL)
|
||||||
add_op_code_entry(
|
oce.add(info=Info.REQ_OS_HK, keys=OpCodes.REQ_HK_ONCE)
|
||||||
op_code_dict=op_code_dict, info=Info.REQ_OS_HK, keys=OpCodes.REQ_HK_ONCE
|
oce.add(info=Info.DEBUG_ON, keys=OpCodes.DEBUG_ON)
|
||||||
)
|
oce.add(info=Info.DEBUG_OFF, keys=OpCodes.DEBUG_OFF)
|
||||||
add_op_code_entry(
|
defs.add_service(
|
||||||
op_code_dict=op_code_dict, info=Info.DEBUG_ON, keys=OpCodes.DEBUG_ON
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict, info=Info.DEBUG_OFF, keys=OpCodes.DEBUG_OFF
|
|
||||||
)
|
|
||||||
add_service_op_code_entry(
|
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.RAD_SENSOR.value,
|
name=CustomServiceList.RAD_SENSOR.value,
|
||||||
info="Radiation Sensor",
|
info="Radiation Sensor",
|
||||||
op_code_entry=op_code_dict,
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_rad_sensor_test_into(object_id: ObjectId, tc_queue: TcQueueT, op_code: str):
|
def pack_rad_sensor_test_into(
|
||||||
tc_queue.appendleft(
|
object_id: ObjectIdU32, q: DefaultPusQueueHelper, op_code: str
|
||||||
(QueueCommands.PRINT, f"Commanding Radiation sensor handler {object_id}")
|
):
|
||||||
)
|
q.add_log_cmd(f"Commanding Radiation sensor handler {object_id}")
|
||||||
|
|
||||||
if op_code in OpCodes.ON:
|
if op_code in OpCodes.ON:
|
||||||
rad_sensor_mode_cmd(object_id, Modes.ON, Info.ON, tc_queue)
|
rad_sensor_mode_cmd(object_id, Modes.ON, Info.ON, q)
|
||||||
if op_code in OpCodes.NORMAL:
|
if op_code in OpCodes.NORMAL:
|
||||||
rad_sensor_mode_cmd(object_id, Modes.NORMAL, Info.NORMAL, tc_queue)
|
rad_sensor_mode_cmd(object_id, Modes.NORMAL, Info.NORMAL, q)
|
||||||
if op_code in OpCodes.OFF:
|
if op_code in OpCodes.OFF:
|
||||||
rad_sensor_mode_cmd(object_id, Modes.OFF, Info.OFF, tc_queue)
|
rad_sensor_mode_cmd(object_id, Modes.OFF, Info.OFF, q)
|
||||||
if op_code in OpCodes.REQ_HK_ONCE:
|
if op_code in OpCodes.REQ_HK_ONCE:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"Rad sensor: {Info.REQ_OS_HK}"))
|
q.add_log_cmd(f"Rad sensor: {Info.REQ_OS_HK}")
|
||||||
cmd = generate_one_hk_command(
|
q.add_pus_tc(
|
||||||
sid=make_sid(object_id.as_bytes, set_id=SetIds.HK), ssc=0
|
generate_one_hk_command(sid=make_sid(object_id.as_bytes, set_id=SetIds.HK))
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
|
||||||
if op_code in OpCodes.DEBUG_ON:
|
if op_code in OpCodes.DEBUG_ON:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"Rad sensor: {Info.DEBUG_ON}"))
|
q.add_log_cmd(f"Rad sensor: {Info.DEBUG_ON}")
|
||||||
command = object_id.as_bytes + struct.pack("!I", CommandIds.ENABLE_DEBUG_OUTPUT)
|
command = object_id.as_bytes + struct.pack("!I", CommandIds.ENABLE_DEBUG_OUTPUT)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in OpCodes.DEBUG_OFF:
|
if op_code in OpCodes.DEBUG_OFF:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"Rad sensor: {Info.DEBUG_OFF}"))
|
q.add_log_cmd(f"Rad sensor: {Info.DEBUG_OFF}")
|
||||||
command = object_id.as_bytes + struct.pack(
|
command = object_id.as_bytes + struct.pack(
|
||||||
"!I", CommandIds.DISABLE_DEBUG_OUTPUT
|
"!I", CommandIds.DISABLE_DEBUG_OUTPUT
|
||||||
)
|
)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=45, app_data=command)
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
|
|
||||||
def rad_sensor_mode_cmd(
|
def rad_sensor_mode_cmd(
|
||||||
object_id: ObjectId, mode: Modes, info: str, tc_queue: TcQueueT
|
object_id: ObjectIdU32, mode: Modes, info: str, q: DefaultPusQueueHelper
|
||||||
):
|
):
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"Rad sensor: {info}"))
|
q.add_log_cmd(f"Rad sensor: {info}")
|
||||||
mode_data = pack_mode_data(object_id.as_bytes, mode, 0)
|
mode_data = pack_mode_data(object_id.as_bytes, mode, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=41, app_data=mode_data)
|
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=mode_data))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
@date 20.06.2021
|
@date 20.06.2021
|
||||||
"""
|
"""
|
||||||
import struct
|
import struct
|
||||||
from tmtccmd.config.definitions import QueueCommands, ServiceOpCodeDictT
|
|
||||||
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||||
generate_one_hk_command,
|
generate_one_hk_command,
|
||||||
generate_one_diag_command,
|
generate_one_diag_command,
|
||||||
make_sid,
|
make_sid,
|
||||||
)
|
)
|
||||||
from tmtccmd.config.globals import add_op_code_entry, add_service_op_code_entry
|
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
|
||||||
from spacepackets.ecss.tc import PusTelecommand
|
from spacepackets.ecss.tc import PusTelecommand
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes, Subservices
|
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes, Subservices
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
@ -75,128 +76,112 @@ class RampTime:
|
|||||||
MS_1000 = 1000
|
MS_1000 = 1000
|
||||||
|
|
||||||
|
|
||||||
def add_rw_cmds(cmd_dict: ServiceOpCodeDictT):
|
@tmtc_definitions_provider
|
||||||
op_code_dict = dict()
|
def add_rw_cmds(defs: TmtcDefinitionWrapper):
|
||||||
add_op_code_entry(
|
oce = OpCodeEntry()
|
||||||
op_code_dict=op_code_dict, info=InfoDevs.SPEED, keys=OpCodesDevs.SPEED
|
oce.add(info=InfoDevs.SPEED, keys=OpCodesDevs.SPEED)
|
||||||
)
|
oce.add(info=InfoDevs.ON, keys=OpCodesDevs.ON)
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, info=InfoDevs.ON, keys=OpCodesDevs.ON)
|
oce.add(info=InfoDevs.OFF, keys=OpCodesDevs.OFF)
|
||||||
add_op_code_entry(
|
oce.add(info=InfoDevs.NML, keys=OpCodesDevs.NML)
|
||||||
op_code_dict=op_code_dict, info=InfoDevs.OFF, keys=OpCodesDevs.OFF
|
oce.add(info=InfoDevs.GET_STATUS, keys=OpCodesDevs.GET_STATUS)
|
||||||
)
|
oce.add(info=InfoDevs.GET_TM, keys=OpCodesDevs.GET_TM)
|
||||||
add_op_code_entry(
|
defs.add_service(
|
||||||
op_code_dict=op_code_dict, info=InfoDevs.NML, keys=OpCodesDevs.NML
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict, info=InfoDevs.GET_STATUS, keys=OpCodesDevs.GET_STATUS
|
|
||||||
)
|
|
||||||
add_op_code_entry(
|
|
||||||
op_code_dict=op_code_dict, info=InfoDevs.GET_TM, keys=OpCodesDevs.GET_TM
|
|
||||||
)
|
|
||||||
add_service_op_code_entry(
|
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.REACTION_WHEEL_1.value,
|
name=CustomServiceList.REACTION_WHEEL_1.value,
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
info="Reaction Wheel 1",
|
info="Reaction Wheel 1",
|
||||||
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
add_service_op_code_entry(
|
defs.add_service(
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.REACTION_WHEEL_2.value,
|
name=CustomServiceList.REACTION_WHEEL_2.value,
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
info="Reaction Wheel 2",
|
info="Reaction Wheel 2",
|
||||||
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
add_service_op_code_entry(
|
defs.add_service(
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.REACTION_WHEEL_3.value,
|
name=CustomServiceList.REACTION_WHEEL_3.value,
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
info="Reaction Wheel 3",
|
info="Reaction Wheel 3",
|
||||||
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
add_service_op_code_entry(
|
defs.add_service(
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.REACTION_WHEEL_4.value,
|
name=CustomServiceList.REACTION_WHEEL_4.value,
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
info="Reaction Wheel 4",
|
info="Reaction Wheel 4",
|
||||||
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
op_code_dict = dict()
|
oce = OpCodeEntry()
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, info=InfoAss.ON, keys=OpCodesAss.ON)
|
oce.add(info=InfoAss.ON, keys=OpCodesAss.ON)
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, info=InfoAss.NML, keys=OpCodesAss.NML)
|
oce.add(info=InfoAss.NML, keys=OpCodesAss.NML)
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, info=InfoAss.OFF, keys=OpCodesAss.OFF)
|
oce.add(info=InfoAss.OFF, keys=OpCodesAss.OFF)
|
||||||
add_service_op_code_entry(
|
defs.add_service(
|
||||||
srv_op_code_dict=cmd_dict,
|
|
||||||
name=CustomServiceList.RW_ASSEMBLY.value,
|
name=CustomServiceList.RW_ASSEMBLY.value,
|
||||||
op_code_entry=op_code_dict,
|
|
||||||
info="Reaction Wheel Assembly",
|
info="Reaction Wheel Assembly",
|
||||||
|
op_code_entry=oce,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_single_rw_test_into(
|
def pack_single_rw_test_into(
|
||||||
object_id: bytes, rw_idx: int, tc_queue: TcQueueT, op_code: str
|
object_id: bytes, rw_idx: int, q: DefaultPusQueueHelper, op_code: str
|
||||||
) -> TcQueueT:
|
):
|
||||||
if op_code in OpCodesDevs.SPEED:
|
if op_code in OpCodesDevs.SPEED:
|
||||||
speed = int(input("Specify speed [0.1 RPM]: "))
|
speed = int(input("Specify speed [0.1 RPM]: "))
|
||||||
ramp_time = int(input("Specify ramp time [ms]: "))
|
ramp_time = int(input("Specify ramp time [ms]: "))
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"RW {rw_idx}: {InfoDevs.SPEED}"))
|
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.SPEED}")
|
||||||
command = pack_set_speed_command(object_id, speed, ramp_time, 40)
|
q.add_pus_tc(pack_set_speed_command(object_id, speed, ramp_time))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code in OpCodesDevs.ON:
|
if op_code in OpCodesDevs.ON:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"RW {rw_idx}: {InfoDevs.ON}"))
|
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.ON}")
|
||||||
mode_data = pack_mode_data(object_id, Modes.ON, 0)
|
mode_data = pack_mode_data(object_id, Modes.ON, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=41, app_data=mode_data)
|
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=mode_data))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code in OpCodesDevs.NML:
|
if op_code in OpCodesDevs.NML:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"RW {rw_idx}: {InfoDevs.NML}"))
|
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.NML}")
|
||||||
mode_data = pack_mode_data(object_id, Modes.NORMAL, 0)
|
mode_data = pack_mode_data(object_id, Modes.NORMAL, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=42, app_data=mode_data)
|
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=mode_data))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code in OpCodesDevs.OFF:
|
if op_code in OpCodesDevs.OFF:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"RW {rw_idx}: {InfoDevs.OFF}"))
|
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.OFF}")
|
||||||
mode_data = pack_mode_data(object_id, Modes.OFF, 0)
|
mode_data = pack_mode_data(object_id, Modes.OFF, 0)
|
||||||
command = PusTelecommand(service=200, subservice=1, ssc=43, app_data=mode_data)
|
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=mode_data))
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
|
|
||||||
if op_code in OpCodesDevs.GET_TM:
|
if op_code in OpCodesDevs.GET_TM:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, f"RW {rw_idx}: {InfoDevs.GET_TM}"))
|
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.GET_TM}")
|
||||||
command = generate_one_hk_command(
|
q.add_pus_tc(
|
||||||
sid=make_sid(object_id=object_id, set_id=RwSetIds.TM_SET), ssc=0
|
generate_one_hk_command(
|
||||||
|
sid=make_sid(object_id=object_id, set_id=RwSetIds.TM_SET)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
if op_code in OpCodesDevs.GET_STATUS:
|
if op_code in OpCodesDevs.GET_STATUS:
|
||||||
tc_queue.appendleft(
|
q.add_log_cmd(f"RW {rw_idx}: {InfoDevs.GET_STATUS}")
|
||||||
(QueueCommands.PRINT, f"RW {rw_idx}: {InfoDevs.GET_STATUS}")
|
q.add_pus_tc(
|
||||||
|
generate_one_diag_command(
|
||||||
|
sid=make_sid(object_id=object_id, set_id=RwSetIds.STATUS_SET_ID)
|
||||||
)
|
)
|
||||||
command = generate_one_diag_command(
|
|
||||||
sid=make_sid(object_id=object_id, set_id=RwSetIds.STATUS_SET_ID), ssc=0
|
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
|
||||||
return tc_queue
|
|
||||||
|
|
||||||
|
|
||||||
def pack_rw_ass_cmds(tc_queue: TcQueueT, object_id: bytes, op_code: str):
|
def pack_rw_ass_cmds(q: DefaultPusQueueHelper, object_id: bytes, op_code: str):
|
||||||
if op_code in OpCodesAss.OFF:
|
if op_code in OpCodesAss.OFF:
|
||||||
data = pack_mode_data(object_id=object_id, mode=Modes.OFF, submode=0)
|
data = pack_mode_data(object_id=object_id, mode=Modes.OFF, submode=0)
|
||||||
cmd = PusTelecommand(
|
q.add_pus_tc(
|
||||||
|
PusTelecommand(
|
||||||
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data
|
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
)
|
||||||
if op_code in OpCodesAss.ON:
|
if op_code in OpCodesAss.ON:
|
||||||
data = pack_mode_data(object_id=object_id, mode=Modes.ON, submode=0)
|
data = pack_mode_data(object_id=object_id, mode=Modes.ON, submode=0)
|
||||||
cmd = PusTelecommand(
|
q.add_pus_tc(
|
||||||
|
PusTelecommand(
|
||||||
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data
|
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
)
|
||||||
if op_code in OpCodesAss.NML:
|
if op_code in OpCodesAss.NML:
|
||||||
data = pack_mode_data(object_id=object_id, mode=Modes.NORMAL, submode=0)
|
data = pack_mode_data(object_id=object_id, mode=Modes.NORMAL, submode=0)
|
||||||
cmd = PusTelecommand(
|
q.add_pus_tc(
|
||||||
|
PusTelecommand(
|
||||||
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data
|
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=data
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_set_speed_command(
|
def pack_set_speed_command(
|
||||||
object_id: bytes, speed: int, ramp_time_ms: int, ssc: int
|
object_id: bytes, speed: int, ramp_time_ms: int
|
||||||
) -> PusTelecommand:
|
) -> PusTelecommand:
|
||||||
"""With this function a command is packed to set the speed of a reaction wheel
|
"""With this function a command is packed to set the speed of a reaction wheel
|
||||||
:param object_id: The object id of the reaction wheel handler.
|
:param object_id: The object id of the reaction wheel handler.
|
||||||
@ -204,7 +189,6 @@ def pack_set_speed_command(
|
|||||||
specified in 0.1 * RPM
|
specified in 0.1 * RPM
|
||||||
:param ramp_time_ms: The time after which the reaction wheel will reach the commanded speed.
|
:param ramp_time_ms: The time after which the reaction wheel will reach the commanded speed.
|
||||||
Valid times are 10 - 10000 ms
|
Valid times are 10 - 10000 ms
|
||||||
:param ssc: Source sequence count
|
|
||||||
"""
|
"""
|
||||||
if speed > 0:
|
if speed > 0:
|
||||||
if speed < 1000 or speed > 65000:
|
if speed < 1000 or speed > 65000:
|
||||||
@ -212,12 +196,16 @@ def pack_set_speed_command(
|
|||||||
"Invalid RW speed specified. "
|
"Invalid RW speed specified. "
|
||||||
"Allowed range is [1000, 65000] 0.1 * RPM"
|
"Allowed range is [1000, 65000] 0.1 * RPM"
|
||||||
)
|
)
|
||||||
else:
|
elif speed < 0:
|
||||||
if speed < -65000 or speed > -1000:
|
if speed < -65000 or speed > -1000:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Invalid RW speed specified. "
|
"Invalid RW speed specified. "
|
||||||
"Allowed range is [-65000, -1000] 0.1 * RPM"
|
"Allowed range is [-65000, -1000] 0.1 * RPM"
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
# Speed is 0
|
||||||
|
pass
|
||||||
|
|
||||||
if ramp_time_ms < 0 or (
|
if ramp_time_ms < 0 or (
|
||||||
ramp_time_ms > 0 and (ramp_time_ms > 10000 or ramp_time_ms < 10)
|
ramp_time_ms > 0 and (ramp_time_ms > 10000 or ramp_time_ms < 10)
|
||||||
):
|
):
|
||||||
@ -227,5 +215,5 @@ def pack_set_speed_command(
|
|||||||
command += object_id + command_id
|
command += object_id + command_id
|
||||||
command = command + struct.pack("!i", speed)
|
command = command + struct.pack("!i", speed)
|
||||||
command = command + ramp_time_ms.to_bytes(length=2, byteorder="big")
|
command = command + ramp_time_ms.to_bytes(length=2, byteorder="big")
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=ssc, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, app_data=command)
|
||||||
return command
|
return command
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
|
from pus_tc.devs.pdec_handler import CommandIds
|
||||||
from spacepackets.ecss import PusTelecommand
|
from spacepackets.ecss import PusTelecommand
|
||||||
from tmtccmd.config import (
|
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||||
ServiceOpCodeDictT,
|
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||||
add_op_code_entry,
|
|
||||||
add_service_op_code_entry,
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
)
|
from tmtccmd.util import ObjectIdU32
|
||||||
from tmtccmd.tc.definitions import TcQueueT
|
|
||||||
from tmtccmd.utility import ObjectId
|
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import Modes, pack_mode_data, Subservices
|
from tmtccmd.tc.pus_200_fsfw_modes import Modes, pack_mode_data, Subservices
|
||||||
import config.object_ids as oids
|
import config.object_ids as oids
|
||||||
from config.object_ids import get_object_ids
|
from config.object_ids import get_object_ids
|
||||||
@ -37,28 +36,30 @@ class OpCodes:
|
|||||||
ON = ["0", "on"]
|
ON = ["0", "on"]
|
||||||
OFF = ["1", "off"]
|
OFF = ["1", "off"]
|
||||||
NORMAL = ["2", "normal"]
|
NORMAL = ["2", "normal"]
|
||||||
|
CONFIG_CMD = ["3", "Write config"]
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class Info:
|
||||||
ON = "Switch handler on"
|
ON = "Switch handler on"
|
||||||
OFF = "Switch handler off"
|
OFF = "Switch handler off"
|
||||||
NORMAL = "Switch handler normal"
|
NORMAL = "Switch handler normal"
|
||||||
|
WIRTE_CONFIG = "Write config"
|
||||||
|
|
||||||
|
|
||||||
def specify_rtd_cmds(cmd_dict: ServiceOpCodeDictT):
|
@tmtc_definitions_provider
|
||||||
op_code_dict = dict()
|
def specify_rtd_cmds(defs: TmtcDefinitionWrapper):
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, keys=OpCodes.ON, info=Info.ON)
|
oce = OpCodeEntry()
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, keys=OpCodes.NORMAL, info=Info.NORMAL)
|
oce.add(keys=OpCodes.ON, info=Info.ON)
|
||||||
add_op_code_entry(op_code_dict=op_code_dict, keys=OpCodes.OFF, info=Info.OFF)
|
oce.add(keys=OpCodes.NORMAL, info=Info.NORMAL)
|
||||||
add_service_op_code_entry(
|
oce.add(keys=OpCodes.OFF, info=Info.OFF)
|
||||||
srv_op_code_dict=cmd_dict,
|
defs.add_service(
|
||||||
op_code_entry=op_code_dict,
|
name=CustomServiceList.RTD.value, info="RTD commands", op_code_entry=oce
|
||||||
name=CustomServiceList.RTD.value,
|
|
||||||
info="RTD commands",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def pack_rtd_commands(op_code: str, object_id: Optional[ObjectId], tc_queue: TcQueueT):
|
def pack_rtd_commands(
|
||||||
|
op_code: str, object_id: Optional[ObjectIdU32], q: DefaultPusQueueHelper
|
||||||
|
):
|
||||||
if object_id is not None and object_id not in RTD_IDS:
|
if object_id is not None and object_id not in RTD_IDS:
|
||||||
print("Specified object ID not a valid RTD ID")
|
print("Specified object ID not a valid RTD ID")
|
||||||
object_id = None
|
object_id = None
|
||||||
@ -70,26 +71,32 @@ def pack_rtd_commands(op_code: str, object_id: Optional[ObjectId], tc_queue: TcQ
|
|||||||
app_data = pack_mode_data(
|
app_data = pack_mode_data(
|
||||||
object_id=object_id.as_bytes, mode=Modes.ON, submode=0
|
object_id=object_id.as_bytes, mode=Modes.ON, submode=0
|
||||||
)
|
)
|
||||||
cmd = PusTelecommand(
|
q.add_pus_tc(
|
||||||
|
PusTelecommand(
|
||||||
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=app_data
|
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=app_data
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
)
|
||||||
if op_code in OpCodes.NORMAL:
|
if op_code in OpCodes.NORMAL:
|
||||||
app_data = pack_mode_data(
|
app_data = pack_mode_data(
|
||||||
object_id=object_id.as_bytes, mode=Modes.NORMAL, submode=0
|
object_id=object_id.as_bytes, mode=Modes.NORMAL, submode=0
|
||||||
)
|
)
|
||||||
cmd = PusTelecommand(
|
q.add_pus_tc(
|
||||||
|
PusTelecommand(
|
||||||
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=app_data
|
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=app_data
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
)
|
||||||
if op_code in OpCodes.OFF:
|
if op_code in OpCodes.OFF:
|
||||||
app_data = pack_mode_data(
|
app_data = pack_mode_data(
|
||||||
object_id=object_id.as_bytes, mode=Modes.OFF, submode=0
|
object_id=object_id.as_bytes, mode=Modes.OFF, submode=0
|
||||||
)
|
)
|
||||||
cmd = PusTelecommand(
|
q.add_pus_tc(
|
||||||
|
PusTelecommand(
|
||||||
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=app_data
|
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=app_data
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(cmd.pack_command_tuple())
|
)
|
||||||
|
if op_code in OpCodes.CONFIG_CMD:
|
||||||
|
command = object_id.as_bytes + CommandIds.PRINT_CLCW
|
||||||
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
|
|
||||||
|
|
||||||
def prompt_rtd_idx():
|
def prompt_rtd_idx():
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user