35 lines
992 B
Python
35 lines
992 B
Python
|
from tmtccmd.tc.definitions import TcQueueT, QueueCommands
|
||
|
from tmtccmd.tc.service_200_mode import Modes
|
||
|
|
||
|
from .common import command_assembly
|
||
|
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(tc_queue: TcQueueT, op_code: str):
|
||
|
if op_code in OpCodes.TCS_BOARD_ASS_NORMAL:
|
||
|
command_assembly(
|
||
|
object_id=TCS_BOARD_ASS_ID,
|
||
|
mode=Modes.NORMAL,
|
||
|
submode=0,
|
||
|
tc_queue=tc_queue,
|
||
|
info=Info.TCS_BOARD_ASS_NORMAL,
|
||
|
)
|
||
|
if op_code in OpCodes.TCS_BOARD_ASS_OFF:
|
||
|
command_assembly(
|
||
|
object_id=TCS_BOARD_ASS_ID,
|
||
|
mode=Modes.NORMAL,
|
||
|
submode=0,
|
||
|
tc_queue=tc_queue,
|
||
|
info=Info.TCS_BOARD_ASS_OFF,
|
||
|
)
|