fsfw-example-tmtc-common/pus_tc/cmd_definitions.py

45 lines
1.4 KiB
Python
Raw Normal View History

2022-05-18 23:40:13 +02:00
from tmtccmd.config import (
ServiceOpCodeDictT,
add_op_code_entry,
add_service_op_code_entry,
2022-05-24 13:24:02 +02:00
generate_op_code_options,
2022-05-18 23:40:13 +02:00
OpCodeDictKeys,
)
2022-05-24 13:24:02 +02:00
from tmtccmd.config.definitions import OpCodeOptionsT
2022-05-18 23:40:13 +02:00
from tmtccmd.config.globals import get_default_service_op_code_dict
2022-05-24 13:24:02 +02:00
from common_tmtc.pus_tc.pus_11_tc_sched import OpCodes
2022-05-18 23:40:13 +02:00
2022-05-20 11:08:46 +02:00
def common_fsfw_service_op_code_dict() -> ServiceOpCodeDictT:
2022-05-18 23:40:13 +02:00
service_op_code_dict = get_default_service_op_code_dict()
op_code = dict()
add_op_code_entry(op_code_dict=op_code, keys="test", info="Mode CMD Test")
add_op_code_entry(
op_code_dict=op_code,
keys=["0", "asm_to_normal"],
info="Command test assembly to normal mode",
options={OpCodeDictKeys.TIMEOUT: 6.0},
)
add_service_op_code_entry(
srv_op_code_dict=service_op_code_dict,
name="200",
2022-05-20 11:08:46 +02:00
info="PUS Service 200 Mode MGMT",
op_code_entry=op_code,
)
op_code = dict()
2022-05-24 13:24:02 +02:00
add_op_code_entry(
op_code_dict=op_code,
keys=OpCodes.INSERT,
info="Insertion Test",
options=generate_op_code_options(custom_timeout=0.5),
)
add_op_code_entry(op_code_dict=op_code, keys=OpCodes.DELETE, info="Deletion Test")
2022-05-20 11:08:46 +02:00
add_service_op_code_entry(
srv_op_code_dict=service_op_code_dict,
name="11",
info="PUS Service 11 TC Scheduling",
2022-05-18 23:40:13 +02:00
op_code_entry=op_code,
)
return service_op_code_dict