bump tmtccmd again
This commit is contained in:
parent
e5e19a8c04
commit
ead4c91769
@ -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.logging import get_console_logger
|
||||||
from tmtccmd.tm import Service8FsfwTm
|
from tmtccmd.tm import Service8FsfwTm
|
||||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||||
|
from spacepackets.ccsds.time import CdsShortTimestamp
|
||||||
|
|
||||||
LOGGER = get_console_logger()
|
LOGGER = get_console_logger()
|
||||||
|
|
||||||
@ -19,7 +20,9 @@ def handle_action_reply(
|
|||||||
"""Core Action reply handler
|
"""Core Action reply handler
|
||||||
:return:
|
: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)
|
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)
|
object_id = obj_id_dict.get(tm_packet.source_object_id_as_bytes)
|
||||||
pw = PrintWrapper(printer)
|
pw = PrintWrapper(printer)
|
||||||
|
@ -11,13 +11,14 @@ from tmtccmd.tm import Service5Tm
|
|||||||
from tmtccmd.logging import get_console_logger
|
from tmtccmd.logging import get_console_logger
|
||||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||||
from tmtccmd.fsfw import EventInfo
|
from tmtccmd.fsfw import EventInfo
|
||||||
|
from spacepackets.ccsds.time import CdsShortTimestamp
|
||||||
|
|
||||||
LOGGER = get_console_logger()
|
LOGGER = get_console_logger()
|
||||||
|
|
||||||
|
|
||||||
def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
|
def handle_event_packet(raw_tm: bytes, printer: FsfwTmTcPrinter):
|
||||||
pw = PrintWrapper(printer)
|
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()
|
event_dict = get_event_dict()
|
||||||
info = event_dict.get(tm.event_id)
|
info = event_dict.get(tm.event_id)
|
||||||
if info is None:
|
if info is None:
|
||||||
|
@ -4,6 +4,7 @@ from eive_tmtc.config.object_ids import get_object_ids
|
|||||||
from spacepackets.ecss import PusTelemetry
|
from spacepackets.ecss import PusTelemetry
|
||||||
from spacepackets.ecss.pus_17_test import Service17Tm
|
from spacepackets.ecss.pus_17_test import Service17Tm
|
||||||
from spacepackets.util import PrintFormats
|
from spacepackets.util import PrintFormats
|
||||||
|
from spacepackets.ccsds.time import CdsShortTimestamp
|
||||||
from tmtccmd import get_console_logger
|
from tmtccmd import get_console_logger
|
||||||
from tmtccmd.logging.pus import RawTmtcTimedLogWrapper
|
from tmtccmd.logging.pus import RawTmtcTimedLogWrapper
|
||||||
from tmtccmd.pus import VerificationWrapper
|
from tmtccmd.pus import VerificationWrapper
|
||||||
@ -30,7 +31,7 @@ def pus_factory_hook(
|
|||||||
LOGGER.warning("Detected packet shorter than 8 bytes!")
|
LOGGER.warning("Detected packet shorter than 8 bytes!")
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
tm_packet = PusTelemetry.unpack(packet)
|
tm_packet = PusTelemetry.unpack(packet, CdsShortTimestamp.empty())
|
||||||
except ValueError:
|
except ValueError:
|
||||||
LOGGER.warning("Could not generate PUS TM object from raw data")
|
LOGGER.warning("Could not generate PUS TM object from raw data")
|
||||||
LOGGER.warning(f"Raw Packet: [{packet.hex(sep=',')}], REPR: {packet!r}")
|
LOGGER.warning(f"Raw Packet: [{packet.hex(sep=',')}], REPR: {packet!r}")
|
||||||
@ -48,15 +49,21 @@ def pus_factory_hook(
|
|||||||
elif service == 8:
|
elif service == 8:
|
||||||
handle_action_reply(raw_tm=packet, printer=printer, obj_id_dict=obj_id_dict)
|
handle_action_reply(raw_tm=packet, printer=printer, obj_id_dict=obj_id_dict)
|
||||||
elif service == 17:
|
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:
|
if tm_packet.subservice == 2:
|
||||||
verif_wrapper.dlog("Received Ping Reply TM[17,2]")
|
verif_wrapper.dlog("Received Ping Reply TM[17,2]")
|
||||||
dedicated_handler = True
|
dedicated_handler = True
|
||||||
elif service == 20:
|
elif service == 20:
|
||||||
tm_packet = Service20FsfwTm.unpack(raw_telemetry=packet)
|
tm_packet = Service20FsfwTm.unpack(
|
||||||
|
raw_telemetry=packet, time_reader=CdsShortTimestamp.empty()
|
||||||
|
)
|
||||||
dedicated_handler = False
|
dedicated_handler = False
|
||||||
elif service == 200:
|
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:
|
if tm_packet.subservice == ModeSubservices.TM_CANT_REACH_MODE:
|
||||||
obj_id = tm_packet.object_id
|
obj_id = tm_packet.object_id
|
||||||
obj_id_obj = obj_id_dict.get(obj_id)
|
obj_id_obj = obj_id_dict.get(obj_id)
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
|
from spacepackets.ccsds import CdsShortTimestamp
|
||||||
from spacepackets.ecss.pus_1_verification import UnpackParams, Service1Tm
|
from spacepackets.ecss.pus_1_verification import UnpackParams, Service1Tm
|
||||||
from tmtccmd.logging import get_console_logger
|
from tmtccmd.logging import get_console_logger
|
||||||
from tmtccmd.pus import VerificationWrapper
|
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"
|
"Console logger or file logger not valid. Please set a valid one"
|
||||||
)
|
)
|
||||||
# Error code with length 2 is FSFW specific
|
# 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)
|
fsfw_wrapper = Service1FsfwWrapper(tm_packet)
|
||||||
res = wrapper.verificator.add_tm(tm_packet)
|
res = wrapper.verificator.add_tm(tm_packet)
|
||||||
if res is None:
|
if res is None:
|
||||||
|
@ -28,7 +28,7 @@ classifiers =
|
|||||||
[options]
|
[options]
|
||||||
install_requires =
|
install_requires =
|
||||||
# tmtccmd @ git+https://github.com/robamu-org/tmtccmd@v4.0.0a1
|
# 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:
|
packages = find:
|
||||||
python_requires = >=3.10
|
python_requires = >=3.10
|
||||||
include_package_data = True
|
include_package_data = True
|
||||||
|
Loading…
Reference in New Issue
Block a user