diff --git a/.idea/runConfigurations/tmtcclient_Single_Command_Serial.xml b/.idea/runConfigurations/tmtcclient_Single_Command_Serial.xml index 1c72dd64e6f72df9c343069f4bb25e9f6672885c..aa1a2f4b2ae631f47148b51f094fe3d17986b6e4 100644 --- a/.idea/runConfigurations/tmtcclient_Single_Command_Serial.xml +++ b/.idea/runConfigurations/tmtcclient_Single_Command_Serial.xml @@ -13,7 +13,7 @@ <option name="ADD_SOURCE_ROOTS" value="true" /> <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> <option name="SCRIPT_NAME" value="$PROJECT_DIR$/obsw_tmtc_client.py" /> - <option name="PARAMETERS" value="-m 2 -c 1 -t 5" /> + <option name="PARAMETERS" value="-m 2 -c 1 -t 3" /> <option name="SHOW_COMMAND_LINE" value="false" /> <option name="EMULATE_TERMINAL" value="false" /> <option name="MODULE_MODE" value="false" /> diff --git a/config/obsw_config.py b/config/obsw_config.py index 0bc83a5bd8f598c4e073be6b56874cbd5b2b459d..a92d079c6598ab5bcc6df18cc4d2b694e0d69a72 100644 --- a/config/obsw_config.py +++ b/config/obsw_config.py @@ -20,6 +20,7 @@ Mission/Device specific information. # TODO: Automate / Autofill this file with the MIB parser # Object IDs +PUS_SERVICE_17 = bytearray([0x53, 0x00, 0x00, 0x17]) GPS0_DEVICE_ID = bytearray([0x44, 0x10, 0x1F, 0x00]) GPS1_DEVICE_ID = bytearray([0x44, 0x20, 0x20, 0x00]) DUMMY_DEVICE_ID = bytearray([0x44, 0x00, 0xAF, 0xFE]) diff --git a/obsw_tmtc_client.py b/obsw_tmtc_client.py index 21785befae88e7182a62cc28f7ae47099d3c2c56..69eb88c247c081de3f119e9638f3e1b8139317d1 100755 --- a/obsw_tmtc_client.py +++ b/obsw_tmtc_client.py @@ -159,11 +159,11 @@ class TmTcHandler: self.prompt_mode() if self.mode == g.ModeList.ListenerMode: - if self.tm_listener.event_reply_received.is_set(): + if self.tm_listener.reply_event(): LOGGER.info("TmTcHandler: Packets received.") self.tmtc_printer.print_telemetry_queue(self.tm_listener.retrieve_tm_packet_queue()) self.tm_listener.clear_tm_packet_queue() - self.tm_listener.event_reply_received.clear() + self.tm_listener.clear_reply_event() self.command_received = True elif self.mode == g.ModeList.SingleCommandMode: diff --git a/test/obsw_module_test.py b/test/obsw_module_test.py index 07b97cec3523a0a73e1c6d78fc63e88a33f2a511..fbdd1b609b3beed2f19d34c24108f6909c7bf47c 100644 --- a/test/obsw_module_test.py +++ b/test/obsw_module_test.py @@ -240,10 +240,12 @@ class TestService(unittest.TestCase): if current_tm_info[TmDictionaryKeys.SERVICE] == 1: self.scan_for_respective_tc(current_tm_info) # Here, the desired event Id or RID can be specified + elif current_tm_info[TmDictionaryKeys.SERVICE] == 5: # TODO: hardcoded values.. should be in config file - if (current_tm_info[TmDictionaryKeys.EVENT_ID] == 8300 and - current_tm_info[TmDictionaryKeys.REPORTER_ID] == 0x51001700): + if current_tm_info[TmDictionaryKeys.EVENT_ID] == 9700 and \ + current_tm_info[TmDictionaryKeys.REPORTER_ID] == \ + (struct.unpack('>I', g.PUS_SERVICE_17)[0]): self.event_counter = self.event_counter + 1 elif current_tm_info[TmDictionaryKeys.SERVICE] == 17: self.misc_counter = self.misc_counter + 1 diff --git a/tmtc_core b/tmtc_core index 156030a9485ee7607b1b82711f37cf5bf91d25a3..c1575e2bf8eb6b0a8c906cb84a544e9f8c75784d 160000 --- a/tmtc_core +++ b/tmtc_core @@ -1 +1 @@ -Subproject commit 156030a9485ee7607b1b82711f37cf5bf91d25a3 +Subproject commit c1575e2bf8eb6b0a8c906cb84a544e9f8c75784d