Merge branch 'main' into petri_dev
This commit is contained in:
commit
bcdc0615c1
@ -36,11 +36,11 @@ class CustomServiceList(str, enum.Enum):
|
|||||||
PCDU = "pcdu"
|
PCDU = "pcdu"
|
||||||
PL_PCDU = "plpcdu"
|
PL_PCDU = "plpcdu"
|
||||||
SA_DEPLYOMENT = "sa_depl"
|
SA_DEPLYOMENT = "sa_depl"
|
||||||
REACTION_WHEEL_1 = "rw-1"
|
REACTION_WHEEL_1 = "rw_1"
|
||||||
REACTION_WHEEL_2 = "rw-2"
|
REACTION_WHEEL_2 = "rw_2"
|
||||||
REACTION_WHEEL_3 = "rw-3"
|
REACTION_WHEEL_3 = "rw_3"
|
||||||
REACTION_WHEEL_4 = "rw-4"
|
REACTION_WHEEL_4 = "rw_4"
|
||||||
RW_ASSEMBLY = "rw-ass"
|
RW_ASSEMBLY = "rw_ass"
|
||||||
RAD_SENSOR = "rad_sensor"
|
RAD_SENSOR = "rad_sensor"
|
||||||
GPS_CTRL = "gnss-ctrl"
|
GPS_CTRL = "gnss-ctrl"
|
||||||
PLOC_MEMORY_DUMPER = "ploc_memory_dumper"
|
PLOC_MEMORY_DUMPER = "ploc_memory_dumper"
|
||||||
@ -50,11 +50,11 @@ class CustomServiceList(str, enum.Enum):
|
|||||||
PDEC_HANDLER = "pdec_handler"
|
PDEC_HANDLER = "pdec_handler"
|
||||||
STR_IMG_HELPER = "str_img_helper"
|
STR_IMG_HELPER = "str_img_helper"
|
||||||
SYRLINKS = "syrlinks"
|
SYRLINKS = "syrlinks"
|
||||||
ACS_CTRL = "acs-ctrl"
|
ACS_CTRL = "acs_ctrl"
|
||||||
ACS_ASS = "acs-ass"
|
ACS_ASS = "acs_ass"
|
||||||
SUS_ASS = "sus-ass"
|
SUS_ASS = "sus_ass"
|
||||||
TCS = "tcs"
|
TCS = "tcs"
|
||||||
TCS_ASS = "tcs-ass"
|
TCS_ASS = "tcs_ass"
|
||||||
TIME = "time"
|
TIME = "time"
|
||||||
PROCEDURE = "proc"
|
PROCEDURE = "proc"
|
||||||
RTD = "rtd"
|
RTD = "rtd"
|
||||||
|
@ -16,9 +16,9 @@ from config.object_ids import TCS_BOARD_ASS_ID, TCS_CONTROLLER
|
|||||||
|
|
||||||
|
|
||||||
class OpCodes:
|
class OpCodes:
|
||||||
TCS_BOARD_ASS_NORMAL = ["0", "tcs-normal"]
|
TCS_BOARD_ASS_NORMAL = ["0", "normal"]
|
||||||
TCS_BOARD_ASS_OFF = ["1", "tcs-off"]
|
TCS_BOARD_ASS_OFF = ["1", "off"]
|
||||||
REQUEST_SENSOR_TEMP_SET = ["2", "temp-hk"]
|
REQUEST_SENSOR_TEMP_SET = ["2", "temps"]
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class Info:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
"""HK Handling for EIVE OBSW"""
|
"""HK Handling for EIVE OBSW"""
|
||||||
from pus_tm.tcp_server_objects import tcp_server_sensor_temperatures
|
# from pus_tm.tcp_server_objects import TCP_SEVER_SENSOR_TEMPERATURES
|
||||||
from tmtc.acs_ctrl import handle_acs_ctrl_mgm_data
|
from tmtc.acs_ctrl import handle_acs_ctrl_mgm_data
|
||||||
from pus_tm.devs.plpcdu import handle_plpcdu_hk
|
from pus_tm.devs.plpcdu import handle_plpcdu_hk
|
||||||
from pus_tm.devs.rad_sensor import handle_rad_sensor_data
|
from pus_tm.devs.rad_sensor import handle_rad_sensor_data
|
||||||
@ -51,9 +51,11 @@ def handle_hk_packet(
|
|||||||
if tm_packet.subservice == 25 or tm_packet.subservice == 26:
|
if tm_packet.subservice == 25 or tm_packet.subservice == 26:
|
||||||
hk_data = tm_packet.tm_data[8:]
|
hk_data = tm_packet.tm_data[8:]
|
||||||
if FORWARD_SENSOR_TEMPS:
|
if FORWARD_SENSOR_TEMPS:
|
||||||
tcp_server_sensor_temperatures.report_raw_hk_data(
|
# TODO: Maybe use singleton?
|
||||||
object_id=named_obj_id, set_id=tm_packet.set_id, hk_data=hk_data
|
# TCP_SEVER_SENSOR_TEMPERATURES.report_raw_hk_data(
|
||||||
)
|
# object_id=named_obj_id, set_id=tm_packet.set_id, hk_data=hk_data
|
||||||
|
# )
|
||||||
|
pass
|
||||||
printer.generic_hk_tm_print(
|
printer.generic_hk_tm_print(
|
||||||
content_type=HkContentType.HK,
|
content_type=HkContentType.HK,
|
||||||
object_id=named_obj_id,
|
object_id=named_obj_id,
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
import enum
|
import enum
|
||||||
|
import pprint
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
from pus_tm.defs import PrintWrapper
|
from pus_tm.defs import PrintWrapper
|
||||||
from pus_tm.tcp_server_objects import (
|
|
||||||
tcp_server_sensor_temperatures,
|
|
||||||
tcp_server_device_temperatures,
|
|
||||||
)
|
|
||||||
from pus_tm.tm_tcp_server import TmTcpServer
|
|
||||||
from tmtccmd.util import ObjectIdU32
|
from tmtccmd.util import ObjectIdU32
|
||||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||||
|
|
||||||
@ -20,10 +16,13 @@ class SetIds(enum.IntEnum):
|
|||||||
def handle_thermal_controller_hk_data(
|
def handle_thermal_controller_hk_data(
|
||||||
object_id: ObjectIdU32, printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes
|
object_id: ObjectIdU32, printer: FsfwTmTcPrinter, set_id: int, hk_data: bytes
|
||||||
):
|
):
|
||||||
if tcp_server_sensor_temperatures is None:
|
# need a better solutuon for this is this is used again..
|
||||||
tcp_server_sensor_temperatures = TmTcpServer("localhost", 7305)
|
"""
|
||||||
if tcp_server_device_temperatures is None:
|
if TCP_TEMP_SENS_SERVER is None:
|
||||||
tcp_server_device_temperatures = TmTcpServer("localhost", 7306)
|
TCP_TEMP_SENS_SERVER = TmTcpServer("localhost", 7305)
|
||||||
|
if TCP_TEMP_DEV_SERVER:
|
||||||
|
TCP_TEMP_DEV_SERVER = TmTcpServer("localhost", 7306)
|
||||||
|
"""
|
||||||
if set_id == SetIds.SENSOR_TEMPERATURE_SET:
|
if set_id == SetIds.SENSOR_TEMPERATURE_SET:
|
||||||
pw = PrintWrapper(printer)
|
pw = PrintWrapper(printer)
|
||||||
pw.dlog("Received sensor temperature data")
|
pw.dlog("Received sensor temperature data")
|
||||||
@ -51,9 +50,11 @@ def handle_thermal_controller_hk_data(
|
|||||||
"TMP1075 2": tm_data[17],
|
"TMP1075 2": tm_data[17],
|
||||||
}
|
}
|
||||||
printer.file_logger.info(str(parsed_data))
|
printer.file_logger.info(str(parsed_data))
|
||||||
tcp_server_sensor_temperatures.report_parsed_hk_data(
|
pp = pprint.PrettyPrinter(depth=4)
|
||||||
object_id, set_id, parsed_data
|
pp.pprint(parsed_data)
|
||||||
)
|
# tcp_server_sensor_temperatures.report_parsed_hk_data(
|
||||||
|
# object_id, set_id, parsed_data
|
||||||
|
# )
|
||||||
elif set_id == SetIds.DEVICE_TEMPERATURE_SET:
|
elif set_id == SetIds.DEVICE_TEMPERATURE_SET:
|
||||||
pw = PrintWrapper(printer)
|
pw = PrintWrapper(printer)
|
||||||
pw.dlog("Received device temperature data")
|
pw.dlog("Received device temperature data")
|
||||||
@ -88,10 +89,13 @@ def handle_thermal_controller_hk_data(
|
|||||||
"MGM_1_TEMPERATURE": tm_data[25],
|
"MGM_1_TEMPERATURE": tm_data[25],
|
||||||
"ADC_PL_PCDU_TEMPERATURE": tm_data[26],
|
"ADC_PL_PCDU_TEMPERATURE": tm_data[26],
|
||||||
}
|
}
|
||||||
|
printer.file_logger.info(str(parsed_data))
|
||||||
|
pp = pprint.PrettyPrinter(depth=4)
|
||||||
|
pp.pprint(parsed_data)
|
||||||
# print(parsed_data)
|
# print(parsed_data)
|
||||||
tcp_server_device_temperatures.report_parsed_hk_data(
|
# tcp_server_device_temperatures.report_parsed_hk_data(
|
||||||
object_id, set_id, parsed_data
|
# object_id, set_id, parsed_data
|
||||||
)
|
# )
|
||||||
elif set_id == SetIds.SUS_TEMPERATURE_SET:
|
elif set_id == SetIds.SUS_TEMPERATURE_SET:
|
||||||
pass
|
pass
|
||||||
# pw = PrintWrapper(printer)
|
# pw = PrintWrapper(printer)
|
||||||
|
@ -2,5 +2,5 @@ from typing import Optional
|
|||||||
|
|
||||||
from pus_tm.tm_tcp_server import TmTcpServer
|
from pus_tm.tm_tcp_server import TmTcpServer
|
||||||
|
|
||||||
tcp_server_sensor_temperatures: Optional[TmTcpServer] = None
|
TCP_SERVER_SENSOR_TEMPERATURES: Optional[TmTcpServer] = None
|
||||||
tcp_server_device_temperatures: Optional[TmTcpServer] = None
|
TCP_SERVER_DEVICE_TEMPERATURES: Optional[TmTcpServer] = None
|
||||||
|
Loading…
Reference in New Issue
Block a user