add COM subsystem commanding
This commit is contained in:
parent
8b6039e15d
commit
b8376c6f48
@ -35,6 +35,7 @@ class CustomServiceList(str, enum.Enum):
|
|||||||
POWER = "power"
|
POWER = "power"
|
||||||
ACU = "acu"
|
ACU = "acu"
|
||||||
ACS = "acs"
|
ACS = "acs"
|
||||||
|
COM_SS = "com"
|
||||||
BPX_BATTERY = "bpx"
|
BPX_BATTERY = "bpx"
|
||||||
TMP1075_1 = "tmp1075_1"
|
TMP1075_1 = "tmp1075_1"
|
||||||
TMP1075_2 = "tmp1075_2"
|
TMP1075_2 = "tmp1075_2"
|
||||||
|
@ -127,6 +127,8 @@ SUS_11_R_LOC_XBYMZB_PT_ZB = bytes([0x44, 0x12, 0x00, 0x43])
|
|||||||
ACS_SUBSYSTEM_ID = bytes([0x73, 0x01, 0x00, 0x01])
|
ACS_SUBSYSTEM_ID = bytes([0x73, 0x01, 0x00, 0x01])
|
||||||
PL_SUBSYSTEM_ID = bytes([0x73, 0x01, 0x00, 0x02])
|
PL_SUBSYSTEM_ID = bytes([0x73, 0x01, 0x00, 0x02])
|
||||||
TCS_SUBSYSTEM_ID = bytes([0x73, 0x01, 0x00, 0x03])
|
TCS_SUBSYSTEM_ID = bytes([0x73, 0x01, 0x00, 0x03])
|
||||||
|
COM_SUBSYSTEM_ID = bytes([0x73, 0x01, 0x00, 0x04])
|
||||||
|
|
||||||
ACS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x01])
|
ACS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x01])
|
||||||
SUS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x02])
|
SUS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x02])
|
||||||
TCS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x03])
|
TCS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x03])
|
||||||
|
@ -4,7 +4,7 @@ from eive_tmtc.config.events import get_event_dict
|
|||||||
from eive_tmtc.config.object_ids import get_object_ids
|
from eive_tmtc.config.object_ids import get_object_ids
|
||||||
from eive_tmtc.pus_tm.defs import PrintWrapper
|
from eive_tmtc.pus_tm.defs import PrintWrapper
|
||||||
from eive_tmtc.pus_tm.verification_handler import generic_retval_printout
|
from eive_tmtc.pus_tm.verification_handler import generic_retval_printout
|
||||||
from eive_tmtc.tmtc.acs.acs_subsystem import AcsMode
|
from eive_tmtc.tmtc.acs.subsystem import AcsMode
|
||||||
from tmtccmd.tc.pus_200_fsfw_modes import Mode
|
from tmtccmd.tc.pus_200_fsfw_modes import Mode
|
||||||
|
|
||||||
from tmtccmd.tm import Service5Tm
|
from tmtccmd.tm import Service5Tm
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
from .payload.pl_subsystem import add_payload_subsystem_cmds
|
from .payload.subsystem import add_payload_subsystem_cmds
|
||||||
from .solar_array_deployment import add_sa_depl_cmds
|
from .solar_array_deployment import add_sa_depl_cmds
|
||||||
from .test import add_test_defs
|
from .test import add_test_defs
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
from .subsystem import add_com_subsystem_cmds
|
67
eive_tmtc/tmtc/com/subsystem.py
Normal file
67
eive_tmtc/tmtc/com/subsystem.py
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
import enum
|
||||||
|
|
||||||
|
from eive_tmtc.config.definitions import CustomServiceList
|
||||||
|
from eive_tmtc.config.object_ids import COM_SUBSYSTEM_ID
|
||||||
|
from tmtccmd.config.tmtc import (
|
||||||
|
tmtc_definitions_provider,
|
||||||
|
TmtcDefinitionWrapper,
|
||||||
|
OpCodeEntry,
|
||||||
|
)
|
||||||
|
from tmtccmd.tc import service_provider
|
||||||
|
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||||
|
from tmtccmd.tc.pus_200_fsfw_modes import create_mode_command
|
||||||
|
|
||||||
|
|
||||||
|
class Submode(enum.IntEnum):
|
||||||
|
RX_ONLY = 0
|
||||||
|
RX_AND_TX_DEF_DATARATE = 1
|
||||||
|
RX_AND_TX_LOW_DATARATE = 2
|
||||||
|
RX_AND_TX_HIGH_DATARATE = 3
|
||||||
|
RX_AND_TX_CARRIER_WAVE = 4
|
||||||
|
|
||||||
|
|
||||||
|
class OpCode:
|
||||||
|
RX_ONLY = "rx_only"
|
||||||
|
TX_AND_RX_LOW_RATE = "rx_and_tx_low_rate"
|
||||||
|
TX_AND_RX_HIGH_RATE = "rx_and_tx_high_rate"
|
||||||
|
TX_AND_RX_CARRIER_WAVE = "rx_and_tx_carrier_wave"
|
||||||
|
|
||||||
|
|
||||||
|
class Info:
|
||||||
|
RX_ONLY = "Syrlinks RX Only"
|
||||||
|
TX_AND_RX_LOW_DATARATE = "Syrlinks with TX low datarate (BPSK modulation)"
|
||||||
|
TX_AND_RX_HIGH_DATARATE = "Syrlinks with TX high datarate (0QPSK modulation)"
|
||||||
|
TX_AND_RX_CARRIER_WAVE = "Syrlinks with TX carrier wave"
|
||||||
|
|
||||||
|
|
||||||
|
@service_provider(CustomServiceList.COM_SS)
|
||||||
|
def build_com_subsystem_cmd(p: ServiceProviderParams):
|
||||||
|
q = p.queue_helper
|
||||||
|
o = p.op_code
|
||||||
|
if o == OpCode.RX_ONLY:
|
||||||
|
q.add_log_cmd(Info.RX_ONLY)
|
||||||
|
q.add_pus_tc(create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_ONLY, 0))
|
||||||
|
elif o == OpCode.TX_AND_RX_LOW_RATE:
|
||||||
|
q.add_log_cmd(Info.TX_AND_RX_LOW_DATARATE)
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_AND_TX_LOW_DATARATE, 0)
|
||||||
|
)
|
||||||
|
elif o == OpCode.TX_AND_RX_HIGH_RATE:
|
||||||
|
q.add_log_cmd(Info.TX_AND_RX_HIGH_DATARATE)
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_AND_TX_HIGH_DATARATE, 0)
|
||||||
|
)
|
||||||
|
elif o == OpCode.TX_AND_RX_CARRIER_WAVE:
|
||||||
|
q.add_log_cmd(Info.TX_AND_RX_CARRIER_WAVE)
|
||||||
|
q.add_pus_tc(
|
||||||
|
create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_AND_TX_CARRIER_WAVE, 0)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@tmtc_definitions_provider
|
||||||
|
def add_com_subsystem_cmds(defs: TmtcDefinitionWrapper):
|
||||||
|
oce = OpCodeEntry()
|
||||||
|
oce.add(OpCode.RX_ONLY, Info.RX_ONLY)
|
||||||
|
oce.add(OpCode.TX_AND_RX_LOW_RATE, Info.TX_AND_RX_LOW_DATARATE)
|
||||||
|
oce.add(OpCode.TX_AND_RX_HIGH_RATE, Info.TX_AND_RX_HIGH_DATARATE)
|
||||||
|
defs.add_service(CustomServiceList.COM_SS, "COM Subsystem", oce)
|
Loading…
Reference in New Issue
Block a user