re-test param service
This commit is contained in:
parent
9dedcd4e4f
commit
2593105d65
@ -1,3 +1,4 @@
|
||||
from common_tmtc.pus_tc.service_20_parameters import add_param_cmds
|
||||
from tmtccmd.config import (
|
||||
TmTcDefWrapper,
|
||||
)
|
||||
@ -18,5 +19,6 @@ def common_fsfw_service_op_code_dict() -> TmTcDefWrapper:
|
||||
)
|
||||
|
||||
add_tc_sched_cmds(def_wrapper)
|
||||
add_param_cmds(def_wrapper)
|
||||
|
||||
return def_wrapper
|
||||
|
@ -1,7 +1,9 @@
|
||||
import struct
|
||||
|
||||
from spacepackets.ecss.tc import PusTelecommand
|
||||
from spacepackets.ecss import PusServices
|
||||
|
||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
||||
from tmtccmd.tc import QueueHelper
|
||||
from tmtccmd.tc.pus_20_params import pack_type_and_matrix_data, pack_parameter_id
|
||||
from tmtccmd.tc.pus_200_fsfw_modes import pack_mode_data, Modes
|
||||
@ -12,6 +14,16 @@ from common_tmtc.config.object_ids import TEST_DEVICE_0_ID
|
||||
LOGGER = get_console_logger()
|
||||
|
||||
|
||||
def add_param_cmds(defs: TmTcDefWrapper):
|
||||
op_code_entry = OpCodeEntry()
|
||||
op_code_entry.add(keys=["0", "test"], info="Generic Test")
|
||||
defs.add_service(
|
||||
name=str(PusServices.S20_PARAMETER.value),
|
||||
info="Service 20 Parameters",
|
||||
op_code_entry=op_code_entry
|
||||
)
|
||||
|
||||
|
||||
def pack_service20_commands_into(q: QueueHelper, op_code: str):
|
||||
if op_code == "0":
|
||||
pack_service20_test_into(q=q)
|
||||
@ -22,6 +34,10 @@ def pack_service20_test_into(q: QueueHelper, called_externally: bool = False):
|
||||
q.add_log_cmd("Testing Service 20")
|
||||
object_id = TEST_DEVICE_0_ID
|
||||
|
||||
# set mode on
|
||||
q.add_log_cmd("Testing Service 20: Set Mode On")
|
||||
mode_data = pack_mode_data(object_id, Modes.ON, 0)
|
||||
q.add_pus_tc(PusTelecommand(service=200, subservice=1, app_data=mode_data))
|
||||
# set mode normal
|
||||
q.add_log_cmd("Testing Service 20: Set Normal Mode")
|
||||
mode_data = pack_mode_data(object_id, Modes.NORMAL, 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user