Merge branch 'ploc-mpsoc-skip-supv-commanding-param' into v6.0.0-dev
All checks were successful
EIVE/-/pipeline/head This commit looks good
All checks were successful
EIVE/-/pipeline/head This commit looks good
This commit is contained in:
commit
839da7a224
@ -50,6 +50,8 @@ from eive_tmtc.tmtc.com.subsystem import build_com_subsystem_procedure
|
||||
from eive_tmtc.tmtc.com.syrlinks_handler import pack_syrlinks_command
|
||||
from eive_tmtc.tmtc.core import pack_core_commands
|
||||
from eive_tmtc.tmtc.health import build_health_cmds
|
||||
from eive_tmtc.tmtc.payload.ploc_mpsoc import pack_ploc_mpsoc_commands
|
||||
from eive_tmtc.tmtc.payload.ploc_supervisor import pack_ploc_supv_commands
|
||||
from eive_tmtc.tmtc.payload.plpcdu import pack_pl_pcdu_commands
|
||||
from eive_tmtc.tmtc.payload.rad_sensor import create_rad_sensor_cmd
|
||||
from eive_tmtc.tmtc.payload.scex import pack_scex_cmds
|
||||
@ -246,6 +248,12 @@ def handle_payload_procedure(
|
||||
):
|
||||
obj_id_man = get_object_ids()
|
||||
assert len(cmd_path_list) >= 2
|
||||
if cmd_path_list[0] == "ploc_mpsoc":
|
||||
assert len(cmd_path_list) >= 3
|
||||
return pack_ploc_mpsoc_commands(queue_helper, cmd_path_list[2])
|
||||
if cmd_path_list[0] == "ploc_supv":
|
||||
assert len(cmd_path_list) >= 3
|
||||
return pack_ploc_supv_commands(queue_helper, cmd_path_list[2])
|
||||
if cmd_path_list[0] == "rad_sensor":
|
||||
assert len(cmd_path_list) >= 3
|
||||
object_id = cast(ObjectIdU32, obj_id_man.get(RAD_SENSOR_ID))
|
||||
|
@ -24,6 +24,7 @@ from spacepackets.ecss.tc import PusTelecommand
|
||||
from tmtccmd.tmtc import DefaultPusQueueHelper
|
||||
from eive_tmtc.utility.input_helper import InputHelper
|
||||
from tmtccmd.pus.s200_fsfw_mode import pack_mode_data, Mode
|
||||
from tmtccmd.pus.s20_fsfw_param import create_load_param_cmd, create_scalar_u8_parameter
|
||||
from tmtccmd.pus.s8_fsfw_action import create_action_cmd
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@ -93,6 +94,10 @@ class ActionId(enum.IntEnum):
|
||||
TC_FLASH_READ_FULL_FILE = 30
|
||||
|
||||
|
||||
class ParamId(enum.IntEnum):
|
||||
PLOC_SUPV_CMD_TO_ON = 1
|
||||
|
||||
|
||||
class OpCode:
|
||||
ON = "on"
|
||||
OFF = "off"
|
||||
@ -115,6 +120,8 @@ class OpCode:
|
||||
SIMPLEX_SEND_FILE = "simplex_send_file"
|
||||
DOWNLINK_DATA_MODULATE = "downlink_data_modulate"
|
||||
MODE_SNAPSHOT = "mode_snapshot"
|
||||
ENABLE_PLOC_SUPV_COMMANDING_TO_ON = "enable_ploc_supv_cmd_to_on"
|
||||
DISABLE_PLOC_SUPV_COMMANDING_TO_ON = "disable_ploc_supv_cmd_to_on"
|
||||
|
||||
|
||||
class Info:
|
||||
@ -139,6 +146,10 @@ class Info:
|
||||
FLASH_GET_DIR_CONTENT = "Get flash directory content on MPSoC"
|
||||
DOWNLINK_DATA_MODULATE = "Downlink data modulate"
|
||||
MODE_SNAPSHOT = "Mode Snapshot"
|
||||
ENABLE_PLOC_SUPV_COMMANDING_TO_ON = "Enable PLOC SUPV commanding when switching ON"
|
||||
DISABLE_PLOC_SUPV_COMMANDING_TO_ON = (
|
||||
"Disable PLOC SUPV commanding when switching ON"
|
||||
)
|
||||
|
||||
|
||||
class MemAddresses(enum.IntEnum):
|
||||
@ -186,6 +197,13 @@ def add_ploc_mpsoc_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce.add(OpCode.SIMPLEX_SEND_FILE, Info.SIMPLEX_SEND_FILE)
|
||||
oce.add(OpCode.DOWNLINK_DATA_MODULATE, Info.DOWNLINK_DATA_MODULATE)
|
||||
oce.add(OpCode.MODE_SNAPSHOT, Info.MODE_SNAPSHOT)
|
||||
oce.add(
|
||||
OpCode.ENABLE_PLOC_SUPV_COMMANDING_TO_ON, Info.ENABLE_PLOC_SUPV_COMMANDING_TO_ON
|
||||
)
|
||||
oce.add(
|
||||
OpCode.DISABLE_PLOC_SUPV_COMMANDING_TO_ON,
|
||||
Info.DISABLE_PLOC_SUPV_COMMANDING_TO_ON,
|
||||
)
|
||||
defs.add_service(CustomServiceList.PLOC_MPSOC.value, "Ploc MPSoC", oce)
|
||||
|
||||
|
||||
@ -322,6 +340,25 @@ def pack_ploc_mpsoc_commands(
|
||||
q.add_log_cmd("PLOC MPSoC: Mode snapshot")
|
||||
data = object_id.as_bytes + struct.pack("!I", ActionId.TC_MODE_SNAPSHOT)
|
||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=data))
|
||||
if cmd_str == OpCode.ENABLE_PLOC_SUPV_COMMANDING_TO_ON:
|
||||
print("shit")
|
||||
q.add_log_cmd(Info.ENABLE_PLOC_SUPV_COMMANDING_TO_ON)
|
||||
q.add_pus_tc(
|
||||
create_load_param_cmd(
|
||||
create_scalar_u8_parameter(
|
||||
object_id.as_bytes, 0, ParamId.PLOC_SUPV_CMD_TO_ON, 0
|
||||
)
|
||||
)
|
||||
)
|
||||
if cmd_str == OpCode.DISABLE_PLOC_SUPV_COMMANDING_TO_ON:
|
||||
q.add_log_cmd(Info.DISABLE_PLOC_SUPV_COMMANDING_TO_ON)
|
||||
q.add_pus_tc(
|
||||
create_load_param_cmd(
|
||||
create_scalar_u8_parameter(
|
||||
object_id.as_bytes, 0, ParamId.PLOC_SUPV_CMD_TO_ON, 1
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def generate_write_mem_command(
|
||||
|
Loading…
Reference in New Issue
Block a user