add default rate command

This commit is contained in:
Robin Müller 2023-01-27 20:23:41 +01:00
parent f4702eb701
commit 39a9497494

View File

@ -22,6 +22,7 @@ class Submode(enum.IntEnum):
class OpCode: class OpCode:
RX_ONLY = "rx_only" RX_ONLY = "rx_only"
TX_AND_RX_DEF_RATE = "rx_and_tx_default_rate"
TX_AND_RX_LOW_RATE = "rx_and_tx_low_rate" TX_AND_RX_LOW_RATE = "rx_and_tx_low_rate"
TX_AND_RX_HIGH_RATE = "rx_and_tx_high_rate" TX_AND_RX_HIGH_RATE = "rx_and_tx_high_rate"
TX_AND_RX_CARRIER_WAVE = "rx_and_tx_carrier_wave" TX_AND_RX_CARRIER_WAVE = "rx_and_tx_carrier_wave"
@ -29,6 +30,7 @@ class OpCode:
class Info: class Info:
RX_ONLY = "Syrlinks RX Only" RX_ONLY = "Syrlinks RX Only"
TX_AND_RX_DEF_DATARATE = "Syrlinks with TX default datarate"
TX_AND_RX_LOW_DATARATE = "Syrlinks with TX low datarate (BPSK modulation)" 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_HIGH_DATARATE = "Syrlinks with TX high datarate (0QPSK modulation)"
TX_AND_RX_CARRIER_WAVE = "Syrlinks with TX carrier wave" TX_AND_RX_CARRIER_WAVE = "Syrlinks with TX carrier wave"
@ -41,6 +43,11 @@ def build_com_subsystem_cmd(p: ServiceProviderParams):
if o == OpCode.RX_ONLY: if o == OpCode.RX_ONLY:
q.add_log_cmd(Info.RX_ONLY) q.add_log_cmd(Info.RX_ONLY)
q.add_pus_tc(create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_ONLY, 0)) q.add_pus_tc(create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_ONLY, 0))
elif o == OpCode.TX_AND_RX_DEF_RATE:
q.add_log_cmd(Info.TX_AND_RX_DEF_DATARATE)
q.add_pus_tc(
create_mode_command(COM_SUBSYSTEM_ID, Submode.RX_AND_TX_DEF_DATARATE, 0)
)
elif o == OpCode.TX_AND_RX_LOW_RATE: elif o == OpCode.TX_AND_RX_LOW_RATE:
q.add_log_cmd(Info.TX_AND_RX_LOW_DATARATE) q.add_log_cmd(Info.TX_AND_RX_LOW_DATARATE)
q.add_pus_tc( q.add_pus_tc(
@ -64,4 +71,5 @@ def add_com_subsystem_cmds(defs: TmtcDefinitionWrapper):
oce.add(OpCode.RX_ONLY, Info.RX_ONLY) 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_LOW_RATE, Info.TX_AND_RX_LOW_DATARATE)
oce.add(OpCode.TX_AND_RX_HIGH_RATE, Info.TX_AND_RX_HIGH_DATARATE) oce.add(OpCode.TX_AND_RX_HIGH_RATE, Info.TX_AND_RX_HIGH_DATARATE)
oce.add(OpCode.TX_AND_RX_DEF_RATE, Info.TX_AND_RX_DEF_DATARATE)
defs.add_service(CustomServiceList.COM_SS, "COM Subsystem", oce) defs.add_service(CustomServiceList.COM_SS, "COM Subsystem", oce)