bug fixed

This commit is contained in:
Robin Müller 2021-06-30 10:42:28 +02:00
parent 56a05e6290
commit ee11df2f1c
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
6 changed files with 45 additions and 11 deletions

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TMTC PUS 17 Generic" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
<option name="PARAMETERS" value="-s 17 -o 1 -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>

View File

@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TMTC PUS 17" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
<configuration default="false" name="TMTC PUS 17 Ping" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />

View File

@ -51,7 +51,7 @@ class FsfwHookBase(TmTcHookBase):
def pack_service_queue(self, service: int, op_code: str, service_queue: TcQueueT):
from pus_tc.tc_packing import pack_service_queue_user
pack_service_queue_user(service=service, op_code=op_code, service_queue=service_queue)
pack_service_queue_user(service=service, op_code=op_code, tc_queue=service_queue)
def get_object_ids(self) -> Dict[bytes, list]:
from config.object_ids import get_object_ids

View File

@ -0,0 +1,9 @@
from tmtccmd.pus_tc.definitions import TcQueueT
from tmtccmd.pus_tc.service_17_test import pack_service17_ping_command, pack_generic_service17_test
def pack_service_17_commands(op_code: str, init_ssc: int, tc_queue: TcQueueT):
if op_code == "0":
tc_queue.appendleft(pack_service17_ping_command(ssc=init_ssc).pack_command_tuple())
else:
pack_generic_service17_test(tc_queue=tc_queue, init_ssc=init_ssc)

View File

@ -11,6 +11,7 @@ from typing import Union
from pus_tc.service_20_parameters import pack_service20_commands_into
from pus_tc.service_2_raw_cmd import pack_service_2_commands_into
from pus_tc.service_3_housekeeping import pack_service_3_commands_into
from pus_tc.service_17_test import pack_service_17_commands
from pus_tc.service_8_func_cmd import pack_service_8_commands_into
from tmtccmd.utility.logger import get_console_logger
from tmtccmd.pus_tc.definitions import TcQueueT
@ -22,21 +23,21 @@ from pus_tc.service_200_mode import pack_service_200_commands_into
LOGGER = get_console_logger()
def pack_service_queue_user(service: Union[str, int], op_code: str, service_queue: TcQueueT):
def pack_service_queue_user(service: Union[str, int], op_code: str, tc_queue: TcQueueT):
if service == CoreServiceList.SERVICE_2.value:
return pack_service_2_commands_into(op_code=op_code, tc_queue=service_queue)
return pack_service_2_commands_into(op_code=op_code, tc_queue=tc_queue)
if service == CoreServiceList.SERVICE_3.value:
return pack_service_3_commands_into(op_code=op_code, tc_queue=service_queue)
return pack_service_3_commands_into(op_code=op_code, tc_queue=tc_queue)
if service == CoreServiceList.SERVICE_5.value:
return pack_generic_service5_test_into(tc_queue=service_queue)
return pack_generic_service5_test_into(tc_queue=tc_queue)
if service == CoreServiceList.SERVICE_8.value:
return pack_service_8_commands_into(op_code=op_code, tc_queue=service_queue)
return pack_service_8_commands_into(op_code=op_code, tc_queue=tc_queue)
if service == CoreServiceList.SERVICE_17.value:
return pack_generic_service17_test(init_ssc=1700, tc_queue=service_queue)
return pack_service_17_commands(op_code=op_code, tc_queue=tc_queue, init_ssc=0)
if service == CoreServiceList.SERVICE_20.value:
return pack_service20_commands_into(tc_queue=service_queue, op_code=op_code)
return pack_service20_commands_into(tc_queue=tc_queue, op_code=op_code)
if service == CoreServiceList.SERVICE_200.value:
return pack_service_200_commands_into(tc_queue=service_queue, op_code=op_code)
return pack_service_200_commands_into(tc_queue=tc_queue, op_code=op_code)
LOGGER.warning("Invalid Service !")

@ -1 +1 @@
Subproject commit 7633cae84f57d2e56b56ac76cb2e6af40650f812
Subproject commit eed1bb0b2e6e7634a1af3198406dd3629b56ecaf