bump tmtccmd again

This commit is contained in:
Robin Müller 2023-01-16 17:45:46 +01:00
parent e5e19a8c04
commit ead4c91769
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
5 changed files with 22 additions and 8 deletions

View File

@ -9,6 +9,7 @@ from eive_tmtc.tmtc.power.tm import handle_get_param_data_reply
from tmtccmd.logging import get_console_logger
from tmtccmd.tm import Service8FsfwTm
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from spacepackets.ccsds.time import CdsShortTimestamp
LOGGER = get_console_logger()
@ -19,7 +20,9 @@ def handle_action_reply(
"""Core Action reply handler
:return:
"""
tm_packet = Service8FsfwTm.unpack(raw_telemetry=raw_tm)
tm_packet = Service8FsfwTm.unpack(
raw_telemetry=raw_tm, time_reader=CdsShortTimestamp.empty()
)
printer.handle_long_tm_print(packet_if=tm_packet, info_if=tm_packet)
object_id = obj_id_dict.get(tm_packet.source_object_id_as_bytes)
pw = PrintWrapper(printer)

View File

@ -11,13 +11,14 @@ from tmtccmd.tm import Service5Tm
from tmtccmd.logging import get_console_logger
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from tmtccmd.fsfw import EventInfo
from spacepackets.ccsds.time import CdsShortTimestamp
LOGGER = get_console_logger()
def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
pw = PrintWrapper(printer)
tm = Service5Tm.unpack(raw_telemetry=raw_tm)
tm = Service5Tm.unpack(raw_telemetry=raw_tm, time_reader=CdsShortTimestamp.empty())
event_dict = get_event_dict()
info = event_dict.get(tm.event_id)
if info is None:

View File

@ -4,6 +4,7 @@ from eive_tmtc.config.object_ids import get_object_ids
from spacepackets.ecss import PusTelemetry
from spacepackets.ecss.pus_17_test import Service17Tm
from spacepackets.util import PrintFormats
from spacepackets.ccsds.time import CdsShortTimestamp
from tmtccmd import get_console_logger
from tmtccmd.logging.pus import RawTmtcTimedLogWrapper
from tmtccmd.pus import VerificationWrapper
@ -30,7 +31,7 @@ def pus_factory_hook(
LOGGER.warning("Detected packet shorter than 8 bytes!")
return
try:
tm_packet = PusTelemetry.unpack(packet)
tm_packet = PusTelemetry.unpack(packet, CdsShortTimestamp.empty())
except ValueError:
LOGGER.warning("Could not generate PUS TM object from raw data")
LOGGER.warning(f"Raw Packet: [{packet.hex(sep=',')}], REPR: {packet!r}")
@ -48,15 +49,21 @@ def pus_factory_hook(
elif service == 8:
handle_action_reply(raw_tm=packet, printer=printer, obj_id_dict=obj_id_dict)
elif service == 17:
tm_packet = Service17Tm.unpack(raw_telemetry=packet)
tm_packet = Service17Tm.unpack(
raw_telemetry=packet, time_reader=CdsShortTimestamp.empty()
)
if tm_packet.subservice == 2:
verif_wrapper.dlog("Received Ping Reply TM[17,2]")
dedicated_handler = True
elif service == 20:
tm_packet = Service20FsfwTm.unpack(raw_telemetry=packet)
tm_packet = Service20FsfwTm.unpack(
raw_telemetry=packet, time_reader=CdsShortTimestamp.empty()
)
dedicated_handler = False
elif service == 200:
tm_packet = Service200FsfwTm.unpack(raw_telemetry=packet)
tm_packet = Service200FsfwTm.unpack(
raw_telemetry=packet, time_reader=CdsShortTimestamp.empty()
)
if tm_packet.subservice == ModeSubservices.TM_CANT_REACH_MODE:
obj_id = tm_packet.object_id
obj_id_obj = obj_id_dict.get(obj_id)

View File

@ -1,5 +1,6 @@
from typing import List, Optional
from spacepackets.ccsds import CdsShortTimestamp
from spacepackets.ecss.pus_1_verification import UnpackParams, Service1Tm
from tmtccmd.logging import get_console_logger
from tmtccmd.pus import VerificationWrapper
@ -15,7 +16,9 @@ def handle_service_1_fsfw_packet(wrapper: VerificationWrapper, raw_tm: bytes):
"Console logger or file logger not valid. Please set a valid one"
)
# Error code with length 2 is FSFW specific
tm_packet = Service1Tm.unpack(data=raw_tm, params=UnpackParams(1, 2))
tm_packet = Service1Tm.unpack(
data=raw_tm, params=UnpackParams(CdsShortTimestamp.empty(), 1, 2)
)
fsfw_wrapper = Service1FsfwWrapper(tm_packet)
res = wrapper.verificator.add_tm(tm_packet)
if res is None:

View File

@ -28,7 +28,7 @@ classifiers =
[options]
install_requires =
# tmtccmd @ git+https://github.com/robamu-org/tmtccmd@v4.0.0a1
tmtccmd @ git+https://github.com/robamu-org/tmtccmd@aea3c7d05fe88fdf683ea9a192fef02b871afcb0#egg=tmtccmd
tmtccmd @ git+https://github.com/robamu-org/tmtccmd@0f5544e0fd514#egg=tmtccmd
packages = find:
python_requires = >=3.10
include_package_data = True