added missing changes from pyclient
This commit is contained in:
@ -7,6 +7,8 @@ import sys
|
||||
import time
|
||||
from typing import Optional
|
||||
import datetime
|
||||
import json
|
||||
import pprint
|
||||
|
||||
import tmtccmd
|
||||
from spacepackets.ecss import PusTelemetry, PusTelecommand, PusVerificator
|
||||
@ -169,13 +171,15 @@ class PusHandler(SpecificApidHandlerBase):
|
||||
self.verif_wrapper.log_to_file(tm_packet, res)
|
||||
dedicated_handler = True
|
||||
if service == 3:
|
||||
_LOGGER.info("No handling for HK packets implemented")
|
||||
_LOGGER.info(f"Raw packet: 0x[{packet.hex(sep=',')}]")
|
||||
# _LOGGER.info("No handling for HK packets implemented")
|
||||
# _LOGGER.info(f"Raw packet: 0x[{packet.hex(sep=',')}]")
|
||||
pus_tm = PusTelemetry.unpack(packet, time_reader=CdsShortTimestamp.empty())
|
||||
if pus_tm.subservice == 25:
|
||||
if len(pus_tm.source_data) < 8:
|
||||
raise ValueError("No addressable ID in HK packet")
|
||||
json_str = pus_tm.source_data[8:]
|
||||
json_str = str(pus_tm.source_data[8:].decode('utf8'))
|
||||
json_object = json.loads(json_str)
|
||||
pprint.pprint(json_object)
|
||||
dedicated_handler = True
|
||||
if service == 5:
|
||||
tm_packet = Service5Tm.unpack(packet, time_reader=CdsShortTimestamp.empty())
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"com_if": "udp",
|
||||
"tcpip_udp_ip_addr": "169.254.7.6",
|
||||
"tcpip_udp_ip_addr": "192.168.1.116",
|
||||
"tcpip_udp_port": 7301,
|
||||
"tcpip_udp_recv_max_size": 1500
|
||||
}
|
Reference in New Issue
Block a user