Internal error reporter #211

Merged
meggert merged 4 commits from internal-error-reporter into main 2023-06-28 13:16:38 +02:00
6 changed files with 33 additions and 1 deletions
Showing only changes of commit ddc80071e0 - Show all commits

View File

@ -10,6 +10,10 @@ list yields a list of all related PRs for each release.
# [unreleased] # [unreleased]
## Added
- Internal error reporter dataset handling.
# [v5.0.0] # [v5.0.0]
## Changed ## Changed

View File

@ -18,6 +18,7 @@ __OBJECT_ID_DICT = None
# Core Object IDs # Core Object IDs
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2]) SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
INTERNAL_ERROR_REPORTER_ID = bytes([0x53, 0x04, 0x00, 0x00])
# Power Object IDs # Power Object IDs
PCDU_HANDLER_ID = bytes([0x44, 0x20, 0x00, 0xA1]) PCDU_HANDLER_ID = bytes([0x44, 0x20, 0x00, 0xA1])

View File

@ -3,6 +3,7 @@ import logging
# from pus_tm.tcp_server_objects import TCP_SEVER_SENSOR_TEMPERATURES # from pus_tm.tcp_server_objects import TCP_SEVER_SENSOR_TEMPERATURES
from eive_tmtc.tmtc.acs.acs_ctrl import handle_acs_ctrl_hk_data from eive_tmtc.tmtc.acs.acs_ctrl import handle_acs_ctrl_hk_data
from eive_tmtc.tmtc.internal_err_reporter import handle_ier_hk_data
from eive_tmtc.tmtc.payload.ploc_mpsoc import handle_ploc_mpsoc_hk_data from eive_tmtc.tmtc.payload.ploc_mpsoc import handle_ploc_mpsoc_hk_data
from eive_tmtc.tmtc.tcs.rtd import RTD_NAMES, handle_rtd_hk from eive_tmtc.tmtc.tcs.rtd import RTD_NAMES, handle_rtd_hk
from eive_tmtc.tmtc.acs.star_tracker import handle_str_hk_data from eive_tmtc.tmtc.acs.star_tracker import handle_str_hk_data
@ -122,6 +123,8 @@ def handle_regular_hk_print( # noqa C901: Complexity okay here
return handle_ploc_mpsoc_hk_data(pw=pw, hk_data=hk_data, set_id=set_id) return handle_ploc_mpsoc_hk_data(pw=pw, hk_data=hk_data, set_id=set_id)
elif objb == obj_ids.ACU_HANDLER_ID: elif objb == obj_ids.ACU_HANDLER_ID:
return handle_acu_hk_data(pw=pw, hk_data=hk_data, set_id=set_id) return handle_acu_hk_data(pw=pw, hk_data=hk_data, set_id=set_id)
elif objb == obj_ids.INTERNAL_ERROR_REPORTER_ID:
return handle_ier_hk_data(pw=pw, hk_data=hk_data, set_id=set_id)
elif objb == obj_ids.RAD_SENSOR_ID: elif objb == obj_ids.RAD_SENSOR_ID:
return handle_rad_sensor_data(pw=pw, hk_data=hk_data, set_id=set_id) return handle_rad_sensor_data(pw=pw, hk_data=hk_data, set_id=set_id)
elif objb in [obj_ids.RW1_ID, obj_ids.RW2_ID, obj_ids.RW3_ID, obj_ids.RW4_ID]: elif objb in [obj_ids.RW1_ID, obj_ids.RW2_ID, obj_ids.RW3_ID, obj_ids.RW4_ID]:

View File

@ -0,0 +1,24 @@
import enum
import struct
from tmtccmd.fsfw.tmtc_printer import FsfwTmTcPrinter
from eive_tmtc.pus_tm.defs import PrintWrapper
class SetId(enum.IntEnum):
ERROR_ID = 0
def handle_ier_hk_data(pw: PrintWrapper, hk_data: bytes, set_id: int):
pw.dlog(f"Received internal error reporter HK data with set ID {set_id}")
if set_id == SetId.ERROR_ID:
fmt_str = "!III"
inc_len = struct.calcsize(fmt_str)
(tm_errors, queue_errors, store_hits) = struct.unpack(
fmt_str, hk_data[:inc_len]
)
pw.dlog(f"TM Errors: {tm_errors}")
pw.dlog(f"Queue Errors: {queue_errors}")
pw.dlog(f"Store Errors: {store_hits}")
pw.dlog(FsfwTmTcPrinter.get_validity_buffer(hk_data[inc_len:], 3))

View File

@ -94,7 +94,7 @@ from eive_tmtc.config.definitions import (
CFDP_REMOTE_ENTITY_ID, CFDP_REMOTE_ENTITY_ID,
) )
from eive_tmtc.config.hook import EiveHookObject from eive_tmtc.config.hook import EiveHookObject
from eive_tmtc.pus_tm.factory_hook import pus_factory_hook from eive_tmtc.pus_tm.pus_demux import pus_factory_hook
from eive_tmtc.pus_tc.procedure_packer import handle_default_procedure from eive_tmtc.pus_tc.procedure_packer import handle_default_procedure
_LOGGER = APP_LOGGER _LOGGER = APP_LOGGER