2022-07-04 17:59:09 +02:00
|
|
|
from tmtccmd.tc import QueueHelper
|
2022-05-05 16:15:53 +02:00
|
|
|
from tmtccmd.tc.pus_200_fsfw_modes import Modes
|
2022-03-22 19:29:55 +01:00
|
|
|
|
2022-05-17 10:41:45 +02:00
|
|
|
from .common import command_mode
|
2022-03-22 19:29:55 +01:00
|
|
|
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"
|
|
|
|
|
|
|
|
|
2022-07-04 17:59:09 +02:00
|
|
|
def pack_tcs_sys_commands(q: QueueHelper, op_code: str):
|
2022-03-22 19:29:55 +01:00
|
|
|
if op_code in OpCodes.TCS_BOARD_ASS_NORMAL:
|
2022-05-17 10:41:45 +02:00
|
|
|
command_mode(
|
2022-03-22 19:29:55 +01:00
|
|
|
object_id=TCS_BOARD_ASS_ID,
|
|
|
|
mode=Modes.NORMAL,
|
|
|
|
submode=0,
|
2022-07-04 17:59:09 +02:00
|
|
|
q=q,
|
2022-03-22 19:29:55 +01:00
|
|
|
info=Info.TCS_BOARD_ASS_NORMAL,
|
|
|
|
)
|
|
|
|
if op_code in OpCodes.TCS_BOARD_ASS_OFF:
|
2022-05-17 10:41:45 +02:00
|
|
|
command_mode(
|
2022-03-22 19:29:55 +01:00
|
|
|
object_id=TCS_BOARD_ASS_ID,
|
2022-03-22 20:35:24 +01:00
|
|
|
mode=Modes.OFF,
|
2022-03-22 19:29:55 +01:00
|
|
|
submode=0,
|
2022-07-04 17:59:09 +02:00
|
|
|
q=q,
|
2022-03-22 19:29:55 +01:00
|
|
|
info=Info.TCS_BOARD_ASS_OFF,
|
|
|
|
)
|