26 lines
590 B
Python
26 lines
590 B
Python
from typing import Union
|
|
|
|
from spacepackets.ecss.tc import PusTelecommand
|
|
from tmtccmd.tc import QueueHelper
|
|
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes, Subservices
|
|
|
|
|
|
def command_mode(
|
|
object_id: bytes,
|
|
mode: Union[int, Modes],
|
|
submode: int,
|
|
q: QueueHelper,
|
|
info: str,
|
|
):
|
|
q.add_log_cmd(info)
|
|
mode_data = pack_mode_data(
|
|
object_id=object_id,
|
|
mode=mode,
|
|
submode=submode,
|
|
)
|
|
q.add_pus_tc(
|
|
PusTelecommand(
|
|
service=200, subservice=Subservices.TC_MODE_COMMAND, app_data=mode_data
|
|
)
|
|
)
|