Release v1.8.0 #16

Merged
muellerr merged 31 commits from develop into master 2021-08-09 15:46:54 +02:00
2 changed files with 40 additions and 1 deletions
Showing only changes of commit 93fdc0fc7f - Show all commits

View File

@ -115,6 +115,8 @@ class EiveHookObject(TmTcHookBase):
"30": ("PLOC Supervisor: Run auto EM tests", {OpCodeDictKeys.TIMEOUT: 2.0}), "30": ("PLOC Supervisor: Run auto EM tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
"31": ("PLOC Supervisor: MRAM Wipe", {OpCodeDictKeys.TIMEOUT: 2.0}), "31": ("PLOC Supervisor: MRAM Wipe", {OpCodeDictKeys.TIMEOUT: 2.0}),
"32": ("PLOC Supervisor: MRAM Dump", {OpCodeDictKeys.TIMEOUT: 2.0}), "32": ("PLOC Supervisor: MRAM Dump", {OpCodeDictKeys.TIMEOUT: 2.0}),
"33": ("PLOC Supervisor: Print CPU stats", {OpCodeDictKeys.TIMEOUT: 2.0}),
"34": ("PLOC Supervisor: Set debug verbosity", {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)
@ -158,7 +160,7 @@ class EiveHookObject(TmTcHookBase):
from tmtccmd.config.com_if import create_communication_interface_default from tmtccmd.config.com_if import create_communication_interface_default
return create_communication_interface_default( return create_communication_interface_default(
com_if_key=com_if_key, tmtc_printer=tmtc_printer, com_if_key=com_if_key, tmtc_printer=tmtc_printer,
json_cfg_path=self.get_json_config_file_path() json_cfg_path=self.get_json_config_file_path(), space_packet_id=0x0065
) )
def perform_mode_operation(self, tmtc_backend: TmTcHandler, mode: int): def perform_mode_operation(self, tmtc_backend: TmTcHandler, mode: int):

View File

@ -232,6 +232,16 @@ def pack_ploc_supv_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code:
command = pack_mram_dump_cmd(object_id) command = pack_mram_dump_cmd(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=47, app_data=command) command = PusTelecommand(service=8, subservice=128, ssc=47, app_data=command)
tc_queue.appendleft(command.pack_command_tuple()) tc_queue.appendleft(command.pack_command_tuple())
elif op_code == "33":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Print CPU stats"))
command = pack_print_cpu_stats_cmd(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=48, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
elif op_code == "34":
tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: Set debug verbosity"))
command = pack_set_debug_verbosity_cmd(object_id)
command = PusTelecommand(service=8, subservice=128, ssc=49, app_data=command)
tc_queue.appendleft(command.pack_command_tuple())
return tc_queue return tc_queue
@ -457,6 +467,7 @@ def pack_mram_wipe_cmd(object_id: bytearray) -> bytearray:
command = command + struct.pack('!I', stop) command = command + struct.pack('!I', stop)
return command return command
def pack_mram_dump_cmd(object_id: bytearray) -> bytearray: def pack_mram_dump_cmd(object_id: bytearray) -> bytearray:
start = int(input("Start address: 0x"), 16) start = int(input("Start address: 0x"), 16)
stop = int(input("Stop address: 0x"), 16) stop = int(input("Stop address: 0x"), 16)
@ -465,3 +476,29 @@ def pack_mram_dump_cmd(object_id: bytearray) -> bytearray:
command = command + struct.pack('!I', start) command = command + struct.pack('!I', start)
command = command + struct.pack('!I', stop) command = command + struct.pack('!I', stop)
return command return command
def pack_print_cpu_stats_cmd(object_id: bytearray) -> bytearray:
en = 1
command = bytearray()
command = object_id + struct.pack('!I', SupvActionIds.PRINT_CPU_STATS)
command = command + struct.pack('!B', en)
return command
def pack_set_debug_verbosity_cmd(object_id: bytearray) -> bytearray:
command = bytearray()
print("Specify debug verbosity")
verbosity_options_dict = {
0: "None",
1: "Error",
2: "Warn",
3: "Info",
}
print("{:<6} | {}".format('Key', 'Description'))
for entry in verbosity_options_dict.items():
print("{:<6} | {}".format(entry[0], entry[1]))
verbosity = int(input("Specify verbosity key: "))
command = object_id + struct.pack('!I', SupvActionIds.SET_DBG_VERBOSITY)
command = command + struct.pack('!B', verbosity)
return command