6.3. aas.compliance_tool.compliance_check_aasx - Check AASX-File compliance

Module which offers functions to use in a confirmation tool related to AASX files

check_deserialization(): Checks if a AASX file can be deserialized

check_aas_example(): Checks if a AASX file consist the data of the example data defined in aas.examples.data.example_aas.py

check_aasx_files_equivalence(): Checks if two AASX files have the same data regardless of their order

All functions reports any issues using the given ComplianceToolStateManager by adding new steps and associated LogRecords

basyx.aas.compliance_tool.compliance_check_aasx.check_aas_example(file_path: str, state_manager: basyx.aas.compliance_tool.state_manager.ComplianceToolStateManager, **kwargs) None

Checks if a file contains all elements of the aas example and reports any issues using the given ComplianceToolStateManager

Calls the check_deserialization() and add the steps: Check if data is equal to example data

Parameters
  • file_path – Given file which should be checked

  • state_managerComplianceToolStateManager to log the steps

  • kwargs – Additional arguments to pass to AASDataChecker

basyx.aas.compliance_tool.compliance_check_aasx.check_aasx_files_equivalence(file_path_1: str, file_path_2: str, state_manager: basyx.aas.compliance_tool.state_manager.ComplianceToolStateManager, **kwargs) None

Checks if two aasx files contain the same elements in any order and reports any issues using the given ComplianceToolStateManager

calls the check_deserialization() for each file and add the steps: Check if data in files are equal

Parameters
  • file_path_1 – Given first file which should be checked

  • file_path_2 – Given second file which should be checked

  • state_managerComplianceToolStateManager to log the steps

  • kwargs – Additional arguments to pass to AASDataChecker

basyx.aas.compliance_tool.compliance_check_aasx.check_deserialization(file_path: str, state_manager: basyx.aas.compliance_tool.state_manager.ComplianceToolStateManager, file_info: Optional[str] = None) Tuple[basyx.aas.model.provider.DictObjectStore, basyx.aas.adapter.aasx.DictSupplementaryFileContainer, pyecma376_2.core_properties.OPCCoreProperties]

Read a AASX file and reports any issues using the given ComplianceToolStateManager

Add the steps: Open {} file’ and ‘Read {} file

Parameters
  • file_path – Given file which should be deserialized

  • state_manager – Manager to log the steps

  • file_info – Additional information about the file for name of the steps

Returns

The read object store

basyx.aas.compliance_tool.compliance_check_aasx.check_schema(file_path: str, state_manager: basyx.aas.compliance_tool.state_manager.ComplianceToolStateManager) None

Checks a given file against the official json schema and reports any issues using the given ComplianceToolStateManager

Opens the file and checks if the data inside is stored in XML or JSON. Then calls the respective compliance tool schema check