add ploc supv hk handling

This commit is contained in:
Robin Müller 2022-08-19 14:48:10 +02:00
parent d8b0d81ef3
commit 26e656faf0
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
6 changed files with 94 additions and 5 deletions

View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="PLOC SUPV Normal" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
<option name="PARAMETERS" value="tmtc -s ploc_supv -o nml" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

24
.run/PLOC SUPV On.run.xml Normal file
View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="PLOC SUPV On" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
<option name="PARAMETERS" value="tmtc -s ploc_supv -o on" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

24
.run/PLOC SUPV.run.xml Normal file
View File

@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="PLOC SUPV" type="PythonConfigurationType" factoryName="Python" folderName="PLOC">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcc.py" />
<option name="PARAMETERS" value="tmtc -s ploc_supv -d 6" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="true" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
</component>

View File

@ -1,9 +1,11 @@
"""HK Handling for EIVE OBSW"""
from pus_tm.tcp_server_objects import tcp_server_sensor_temperatures
from tmtc.acs_ctrl import handle_acs_ctrl_mgm_data
from pus_tm.devs.plpcdu import handle_plpcdu_hk
from pus_tm.devs.rad_sensor import handle_rad_sensor_data
from pus_tm.devs.sus import handle_sus_hk
from pus_tm.system.tcs import handle_thermal_controller_hk_data
from tmtc.ploc_supervisor import handle_supv_hk_data
from tmtccmd.tm.pus_3_fsfw_hk import (
Service3Base,
HkContentType,
@ -34,6 +36,9 @@ import config.object_ids as obj_ids
LOGGER = get_console_logger()
FORWARD_SENSOR_TEMPS = False
def handle_hk_packet(
raw_tm: bytes,
obj_id_dict: ObjectIdDictT,
@ -45,9 +50,10 @@ def handle_hk_packet(
named_obj_id = tm_packet.object_id
if tm_packet.subservice == 25 or tm_packet.subservice == 26:
hk_data = tm_packet.tm_data[8:]
# tcp_server_sensor_temperatures.report_raw_hk_data(
# object_id=named_obj_id, set_id=tm_packet.set_id, hk_data=hk_data
# )
if FORWARD_SENSOR_TEMPS:
tcp_server_sensor_temperatures.report_raw_hk_data(
object_id=named_obj_id, set_id=tm_packet.set_id, hk_data=hk_data
)
printer.generic_hk_tm_print(
content_type=HkContentType.HK,
object_id=named_obj_id,
@ -160,6 +166,8 @@ def handle_regular_hk_print(
handle_thermal_controller_hk_data(
object_id=object_id, printer=printer, set_id=set_id, hk_data=hk_data
)
elif objb == obj_ids.PLOC_SUPV_ID:
handle_supv_hk_data(set_id=set_id, hk_data=hk_data, printer=printer)
elif objb == obj_ids.ACS_CONTROLLER:
handle_acs_ctrl_mgm_data(printer, hk_data)
else:

View File

@ -19,6 +19,7 @@ from tmtccmd.logging import get_console_logger
from tmtccmd.tc import service_provider
from tmtccmd.tc.decorator import ServiceProviderParams
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
from utility.input_helper import InputHelper
LOGGER = get_console_logger()
@ -681,3 +682,7 @@ def get_event_buffer_path() -> str:
else:
file = event_buffer_path_dict[key][1]
return file
def handle_supv_hk_data(set_id: int, hk_data: bytes, printer: FsfwTmTcPrinter):
pass

View File

@ -51,8 +51,12 @@ from tmtccmd.tc import (
from tmtccmd.config import default_json_path, SetupWrapper
from tmtccmd.config.args import (
SetupParams,
ArgParserWrapper, create_default_args_parser, add_default_com_if_arguments,
add_default_mode_arguments, add_generic_arguments, add_ethernet_arguments,
ArgParserWrapper,
create_default_args_parser,
add_default_com_if_arguments,
add_default_mode_arguments,
add_generic_arguments,
add_ethernet_arguments,
)
from config import __version__
from config.definitions import PUS_APID