eive-tmtc/eive_tmtc/pus_tc/cmd_definitions.py

22 lines
735 B
Python
Raw Normal View History

2022-08-18 11:09:35 +02:00
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry, CoreServiceList
2022-08-12 10:22:33 +02:00
from tmtccmd.config.tmtc import (
call_all_definitions_providers,
)
2022-07-04 18:14:51 +02:00
from tmtccmd.config.globals import get_default_tmtc_defs
def get_eive_service_op_code_dict() -> TmtcDefinitionWrapper:
2022-08-12 10:20:01 +02:00
"""Call all registered TMTC definition providers. They were registered using
the :py:func:`tmtc_definitions_provider` decorator.
"""
2022-07-04 18:14:51 +02:00
def_wrapper = get_default_tmtc_defs()
2022-08-18 11:09:35 +02:00
srv_5 = OpCodeEntry()
srv_5.add("0", "Event Test")
def_wrapper.add_service(
name=CoreServiceList.SERVICE_5.value,
info="PUS Service 5 Event",
op_code_entry=srv_5,
)
call_all_definitions_providers(def_wrapper)
2022-07-04 18:14:51 +02:00
return def_wrapper