add ploc supv hk handling
This commit is contained in:
parent
d8b0d81ef3
commit
26e656faf0
24
.run/PLOC SUPV Normal.run.xml
Normal file
24
.run/PLOC SUPV Normal.run.xml
Normal 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
24
.run/PLOC SUPV On.run.xml
Normal 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
24
.run/PLOC SUPV.run.xml
Normal 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>
|
@ -1,9 +1,11 @@
|
|||||||
"""HK Handling for EIVE OBSW"""
|
"""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 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
|
||||||
from pus_tm.devs.sus import handle_sus_hk
|
from pus_tm.devs.sus import handle_sus_hk
|
||||||
from pus_tm.system.tcs import handle_thermal_controller_hk_data
|
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 (
|
from tmtccmd.tm.pus_3_fsfw_hk import (
|
||||||
Service3Base,
|
Service3Base,
|
||||||
HkContentType,
|
HkContentType,
|
||||||
@ -34,6 +36,9 @@ import config.object_ids as obj_ids
|
|||||||
LOGGER = get_console_logger()
|
LOGGER = get_console_logger()
|
||||||
|
|
||||||
|
|
||||||
|
FORWARD_SENSOR_TEMPS = False
|
||||||
|
|
||||||
|
|
||||||
def handle_hk_packet(
|
def handle_hk_packet(
|
||||||
raw_tm: bytes,
|
raw_tm: bytes,
|
||||||
obj_id_dict: ObjectIdDictT,
|
obj_id_dict: ObjectIdDictT,
|
||||||
@ -45,9 +50,10 @@ def handle_hk_packet(
|
|||||||
named_obj_id = tm_packet.object_id
|
named_obj_id = tm_packet.object_id
|
||||||
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:]
|
||||||
# tcp_server_sensor_temperatures.report_raw_hk_data(
|
if FORWARD_SENSOR_TEMPS:
|
||||||
# object_id=named_obj_id, set_id=tm_packet.set_id, hk_data=hk_data
|
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(
|
printer.generic_hk_tm_print(
|
||||||
content_type=HkContentType.HK,
|
content_type=HkContentType.HK,
|
||||||
object_id=named_obj_id,
|
object_id=named_obj_id,
|
||||||
@ -160,6 +166,8 @@ def handle_regular_hk_print(
|
|||||||
handle_thermal_controller_hk_data(
|
handle_thermal_controller_hk_data(
|
||||||
object_id=object_id, printer=printer, set_id=set_id, hk_data=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:
|
elif objb == obj_ids.ACS_CONTROLLER:
|
||||||
handle_acs_ctrl_mgm_data(printer, hk_data)
|
handle_acs_ctrl_mgm_data(printer, hk_data)
|
||||||
else:
|
else:
|
||||||
|
@ -19,6 +19,7 @@ from tmtccmd.logging import get_console_logger
|
|||||||
from tmtccmd.tc import service_provider
|
from tmtccmd.tc import service_provider
|
||||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
|
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
|
from utility.input_helper import InputHelper
|
||||||
|
|
||||||
LOGGER = get_console_logger()
|
LOGGER = get_console_logger()
|
||||||
@ -681,3 +682,7 @@ def get_event_buffer_path() -> str:
|
|||||||
else:
|
else:
|
||||||
file = event_buffer_path_dict[key][1]
|
file = event_buffer_path_dict[key][1]
|
||||||
return file
|
return file
|
||||||
|
|
||||||
|
|
||||||
|
def handle_supv_hk_data(set_id: int, hk_data: bytes, printer: FsfwTmTcPrinter):
|
||||||
|
pass
|
||||||
|
8
tmtcc.py
8
tmtcc.py
@ -51,8 +51,12 @@ from tmtccmd.tc import (
|
|||||||
from tmtccmd.config import default_json_path, SetupWrapper
|
from tmtccmd.config import default_json_path, SetupWrapper
|
||||||
from tmtccmd.config.args import (
|
from tmtccmd.config.args import (
|
||||||
SetupParams,
|
SetupParams,
|
||||||
ArgParserWrapper, create_default_args_parser, add_default_com_if_arguments,
|
ArgParserWrapper,
|
||||||
add_default_mode_arguments, add_generic_arguments, add_ethernet_arguments,
|
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 import __version__
|
||||||
from config.definitions import PUS_APID
|
from config.definitions import PUS_APID
|
||||||
|
Loading…
Reference in New Issue
Block a user