supervisor event buffer request

This commit is contained in:
Jakob Meier 2022-04-14 07:53:18 +02:00
parent f2d3f8c68c
commit a3d9e83dc6
4 changed files with 79 additions and 12 deletions

View File

@ -141,15 +141,18 @@
12100;0x2f44;SUPV_UPDATE_FAILED;LOW;update failed;linux\devices\ploc\PlocSupvHelper.h 12100;0x2f44;SUPV_UPDATE_FAILED;LOW;update failed;linux\devices\ploc\PlocSupvHelper.h
12101;0x2f45;SUPV_UPDATE_SUCCESSFUL;LOW;update successful;linux\devices\ploc\PlocSupvHelper.h 12101;0x2f45;SUPV_UPDATE_SUCCESSFUL;LOW;update successful;linux\devices\ploc\PlocSupvHelper.h
12102;0x2f46;TERMINATED_UPDATE_PROCEDURE;LOW;Terminated update procedure by command;linux\devices\ploc\PlocSupvHelper.h 12102;0x2f46;TERMINATED_UPDATE_PROCEDURE;LOW;Terminated update procedure by command;linux\devices\ploc\PlocSupvHelper.h
12103;0x2f47;SUPV_SENDING_COMMAND_FAILED;LOW;;linux\devices\ploc\PlocSupvHelper.h 12103;0x2f47;SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL;LOW;Requesting event buffer was successful;linux\devices\ploc\PlocSupvHelper.h
12104;0x2f48;SUPV_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h 12104;0x2f48;SUPV_EVENT_BUFFER_REQUEST_FAILED;LOW;Requesting event buffer failed;linux\devices\ploc\PlocSupvHelper.h
12105;0x2f49;SUPV_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h 12105;0x2f49;SUPV_EVENT_BUFFER_REQUEST_TERMINATED;LOW;Terminated event buffer request by command P1: Number of packets read before process was terminated;linux\devices\ploc\PlocSupvHelper.h
12106;0x2f4a;SUPV_MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux\devices\ploc\PlocSupvHelper.h 12106;0x2f4a;SUPV_SENDING_COMMAND_FAILED;LOW;;linux\devices\ploc\PlocSupvHelper.h
12107;0x2f4b;SUPV_MISSING_EXE;LOW;Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h 12107;0x2f4b;SUPV_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12108;0x2f4c;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h 12108;0x2f4c;SUPV_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12109;0x2f4d;SUPV_EXE_FAILURE_REPORT;LOW;Supervisor received execution failure report P1: Internal state of supervisor;linux\devices\ploc\PlocSupvHelper.h 12109;0x2f4d;SUPV_MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux\devices\ploc\PlocSupvHelper.h
12110;0x2f4e;SUPV_ACK_INVALID_APID;LOW;Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h 12110;0x2f4e;SUPV_MISSING_EXE;LOW;Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12111;0x2f4f;SUPV_EXE_INVALID_APID;LOW;Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h 12111;0x2f4f;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12112;0x2f50;SUPV_EXE_FAILURE_REPORT;LOW;Supervisor received execution failure report P1: Internal state of supervisor;linux\devices\ploc\PlocSupvHelper.h
12113;0x2f51;SUPV_ACK_INVALID_APID;LOW;Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12114;0x2f52;SUPV_EXE_INVALID_APID;LOW;Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux\devices\ploc\PlocSupvHelper.h
12200;0x2fa8;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission\devices\PayloadPcduHandler.h 12200;0x2fa8;TRANSITION_BACK_TO_OFF;MEDIUM;Could not transition properly and went back to ALL OFF;mission\devices\PayloadPcduHandler.h
12201;0x2fa9;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h 12201;0x2fa9;NEG_V_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h
12202;0x2faa;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h 12202;0x2faa;U_DRO_OUT_OF_BOUNDS;MEDIUM;P1: 0 -> too low, 1 -> too high P2: Float value;mission\devices\PayloadPcduHandler.h

1 2200 0x0898 STORE_SEND_WRITE_FAILED LOW fsfw\src\fsfw\tmstorage\TmStoreBackendIF.h
141 12100 0x2f44 SUPV_UPDATE_FAILED LOW update failed linux\devices\ploc\PlocSupvHelper.h
142 12101 0x2f45 SUPV_UPDATE_SUCCESSFUL LOW update successful linux\devices\ploc\PlocSupvHelper.h
143 12102 0x2f46 TERMINATED_UPDATE_PROCEDURE LOW Terminated update procedure by command linux\devices\ploc\PlocSupvHelper.h
144 12103 0x2f47 SUPV_SENDING_COMMAND_FAILED SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL LOW Requesting event buffer was successful linux\devices\ploc\PlocSupvHelper.h
145 12104 0x2f48 SUPV_HELPER_REQUESTING_REPLY_FAILED SUPV_EVENT_BUFFER_REQUEST_FAILED LOW Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper Requesting event buffer failed linux\devices\ploc\PlocSupvHelper.h
146 12105 0x2f49 SUPV_HELPER_READING_REPLY_FAILED SUPV_EVENT_BUFFER_REQUEST_TERMINATED LOW Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper Terminated event buffer request by command P1: Number of packets read before process was terminated linux\devices\ploc\PlocSupvHelper.h
147 12106 0x2f4a SUPV_MISSING_ACK SUPV_SENDING_COMMAND_FAILED LOW Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper linux\devices\ploc\PlocSupvHelper.h
148 12107 0x2f4b SUPV_MISSING_EXE SUPV_HELPER_REQUESTING_REPLY_FAILED LOW Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper linux\devices\ploc\PlocSupvHelper.h
149 12108 0x2f4c SUPV_ACK_FAILURE_REPORT SUPV_HELPER_READING_REPLY_FAILED LOW Supervisor received acknowledgment failure report P1: Internal state of supervisor helper Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper linux\devices\ploc\PlocSupvHelper.h
150 12109 0x2f4d SUPV_EXE_FAILURE_REPORT SUPV_MISSING_ACK LOW Supervisor received execution failure report P1: Internal state of supervisor Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper linux\devices\ploc\PlocSupvHelper.h
151 12110 0x2f4e SUPV_ACK_INVALID_APID SUPV_MISSING_EXE LOW Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper linux\devices\ploc\PlocSupvHelper.h
152 12111 0x2f4f SUPV_EXE_INVALID_APID SUPV_ACK_FAILURE_REPORT LOW Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper Supervisor received acknowledgment failure report P1: Internal state of supervisor helper linux\devices\ploc\PlocSupvHelper.h
153 12112 0x2f50 SUPV_EXE_FAILURE_REPORT LOW Supervisor received execution failure report P1: Internal state of supervisor linux\devices\ploc\PlocSupvHelper.h
154 12113 0x2f51 SUPV_ACK_INVALID_APID LOW Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper linux\devices\ploc\PlocSupvHelper.h
155 12114 0x2f52 SUPV_EXE_INVALID_APID LOW Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper linux\devices\ploc\PlocSupvHelper.h
156 12200 0x2fa8 TRANSITION_BACK_TO_OFF MEDIUM Could not transition properly and went back to ALL OFF mission\devices\PayloadPcduHandler.h
157 12201 0x2fa9 NEG_V_OUT_OF_BOUNDS MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission\devices\PayloadPcduHandler.h
158 12202 0x2faa U_DRO_OUT_OF_BOUNDS MEDIUM P1: 0 -> too low, 1 -> too high P2: Float value mission\devices\PayloadPcduHandler.h

View File

@ -493,7 +493,9 @@
0x61a1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;0xA1;linux\devices\ploc\PlocMemoryDumper.h;PLOC_MEMORY_DUMPER 0x61a1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;0xA1;linux\devices\ploc\PlocMemoryDumper.h;PLOC_MEMORY_DUMPER
0x68a0; PLMPHLP_FileClosedAccidentally;File accidentally close;0xA0;linux\devices\ploc\PlocMPSoCHelper.h;PLOC_MPSOC_HELPER 0x68a0; PLMPHLP_FileClosedAccidentally;File accidentally close;0xA0;linux\devices\ploc\PlocMPSoCHelper.h;PLOC_MPSOC_HELPER
0x5aa0;PLSPVhLP_FileClosedAccidentally;File accidentally close;0xA0;linux\devices\ploc\PlocSupvHelper.h;PLOC_SUPV_HELPER 0x5aa0;PLSPVhLP_FileClosedAccidentally;File accidentally close;0xA0;linux\devices\ploc\PlocSupvHelper.h;PLOC_SUPV_HELPER
0x5aa1;PLSPVhLP_ProcessTerminated;;0xA1;linux\devices\ploc\PlocSupvHelper.h;PLOC_SUPV_HELPER 0x5aa1;PLSPVhLP_ProcessTerminated;Process has been terminated by command;0xA1;linux\devices\ploc\PlocSupvHelper.h;PLOC_SUPV_HELPER
0x5aa2;PLSPVhLP_PathNotExists;Received command with invalid pathname;0xA2;linux\devices\ploc\PlocSupvHelper.h;PLOC_SUPV_HELPER
0x5aa3;PLSPVhLP_EventBufferReplyInvalidApid;Expected event buffer TM but received space packet with other APID;0xA3;linux\devices\ploc\PlocSupvHelper.h;PLOC_SUPV_HELPER
0x56a0;STRH_TemperatureReqFailed;Status in temperature reply signals error;0xA0;linux\devices\startracker\StarTrackerHandler.h;STR_HANDLER 0x56a0;STRH_TemperatureReqFailed;Status in temperature reply signals error;0xA0;linux\devices\startracker\StarTrackerHandler.h;STR_HANDLER
0x56a1;STRH_PingFailed;Ping command failed;0xA1;linux\devices\startracker\StarTrackerHandler.h;STR_HANDLER 0x56a1;STRH_PingFailed;Ping command failed;0xA1;linux\devices\startracker\StarTrackerHandler.h;STR_HANDLER
0x56a2;STRH_VersionReqFailed;Status in version reply signals error;0xA2;linux\devices\startracker\StarTrackerHandler.h;STR_HANDLER 0x56a2;STRH_VersionReqFailed;Status in version reply signals error;0xA2;linux\devices\startracker\StarTrackerHandler.h;STR_HANDLER

Can't render this file because it has a wrong number of fields in line 29.

View File

@ -575,6 +575,10 @@ def add_ploc_supv_cmds(cmd_dict: ServiceOpCodeDictT):
"48": ("PLOC Supervisor: Disable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}), "48": ("PLOC Supervisor: Disable auto TM", {OpCodeDictKeys.TIMEOUT: 2.0}),
"49": ("PLOC Supervisor: Enable ADC monitor task", {OpCodeDictKeys.TIMEOUT: 2.0}), "49": ("PLOC Supervisor: Enable ADC monitor task", {OpCodeDictKeys.TIMEOUT: 2.0}),
"50": ("PLOC Supervisor: Disable ADC monitor task", {OpCodeDictKeys.TIMEOUT: 2.0}), "50": ("PLOC Supervisor: Disable ADC monitor task", {OpCodeDictKeys.TIMEOUT: 2.0}),
"51": ("PLOC Supervisor: Logging request event buffers", {OpCodeDictKeys.TIMEOUT: 2.0}),
"52": ("PLOC Supervisor: Logging clear counters", {OpCodeDictKeys.TIMEOUT: 2.0}),
"53": ("PLOC Supervisor: Logging set topic", {OpCodeDictKeys.TIMEOUT: 2.0}),
"54": ("PLOC Supervisor: Logging request counters", {OpCodeDictKeys.TIMEOUT: 2.0}),
} }
service_ploc_supv_tuple = ("PLOC Supervisor", op_code_dict_srv_ploc_supv) service_ploc_supv_tuple = ("PLOC Supervisor", op_code_dict_srv_ploc_supv)

View File

@ -34,6 +34,11 @@ update_file_dict = {
"2": ["/mnt/sd0/ploc/supervisor/update.bin", "/mnt/sd0/ploc/supervisor/update.bin"], "2": ["/mnt/sd0/ploc/supervisor/update.bin", "/mnt/sd0/ploc/supervisor/update.bin"],
} }
event_buffer_path_dict = {
MANUAL_INPUT: ["manual input", ""],
"2": ["/mnt/sd0/ploc/supervisor", "/mnt/sd0/ploc/supervisor"],
}
class SupvActionIds: class SupvActionIds:
HK_REPORT = 1 HK_REPORT = 1
@ -73,7 +78,7 @@ class SupvActionIds:
READ_GPIO = 35 READ_GPIO = 35
RESTART_SUPERVISOR = 36 RESTART_SUPERVISOR = 36
FACTORY_RESET_CLEAR_ALL = 37 FACTORY_RESET_CLEAR_ALL = 37
REQUEST_LOGGING_DATA = 38 LOGGING_REQUEST_COUNTERS = 38
UPDATE_IMAGE_DATA = 39 UPDATE_IMAGE_DATA = 39
FACTORY_RESET_CLEAR_MIRROR = 40 FACTORY_RESET_CLEAR_MIRROR = 40
FACTORY_RESET_CLEAR_CIRCULAR = 41 FACTORY_RESET_CLEAR_CIRCULAR = 41
@ -86,6 +91,10 @@ class SupvActionIds:
DISABLE_AUTO_TM = 51 DISABLE_AUTO_TM = 51
ENABLE_ADC_MONITOR_TASK = 52 ENABLE_ADC_MONITOR_TASK = 52
DISABLE_ADC_MONITOR_TASK = 53 DISABLE_ADC_MONITOR_TASK = 53
LOGGING_REQUEST_EVENT_BUFFERS = 54
LOGGING_CLEAR_COUNTERS = 55
LOGGING_SET_TOPIC = 56
class SupvHkIds: class SupvHkIds:
@ -437,6 +446,28 @@ def pack_ploc_supv_commands(
) )
command = PusTelecommand(service=8, subservice=128, ssc=65, app_data=command) command = PusTelecommand(service=8, subservice=128, ssc=65, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
elif op_code == "51":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Logging request event buffers"))
command = pack_logging_buffer_request(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=66, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
elif op_code == "52":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Logging clear counters"))
command = object_id + struct.pack(
"!I", SupvActionIds.LOGGING_CLEAR_COUNTERS
)
command = PusTelecommand(service=8, subservice=128, ssc=67, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
elif op_code == "53":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Logging set topic"))
command = pack_logging_set_topic(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=68, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
elif op_code == "54":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Logging request counters"))
command = object_id + struct.pack('!I', SupvActionIds.LOGGING_REQUEST_COUNTERS)
command = PusTelecommand(service=8, subservice=128, ssc=69, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
return tc_queue return tc_queue
@ -705,6 +736,15 @@ def pack_set_shutdown_timeout_command(object_id: bytearray) -> bytearray:
return command return command
def pack_logging_buffer_request(object_id: bytearray) -> bytearray:
command = bytearray()
command += object_id
command += struct.pack('!I', SupvActionIds.LOGGING_REQUEST_EVENT_BUFFERS)
path = get_event_buffer_path()
command += bytearray(path, 'utf-8')
return command
def get_debug_verbosity() -> int: def get_debug_verbosity() -> int:
tries = 0 tries = 0
while tries < 3: while tries < 3:
@ -752,12 +792,30 @@ def pack_read_gpio_cmd(object_id: bytearray) -> bytearray:
return command return command
def pack_logging_set_topic(objetc_id: bytearray) -> bytearray:
command = objetc_id + struct.pack('!I', SupvActionIds.LOGGING_SET_TOPIC)
tpc = int(input("Specify logging topic: "))
command += struct.pack('!B', tpc)
return command
def get_update_file() -> str: def get_update_file() -> str:
LOGGER.info("Specify update file ") LOGGER.info("Specify update file ")
input_helper = InputHelper(update_file_dict) input_helper = InputHelper(update_file_dict)
key = input_helper.get_key() key = input_helper.get_key()
if key == MANUAL_INPUT: if key == MANUAL_INPUT:
file = input("Ploc MPSoC: Specify absolute name of update file: ") file = input("Ploc Supervisor: Specify absolute name of update file: ")
else: else:
file = update_file_dict[key][1] file = update_file_dict[key][1]
return file return file
def get_event_buffer_path() -> str:
LOGGER.info("Specify path where to store event buffer file ")
input_helper = InputHelper(event_buffer_path_dict)
key = input_helper.get_key()
if key == MANUAL_INPUT:
file = input("Ploc Supervisor: Specify path: ")
else:
file = event_buffer_path_dict[key][1]
return file