Merge branch 'main' into mueller_add_sus_temps
This commit is contained in:
commit
1317441c03
@ -1,4 +1,5 @@
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
import struct
|
||||||
|
|
||||||
from eive_tmtc.config.definitions import CustomServiceList
|
from eive_tmtc.config.definitions import CustomServiceList
|
||||||
from eive_tmtc.pus_tc.devs.pdec_handler import CommandId
|
from eive_tmtc.pus_tc.devs.pdec_handler import CommandId
|
||||||
@ -32,18 +33,22 @@ RTD_IDS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
class CommandId:
|
||||||
|
WRITE_CONFIG = 6
|
||||||
|
|
||||||
|
|
||||||
class OpCode:
|
class OpCode:
|
||||||
ON = ["0", "on"]
|
ON = ["0", "on"]
|
||||||
OFF = ["1", "off"]
|
OFF = ["1", "off"]
|
||||||
NORMAL = ["2", "normal"]
|
NORMAL = ["2", "normal"]
|
||||||
CONFIG_CMD = ["3", "Write config"]
|
WRITE_CONFIG = ["3", "Write config"]
|
||||||
|
|
||||||
|
|
||||||
class Info:
|
class Info:
|
||||||
ON = "Switch handler on"
|
ON = "Switch handler on"
|
||||||
OFF = "Switch handler off"
|
OFF = "Switch handler off"
|
||||||
NORMAL = "Switch handler normal"
|
NORMAL = "Switch handler normal"
|
||||||
WIRTE_CONFIG = "Write config"
|
WRITE_CONFIG = "Write config"
|
||||||
|
|
||||||
|
|
||||||
@tmtc_definitions_provider
|
@tmtc_definitions_provider
|
||||||
@ -52,6 +57,7 @@ def specify_rtd_cmds(defs: TmtcDefinitionWrapper):
|
|||||||
oce.add(keys=OpCode.ON, info=Info.ON)
|
oce.add(keys=OpCode.ON, info=Info.ON)
|
||||||
oce.add(keys=OpCode.NORMAL, info=Info.NORMAL)
|
oce.add(keys=OpCode.NORMAL, info=Info.NORMAL)
|
||||||
oce.add(keys=OpCode.OFF, info=Info.OFF)
|
oce.add(keys=OpCode.OFF, info=Info.OFF)
|
||||||
|
oce.add(keys=OpCode.WRITE_CONFIG, info=Info.WRITE_CONFIG)
|
||||||
defs.add_service(
|
defs.add_service(
|
||||||
name=CustomServiceList.RTD.value, info="RTD commands", op_code_entry=oce
|
name=CustomServiceList.RTD.value, info="RTD commands", op_code_entry=oce
|
||||||
)
|
)
|
||||||
@ -92,8 +98,8 @@ def pack_rtd_commands(
|
|||||||
service=200, subservice=Subservice.TC_MODE_COMMAND, app_data=app_data
|
service=200, subservice=Subservice.TC_MODE_COMMAND, app_data=app_data
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if op_code in OpCode.CONFIG_CMD:
|
if op_code in OpCode.WRITE_CONFIG:
|
||||||
command = object_id.as_bytes + CommandId.PRINT_CLCW
|
command = object_id.as_bytes + struct.pack("!I", CommandId.WRITE_CONFIG)
|
||||||
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
from .payload.pl_subsystem import add_payload_subsystem_cmds
|
from .payload.pl_subsystem import add_payload_subsystem_cmds
|
||||||
|
from .solar_array_deployment import add_sa_depl_cmds
|
||||||
from .test import add_test_defs
|
from .test import add_test_defs
|
||||||
|
@ -258,7 +258,7 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
|
|||||||
elif op_code in OpCodes.ENABLE_RAW_GYR_HK:
|
elif op_code in OpCodes.ENABLE_RAW_GYR_HK:
|
||||||
q.add_log_cmd(Info.ENABLE_RAW_GYR_HK)
|
q.add_log_cmd(Info.ENABLE_RAW_GYR_HK)
|
||||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||||
False, make_sid(ACS_CONTROLLER, SetId.GYR_RAW_SET), 2.0
|
True, make_sid(ACS_CONTROLLER, SetId.GYR_RAW_SET), 2.0
|
||||||
)
|
)
|
||||||
q.add_pus_tc(cmd_tuple[0])
|
q.add_pus_tc(cmd_tuple[0])
|
||||||
q.add_pus_tc(cmd_tuple[1])
|
q.add_pus_tc(cmd_tuple[1])
|
||||||
@ -266,7 +266,7 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
|
|||||||
q.add_log_cmd(Info.DISABLE_RAW_GYR_HK)
|
q.add_log_cmd(Info.DISABLE_RAW_GYR_HK)
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
disable_periodic_hk_command(
|
disable_periodic_hk_command(
|
||||||
False, make_sid(ACS_CONTROLLER, SetId.GYR_RAW_SET)
|
True, make_sid(ACS_CONTROLLER, SetId.GYR_RAW_SET)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif op_code in OpCodes.REQUEST_PROC_GYR_HK:
|
elif op_code in OpCodes.REQUEST_PROC_GYR_HK:
|
||||||
@ -313,16 +313,14 @@ def pack_acs_ctrl_command(p: ServiceProviderParams):
|
|||||||
elif op_code in OpCodes.ENABLE_MEKF_HK:
|
elif op_code in OpCodes.ENABLE_MEKF_HK:
|
||||||
q.add_log_cmd(Info.ENABLE_MEKF_HK)
|
q.add_log_cmd(Info.ENABLE_MEKF_HK)
|
||||||
cmd_tuple = enable_periodic_hk_command_with_interval(
|
cmd_tuple = enable_periodic_hk_command_with_interval(
|
||||||
False, make_sid(ACS_CONTROLLER, SetId.MEKF_DATA), 2.0
|
True, make_sid(ACS_CONTROLLER, SetId.MEKF_DATA), 2.0
|
||||||
)
|
)
|
||||||
q.add_pus_tc(cmd_tuple[0])
|
q.add_pus_tc(cmd_tuple[0])
|
||||||
q.add_pus_tc(cmd_tuple[1])
|
q.add_pus_tc(cmd_tuple[1])
|
||||||
elif op_code in OpCodes.DISABLE_MEKF_HK:
|
elif op_code in OpCodes.DISABLE_MEKF_HK:
|
||||||
q.add_log_cmd(Info.DISABLE_MEKF_HK)
|
q.add_log_cmd(Info.DISABLE_MEKF_HK)
|
||||||
q.add_pus_tc(
|
q.add_pus_tc(
|
||||||
disable_periodic_hk_command(
|
disable_periodic_hk_command(True, make_sid(ACS_CONTROLLER, SetId.MEKF_DATA))
|
||||||
False, make_sid(ACS_CONTROLLER, SetId.MEKF_DATA)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
elif op_code in OpCodes.REQUEST_CTRL_VAL_HK:
|
elif op_code in OpCodes.REQUEST_CTRL_VAL_HK:
|
||||||
q.add_log_cmd(Info.REQUEST_CTRL_VAL_HK)
|
q.add_log_cmd(Info.REQUEST_CTRL_VAL_HK)
|
||||||
|
@ -35,7 +35,7 @@ class ActionId:
|
|||||||
|
|
||||||
|
|
||||||
@tmtc_definitions_provider
|
@tmtc_definitions_provider
|
||||||
def pack_sa_depl_cmds(defs: TmtcDefinitionWrapper):
|
def add_sa_depl_cmds(defs: TmtcDefinitionWrapper):
|
||||||
oce = OpCodeEntry()
|
oce = OpCodeEntry()
|
||||||
oce.add(keys=OpCode.MANUAL_DEPLOYMENT, info=Info.MANUAL_DEPLOYMENT)
|
oce.add(keys=OpCode.MANUAL_DEPLOYMENT, info=Info.MANUAL_DEPLOYMENT)
|
||||||
defs.add_service(
|
defs.add_service(
|
||||||
|
@ -5,7 +5,7 @@ from tmtccmd.config.tmtc import (
|
|||||||
TmtcDefinitionWrapper,
|
TmtcDefinitionWrapper,
|
||||||
OpCodeEntry,
|
OpCodeEntry,
|
||||||
)
|
)
|
||||||
from tmtccmd.pus.s17_test import pack_service_17_ping_command
|
from tmtccmd.pus.s17_test import create_service_17_ping_command
|
||||||
from tmtccmd.tc import service_provider
|
from tmtccmd.tc import service_provider
|
||||||
from tmtccmd.tc.decorator import ServiceProviderParams
|
from tmtccmd.tc.decorator import ServiceProviderParams
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ def pack_test_command(p: ServiceProviderParams):
|
|||||||
q = p.queue_helper
|
q = p.queue_helper
|
||||||
if info.op_code == OpCodes.PING:
|
if info.op_code == OpCodes.PING:
|
||||||
q.add_log_cmd("Sending PUS TC [17,1]")
|
q.add_log_cmd("Sending PUS TC [17,1]")
|
||||||
q.add_pus_tc(pack_service_17_ping_command())
|
q.add_pus_tc(create_service_17_ping_command())
|
||||||
if info.op_code == OpCodes.TRIGGER_EVENT:
|
if info.op_code == OpCodes.TRIGGER_EVENT:
|
||||||
q.add_log_cmd("Sending PUS TC Event Trigger [17, 128]")
|
q.add_log_cmd("Sending PUS TC Event Trigger [17, 128]")
|
||||||
q.add_pus_tc(PusTelecommand(service=PusService.S17_TEST, subservice=128))
|
q.add_pus_tc(PusTelecommand(service=PusService.S17_TEST, subservice=128))
|
||||||
|
@ -28,7 +28,7 @@ classifiers =
|
|||||||
[options]
|
[options]
|
||||||
install_requires =
|
install_requires =
|
||||||
# tmtccmd @ git+https://github.com/robamu-org/tmtccmd@v4.0.0a1
|
# tmtccmd @ git+https://github.com/robamu-org/tmtccmd@v4.0.0a1
|
||||||
tmtccmd @ git+https://github.com/robamu-org/tmtccmd@667913bd7dd#egg=tmtccmd
|
tmtccmd @ git+https://github.com/robamu-org/tmtccmd@fa3c006d3ed#egg=tmtccmd
|
||||||
packages = find:
|
packages = find:
|
||||||
python_requires = >=3.10
|
python_requires = >=3.10
|
||||||
include_package_data = True
|
include_package_data = True
|
||||||
|
Loading…
Reference in New Issue
Block a user