Skip to content

Commit

Permalink
pus 17 and prinotut improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed May 19, 2022
1 parent 4433284 commit bca6440
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/tmtccmd/tm/pus_17_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ def __init__(
)
PusTmBase.__init__(self, pus_tm=self.pus_tm)
PusTmInfoBase.__init__(self, pus_tm=self.pus_tm)
if self.subservice == Subservices.TM_REPLY:
self.set_packet_info("Ping Reply")
self.__set_internal_fields()

@classmethod
def __empty(cls) -> Service17TMExtended:
return cls(subservice=0)

def __set_internal_fields(self):
if self.subservice == Subservices.TM_REPLY:
self.set_packet_info("Ping Reply")

@classmethod
def unpack(
cls,
Expand All @@ -53,4 +56,5 @@ def unpack(
service_17_tm.pus_tm = PusTelemetry.unpack(
raw_telemetry=raw_telemetry, pus_version=pus_version
)
service_17_tm.__set_internal_fields()
return service_17_tm
4 changes: 2 additions & 2 deletions src/tmtccmd/utility/tmtc_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __init__(

@staticmethod
def generic_short_string(packet_if: PusTmInterface) -> str:
return f"Received TM[{packet_if.service}, {packet_if.subservice}]"
return f"Got TM[{packet_if.service}, {packet_if.subservice}]"

def handle_long_tm_print(
self, packet_if: PusTmInterface, info_if: PusTmInfoInterface
Expand All @@ -49,7 +49,7 @@ def handle_long_tm_print(
:param info_if: Information interface
:return:
"""
base_string = "Received Telemetry: " + info_if.get_print_info()
base_string = "Got TM: " + info_if.get_print_info()
LOGGER.info(base_string)
if self.file_logger is not None:
self.file_logger.info(f"{get_current_time_string(True)}: {base_string}")
Expand Down

0 comments on commit bca6440

Please sign in to comment.