diff --git a/.idea/runConfigurations/OBSW_TmTcClient_Module_Test_Serial.xml b/.idea/runConfigurations/tmtcclient_Module_Test_Serial.xml similarity index 86% rename from .idea/runConfigurations/OBSW_TmTcClient_Module_Test_Serial.xml rename to .idea/runConfigurations/tmtcclient_Module_Test_Serial.xml index 9d3a170984f7bfcf98901cb9311ab024498ebe60..edc30694c5b1a4ed02b2d773a89fef28ccb4c638 100644 --- a/.idea/runConfigurations/OBSW_TmTcClient_Module_Test_Serial.xml +++ b/.idea/runConfigurations/tmtcclient_Module_Test_Serial.xml @@ -1,5 +1,5 @@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="OBSW_TmTcClient Module Test Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> + <configuration default="false" name="tmtcclient Module Test Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> <module name="tmtc" /> <option name="INTERPRETER_OPTIONS" value="" /> <option name="PARENT_ENVS" value="true" /> diff --git a/.idea/runConfigurations/OBSW_UdpClient_Service_17_Serial.xml b/.idea/runConfigurations/tmtcclient_Service_17_Serial.xml similarity index 86% rename from .idea/runConfigurations/OBSW_UdpClient_Service_17_Serial.xml rename to .idea/runConfigurations/tmtcclient_Service_17_Serial.xml index f5a39bfb451e02dddc3f727b75d572522260b1ab..641828f86eec64c05a14c3006952c9a38eb26518 100644 --- a/.idea/runConfigurations/OBSW_UdpClient_Service_17_Serial.xml +++ b/.idea/runConfigurations/tmtcclient_Service_17_Serial.xml @@ -1,5 +1,5 @@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="OBSW_UdpClient Service 17 Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> + <configuration default="false" name="tmtcclient Service 17 Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> <module name="tmtc" /> <option name="INTERPRETER_OPTIONS" value="" /> <option name="PARENT_ENVS" value="true" /> diff --git a/.idea/runConfigurations/OBSW_TmTcClient_Software_Serial.xml b/.idea/runConfigurations/tmtcclient_Software_Serial.xml similarity index 86% rename from .idea/runConfigurations/OBSW_TmTcClient_Software_Serial.xml rename to .idea/runConfigurations/tmtcclient_Software_Serial.xml index 20885859f81dfeefb305d9eb3e55846decf98f7a..58c344fb2e410976eebf929a824a656240bf3aa2 100644 --- a/.idea/runConfigurations/OBSW_TmTcClient_Software_Serial.xml +++ b/.idea/runConfigurations/tmtcclient_Software_Serial.xml @@ -1,5 +1,5 @@ <component name="ProjectRunConfigurationManager"> - <configuration default="false" name="OBSW_TmTcClient Software Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> + <configuration default="false" name="tmtcclient Software Serial" type="PythonConfigurationType" factoryName="Python" folderName="Serial Communication"> <module name="tmtc" /> <option name="INTERPRETER_OPTIONS" value="" /> <option name="PARENT_ENVS" value="true" /> diff --git a/comIF/obsw_ethernet_com_if.py b/comIF/obsw_ethernet_com_if.py index 146e12d048a5ae4444e22fd6f034fcd6f636c1d7..647dc1c908f8433c0886660bae2b7faa8fe5592d 100644 --- a/comIF/obsw_ethernet_com_if.py +++ b/comIF/obsw_ethernet_com_if.py @@ -14,18 +14,19 @@ from comIF.obsw_com_interface import CommunicationInterface, PusTmListT, PusTmQu PusTmTupleQueueT, PusTmInfoQueueT from tm.obsw_pus_tm_factory import pus_telemetry_factory from tc.obsw_pus_tc_base import PusTcInfoT -from utility.obsw_tmtc_printer import TmTcPrinterT +from utility.obsw_tmtc_printer import TmTcPrinter import config.obsw_config as g # pylint: disable=abstract-method # pylint: disable=arguments-differ # pylint: disable=too-many-arguments +# TODO: decouple printing from receiving. Printing takes a long time and blocks! class EthernetComIF(CommunicationInterface): """ Communication interface for UDP communication. """ - def __init__(self, tmtc_printer: TmTcPrinterT, tmTimeout: float, tcTimeoutFactor: float, + def __init__(self, tmtc_printer: TmTcPrinter, tmTimeout: float, tcTimeoutFactor: float, receiveAddress: g.ethernetAddressT, sendAddress: g.ethernetAddressT): super().__init__(tmtc_printer) self.tm_timeout = tmTimeout diff --git a/obsw_tmtc_client.py b/obsw_tmtc_client.py index 7fd1a4a67a73cf30aec7ac897ae37c71a2d7e798..68f65e45c86a6fc3a9fc1e7ba95203b50ccd36aa 100644 --- a/obsw_tmtc_client.py +++ b/obsw_tmtc_client.py @@ -182,7 +182,7 @@ def set_communication_interface(tmtc_printer: TmTcPrinterT) -> ComIfT: else: com_port = g.G_COM_PORT baud_rate = 115200 - g.G_SERIAL_TIMEOUT = 0.03 + g.G_SERIAL_TIMEOUT = 0.01 communication_interface = SerialComIF( tmtc_printer=tmtc_printer, com_port=com_port, baud_rate=baud_rate, serial_timeout=g.G_SERIAL_TIMEOUT) diff --git a/test/obsw_pus_service_test.py b/test/obsw_pus_service_test.py index f2abe3b0457bf0699ba91265e9b458f265a5a4a7..f918d92afed62122221e3e88d0ec3b8fbf4ddde6 100644 --- a/test/obsw_pus_service_test.py +++ b/test/obsw_pus_service_test.py @@ -25,7 +25,7 @@ class TestService2(TestService): print("Testing Service 2") # all commands must be sent sequentially, not as a burst cls.wait_intervals = [1, 2, 3, 4] - cls.wait_time = [2, 2, 2, 3] + cls.wait_time = [2.5, 2.5, 2.5, 3] pack_service2_test_into(cls.test_queue) def test_service2(self): @@ -104,7 +104,7 @@ class TestService8(TestService): super().setUpClass() print("Testing Service 8") cls.wait_intervals = [1, 2, 3, 4] - cls.wait_time = [1.5, 0.7, 1.0, 1.1] + cls.wait_time = [1.5, 1.5, 1.5, 1.5] cls.data_reply_count = 0 pack_service8_test_into(cls.test_queue)