eive-tmtc/pus_tc/acs.py
2022-03-04 10:41:05 +01:00

34 lines
896 B
Python

import enum
from tmtccmd.tc.definitions import TcQueueT
from spacepackets.ecss.definitions import PusServices
from tmtccmd.tc.service_200_mode import pack_mode_data, Modes
from tmtccmd.tc.packer import PusTelecommand
from config.object_ids import (
MGM_0_HANDLER_ID,
)
class AcsOpCodes(enum.Enum):
ALL_ON = "0"
ALL_OFF = "1"
POWER_CYCLE = "2"
# Switch on A side
ON_MGM_0 = "12"
ON_MGM_1 = "13"
ON_GYRO_0 = "14"
ON_GYRO_1 = "15"
# Switch on B side
ON_MGM_2 = "16"
ON_MGM_3 = "17"
ON_GYRO_2 = "18"
ON_GYRO_3 = "19"
def pack_acs_command(tc_queue: TcQueueT, op_code: str):
if op_code == AcsOpCodes.ALL_ON:
pass
if op_code == AcsOpCodes.ON_MGM_0.value:
app_data = pack_mode_data(object_id=MGM_0_HANDLER_ID, mode=Modes.ON, submode=0)
# return PusTelecommand(service=PusServices.SERVICE_200_MODE, subservice=)