mbdlyb.functional.capella_import ================================ .. py:module:: mbdlyb.functional.capella_import .. autoapi-nested-parse:: Capella model import utilities for functional analysis. This module provides tools to transform Capella models (from Melody Modeling) into functional model clusters suitable for MBDlyb analysis. The transformation process: - Builds component and function trees from Capella architecture - Establishes functional dependencies and relations - Creates diagnostic tests and results - Manages error propagation and observation paths - Optionally imports operating mode specifications Type aliases: FN_GDB_NODE: Graph database node type (GFunctionalNode or GCluster) FN_GDB_NODE_ID: Tuple of node type and identifier string PVMT_DICT: Dictionary structure for PVMT (CAPELLA metadata) data Attributes ---------- .. autoapisummary:: mbdlyb.functional.capella_import.FN_GDB_NODE mbdlyb.functional.capella_import.FN_GDB_NODE_ID mbdlyb.functional.capella_import.PVMT_DICT Classes ------- .. autoapisummary:: mbdlyb.functional.capella_import.CapellaToCluster Module Contents --------------- .. py:class:: CapellaToCluster(aird: str, queue: Optional[multiprocessing.Queue] = None) Transformer for converting Capella models to functional model clusters. This class orchestrates the multi-step transformation of a Capella model into a Cluster object suitable for functional analysis and diagnosis. The transformation supports multiple architectural layers (logical, physical), automatic diagnostic test generation, and operating mode import. :ivar _aird: Path to the Capella AIRD model file. :vartype _aird: str :ivar _model: Loaded Capella model. :vartype _model: MelodyModel :ivar _architecture: Target architecture. :vartype _architecture: cs.ComponentArchitecture :ivar _cluster: Resulting functional model cluster. :vartype _cluster: GCluster :ivar _elements: Mapping of node types to created elements. :vartype _elements: dict :ivar _diagnostic_test_mapping: Mapping test results to observables. :vartype _diagnostic_test_mapping: dict :ivar _function_to_test_result_mapping: Function to test result mappings. :vartype _function_to_test_result_mapping: dict :ivar _capella_fns: Capella function objects by identifier. :vartype _capella_fns: dict :ivar _error_code_nodes: Error code nodes by identifier. :vartype _error_code_nodes: dict .. py:method:: transform(architecture: str, default_fn_tests: bool = False, default_hl_fn_tests: bool = False, default_hw_tests: bool = False, default_ll_hw_tests: bool = False, import_opms: bool = False) -> mbdlyb.functional.gdb.GCluster Transform Capella architecture to a functional model cluster. Orchestrates the complete transformation process including building component/function trees, establishing relations, creating tests, and importing optional configurations. :param architecture: Architecture to import ('logical' or 'physical'). :type architecture: str :param default_fn_tests: Generate tests for all functions. Defaults to False. :type default_fn_tests: bool :param default_hl_fn_tests: Generate tests only for high-level functions. Defaults to False. :type default_hl_fn_tests: bool :param default_hw_tests: Generate tests for all hardware. Defaults to False. :type default_hw_tests: bool :param default_ll_hw_tests: Generate tests only for low-level hardware. Defaults to False. :type default_ll_hw_tests: bool :param import_opms: Import operating modes. Defaults to False. :type import_opms: bool :returns: The transformed functional model cluster. :rtype: GCluster .. py:type:: FN_GDB_NODE :canonical: Type[Union[GFunctionalNode, GCluster]] .. py:type:: FN_GDB_NODE_ID :canonical: Tuple[FN_GDB_NODE, str] .. py:type:: PVMT_DICT :canonical: dict[str, dict[str, Any]]