eive-tmtc/pus_tc/system/tcs.py

35 lines
923 B
Python

from tmtccmd.tc import QueueHelper
from tmtccmd.tc.pus_200_fsfw_modes import Modes
from .common import command_mode
from config.object_ids import TCS_BOARD_ASS_ID
class OpCodes:
TCS_BOARD_ASS_NORMAL = ["0", "tcs-normal"]
TCS_BOARD_ASS_OFF = ["1", "tcs-off"]
class Info:
TCS_BOARD_ASS_NORMAL = "Switching TCS board assembly on"
TCS_BOARD_ASS_OFF = "Switching TCS board assembly off"
def pack_tcs_sys_commands(q: QueueHelper, op_code: str):
if op_code in OpCodes.TCS_BOARD_ASS_NORMAL:
command_mode(
object_id=TCS_BOARD_ASS_ID,
mode=Modes.NORMAL,
submode=0,
q=q,
info=Info.TCS_BOARD_ASS_NORMAL,
)
if op_code in OpCodes.TCS_BOARD_ASS_OFF:
command_mode(
object_id=TCS_BOARD_ASS_ID,
mode=Modes.OFF,
submode=0,
q=q,
info=Info.TCS_BOARD_ASS_OFF,
)