add command to get flash dir content

This commit is contained in:
Robin Müller 2023-05-04 11:51:50 +02:00
parent 0e9ebefc87
commit e0e9a310b9
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -22,6 +22,7 @@ from tmtccmd.tc import service_provider
from tmtccmd.tc.decorator import ServiceProviderParams
from eive_tmtc.utility.input_helper import InputHelper
from tmtccmd.tc.pus_200_fsfw_mode import pack_mode_data, Mode
from tmtccmd.tc.pus_8_fsfw_funccmd import create_action_cmd
_LOGGER = logging.getLogger(__name__)
@ -224,6 +225,16 @@ def pack_ploc_mpsoc_commands(p: ServiceProviderParams):
q.add_log_cmd("PLOC MPSoC: Downlink pwr off")
data = object_id.as_bytes + struct.pack("!I", ActionId.TC_DOWNLINK_PWR_OFF)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
if op_code == OpCode.FLASH_GET_DIR_CONTENT:
q.add_log_cmd(f"{prefix}: {OpCode.FLASH_GET_DIR_CONTENT}")
dir_name = input("Please specify MPSoC directory name to get information for")
dir_name = bytearray(dir_name.encode("utf-8"))
dir_name.append(0)
return create_action_cmd(
object_id=object_id.as_bytes,
action_id=ActionId.TC_FLASH_DIR_GET_CONTENT,
user_data=dir_name,
)
if op_code == OpCode.REPLAY_WRITE_SEQ:
q.add_log_cmd(f"{prefix}: {Info.REPLAY_WRITE_SEQ}")
data = prepare_replay_write_sequence_cmd(object_id.as_bytes)