updated tmtccmd
This commit is contained in:
parent
a82e6b2e64
commit
acb48916cf
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||||
<option name="PARAMETERS" value="-m 2 -c 2 --hk" />
|
<option name="PARAMETERS" value="-m listener --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s 17 -t 3" />
|
<option name="PARAMETERS" value="-s 17 -o 0 -t 3" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s 200 -t 4" />
|
<option name="PARAMETERS" value="-s 200 -t 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s 2 -t 4" />
|
<option name="PARAMETERS" value="-s 2 -t 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
<option name="EMULATE_TERMINAL" value="false" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s 3 -p --hk" />
|
<option name="PARAMETERS" value="-s 3 -p --hk" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s 8 -t 8" />
|
<option name="PARAMETERS" value="-s 8 -t 8" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
<component name="ProjectRunConfigurationManager">
|
|
||||||
<configuration default="false" name="tmtcc Single Command UDP" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
|
|
||||||
<module name="tmtc" />
|
|
||||||
<option name="INTERPRETER_OPTIONS" value="" />
|
|
||||||
<option name="PARENT_ENVS" value="true" />
|
|
||||||
<envs>
|
|
||||||
<env name="PYTHONUNBUFFERED" value="1" />
|
|
||||||
</envs>
|
|
||||||
<option name="SDK_HOME" value="" />
|
|
||||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
|
||||||
<option name="IS_MODULE_SDK" value="true" />
|
|
||||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_core/tmtcc_runner.py" />
|
|
||||||
<option name="PARAMETERS" value="-m listener -c udp" />
|
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
||||||
<option name="EMULATE_TERMINAL" value="false" />
|
|
||||||
<option name="MODULE_MODE" value="false" />
|
|
||||||
<option name="REDIRECT_INPUT" value="false" />
|
|
||||||
<option name="INPUT_FILE" value="" />
|
|
||||||
<method v="2" />
|
|
||||||
</configuration>
|
|
||||||
</component>
|
|
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s acu --boardIP 192.168.133.10 --clientIP 192.168.133.4 -l" />
|
<option name="PARAMETERS" value="-s acu -l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s p60dock --boardIP 192.168.133.10 --clientIP 192.168.133.4 -l" />
|
<option name="PARAMETERS" value="-s p60dock -l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s pdu1 --boardIP 192.168.133.10 --clientIP 192.168.133.4 -l" />
|
<option name="PARAMETERS" value="-s pdu1 -l" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
|
||||||
<option name="PARAMETERS" value="-m seqcmd -c udp -s pdu2 --boardIP 192.168.133.10 --clientIP 192.168.133.4 -l -t 4" />
|
<option name="PARAMETERS" value="-s pdu2 -l -t 4" />
|
||||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||||
<option name="EMULATE_TERMINAL" value="true" />
|
<option name="EMULATE_TERMINAL" value="true" />
|
||||||
<option name="MODULE_MODE" value="false" />
|
<option name="MODULE_MODE" value="false" />
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
import enum
|
import enum
|
||||||
|
|
||||||
from tmtccmd.core.backend import TmTcHandler
|
from tmtccmd.core.backend import TmTcHandler
|
||||||
from tmtccmd.utility.tmtcc_logger import get_logger
|
from tmtccmd.utility.logger import get_logger
|
||||||
|
|
||||||
LOGGER = get_logger()
|
LOGGER = get_logger()
|
||||||
|
|
||||||
|
@ -11,12 +11,11 @@ import argparse
|
|||||||
# All globals can be added here and will be part of a globals dictionary.
|
# All globals can be added here and will be part of a globals dictionary.
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from config.custom_mode_op import CustomModeList
|
from config.custom_mode_op import CustomModeList
|
||||||
from tmtccmd.core.definitions import CoreComInterfaces, CoreServiceList
|
from tmtccmd.config.definitions import CoreComInterfaces, CoreServiceList, CoreGlobalIds
|
||||||
from tmtccmd.defaults.globals_setup import set_default_globals_pre_args_parsing, \
|
from tmtccmd.config.globals import set_default_globals_pre_args_parsing, \
|
||||||
set_default_globals_post_args_parsing, get_core_service_dict
|
set_default_globals_post_args_parsing
|
||||||
from tmtccmd.core.globals_manager import update_global
|
from tmtccmd.core.globals_manager import update_global
|
||||||
from tmtccmd.core.definitions import CoreGlobalIds
|
from tmtccmd.utility.logger import get_logger
|
||||||
from tmtccmd.utility.tmtcc_logger import get_logger
|
|
||||||
|
|
||||||
LOGGER = get_logger()
|
LOGGER = get_logger()
|
||||||
|
|
||||||
@ -27,29 +26,11 @@ class CustomGlobalIds(enum.Enum):
|
|||||||
|
|
||||||
|
|
||||||
def set_globals_pre_args_parsing(gui: bool = False):
|
def set_globals_pre_args_parsing(gui: bool = False):
|
||||||
set_default_globals_pre_args_parsing(gui=gui, apid=0x65, com_if_id=CoreComInterfaces.TCPIP_UDP)
|
set_default_globals_pre_args_parsing(gui=gui, apid=0x65, com_if_id=CoreComInterfaces.TCPIP_UDP.value)
|
||||||
|
|
||||||
servicelist = get_core_service_dict()
|
|
||||||
update_global(CoreGlobalIds.CURRENT_SERVICE, CoreServiceList.SERVICE_17)
|
|
||||||
update_global(CoreGlobalIds.SERVICE_DICT, servicelist)
|
|
||||||
|
|
||||||
|
|
||||||
def add_globals_post_args_parsing(args: argparse.Namespace):
|
def add_globals_post_args_parsing(args: argparse.Namespace, json_cfg_path: str):
|
||||||
set_default_globals_post_args_parsing(
|
set_default_globals_post_args_parsing(
|
||||||
args=args, custom_services_list=[CustomServiceList],
|
args=args, custom_services_list=[CustomServiceList],
|
||||||
custom_modes_list=[CustomModeList],
|
custom_modes_list=[CustomModeList], json_cfg_path=json_cfg_path
|
||||||
custom_com_ifs_lists=None
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def set_up_serial_cfg(com_if: CoreComInterfaces):
|
|
||||||
from tmtccmd.defaults.com_setup import default_serial_cfg_setup
|
|
||||||
default_serial_cfg_setup(com_if=com_if)
|
|
||||||
|
|
||||||
|
|
||||||
def set_up_ethernet_cfg():
|
|
||||||
from tmtccmd.defaults.com_setup import default_tcpip_udp_cfg_setup
|
|
||||||
default_tcpip_udp_cfg_setup()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,18 +1,29 @@
|
|||||||
import argparse
|
import argparse
|
||||||
from typing import Union, Dict, Tuple
|
from typing import Union, Dict, Tuple
|
||||||
|
|
||||||
|
from tmtccmd.config.definitions import ServiceOpCodeDictT
|
||||||
from tmtccmd.pus_tm.service_3_base import Service3Base
|
from tmtccmd.pus_tm.service_3_base import Service3Base
|
||||||
from tmtccmd.ecss.tm import PusTelemetry
|
from tmtccmd.ecss.tm import PusTelemetry
|
||||||
from tmtccmd.ecss.tc import PusTelecommand
|
|
||||||
from tmtccmd.pus_tc.definitions import TcQueueT
|
from tmtccmd.pus_tc.definitions import TcQueueT
|
||||||
from tmtccmd.com_if.com_interface_base import CommunicationInterface
|
from tmtccmd.com_if.com_interface_base import CommunicationInterface
|
||||||
from tmtccmd.core.backend import TmTcHandler
|
from tmtccmd.core.backend import TmTcHandler
|
||||||
from tmtccmd.core.hook_base import TmTcHookBase
|
from tmtccmd.config.hook import TmTcHookBase
|
||||||
from tmtccmd.utility.tmtc_printer import TmTcPrinter
|
from tmtccmd.utility.tmtc_printer import TmTcPrinter
|
||||||
|
|
||||||
|
|
||||||
class EiveHookObject(TmTcHookBase):
|
class EiveHookObject(TmTcHookBase):
|
||||||
|
|
||||||
|
def get_service_op_code_dictionary(self) -> ServiceOpCodeDictT:
|
||||||
|
from tmtccmd.config.globals import get_default_service_op_code_dict
|
||||||
|
return get_default_service_op_code_dict()
|
||||||
|
|
||||||
|
def get_json_config_file_path(self) -> str:
|
||||||
|
"""
|
||||||
|
The user can specify a path and filename for the JSON configuration file by overriding this function.
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
return "config/tmtc_config.json"
|
||||||
|
|
||||||
def get_version(self) -> str:
|
def get_version(self) -> str:
|
||||||
from config.version import SW_NAME, VERSION_MAJOR, VERSION_MINOR, VERSION_SUBMINOR
|
from config.version import SW_NAME, VERSION_MAJOR, VERSION_MINOR, VERSION_SUBMINOR
|
||||||
return f"{SW_NAME} {VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_SUBMINOR}"
|
return f"{SW_NAME} {VERSION_MAJOR}.{VERSION_MINOR}.{VERSION_SUBMINOR}"
|
||||||
@ -23,12 +34,14 @@ class EiveHookObject(TmTcHookBase):
|
|||||||
|
|
||||||
def add_globals_post_args_parsing(self, args: argparse.Namespace):
|
def add_globals_post_args_parsing(self, args: argparse.Namespace):
|
||||||
from config.globals_config import add_globals_post_args_parsing
|
from config.globals_config import add_globals_post_args_parsing
|
||||||
add_globals_post_args_parsing(args)
|
add_globals_post_args_parsing(args=args, json_cfg_path=self.get_json_config_file_path())
|
||||||
|
|
||||||
def assign_communication_interface(self, com_if: int, tmtc_printer: TmTcPrinter) -> \
|
def assign_communication_interface(self, com_if_key: str, tmtc_printer: TmTcPrinter) -> \
|
||||||
Union[CommunicationInterface, None]:
|
Union[CommunicationInterface, None]:
|
||||||
from tmtccmd.defaults.com_setup import create_communication_interface_default
|
from tmtccmd.config.com_if import create_communication_interface_default
|
||||||
return create_communication_interface_default(com_if=com_if, tmtc_printer=tmtc_printer)
|
return create_communication_interface_default(
|
||||||
|
com_if_key=com_if_key, tmtc_printer=tmtc_printer, json_cfg_path=self.get_json_config_file_path()
|
||||||
|
)
|
||||||
|
|
||||||
def perform_mode_operation(self, tmtc_backend: TmTcHandler, mode: int):
|
def perform_mode_operation(self, tmtc_backend: TmTcHandler, mode: int):
|
||||||
from config.custom_mode_op import custom_mode_operation
|
from config.custom_mode_op import custom_mode_operation
|
||||||
@ -42,21 +55,13 @@ class EiveHookObject(TmTcHookBase):
|
|||||||
from pus_tm.factory_hook import tm_user_factory_hook
|
from pus_tm.factory_hook import tm_user_factory_hook
|
||||||
return tm_user_factory_hook(raw_tm_packet=raw_tm_packet)
|
return tm_user_factory_hook(raw_tm_packet=raw_tm_packet)
|
||||||
|
|
||||||
def set_object_ids(self) -> Dict[int, bytearray]:
|
def get_object_ids(self) -> Dict[bytes, list]:
|
||||||
from config.object_ids import set_object_ids
|
from config.object_ids import get_object_ids
|
||||||
return set_object_ids()
|
return get_object_ids()
|
||||||
|
|
||||||
def pack_total_service_queue(self) -> Union[None, TcQueueT]:
|
|
||||||
from pus_tc.tc_packer_hook import create_total_tc_queue_user
|
|
||||||
return create_total_tc_queue_user()
|
|
||||||
|
|
||||||
def command_preparation_hook(self) -> Union[None, PusTelecommand]:
|
|
||||||
from custom_hooks import command_preparation_hook
|
|
||||||
return command_preparation_hook()
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def handle_service_8_telemetry(
|
def handle_service_8_telemetry(
|
||||||
object_id: int, action_id: int, custom_data: bytearray
|
object_id: bytes, action_id: int, custom_data: bytearray
|
||||||
) -> Tuple[list, list]:
|
) -> Tuple[list, list]:
|
||||||
from pus_tm.service_8_hook import user_analyze_service_8_data
|
from pus_tm.service_8_hook import user_analyze_service_8_data
|
||||||
return user_analyze_service_8_data(
|
return user_analyze_service_8_data(
|
||||||
|
@ -7,45 +7,31 @@
|
|||||||
import enum
|
import enum
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
||||||
PUS_SERVICE_17_ID = bytearray([0x53, 0x00, 0x00, 0x17])
|
PUS_SERVICE_17_ID = bytes([0x53, 0x00, 0x00, 0x17])
|
||||||
TEST_DEVICE_ID = bytearray([0x44, 0x00, 0xAF, 0xFE])
|
TEST_DEVICE_ID = bytes([0x44, 0x00, 0xAF, 0xFE])
|
||||||
P60_DOCK_HANDLER = bytearray([0x44, 0x00, 0x00, 0x1])
|
P60_DOCK_HANDLER = bytes([0x44, 0x00, 0x00, 0x1])
|
||||||
PDU_1_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x2])
|
PDU_1_HANDLER_ID = bytes([0x44, 0x00, 0x00, 0x2])
|
||||||
PDU_2_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x3])
|
PDU_2_HANDLER_ID = bytes([0x44, 0x00, 0x00, 0x3])
|
||||||
ACU_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x4])
|
ACU_HANDLER_ID = bytes([0x44, 0x00, 0x00, 0x4])
|
||||||
TMP_1075_1_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x5])
|
TMP_1075_1_HANDLER_ID = bytes([0x44, 0x00, 0x00, 0x5])
|
||||||
TMP_1075_2_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x6])
|
TMP_1075_2_HANDLER_ID = bytes([0x44, 0x00, 0x00, 0x6])
|
||||||
HEATER_ID = bytearray([0x54, 0x00, 0x00, 0x1])
|
HEATER_ID = bytes([0x54, 0x00, 0x00, 0x1])
|
||||||
PCDU_HANDLER_ID = bytearray([0x44, 0x00, 0x10, 0x00])
|
PCDU_HANDLER_ID = bytes([0x44, 0x00, 0x10, 0x00])
|
||||||
SOLAR_ARRAY_DEPLOYMENT_ID = bytearray([0x44, 0x00, 0x10, 0x01])
|
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x00, 0x10, 0x01])
|
||||||
|
|
||||||
|
|
||||||
class ObjIdIds(enum.IntEnum):
|
def get_object_ids() -> Dict[bytes, list]:
|
||||||
PUS_SERVICE_17_ID = 0
|
|
||||||
TEST_DEVICE_ID = 1
|
|
||||||
P60DOCK_HANDLER_ID = 2
|
|
||||||
PDU1_HANDLER_ID = 3
|
|
||||||
PDU2_HANDLER_ID = 4
|
|
||||||
PCDU_HANDLER_ID = 5
|
|
||||||
ACU_HANDLER_ID = 6
|
|
||||||
TMP1075_1_HANDLER_ID = 7
|
|
||||||
TMP1075_2_HANDLER_ID = 8
|
|
||||||
HEATER_ID = 9
|
|
||||||
SOLAR_ARRAY_DEPLOYMENT_ID = 10
|
|
||||||
|
|
||||||
|
|
||||||
def set_object_ids() -> Dict[int, bytearray]:
|
|
||||||
object_id_dict = ({
|
object_id_dict = ({
|
||||||
ObjIdIds.PUS_SERVICE_17_ID: PUS_SERVICE_17_ID,
|
PUS_SERVICE_17_ID: "PUS Service 17",
|
||||||
ObjIdIds.TEST_DEVICE_ID: TEST_DEVICE_ID,
|
TEST_DEVICE_ID: "Test Device",
|
||||||
ObjIdIds.P60DOCK_HANDLER_ID: P60_DOCK_HANDLER,
|
P60_DOCK_HANDLER: "P60",
|
||||||
ObjIdIds.PDU1_HANDLER_ID: PDU_1_HANDLER_ID,
|
PDU_1_HANDLER_ID: "PCDU PDU1 Handler",
|
||||||
ObjIdIds.PDU2_HANDLER_ID: PDU_2_HANDLER_ID,
|
PDU_2_HANDLER_ID: "PCDU PDU2 Handler",
|
||||||
ObjIdIds.ACU_HANDLER_ID: ACU_HANDLER_ID,
|
ACU_HANDLER_ID: "ACU Handler",
|
||||||
ObjIdIds.TMP1075_1_HANDLER_ID: TMP_1075_1_HANDLER_ID,
|
TMP_1075_1_HANDLER_ID: "TMP 1075 Handler 1",
|
||||||
ObjIdIds.TMP1075_2_HANDLER_ID: TMP_1075_2_HANDLER_ID,
|
TMP_1075_2_HANDLER_ID: "TMP 1075 Handler 2",
|
||||||
ObjIdIds.HEATER_ID: HEATER_ID,
|
HEATER_ID: "Heater",
|
||||||
ObjIdIds.PCDU_HANDLER_ID: PCDU_HANDLER_ID,
|
PCDU_HANDLER_ID: "PCDU",
|
||||||
ObjIdIds.SOLAR_ARRAY_DEPLOYMENT_ID: SOLAR_ARRAY_DEPLOYMENT_ID,
|
SOLAR_ARRAY_DEPLOYMENT_ID: "Solar Array Deployment",
|
||||||
})
|
})
|
||||||
return object_id_dict
|
return object_id_dict
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
from tmtccmd.pus_tc.packer import TcQueueT
|
from tmtccmd.pus_tc.packer import TcQueueT
|
||||||
from tmtccmd.ecss.tc import PusTelecommand
|
from tmtccmd.ecss.tc import PusTelecommand
|
||||||
from tmtccmd.core.definitions import QueueCommands
|
from tmtccmd.config.definitions import QueueCommands
|
||||||
from gomspace.gomspace_common import *
|
from gomspace.gomspace_common import *
|
||||||
from pus_tc.p60dock import P60DockConfigTable
|
from pus_tc.p60dock import P60DockConfigTable
|
||||||
from config.object_ids import ObjIdIds
|
|
||||||
from tmtccmd.core.object_id_manager import get_object_id
|
from config.object_ids import P60_DOCK_HANDLER
|
||||||
|
|
||||||
|
|
||||||
class ACUTestProcedure:
|
class ACUTestProcedure:
|
||||||
@ -57,7 +57,7 @@ def pack_acu_test_into(object_id: bytearray, tc_queue: TcQueueT) -> TcQueueT:
|
|||||||
tc_queue.appendleft((QueueCommands.PRINT, "Testing ACU"))
|
tc_queue.appendleft((QueueCommands.PRINT, "Testing ACU"))
|
||||||
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Enabling ACU connected to X1 slot (channel 0)"))
|
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Enabling ACU connected to X1 slot (channel 0)"))
|
||||||
p60dock_object_id = get_object_id(ObjIdIds.P60DOCK_HANDLER_ID)
|
p60dock_object_id = P60_DOCK_HANDLER
|
||||||
command = pack_set_param_command(p60dock_object_id, P60DockConfigTable.out_en_0.parameter_address,
|
command = pack_set_param_command(p60dock_object_id, P60DockConfigTable.out_en_0.parameter_address,
|
||||||
P60DockConfigTable.out_en_0.parameter_size, Channel.on)
|
P60DockConfigTable.out_en_0.parameter_size, Channel.on)
|
||||||
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
command = PusTelecommand(service=8, subservice=128, ssc=23, app_data=command)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 30.01.2021
|
@date 30.01.2021
|
||||||
"""
|
"""
|
||||||
from tmtccmd.core.definitions import QueueCommands
|
from tmtccmd.config.definitions import QueueCommands
|
||||||
from tmtccmd.pus_tc.packer import TcQueueT
|
from tmtccmd.pus_tc.packer import TcQueueT
|
||||||
from tmtccmd.ecss.tc import PusTelecommand
|
from tmtccmd.ecss.tc import PusTelecommand
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 13.12.2020
|
@date 13.12.2020
|
||||||
"""
|
"""
|
||||||
from tmtccmd.core.definitions import QueueCommands
|
from tmtccmd.config.definitions import QueueCommands
|
||||||
from tmtccmd.pus_tc.packer import TcQueueT
|
from tmtccmd.pus_tc.packer import TcQueueT
|
||||||
from tmtccmd.ecss.tc import PusTelecommand
|
from tmtccmd.ecss.tc import PusTelecommand
|
||||||
from gomspace.gomspace_common import *
|
from gomspace.gomspace_common import *
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 17.12.2020
|
@date 17.12.2020
|
||||||
"""
|
"""
|
||||||
from tmtccmd.core.definitions import QueueCommands
|
from tmtccmd.config.definitions import QueueCommands
|
||||||
|
|
||||||
from tmtccmd.pus_tc.packer import TcQueueT
|
from tmtccmd.pus_tc.packer import TcQueueT
|
||||||
from tmtccmd.ecss.tc import PusTelecommand
|
from tmtccmd.ecss.tc import PusTelecommand
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 17.12.2020
|
@date 17.12.2020
|
||||||
"""
|
"""
|
||||||
from tmtccmd.core.definitions import QueueCommands
|
from tmtccmd.config.definitions import QueueCommands
|
||||||
from tmtccmd.pus_tc.packer import TcQueueT
|
from tmtccmd.pus_tc.packer import TcQueueT
|
||||||
from tmtccmd.ecss.tc import PusTelecommand
|
from tmtccmd.ecss.tc import PusTelecommand
|
||||||
from gomspace.gomspace_common import *
|
from gomspace.gomspace_common import *
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
@author R. Mueller
|
@author R. Mueller
|
||||||
@date 02.05.2020
|
@date 02.05.2020
|
||||||
"""
|
"""
|
||||||
from tmtccmd.core.definitions import QueueCommands
|
from tmtccmd.config.definitions import QueueCommands
|
||||||
from tmtccmd.ecss.tc import PusTelecommand
|
from tmtccmd.ecss.tc import PusTelecommand
|
||||||
from tmtccmd.pus_tc.packer import TcQueueT
|
from tmtccmd.pus_tc.packer import TcQueueT
|
||||||
from tmtccmd.pus_tc.service_200_mode import pack_mode_data
|
from tmtccmd.pus_tc.service_200_mode import pack_mode_data
|
||||||
|
@ -8,12 +8,11 @@ import os
|
|||||||
from collections import deque
|
from collections import deque
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|
||||||
from tmtccmd.core.definitions import CoreServiceList
|
from tmtccmd.config.definitions import CoreServiceList
|
||||||
from tmtccmd.utility.tmtcc_logger import get_logger
|
from tmtccmd.utility.logger import get_logger
|
||||||
from tmtccmd.pus_tc.definitions import TcQueueT
|
from tmtccmd.pus_tc.definitions import TcQueueT
|
||||||
from tmtccmd.pus_tc.service_5_event import pack_generic_service5_test_into
|
from tmtccmd.pus_tc.service_5_event import pack_generic_service5_test_into
|
||||||
from tmtccmd.pus_tc.service_17_test import pack_service17_ping_command
|
from tmtccmd.pus_tc.service_17_test import pack_service17_ping_command
|
||||||
from tmtccmd.core.object_id_manager import get_object_id
|
|
||||||
|
|
||||||
from pus_tc.p60dock import pack_p60dock_test_into
|
from pus_tc.p60dock import pack_p60dock_test_into
|
||||||
from pus_tc.pdu2 import pack_pdu2_test_into
|
from pus_tc.pdu2 import pack_pdu2_test_into
|
||||||
@ -22,39 +21,40 @@ from pus_tc.acu import pack_acu_test_into
|
|||||||
from pus_tc.tmp1075 import pack_tmp1075_test_into
|
from pus_tc.tmp1075 import pack_tmp1075_test_into
|
||||||
from pus_tc.heater import pack_heater_test_into
|
from pus_tc.heater import pack_heater_test_into
|
||||||
from config.definitions import CustomServiceList
|
from config.definitions import CustomServiceList
|
||||||
from config.object_ids import ObjIdIds
|
from config.object_ids import P60_DOCK_HANDLER, PDU_1_HANDLER_ID, PDU_2_HANDLER_ID, ACU_HANDLER_ID, \
|
||||||
|
TMP_1075_1_HANDLER_ID, TMP_1075_2_HANDLER_ID, HEATER_ID
|
||||||
|
|
||||||
|
|
||||||
LOGGER = get_logger()
|
LOGGER = get_logger()
|
||||||
|
|
||||||
|
|
||||||
def pack_service_queue_user(service: Union[str, int], op_code: str, service_queue: TcQueueT):
|
def pack_service_queue_user(service: Union[str, int], op_code: str, service_queue: TcQueueT):
|
||||||
if service == CoreServiceList.SERVICE_5:
|
if service == CoreServiceList.SERVICE_5.value:
|
||||||
return pack_generic_service5_test_into(service_queue)
|
return pack_generic_service5_test_into(service_queue)
|
||||||
if service == CoreServiceList.SERVICE_17:
|
if service == CoreServiceList.SERVICE_17.value:
|
||||||
return service_queue.appendleft(pack_service17_ping_command(ssc=1700).pack_command_tuple())
|
return service_queue.appendleft(pack_service17_ping_command(ssc=1700).pack_command_tuple())
|
||||||
if service == CustomServiceList.P60DOCK.value:
|
if service == CustomServiceList.P60DOCK.value:
|
||||||
object_id = get_object_id(ObjIdIds.P60DOCK_HANDLER_ID)
|
object_id = P60_DOCK_HANDLER
|
||||||
return pack_p60dock_test_into(object_id, service_queue)
|
return pack_p60dock_test_into(object_id, service_queue)
|
||||||
if service == CustomServiceList.PDU1.value:
|
if service == CustomServiceList.PDU1.value:
|
||||||
pdu1_object_id = get_object_id(ObjIdIds.PDU1_HANDLER_ID)
|
pdu1_object_id = PDU_1_HANDLER_ID
|
||||||
p60dock_object_id = get_object_id(ObjIdIds.P60DOCK_HANDLER_ID)
|
p60dock_object_id = P60_DOCK_HANDLER
|
||||||
return pack_pdu1_test_into(pdu1_object_id, p60dock_object_id, service_queue)
|
return pack_pdu1_test_into(pdu1_object_id, p60dock_object_id, service_queue)
|
||||||
if service == CustomServiceList.PDU2.value:
|
if service == CustomServiceList.PDU2.value:
|
||||||
pdu2_object_id = get_object_id(ObjIdIds.PDU2_HANDLER_ID)
|
pdu2_object_id = PDU_2_HANDLER_ID
|
||||||
p60dock_object_id = get_object_id(ObjIdIds.P60DOCK_HANDLER_ID)
|
p60dock_object_id = P60_DOCK_HANDLER
|
||||||
return pack_pdu2_test_into(pdu2_object_id, p60dock_object_id, service_queue)
|
return pack_pdu2_test_into(pdu2_object_id, p60dock_object_id, service_queue)
|
||||||
if service == CustomServiceList.ACU.value:
|
if service == CustomServiceList.ACU.value:
|
||||||
object_id = get_object_id(ObjIdIds.ACU_HANDLER_ID)
|
object_id = ACU_HANDLER_ID
|
||||||
return pack_acu_test_into(object_id, service_queue)
|
return pack_acu_test_into(object_id, service_queue)
|
||||||
if service == CustomServiceList.TMP1075_1.value:
|
if service == CustomServiceList.TMP1075_1.value:
|
||||||
object_id = get_object_id(ObjIdIds.TMP1075_1_HANDLER_ID)
|
object_id = TMP_1075_1_HANDLER_ID
|
||||||
return pack_tmp1075_test_into(object_id, service_queue)
|
return pack_tmp1075_test_into(object_id, service_queue)
|
||||||
if service == CustomServiceList.TMP1075_2.value:
|
if service == CustomServiceList.TMP1075_2.value:
|
||||||
object_id = get_object_id(ObjIdIds.TMP1075_2_HANDLER_ID)
|
object_id = TMP_1075_2_HANDLER_ID
|
||||||
return pack_tmp1075_test_into(object_id, service_queue)
|
return pack_tmp1075_test_into(object_id, service_queue)
|
||||||
if service == CustomServiceList.HEATER.value:
|
if service == CustomServiceList.HEATER.value:
|
||||||
object_id = get_object_id(ObjIdIds.HEATER)
|
object_id = HEATER_ID
|
||||||
return pack_heater_test_into(object_id, service_queue)
|
return pack_heater_test_into(object_id, service_queue)
|
||||||
LOGGER.warning("Invalid Service !")
|
LOGGER.warning("Invalid Service !")
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
@author J. Meier
|
@author J. Meier
|
||||||
@date 06.01.2021
|
@date 06.01.2021
|
||||||
"""
|
"""
|
||||||
from tmtccmd.core.definitions import QueueCommands
|
from tmtccmd.config.definitions import QueueCommands
|
||||||
|
|
||||||
from tmtccmd.pus_tc.packer import TcQueueT
|
from tmtccmd.pus_tc.packer import TcQueueT
|
||||||
from tmtccmd.ecss.tc import PusTelecommand
|
from tmtccmd.ecss.tc import PusTelecommand
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"""
|
"""
|
||||||
from tmtccmd.pus_tm.service_8_functional_cmd import Service8TM
|
from tmtccmd.pus_tm.service_8_functional_cmd import Service8TM
|
||||||
from tmtccmd.ecss.tm import PusTelemetry
|
from tmtccmd.ecss.tm import PusTelemetry
|
||||||
from tmtccmd.utility.tmtcc_logger import get_logger
|
from tmtccmd.utility.logger import get_logger
|
||||||
|
|
||||||
from tmtccmd.pus_tm.service_1_verification import Service1TM
|
from tmtccmd.pus_tm.service_1_verification import Service1TM
|
||||||
from tmtccmd.pus_tm.service_5_event import Service5TM
|
from tmtccmd.pus_tm.service_5_event import Service5TM
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
||||||
from tmtccmd.pus_tm.service_3_base import Service3Base
|
from tmtccmd.pus_tm.service_3_base import Service3Base
|
||||||
from tmtccmd.utility.tmtcc_logger import get_logger
|
from tmtccmd.utility.logger import get_logger
|
||||||
|
|
||||||
LOGGER = get_logger()
|
LOGGER = get_logger()
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
from config.object_ids import ObjIdIds
|
from config.object_ids import PDU_2_HANDLER_ID
|
||||||
|
|
||||||
|
|
||||||
def user_analyze_service_8_data(
|
def user_analyze_service_8_data(
|
||||||
object_id: int, action_id: int, custom_data: bytearray) -> Tuple[list, list]:
|
object_id: bytes, action_id: int, custom_data: bytearray) -> Tuple[list, list]:
|
||||||
"""
|
"""
|
||||||
This function is called by the TMTC core if a Service 8 data reply (subservice 130)
|
This function is called by the TMTC core if a Service 8 data reply (subservice 130)
|
||||||
is received. The user can return a tuple of two lists, where the first list
|
is received. The user can return a tuple of two lists, where the first list
|
||||||
@ -15,7 +15,7 @@ def user_analyze_service_8_data(
|
|||||||
@param custom_data:
|
@param custom_data:
|
||||||
@return:
|
@return:
|
||||||
"""
|
"""
|
||||||
if object_id == ObjIdIds.PDU2_HANDLER_ID.value:
|
if object_id == PDU_2_HANDLER_ID:
|
||||||
header_list = ['PDU2 Service 8 Reply']
|
header_list = ['PDU2 Service 8 Reply']
|
||||||
|
|
||||||
data_string = str()
|
data_string = str()
|
||||||
|
2
tmtccmd
2
tmtccmd
@ -1 +1 @@
|
|||||||
Subproject commit 74a86e54ecccab514ce19e7e722570b78dedd5d6
|
Subproject commit 8ca16e305d18eb8df2165680676992261af99c1b
|
Loading…
Reference in New Issue
Block a user