bug fixed

This commit is contained in:
2021-06-30 10:42:28 +02:00
parent 56a05e6290
commit ee11df2f1c
6 changed files with 45 additions and 11 deletions

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 !")