diff --git a/.idea/runConfigurations/tmtcclient_Service_3_Serial_.xml b/.idea/runConfigurations/tmtcclient_Service_3_IntErrorReporter_Test.xml similarity index 79% rename from .idea/runConfigurations/tmtcclient_Service_3_Serial_.xml rename to .idea/runConfigurations/tmtcclient_Service_3_IntErrorReporter_Test.xml index 15d51da4d1d1c373b763e2928324f7070bd1a14f..77e6aebdc72bfe6a1e11723e119564e132ddeb6a 100644 --- a/.idea/runConfigurations/tmtcclient_Service_3_Serial_.xml +++ b/.idea/runConfigurations/tmtcclient_Service_3_IntErrorReporter_Test.xml @@ -1,5 +1,5 @@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="tmtcclient Service 3 Serial " type="PythonConfigurationType" factoryName="Python" folderName="Serial Service Test"> + <configuration default="false" name="tmtcclient Service 3 IntErrorReporter Test" type="PythonConfigurationType" factoryName="Python" folderName="Serial Service Test"> <module name="tmtc" /> <option name="INTERPRETER_OPTIONS" value="" /> <option name="PARENT_ENVS" value="true" /> @@ -13,7 +13,7 @@ <option name="ADD_SOURCE_ROOTS" value="true" /> <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> <option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" /> - <option name="PARAMETERS" value="-m 3 -s 3 -c 1 -t 3 --hk" /> + <option name="PARAMETERS" value="-m 3 -s 3 -c 1 -t 3 -o ie --hk" /> <option name="SHOW_COMMAND_LINE" value="false" /> <option name="EMULATE_TERMINAL" value="false" /> <option name="MODULE_MODE" value="false" /> diff --git a/tc/obsw_pus_tc_packer.py b/tc/obsw_pus_tc_packer.py index 92ff5784609d021d9b951f11e5733acb47eb6821..58f58e172b2d039d0bd97534fe863e3ee6494d00 100644 --- a/tc/obsw_pus_tc_packer.py +++ b/tc/obsw_pus_tc_packer.py @@ -40,7 +40,7 @@ class ServiceQueuePacker: if service == 2: return pack_service2_test_into(service_queue) if service == 3: - return pack_service3_test_into(service_queue) + return pack_service3_test_into(service_queue, op_code) if service == 5: return pack_service5_test_into(service_queue) if service == 8: diff --git a/tc/obsw_tc_service3.py b/tc/obsw_tc_service3.py index 4ecda487122045bf5833cc331fe6847f8267d969..758d702156d9930fe4f2b0af4e1584b5b68b9381 100644 --- a/tc/obsw_tc_service3.py +++ b/tc/obsw_tc_service3.py @@ -6,7 +6,7 @@ @date 02.05.2020 """ import struct -from typing import Deque +from typing import Deque, Union from tmtc_core.tc.obsw_pus_tc_base import PusTelecommand import config.tmtcc_config as g @@ -27,12 +27,15 @@ number_of_parameters = struct.pack('>B', 5) sid_internal_err_rprtr = make_sid(g.INTERNAL_ERROR_REPORTER_ID, 0) -def pack_service3_test_into(tc_queue: Deque) -> Deque: - tc_queue.appendleft(("print", "Testing Service 3")) - # Predefined packet testing - pack_test_device_test(tc_queue) - # pack_thermal_sensor_tests(tc_queue) - pack_internal_error_reporter_tests(tc_queue) +def pack_service3_test_into(tc_queue: Deque, op_code: Union[str, int] = 0) -> Deque: + if op_code.lower() == "ie": + tc_queue.appendleft(("print", "Testing Internal Error Reporter")) + pack_internal_error_reporter_tests(tc_queue) + else: + tc_queue.appendleft(("print", "Testing Service 3")) + # Predefined packet testing + pack_test_device_test(tc_queue) + # pack_thermal_sensor_tests(tc_queue) tc_queue.appendleft(("export", "log/tmtc_log_service3.txt")) return tc_queue