add announce mode cmds
This commit is contained in:
parent
1bc38ea4b5
commit
d1f96cb83d
@ -15,6 +15,7 @@ tmtccmd version 4.0.0
|
|||||||
## Added
|
## Added
|
||||||
|
|
||||||
- Basic persistent TM store commanding
|
- Basic persistent TM store commanding
|
||||||
|
- System and TCS system announce mode commands
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
|
@ -7,18 +7,24 @@ from tmtccmd.config.tmtc import (
|
|||||||
)
|
)
|
||||||
from tmtccmd.tc import service_provider
|
from tmtccmd.tc import service_provider
|
||||||
from eive_tmtc.config.object_ids import EIVE_SYSTEM_ID
|
from eive_tmtc.config.object_ids import EIVE_SYSTEM_ID
|
||||||
from tmtccmd.tc.pus_200_fsfw_mode import create_mode_command, Mode
|
from tmtccmd.tc.pus_200_fsfw_mode import (
|
||||||
|
create_mode_command,
|
||||||
|
Mode,
|
||||||
|
create_announce_mode_recursive_command,
|
||||||
|
)
|
||||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||||
|
|
||||||
|
|
||||||
class OpCode:
|
class OpCode:
|
||||||
SAFE_MODE = "safe"
|
SAFE_MODE = "safe"
|
||||||
IDLE_MODE = "idle"
|
IDLE_MODE = "idle"
|
||||||
|
ANNOUNCE_MODES = "announce_modes"
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class Info:
|
||||||
SAFE_MODE = "Command System into Safe Mode"
|
SAFE_MODE = "Command System into Safe Mode"
|
||||||
IDLE_MODE = "Command System into Idle Pointing Mode"
|
IDLE_MODE = "Command System into Idle Pointing Mode"
|
||||||
|
ANNOUNCE_MODES = "Announce mode recursively"
|
||||||
|
|
||||||
|
|
||||||
@service_provider(CustomServiceList.SYSTEM.value)
|
@service_provider(CustomServiceList.SYSTEM.value)
|
||||||
@ -32,6 +38,9 @@ def build_system_cmds(p: ServiceProviderParams):
|
|||||||
elif o == OpCode.IDLE_MODE:
|
elif o == OpCode.IDLE_MODE:
|
||||||
q.add_log_cmd(f"{prefix}: {Info.IDLE_MODE}")
|
q.add_log_cmd(f"{prefix}: {Info.IDLE_MODE}")
|
||||||
q.add_pus_tc(create_mode_command(EIVE_SYSTEM_ID, AcsMode.IDLE, 0))
|
q.add_pus_tc(create_mode_command(EIVE_SYSTEM_ID, AcsMode.IDLE, 0))
|
||||||
|
elif o == OpCode.ANNOUNCE_MODES:
|
||||||
|
q.add_log_cmd(f"{prefix}: {Info.ANNOUNCE_MODES}")
|
||||||
|
q.add_pus_tc(create_announce_mode_recursive_command(EIVE_SYSTEM_ID))
|
||||||
|
|
||||||
|
|
||||||
@tmtc_definitions_provider
|
@tmtc_definitions_provider
|
||||||
@ -39,6 +48,7 @@ def add_system_cmd_defs(defs: TmtcDefinitionWrapper):
|
|||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(keys=OpCode.SAFE_MODE, info=Info.SAFE_MODE)
|
oce.add(keys=OpCode.SAFE_MODE, info=Info.SAFE_MODE)
|
||||||
oce.add(keys=OpCode.IDLE_MODE, info=Info.IDLE_MODE)
|
oce.add(keys=OpCode.IDLE_MODE, info=Info.IDLE_MODE)
|
||||||
|
oce.add(keys=OpCode.ANNOUNCE_MODES, info=Info.ANNOUNCE_MODES)
|
||||||
defs.add_service(
|
defs.add_service(
|
||||||
name=CustomServiceList.SYSTEM.value,
|
name=CustomServiceList.SYSTEM.value,
|
||||||
info="EIVE system commands",
|
info="EIVE system commands",
|
||||||
|
@ -9,7 +9,7 @@ from tmtccmd.config.tmtc import (
|
|||||||
OpCodeEntry,
|
OpCodeEntry,
|
||||||
)
|
)
|
||||||
from tmtccmd.tc import DefaultPusQueueHelper
|
from tmtccmd.tc import DefaultPusQueueHelper
|
||||||
from tmtccmd.tc.pus_200_fsfw_mode import Mode
|
from tmtccmd.tc.pus_200_fsfw_mode import Mode, create_announce_mode_recursive_command
|
||||||
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
from tmtccmd.tc.pus_3_fsfw_hk import make_sid, generate_one_hk_command
|
||||||
|
|
||||||
|
|
||||||
@ -19,6 +19,7 @@ class OpCodeSys:
|
|||||||
REQUEST_PRIMARY_TEMP_SET = ["temp"]
|
REQUEST_PRIMARY_TEMP_SET = ["temp"]
|
||||||
REQUEST_DEVICE_TEMP_SET = ["temp_devs"]
|
REQUEST_DEVICE_TEMP_SET = ["temp_devs"]
|
||||||
REQUEST_DEVICE_SUS_SET = ["temp_sus"]
|
REQUEST_DEVICE_SUS_SET = ["temp_sus"]
|
||||||
|
ANNOUNCE_MODES = "announce_modes"
|
||||||
|
|
||||||
|
|
||||||
class InfoSys:
|
class InfoSys:
|
||||||
@ -27,6 +28,7 @@ class InfoSys:
|
|||||||
REQUEST_PRIMARY_TEMP_SET = "Request HK set of primary sensor temperatures"
|
REQUEST_PRIMARY_TEMP_SET = "Request HK set of primary sensor temperatures"
|
||||||
REQUEST_DEVICE_TEMP_SET = "Request HK set of device sensor temperatures"
|
REQUEST_DEVICE_TEMP_SET = "Request HK set of device sensor temperatures"
|
||||||
REQUEST_DEVICE_SUS_SET = "Request HK set of the SUS temperatures"
|
REQUEST_DEVICE_SUS_SET = "Request HK set of the SUS temperatures"
|
||||||
|
ANNOUNCE_MODES = "Announce Modes recursively"
|
||||||
|
|
||||||
|
|
||||||
def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
|
def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
|
||||||
@ -52,6 +54,9 @@ def pack_tcs_sys_commands(q: DefaultPusQueueHelper, op_code: str):
|
|||||||
if op_code in OpCodeSys.NML:
|
if op_code in OpCodeSys.NML:
|
||||||
q.add_log_cmd(InfoSys.NML)
|
q.add_log_cmd(InfoSys.NML)
|
||||||
pack_mode_cmd_with_info(TCS_SUBSYSTEM_ID, Mode.NORMAL, 0, q, InfoSys.OFF)
|
pack_mode_cmd_with_info(TCS_SUBSYSTEM_ID, Mode.NORMAL, 0, q, InfoSys.OFF)
|
||||||
|
if op_code == OpCodeSys.ANNOUNCE_MODES:
|
||||||
|
q.add_log_cmd(InfoSys.ANNOUNCE_MODES)
|
||||||
|
q.add_pus_tc(create_announce_mode_recursive_command(TCS_SUBSYSTEM_ID))
|
||||||
pack_tcs_ass_cmds(q, op_code)
|
pack_tcs_ass_cmds(q, op_code)
|
||||||
|
|
||||||
|
|
||||||
@ -67,6 +72,7 @@ def add_tcs_subsystem_cmds(defs: TmtcDefinitionWrapper):
|
|||||||
keys=OpCodeSys.REQUEST_DEVICE_TEMP_SET, info=InfoSys.REQUEST_DEVICE_TEMP_SET
|
keys=OpCodeSys.REQUEST_DEVICE_TEMP_SET, info=InfoSys.REQUEST_DEVICE_TEMP_SET
|
||||||
)
|
)
|
||||||
oce.add(keys=OpCodeSys.REQUEST_DEVICE_SUS_SET, info=InfoSys.REQUEST_DEVICE_SUS_SET)
|
oce.add(keys=OpCodeSys.REQUEST_DEVICE_SUS_SET, info=InfoSys.REQUEST_DEVICE_SUS_SET)
|
||||||
|
oce.add(keys=OpCodeSys.ANNOUNCE_MODES, info=InfoSys.ANNOUNCE_MODES)
|
||||||
defs.add_service(
|
defs.add_service(
|
||||||
name=CustomServiceList.TCS,
|
name=CustomServiceList.TCS,
|
||||||
info="TCS Board",
|
info="TCS Board",
|
||||||
|
Loading…
Reference in New Issue
Block a user