Skip to content

API Reference

Parser

iodd_parser.IODDParser

Parser for IO-Link Device Description (IODD) files.

This class parses IODD ZIP archives and resolves all references to produce a unified iodd_parser.ParsedIODD result with resolved text strings, datatypes, variables, errors, units, and process data.

Parameters:

Name Type Description Default
standard_definitions_folder str | Path | None

Optional path to a folder containing standard definitions and language files. When provided, all files are loaded from this folder and all language files matching the pattern <base>-<lang>.xml are auto-discovered.

None
standard_definitions_filename str

Filename of the standard definitions XML. Defaults to IODD-StandardDefinitions1.1.xml.

'IODD-StandardDefinitions1.1.xml'
standard_unit_filename str

Filename of the standard unit definitions XML. Defaults to IODD-StandardUnitDefinitions1.1.xml.

'IODD-StandardUnitDefinitions1.1.xml'
load_images bool

Whether to extract and load images from the IODD archive. Defaults to False. Example usage:: parser = IODDParser() # Two-step: parse then resolve parsed = parser.parse("device.zip") print(f"Available languages: {parsed.available_languages}") result = parsed.resolve(lang="de") # Or one-step convenience method result = parser.parse_and_resolve("device.zip", lang="de") print(result.device_name) for var_id, var in result.variables.items(): print(f"{var_id}: {var.name}") # With a custom folder containing standard definitions: parser = IODDParser(standard_definitions_folder="/path/to/definitions")

False
Source code in src/iodd_parser/parser.py
class IODDParser:
    """
    Parser for IO-Link Device Description (IODD) files.

    This class parses IODD ZIP archives and resolves all references to
    produce a unified [`iodd_parser.ParsedIODD`][] result with resolved text strings,
    datatypes, variables, errors, units, and process data.

    :param standard_definitions_folder: Optional path to a folder containing
        standard definitions and language files. When provided, all files are
        loaded from this folder and all language files matching the pattern
        ``<base>-<lang>.xml`` are auto-discovered.
    :param standard_definitions_filename: Filename of the standard definitions XML.
        Defaults to IODD-StandardDefinitions1.1.xml.
    :param standard_unit_filename: Filename of the standard unit definitions XML.
        Defaults to IODD-StandardUnitDefinitions1.1.xml.
    :param load_images: Whether to extract and load images from the IODD archive.
        Defaults to False.

    Example usage::

        parser = IODDParser()

        # Two-step: parse then resolve
        parsed = parser.parse("device.zip")
        print(f"Available languages: {parsed.available_languages}")
        result = parsed.resolve(lang="de")

        # Or one-step convenience method
        result = parser.parse_and_resolve("device.zip", lang="de")

        print(result.device_name)
        for var_id, var in result.variables.items():
            print(f"{var_id}: {var.name}")

        # With a custom folder containing standard definitions:
        parser = IODDParser(standard_definitions_folder="/path/to/definitions")
    """

    load_images: bool
    _loaded_definitions: IoddstandardDefinitions
    _loaded_units: IoddstandardUnitDefinitions
    _lang_texts: dict[str, dict[str, str]]

    def __init__(
        self,
        standard_definitions_folder: str | Path | None = None,
        standard_definitions_filename: str = "IODD-StandardDefinitions1.1.xml",
        standard_unit_filename: str = "IODD-StandardUnitDefinitions1.1.xml",
        load_images: bool = False,
    ):
        self.load_images = load_images

        parser = XmlParser()

        # Determine sources based on whether a folder is provided
        if standard_definitions_folder is not None:
            folder = Path(standard_definitions_folder)
            definitions_source = folder / standard_definitions_filename
            units_source = folder / standard_unit_filename
        else:
            definitions_source = _get_bundled_resource(standard_definitions_filename)
            units_source = _get_bundled_resource(standard_unit_filename)

        self._loaded_definitions = parser.parse(definitions_source, IoddstandardDefinitions)
        self._loaded_units = parser.parse(units_source, IoddstandardUnitDefinitions)

        # Pre-load language-specific standard definitions (texts only)
        self._lang_texts = {}
        def_base = Path(standard_definitions_filename)
        base_stem = def_base.stem
        lang_prefix = f"{base_stem}-"

        # Get iterable of (name, source) tuples for language file discovery
        if standard_definitions_folder is not None:
            folder = Path(standard_definitions_folder)
            lang_files = ((f.name, f) for f in folder.glob(f"{base_stem}-*{def_base.suffix}"))
        else:
            resource_dir = files(STANDARD_DEFINITIONS_PACKAGE).joinpath(STANDARD_DEFINITIONS_VERSION)
            lang_files = ((r.name, r) for r in resource_dir.iterdir() if r.is_file())

        for name, source in lang_files:
            stem = Path(name).stem
            if stem.startswith(lang_prefix):
                lang_code = stem[len(lang_prefix) :]
                if lang_code:
                    try:
                        lang_def = parser.parse(source, ExternalTextDocument)
                        self._lang_texts[lang_code] = {t.id: t.value for t in lang_def.language.text}
                    except (FileNotFoundError, OSError):
                        pass

    def parse(self, zip_path: str | Path) -> ParsedIODD:
        """
        Parse an IODD ZIP archive without resolving references.

        This method parses the XML files and discovers all available language files,
        returning a [`iodd_parser.ParsedIODD`][] object. Call
        [`ParsedIODD.resolve`][iodd_parser.ParsedIODD.resolve] on the result to resolve all
        references with an optional language.

        :param zip_path: Path to the IODD ZIP file.
        :returns: A [`iodd_parser.ParsedIODD`][] object with parsed XML data.
        :raises FileNotFoundError: If the ZIP file or expected XML is not found.
        :raises ValueError: If multiple matching XML files are found in the archive.
        """
        zip_pth = Path(zip_path)
        if not zip_pth.is_file():
            raise FileNotFoundError(f"IODD zip not found: {zip_pth.resolve()}")

        # Always look for the main IODD file (not language-specific)
        xml_suffix = "-IODD1.1.xml"
        xml_suffix_lower = xml_suffix.lower()

        with zipfile.ZipFile(zip_pth, "r") as archive:
            xml_candidates = [
                name
                for name in archive.namelist()
                if not name.endswith("/") and name.lower().endswith(xml_suffix_lower)
            ]

            if not xml_candidates:
                raise FileNotFoundError(f"Expected IODD XML with suffix '{xml_suffix}' not found in {zip_pth.name}")
            if len(xml_candidates) > 1:
                raise ValueError(f"Multiple IODD XML files with suffix '{xml_suffix}' found: {xml_candidates}")

            main_xml_name = xml_candidates[0]
            xml_data = archive.read(main_xml_name)
            device = XmlParser().parse(io.BytesIO(xml_data), Iodevice)

            # Discover all language files in the archive
            # Language file pattern: <main_name_without_extension>-<lang>.xml
            device_lang_texts: dict[str, dict[str, str]] = {}
            main_base = main_xml_name.rsplit(".", 1)[0]  # Remove .xml extension
            lang_prefix = f"{main_base}-".lower()

            for name in archive.namelist():
                if name.endswith("/"):
                    continue
                name_lower = name.lower()
                if name_lower.startswith(lang_prefix) and name_lower.endswith(".xml"):
                    # Extract language code from filename
                    # e.g., "VendorX-DeviceY-20110603-IODD1.1-de.xml" -> "de"
                    lang_part = name[len(main_base) + 1 : -4]  # Remove prefix and .xml
                    if lang_part and "-" not in lang_part:  # Valid language code (no extra dashes)
                        try:
                            lang_xml_data = archive.read(name)
                            lang_doc = XmlParser().parse(io.BytesIO(lang_xml_data), ExternalTextDocument)
                            device_lang_texts[lang_part] = {t.id: t.value for t in lang_doc.language.text}
                        except (OSError, Exception):
                            pass  # Skip invalid language files

            images: list[IoddImage] = []
            if self.load_images:
                for name in archive.namelist():
                    if name.endswith("/"):
                        continue
                    if Path(name).suffix.lower() in IODD_IMAGE_FORMATS:
                        images.append(IoddImage(filename=name, data=archive.read(name)))

        return ParsedIODD(
            iodd_definitions=self._loaded_definitions,
            iodd_units=self._loaded_units,
            iodd_device=device,
            standard_lang_texts=self._lang_texts,
            device_lang_texts=device_lang_texts,
            images=images,
        )

    def parse_and_resolve(self, zip_path: str | Path, lang: str | None = None) -> ResolvedIODD:
        """
        Parse an IODD ZIP archive and resolve all references.

        This is a convenience method that calls [`IODDParser.parse`][iodd_parser.IODDParser.parse]
        followed by [`ParsedIODD.resolve`][iodd_parser.ParsedIODD.resolve].

        :param zip_path: Path to the IODD ZIP file.
        :param lang: Optional language code (e.g., "de", "fr") for localised texts.
            When specified, texts are resolved in the following priority order
            (later sources override earlier ones):

            1. Primary language (English) from standard definitions
            2. Primary language from device IODD
            3. Primary language from standard unit definitions (English only)
            4. Pre-loaded language-specific standard definitions file (if available)
            5. Language sections within main standard definitions file
            6. Language sections within main device IODD file
            7. Device-specific language file (e.g., ``*-IODD1.1-de.xml``) - highest priority

        :returns: A [`iodd_parser.ResolvedIODD`][] object with all resolved data.
        :raises FileNotFoundError: If the ZIP file or expected XML is not found.
        :raises ValueError: If multiple matching XML files are found in the archive.
        """
        return self.parse(zip_path).resolve(lang)

    @property
    def standard_definitions(self) -> IoddstandardDefinitions:
        """
        Get the loaded standard definitions.

        :returns: The parsed standard definitions object.
        """
        return self._loaded_definitions

    @property
    def standard_definition_units(self) -> IoddstandardUnitDefinitions:
        """
        Get the loaded standard unit definitions.

        :returns: The parsed standard unit definitions object.
        """
        return self._loaded_units

    @property
    def language_texts(self) -> dict[str, dict[str, str]]:
        """
        Get the pre-loaded language-specific texts from standard definitions.

        :returns: A dictionary mapping language codes to their text dictionaries.
            Each text dictionary maps text IDs to their localised string values.
        """
        return self._lang_texts

standard_definitions property

Get the loaded standard definitions.

Returns:

Type Description
IoddstandardDefinitions

The parsed standard definitions object.

standard_definition_units property

Get the loaded standard unit definitions.

Returns:

Type Description
IoddstandardUnitDefinitions

The parsed standard unit definitions object.

language_texts property

Get the pre-loaded language-specific texts from standard definitions.

Returns:

Type Description
dict[str, dict[str, str]]

A dictionary mapping language codes to their text dictionaries. Each text dictionary maps text IDs to their localised string values.

parse(zip_path)

Parse an IODD ZIP archive without resolving references.

This method parses the XML files and discovers all available language files, returning a iodd_parser.ParsedIODD object. Call ParsedIODD.resolve on the result to resolve all references with an optional language.

Parameters:

Name Type Description Default
zip_path str | Path

Path to the IODD ZIP file.

required

Returns:

Type Description
ParsedIODD

A iodd_parser.ParsedIODD object with parsed XML data.

Raises:

Type Description
FileNotFoundError

If the ZIP file or expected XML is not found.

ValueError

If multiple matching XML files are found in the archive.

Source code in src/iodd_parser/parser.py
def parse(self, zip_path: str | Path) -> ParsedIODD:
    """
    Parse an IODD ZIP archive without resolving references.

    This method parses the XML files and discovers all available language files,
    returning a [`iodd_parser.ParsedIODD`][] object. Call
    [`ParsedIODD.resolve`][iodd_parser.ParsedIODD.resolve] on the result to resolve all
    references with an optional language.

    :param zip_path: Path to the IODD ZIP file.
    :returns: A [`iodd_parser.ParsedIODD`][] object with parsed XML data.
    :raises FileNotFoundError: If the ZIP file or expected XML is not found.
    :raises ValueError: If multiple matching XML files are found in the archive.
    """
    zip_pth = Path(zip_path)
    if not zip_pth.is_file():
        raise FileNotFoundError(f"IODD zip not found: {zip_pth.resolve()}")

    # Always look for the main IODD file (not language-specific)
    xml_suffix = "-IODD1.1.xml"
    xml_suffix_lower = xml_suffix.lower()

    with zipfile.ZipFile(zip_pth, "r") as archive:
        xml_candidates = [
            name
            for name in archive.namelist()
            if not name.endswith("/") and name.lower().endswith(xml_suffix_lower)
        ]

        if not xml_candidates:
            raise FileNotFoundError(f"Expected IODD XML with suffix '{xml_suffix}' not found in {zip_pth.name}")
        if len(xml_candidates) > 1:
            raise ValueError(f"Multiple IODD XML files with suffix '{xml_suffix}' found: {xml_candidates}")

        main_xml_name = xml_candidates[0]
        xml_data = archive.read(main_xml_name)
        device = XmlParser().parse(io.BytesIO(xml_data), Iodevice)

        # Discover all language files in the archive
        # Language file pattern: <main_name_without_extension>-<lang>.xml
        device_lang_texts: dict[str, dict[str, str]] = {}
        main_base = main_xml_name.rsplit(".", 1)[0]  # Remove .xml extension
        lang_prefix = f"{main_base}-".lower()

        for name in archive.namelist():
            if name.endswith("/"):
                continue
            name_lower = name.lower()
            if name_lower.startswith(lang_prefix) and name_lower.endswith(".xml"):
                # Extract language code from filename
                # e.g., "VendorX-DeviceY-20110603-IODD1.1-de.xml" -> "de"
                lang_part = name[len(main_base) + 1 : -4]  # Remove prefix and .xml
                if lang_part and "-" not in lang_part:  # Valid language code (no extra dashes)
                    try:
                        lang_xml_data = archive.read(name)
                        lang_doc = XmlParser().parse(io.BytesIO(lang_xml_data), ExternalTextDocument)
                        device_lang_texts[lang_part] = {t.id: t.value for t in lang_doc.language.text}
                    except (OSError, Exception):
                        pass  # Skip invalid language files

        images: list[IoddImage] = []
        if self.load_images:
            for name in archive.namelist():
                if name.endswith("/"):
                    continue
                if Path(name).suffix.lower() in IODD_IMAGE_FORMATS:
                    images.append(IoddImage(filename=name, data=archive.read(name)))

    return ParsedIODD(
        iodd_definitions=self._loaded_definitions,
        iodd_units=self._loaded_units,
        iodd_device=device,
        standard_lang_texts=self._lang_texts,
        device_lang_texts=device_lang_texts,
        images=images,
    )

parse_and_resolve(zip_path, lang=None)

Parse an IODD ZIP archive and resolve all references.

This is a convenience method that calls IODDParser.parse followed by ParsedIODD.resolve.

Parameters:

Name Type Description Default
zip_path str | Path

Path to the IODD ZIP file.

required
lang str | None

Optional language code (e.g., "de", "fr") for localised texts. When specified, texts are resolved in the following priority order (later sources override earlier ones): 1. Primary language (English) from standard definitions 2. Primary language from device IODD 3. Primary language from standard unit definitions (English only) 4. Pre-loaded language-specific standard definitions file (if available) 5. Language sections within main standard definitions file 6. Language sections within main device IODD file 7. Device-specific language file (e.g., *-IODD1.1-de.xml) - highest priority

None

Returns:

Type Description
ResolvedIODD

A iodd_parser.ResolvedIODD object with all resolved data.

Raises:

Type Description
FileNotFoundError

If the ZIP file or expected XML is not found.

ValueError

If multiple matching XML files are found in the archive.

Source code in src/iodd_parser/parser.py
def parse_and_resolve(self, zip_path: str | Path, lang: str | None = None) -> ResolvedIODD:
    """
    Parse an IODD ZIP archive and resolve all references.

    This is a convenience method that calls [`IODDParser.parse`][iodd_parser.IODDParser.parse]
    followed by [`ParsedIODD.resolve`][iodd_parser.ParsedIODD.resolve].

    :param zip_path: Path to the IODD ZIP file.
    :param lang: Optional language code (e.g., "de", "fr") for localised texts.
        When specified, texts are resolved in the following priority order
        (later sources override earlier ones):

        1. Primary language (English) from standard definitions
        2. Primary language from device IODD
        3. Primary language from standard unit definitions (English only)
        4. Pre-loaded language-specific standard definitions file (if available)
        5. Language sections within main standard definitions file
        6. Language sections within main device IODD file
        7. Device-specific language file (e.g., ``*-IODD1.1-de.xml``) - highest priority

    :returns: A [`iodd_parser.ResolvedIODD`][] object with all resolved data.
    :raises FileNotFoundError: If the ZIP file or expected XML is not found.
    :raises ValueError: If multiple matching XML files are found in the archive.
    """
    return self.parse(zip_path).resolve(lang)

Parsed Result

iodd_parser.ParsedIODD dataclass

The result of parsing an IODD file before reference resolution.

This dataclass contains the raw parsed IODD XML objects and language-specific texts. Use the iodd_parser.ParsedIODD.resolve method to produce a fully resolved iodd_parser.ParsedIODD object.

Attributes:

Name Type Description
iodd_definitions IoddstandardDefinitions

The parsed standard definitions XML.

iodd_units IoddstandardUnitDefinitions

The parsed standard unit definitions XML.

iodd_device Iodevice

The parsed device IODD XML.

standard_lang_texts dict[str, dict[str, str]]

Dict of language code to text dictionaries from standard definitions.

device_lang_texts dict[str, dict[str, str]]

Dict of language code to text dictionaries from device-specific language files.

images list[IoddImage]

List of images extracted from the IODD archive.

Source code in src/iodd_parser/types.py
@dataclass
class ParsedIODD:
    """
    The result of parsing an IODD file before reference resolution.

    This dataclass contains the raw parsed IODD XML objects and
    language-specific texts. Use the [`iodd_parser.ParsedIODD.resolve`][]  method to produce
    a fully resolved [`iodd_parser.ParsedIODD`][]  object.

    :ivar iodd_definitions: The parsed standard definitions XML.
    :ivar iodd_units: The parsed standard unit definitions XML.
    :ivar iodd_device: The parsed device IODD XML.
    :ivar standard_lang_texts: Dict of language code to text dictionaries from
        standard definitions.
    :ivar device_lang_texts: Dict of language code to text dictionaries from
        device-specific language files.
    :ivar images: List of images extracted from the IODD archive.
    """

    iodd_definitions: IoddstandardDefinitions
    iodd_units: IoddstandardUnitDefinitions
    iodd_device: Iodevice
    standard_lang_texts: dict[str, dict[str, str]]
    device_lang_texts: dict[str, dict[str, str]]
    images: list[IoddImage]

    @property
    def available_languages(self) -> set[str]:
        """
        Get the set of available language codes.

        :returns: A set of language codes available in either standard or device texts.
        """
        return set(self.standard_lang_texts.keys()) | set(self.device_lang_texts.keys())

    def resolve(self, lang: str | None = None) -> ResolvedIODD:
        """
        Resolve all references and produce a fully resolved ResolvedIODD object.

        This method resolves all text references, datatypes, variables, errors,
        units, process data, and user interface elements.

        :param lang: Optional language code (e.g., "de", "fr") for localised texts.
            When specified, texts are resolved in the following priority order
            (later sources override earlier ones):

            1. Primary language (English) from standard definitions
            2. Primary language from device IODD
            3. Primary language from standard unit definitions (English only)
            4. Pre-loaded language-specific standard definitions file (if available)
            5. Language sections within main standard definitions file
            6. Language sections within main device IODD file
            7. Device-specific language file (e.g., ``*-IODD1.1-de.xml``) - highest priority

        :returns: A [`iodd_parser.ResolvedIODD`][]  object with all references resolved.
        """
        # Import here to avoid circular imports
        from iodd_parser.resolvers import (
            resolve_errors,
            resolve_process_data,
            resolve_texts,
            resolve_units,
            resolve_user_interface,
            resolve_variables,
        )

        texts = resolve_texts(
            self.iodd_definitions,
            self.iodd_units,
            self.iodd_device,
            lang,
            self.standard_lang_texts,
            self.device_lang_texts,
        )

        # Build datatypes lookup from both standard definitions and device
        datatypes: dict[str, DatatypeT] = {}
        if self.iodd_definitions.datatype_collection is not None:
            for dt in self.iodd_definitions.datatype_collection.datatype:
                if dt.id is not None:
                    datatypes[dt.id] = dt
        if self.iodd_device.profile_body.device_function.datatype_collection is not None:
            for dt in self.iodd_device.profile_body.device_function.datatype_collection.datatype:
                if dt.id is not None:
                    datatypes[dt.id] = dt

        # Resolve all collections
        errors = resolve_errors(
            self.iodd_definitions.error_type_collection,
            self.iodd_device.profile_body.device_function.error_type_collection,
            texts,
        )

        units = resolve_units(self.iodd_units, texts)

        variables = resolve_variables(
            self.iodd_definitions.variable_collection,
            self.iodd_device.profile_body.device_function.variable_collection,
            texts,
            datatypes,
        )

        process_data = resolve_process_data(
            self.iodd_device.profile_body.device_function.process_data_collection,
            texts,
            datatypes,
        )

        user_interface = resolve_user_interface(
            self.iodd_device.profile_body.device_function.user_interface,
            texts,
        )

        # Extract device identity information
        device_identity = self.iodd_device.profile_body.device_identity
        device_name = texts.get(
            device_identity.device_name.text_id,
            device_identity.device_name.text_id,
        )

        return ResolvedIODD(
            iodd_definitions=self.iodd_definitions,
            iodd_units=self.iodd_units,
            iodd_device=self.iodd_device,
            device_name=device_name,
            device_manufacturer=device_identity.vendor_name,
            variables=variables,
            process_data=process_data,
            texts=texts,
            datatypes=datatypes,
            errors=errors,
            units=units,
            user_interface=user_interface,
            images=self.images,
        )

available_languages property

Get the set of available language codes.

Returns:

Type Description
set[str]

A set of language codes available in either standard or device texts.

resolve(lang=None)

Resolve all references and produce a fully resolved ResolvedIODD object.

This method resolves all text references, datatypes, variables, errors, units, process data, and user interface elements.

Parameters:

Name Type Description Default
lang str | None

Optional language code (e.g., "de", "fr") for localised texts. When specified, texts are resolved in the following priority order (later sources override earlier ones): 1. Primary language (English) from standard definitions 2. Primary language from device IODD 3. Primary language from standard unit definitions (English only) 4. Pre-loaded language-specific standard definitions file (if available) 5. Language sections within main standard definitions file 6. Language sections within main device IODD file 7. Device-specific language file (e.g., *-IODD1.1-de.xml) - highest priority

None

Returns:

Type Description
ResolvedIODD

A iodd_parser.ResolvedIODD object with all references resolved.

Source code in src/iodd_parser/types.py
def resolve(self, lang: str | None = None) -> ResolvedIODD:
    """
    Resolve all references and produce a fully resolved ResolvedIODD object.

    This method resolves all text references, datatypes, variables, errors,
    units, process data, and user interface elements.

    :param lang: Optional language code (e.g., "de", "fr") for localised texts.
        When specified, texts are resolved in the following priority order
        (later sources override earlier ones):

        1. Primary language (English) from standard definitions
        2. Primary language from device IODD
        3. Primary language from standard unit definitions (English only)
        4. Pre-loaded language-specific standard definitions file (if available)
        5. Language sections within main standard definitions file
        6. Language sections within main device IODD file
        7. Device-specific language file (e.g., ``*-IODD1.1-de.xml``) - highest priority

    :returns: A [`iodd_parser.ResolvedIODD`][]  object with all references resolved.
    """
    # Import here to avoid circular imports
    from iodd_parser.resolvers import (
        resolve_errors,
        resolve_process_data,
        resolve_texts,
        resolve_units,
        resolve_user_interface,
        resolve_variables,
    )

    texts = resolve_texts(
        self.iodd_definitions,
        self.iodd_units,
        self.iodd_device,
        lang,
        self.standard_lang_texts,
        self.device_lang_texts,
    )

    # Build datatypes lookup from both standard definitions and device
    datatypes: dict[str, DatatypeT] = {}
    if self.iodd_definitions.datatype_collection is not None:
        for dt in self.iodd_definitions.datatype_collection.datatype:
            if dt.id is not None:
                datatypes[dt.id] = dt
    if self.iodd_device.profile_body.device_function.datatype_collection is not None:
        for dt in self.iodd_device.profile_body.device_function.datatype_collection.datatype:
            if dt.id is not None:
                datatypes[dt.id] = dt

    # Resolve all collections
    errors = resolve_errors(
        self.iodd_definitions.error_type_collection,
        self.iodd_device.profile_body.device_function.error_type_collection,
        texts,
    )

    units = resolve_units(self.iodd_units, texts)

    variables = resolve_variables(
        self.iodd_definitions.variable_collection,
        self.iodd_device.profile_body.device_function.variable_collection,
        texts,
        datatypes,
    )

    process_data = resolve_process_data(
        self.iodd_device.profile_body.device_function.process_data_collection,
        texts,
        datatypes,
    )

    user_interface = resolve_user_interface(
        self.iodd_device.profile_body.device_function.user_interface,
        texts,
    )

    # Extract device identity information
    device_identity = self.iodd_device.profile_body.device_identity
    device_name = texts.get(
        device_identity.device_name.text_id,
        device_identity.device_name.text_id,
    )

    return ResolvedIODD(
        iodd_definitions=self.iodd_definitions,
        iodd_units=self.iodd_units,
        iodd_device=self.iodd_device,
        device_name=device_name,
        device_manufacturer=device_identity.vendor_name,
        variables=variables,
        process_data=process_data,
        texts=texts,
        datatypes=datatypes,
        errors=errors,
        units=units,
        user_interface=user_interface,
        images=self.images,
    )

Resolved Result

iodd_parser.ResolvedIODD dataclass

The result of parsing an IODD file with all references resolved.

This dataclass contains both the raw parsed IODD objects and resolved/processed data for convenient access.

Attributes:

Name Type Description
iodd_definitions IoddstandardDefinitions

The parsed standard definitions XML.

iodd_units IoddstandardUnitDefinitions

The parsed standard unit definitions XML.

iodd_device Iodevice

The parsed device IODD XML.

device_name str

The resolved device name.

device_manufacturer str

The vendor/manufacturer name.

variables dict[str, ResolvedVariable]

Dict of resolved variables, keyed by variable id.

process_data dict[str, ResolvedProcessData]

Dict of resolved process data, keyed by id.

texts dict[str, str]

Dict of all text strings, keyed by text id.

datatypes dict[str, DatatypeT]

Dict of all data types, keyed by datatype id.

errors dict[tuple[int, int], ResolvedError]

Dict of resolved errors, keyed by (code, additional_code).

units dict[int, ResolvedUnit]

Dict of resolved units, keyed by unit code.

user_interface ResolvedUserInterface

The resolved user interface with menus and role assignments.

images list[IoddImage]

List of images extracted from the IODD archive.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedIODD:
    """
    The result of parsing an IODD file with all references resolved.

    This dataclass contains both the raw parsed IODD objects and
    resolved/processed data for convenient access.

    :ivar iodd_definitions: The parsed standard definitions XML.
    :ivar iodd_units: The parsed standard unit definitions XML.
    :ivar iodd_device: The parsed device IODD XML.
    :ivar device_name: The resolved device name.
    :ivar device_manufacturer: The vendor/manufacturer name.
    :ivar variables: Dict of resolved variables, keyed by variable id.
    :ivar process_data: Dict of resolved process data, keyed by id.
    :ivar texts: Dict of all text strings, keyed by text id.
    :ivar datatypes: Dict of all data types, keyed by datatype id.
    :ivar errors: Dict of resolved errors, keyed by (code, additional_code).
    :ivar units: Dict of resolved units, keyed by unit code.
    :ivar user_interface: The resolved user interface with menus and role assignments.
    :ivar images: List of images extracted from the IODD archive.
    """

    iodd_definitions: IoddstandardDefinitions
    iodd_units: IoddstandardUnitDefinitions
    iodd_device: Iodevice

    device_name: str
    device_manufacturer: str
    variables: dict[str, ResolvedVariable]
    process_data: dict[str, ResolvedProcessData]
    texts: dict[str, str]
    datatypes: dict[str, DatatypeT]
    errors: dict[tuple[int, int], ResolvedError]
    units: dict[int, ResolvedUnit]
    user_interface: ResolvedUserInterface

    images: list[IoddImage]

    def get_text(self, ref: TextRefT) -> str | None:
        """
        Get the text string for a text reference.

        :param ref: The text reference object containing the text_id.
        :returns: The resolved text string, or None if not found.
        """
        return self.texts.get(ref.text_id)

get_text(ref)

Get the text string for a text reference.

Parameters:

Name Type Description Default
ref TextRefT

The text reference object containing the text_id.

required

Returns:

Type Description
str | None

The resolved text string, or None if not found.

Source code in src/iodd_parser/types.py
def get_text(self, ref: TextRefT) -> str | None:
    """
    Get the text string for a text reference.

    :param ref: The text reference object containing the text_id.
    :returns: The resolved text string, or None if not found.
    """
    return self.texts.get(ref.text_id)

Variables

iodd_parser.ResolvedVariable dataclass

A resolved variable with all references resolved.

Variables can come from three sources:

  • StdVariableRef: references to standard variables from the loaded Standard Definitions file.
  • DirectParameterOverlay: device-specific data within DirectParameter page
  • Variable: vendor-specific variables with a device-specific index

Attributes:

Name Type Description
id str

Unique identifier of the variable within the IODD.

index int

Index for addressing the variable (ISDU index).

datatype ResolvedDatatype

The resolved data type of the variable.

name str

The resolved human-readable name.

description None | str

The resolved description text, if available.

access_rights AccessRightsT

Access rights (read-only, write-only, read-write).

dynamic bool

Whether the variable is autonomously changed by the device.

modifies_other_variables bool

Whether writing to this variable may change other variables.

excluded_from_data_storage bool

Whether the variable is excluded from data storage mechanism.

default_value None | object

The offline default value, if specified.

fixed_length_restriction None | int

Length restriction for string/array types.

record_item_info list[RecordItemInfoT]

Additional information for record items.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedVariable:
    """
    A resolved variable with all references resolved.

    Variables can come from three sources:

    - **StdVariableRef**: references to standard variables from
      the loaded Standard Definitions file.
    - **DirectParameterOverlay**: device-specific data within DirectParameter page
    - **Variable**: vendor-specific variables with a device-specific index

    :ivar id: Unique identifier of the variable within the IODD.
    :ivar index: Index for addressing the variable (ISDU index).
    :ivar datatype: The resolved data type of the variable.
    :ivar name: The resolved human-readable name.
    :ivar description: The resolved description text, if available.
    :ivar access_rights: Access rights (read-only, write-only, read-write).
    :ivar dynamic: Whether the variable is autonomously changed by the device.
    :ivar modifies_other_variables: Whether writing to this variable may change
        other variables.
    :ivar excluded_from_data_storage: Whether the variable is excluded from
        data storage mechanism.
    :ivar default_value: The offline default value, if specified.
    :ivar fixed_length_restriction: Length restriction for string/array types.
    :ivar record_item_info: Additional information for record items.
    """

    id: str
    index: int
    datatype: ResolvedDatatype
    name: str
    description: None | str
    access_rights: AccessRightsT
    dynamic: bool
    modifies_other_variables: bool
    excluded_from_data_storage: bool
    default_value: None | object = None
    fixed_length_restriction: None | int = None
    record_item_info: list[RecordItemInfoT] = field(default_factory=list)

iodd_parser.ResolvedVariableRef dataclass

A resolved variable reference in a menu.

Defines how a variable should be displayed in the user interface, with optional gradient/offset transformations and display formatting.

Attributes:

Name Type Description
variable_id str

The referenced variable id.

gradient Decimal | None

Gradient for value transformation (displayed = value * gradient + offset).

offset Decimal | None

Offset for value transformation.

unit_code int | None

Unit code for the displayed value.

display_format str | None

Display format (Bin, Hex, Dec, Dec.x).

access_right_restriction AccessRightsT | None

Access rights restriction for certain user roles.

button ResolvedButton | None

Button definition if this variable ref displays as a button.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedVariableRef:
    """
    A resolved variable reference in a menu.

    Defines how a variable should be displayed in the user interface,
    with optional gradient/offset transformations and display formatting.

    :ivar variable_id: The referenced variable id.
    :ivar gradient: Gradient for value transformation (displayed = value * gradient + offset).
    :ivar offset: Offset for value transformation.
    :ivar unit_code: Unit code for the displayed value.
    :ivar display_format: Display format (Bin, Hex, Dec, Dec.x).
    :ivar access_right_restriction: Access rights restriction for certain user roles.
    :ivar button: Button definition if this variable ref displays as a button.
    """

    variable_id: str
    gradient: Decimal | None = None
    offset: Decimal | None = None
    unit_code: int | None = None
    display_format: str | None = None
    access_right_restriction: AccessRightsT | None = None
    button: ResolvedButton | None = None

Process Data

iodd_parser.ResolvedProcessData dataclass

Resolved process data with optional condition for switching.

ProcessData elements can have a Condition element that allows switching between different process data configurations based on a variable value. Multiple ProcessData elements may exist when conditional switching is used.

Attributes:

Name Type Description
id str

Explicit id of the ProcessData.

process_data_in None | ResolvedProcessDataItem

Description of input process data (device to master).

process_data_out None | ResolvedProcessDataItem

Description of output process data (master to device).

condition_variable_id None | str

Variable id for switching, if conditional.

condition_subindex None | int

Subindex for record item addressing, if applicable.

condition_value None | int

The value that selects this ProcessData configuration.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedProcessData:
    """
    Resolved process data with optional condition for switching.

    ProcessData elements can have a Condition element that allows switching
    between different process data configurations based on a variable value.
    Multiple ProcessData elements may exist when conditional switching is used.

    :ivar id: Explicit id of the ProcessData.
    :ivar process_data_in: Description of input process data (device to master).
    :ivar process_data_out: Description of output process data (master to device).
    :ivar condition_variable_id: Variable id for switching, if conditional.
    :ivar condition_subindex: Subindex for record item addressing, if applicable.
    :ivar condition_value: The value that selects this ProcessData configuration.
    """

    id: str
    process_data_in: None | ResolvedProcessDataItem = None
    process_data_out: None | ResolvedProcessDataItem = None
    condition_variable_id: None | str = None
    condition_subindex: None | int = None
    condition_value: None | int = None

iodd_parser.ResolvedProcessDataInfo dataclass

Display info for process data (non-record type).

Attributes:

Name Type Description
gradient Decimal | None

Gradient for value transformation.

offset Decimal | None

Offset for value transformation.

unit_code int | None

Unit code for the displayed value.

display_format str | None

Display format (Bin, Hex, Dec, Dec.x).

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedProcessDataInfo:
    """
    Display info for process data (non-record type).

    :ivar gradient: Gradient for value transformation.
    :ivar offset: Offset for value transformation.
    :ivar unit_code: Unit code for the displayed value.
    :ivar display_format: Display format (Bin, Hex, Dec, Dec.x).
    """

    gradient: Decimal | None = None
    offset: Decimal | None = None
    unit_code: int | None = None
    display_format: str | None = None

iodd_parser.ResolvedProcessDataItem dataclass

A resolved process data item (input or output).

ProcessDataIn/ProcessDataOut elements describe the structure of the cyclic process data exchanged between master and device.

Attributes:

Name Type Description
id str

Explicit id of the ProcessDataIn/ProcessDataOut description.

bit_length int

Length of the process data in bits (1..256).

name str

The resolved name of the process data.

datatype ResolvedDatatype

The resolved data type.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedProcessDataItem:
    """
    A resolved process data item (input or output).

    ProcessDataIn/ProcessDataOut elements describe the structure of
    the cyclic process data exchanged between master and device.

    :ivar id: Explicit id of the ProcessDataIn/ProcessDataOut description.
    :ivar bit_length: Length of the process data in bits (1..256).
    :ivar name: The resolved name of the process data.
    :ivar datatype: The resolved data type.
    """

    id: str
    bit_length: int
    name: str
    datatype: ResolvedDatatype = None

iodd_parser.ResolvedProcessDataRecordItemInfo dataclass

Display info for a record item within process data.

Attributes:

Name Type Description
subindex int

The subindex of the record item.

gradient Decimal | None

Gradient for value transformation.

offset Decimal | None

Offset for value transformation.

unit_code int | None

Unit code for the displayed value.

display_format str | None

Display format (Bin, Hex, Dec, Dec.x).

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedProcessDataRecordItemInfo:
    """
    Display info for a record item within process data.

    :ivar subindex: The subindex of the record item.
    :ivar gradient: Gradient for value transformation.
    :ivar offset: Offset for value transformation.
    :ivar unit_code: Unit code for the displayed value.
    :ivar display_format: Display format (Bin, Hex, Dec, Dec.x).
    """

    subindex: int
    gradient: Decimal | None = None
    offset: Decimal | None = None
    unit_code: int | None = None
    display_format: str | None = None

iodd_parser.ResolvedProcessDataRef dataclass

A resolved reference to process data with display info.

Defines how process data should be displayed in the user interface.

Attributes:

Name Type Description
process_data_id str

Reference to ProcessDataIn or ProcessDataOut id.

process_data_info ResolvedProcessDataInfo | None

Display info for non-record process data.

record_item_infos list[ResolvedProcessDataRecordItemInfo]

Display info for record items (for record-type process data).

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedProcessDataRef:
    """
    A resolved reference to process data with display info.

    Defines how process data should be displayed in the user interface.

    :ivar process_data_id: Reference to ProcessDataIn or ProcessDataOut id.
    :ivar process_data_info: Display info for non-record process data.
    :ivar record_item_infos: Display info for record items (for record-type process data).
    """

    process_data_id: str
    process_data_info: ResolvedProcessDataInfo | None = None
    record_item_infos: list[ResolvedProcessDataRecordItemInfo] = field(default_factory=list)

iodd_parser.ResolvedRecordItemRef dataclass

A resolved record item reference in a menu.

Like VariableRef but addresses a specific record item via subindex. The referenced variable must be of type record.

Attributes:

Name Type Description
variable_id str

The referenced variable id (must be of type record).

subindex int

The subindex addressing the record item within the record.

gradient Decimal | None

Gradient for value transformation.

offset Decimal | None

Offset for value transformation.

unit_code int | None

Unit code for the displayed value.

display_format str | None

Display format (Bin, Hex, Dec, Dec.x).

access_right_restriction AccessRightsT | None

Access rights restriction for certain user roles.

button ResolvedButton | None

Button definition if this record item ref displays as a button.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedRecordItemRef:
    """
    A resolved record item reference in a menu.

    Like VariableRef but addresses a specific record item via subindex.
    The referenced variable must be of type record.

    :ivar variable_id: The referenced variable id (must be of type record).
    :ivar subindex: The subindex addressing the record item within the record.
    :ivar gradient: Gradient for value transformation.
    :ivar offset: Offset for value transformation.
    :ivar unit_code: Unit code for the displayed value.
    :ivar display_format: Display format (Bin, Hex, Dec, Dec.x).
    :ivar access_right_restriction: Access rights restriction for certain user roles.
    :ivar button: Button definition if this record item ref displays as a button.
    """

    variable_id: str
    subindex: int
    gradient: Decimal | None = None
    offset: Decimal | None = None
    unit_code: int | None = None
    display_format: str | None = None
    access_right_restriction: AccessRightsT | None = None
    button: ResolvedButton | None = None

Errors

iodd_parser.ResolvedError dataclass

A resolved error type with all references resolved.

Error types are identified by a combination of code and additional_code:

  • code=128: Standard errors from the loaded Standard Definitions file.
  • code=129: Vendor-specific errors defined in the device IODD

Attributes:

Name Type Description
code int

The error code (128 for standard, 129 for vendor-specific).

additional_code int

The additional code identifying the specific error.

name str

The resolved error message text.

description None | str

The resolved description (cause and remedy), if available.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedError:
    """
    A resolved error type with all references resolved.

    Error types are identified by a combination of code and additional_code:

    - **code=128**: Standard errors from the loaded Standard Definitions file.
    - **code=129**: Vendor-specific errors defined in the device IODD

    :ivar code: The error code (128 for standard, 129 for vendor-specific).
    :ivar additional_code: The additional code identifying the specific error.
    :ivar name: The resolved error message text.
    :ivar description: The resolved description (cause and remedy), if available.
    """

    code: int
    additional_code: int
    name: str
    description: None | str

Units

iodd_parser.ResolvedUnit dataclass

A resolved unit with its code, abbreviation, and name.

Units are defined in IODD-StandardUnitDefinitions1.1.xml.

Attributes:

Name Type Description
code int

The unit code (e.g., 1001 for degrees Celsius).

abbreviation str

The short form (e.g., "°C").

name str

The full name (e.g., "degree Celsius").

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedUnit:
    """
    A resolved unit with its code, abbreviation, and name.

    Units are defined in IODD-StandardUnitDefinitions1.1.xml.

    :ivar code: The unit code (e.g., 1001 for degrees Celsius).
    :ivar abbreviation: The short form (e.g., "°C").
    :ivar name: The full name (e.g., "degree Celsius").
    """

    code: int
    abbreviation: str
    name: str

User Interface

iodd_parser.ResolvedUserInterface dataclass

A resolved user interface with all menus and role assignments.

The user interface defines how the device is presented in IO-Link Tools, organized by user roles with hierarchical menus.

Attributes:

Name Type Description
menus dict[str, ResolvedMenu]

Dict of all menus, keyed by menu id.

observer_role_menu_set ResolvedMenuSet

Menu set for the Observer (Operator) role.

maintenance_role_menu_set ResolvedMenuSet

Menu set for the Maintenance role.

specialist_role_menu_set ResolvedMenuSet

Menu set for the Specialist role.

process_data_refs list[ResolvedProcessDataRef]

List of process data display references.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedUserInterface:
    """
    A resolved user interface with all menus and role assignments.

    The user interface defines how the device is presented in IO-Link Tools,
    organized by user roles with hierarchical menus.

    :ivar menus: Dict of all menus, keyed by menu id.
    :ivar observer_role_menu_set: Menu set for the Observer (Operator) role.
    :ivar maintenance_role_menu_set: Menu set for the Maintenance role.
    :ivar specialist_role_menu_set: Menu set for the Specialist role.
    :ivar process_data_refs: List of process data display references.
    """

    menus: dict[str, ResolvedMenu]
    observer_role_menu_set: ResolvedMenuSet
    maintenance_role_menu_set: ResolvedMenuSet
    specialist_role_menu_set: ResolvedMenuSet
    process_data_refs: list[ResolvedProcessDataRef] = field(default_factory=list)

iodd_parser.ResolvedMenuSet dataclass

A resolved role menu set with top-level menu references.

Each role has a set of fixed top-level menus. The menu names are hard-coded by tools and should not be taken from the IODD.

Attributes:

Name Type Description
identification_menu_id str

Menu id for device identification (mandatory).

parameter_menu_id str | None

Menu id for device parameters (optional).

observation_menu_id str | None

Menu id for observation/process data (optional).

diagnosis_menu_id str | None

Menu id for diagnosis/events (optional).

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedMenuSet:
    """
    A resolved role menu set with top-level menu references.

    Each role has a set of fixed top-level menus. The menu names are
    hard-coded by tools and should not be taken from the IODD.

    :ivar identification_menu_id: Menu id for device identification (mandatory).
    :ivar parameter_menu_id: Menu id for device parameters (optional).
    :ivar observation_menu_id: Menu id for observation/process data (optional).
    :ivar diagnosis_menu_id: Menu id for diagnosis/events (optional).
    """

    identification_menu_id: str
    parameter_menu_id: str | None = None
    observation_menu_id: str | None = None
    diagnosis_menu_id: str | None = None

iodd_parser.ResolvedMenu dataclass

A resolved menu from the MenuCollection.

A menu contains references to variables, record items, and sub-menus. Items are displayed in the order they appear in the IODD.

Attributes:

Name Type Description
id str

Explicit id of the menu.

name str | None

The resolved menu name (may be None for top-level menus).

variable_refs list[ResolvedVariableRef]

List of variable references in this menu.

record_item_refs list[ResolvedRecordItemRef]

List of record item references in this menu.

menu_refs list[ResolvedMenuRef]

List of sub-menu references in this menu.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedMenu:
    """
    A resolved menu from the MenuCollection.

    A menu contains references to variables, record items, and sub-menus.
    Items are displayed in the order they appear in the IODD.

    :ivar id: Explicit id of the menu.
    :ivar name: The resolved menu name (may be None for top-level menus).
    :ivar variable_refs: List of variable references in this menu.
    :ivar record_item_refs: List of record item references in this menu.
    :ivar menu_refs: List of sub-menu references in this menu.
    """

    id: str
    name: str | None
    variable_refs: list[ResolvedVariableRef] = field(default_factory=list)
    record_item_refs: list[ResolvedRecordItemRef] = field(default_factory=list)
    menu_refs: list[ResolvedMenuRef] = field(default_factory=list)

iodd_parser.ResolvedMenuRef dataclass

A resolved reference to a sub-menu.

Attributes:

Name Type Description
menu_id str

The referenced menu id from the MenuCollection.

condition ResolvedCondition | None

Optional condition for conditional display of this menu.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedMenuRef:
    """
    A resolved reference to a sub-menu.

    :ivar menu_id: The referenced menu id from the MenuCollection.
    :ivar condition: Optional condition for conditional display of this menu.
    """

    menu_id: str
    condition: ResolvedCondition | None = None

iodd_parser.ResolvedButton dataclass

A resolved button for command interface.

Buttons are used to implement command interfaces to the device. When pressed, the button value is immediately sent to the device.

Attributes:

Name Type Description
button_value bool | int

The value sent to the device when the button is clicked.

description str | None

A text explaining the action started by pressing the button.

action_started_message str | None

A text shown after the value was successfully sent.

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedButton:
    """
    A resolved button for command interface.

    Buttons are used to implement command interfaces to the device.
    When pressed, the button value is immediately sent to the device.

    :ivar button_value: The value sent to the device when the button is clicked.
    :ivar description: A text explaining the action started by pressing the button.
    :ivar action_started_message: A text shown after the value was successfully sent.
    """

    button_value: bool | int
    description: str | None = None
    action_started_message: str | None = None

iodd_parser.ResolvedCondition dataclass

A resolved condition for conditional menu display.

An IO-Link Tool shows the referenced menu only if the value of the referenced variable/record item equals the condition value.

Attributes:

Name Type Description
variable_id str

The referenced condition variable id.

subindex int | None

Subindex for record item addressing (if variable is RecordT).

value int

The value that must match for the condition to be true (0-255).

Source code in src/iodd_parser/types.py
@dataclass
class ResolvedCondition:
    """
    A resolved condition for conditional menu display.

    An IO-Link Tool shows the referenced menu only if the value of the
    referenced variable/record item equals the condition value.

    :ivar variable_id: The referenced condition variable id.
    :ivar subindex: Subindex for record item addressing (if variable is RecordT).
    :ivar value: The value that must match for the condition to be true (0-255).
    """

    variable_id: str
    subindex: int | None
    value: int

Enums

iodd_parser.UserRole

Bases: Enum

User roles for the device user interface.

Attributes:

Name Type Description
OBSERVER

Operator role - read-only access, no modifications allowed.

MAINTENANCE

Maintenance role - uncritical editing allowed.

SPECIALIST

Specialist role - full access to the device.

Source code in src/iodd_parser/types.py
class UserRole(Enum):
    """
    User roles for the device user interface.

    :cvar OBSERVER: Operator role - read-only access, no modifications allowed.
    :cvar MAINTENANCE: Maintenance role - uncritical editing allowed.
    :cvar SPECIALIST: Specialist role - full access to the device.
    """

    OBSERVER = "observer"
    MAINTENANCE = "maintenance"
    SPECIALIST = "specialist"

iodd_parser.TopLevelMenuType

Bases: Enum

Types of top-level menus in a role menu set.

Attributes:

Name Type Description
IDENTIFICATION

Menu for device identification variables.

PARAMETER

Menu for device parameterization variables.

OBSERVATION

Menu for observation (process data, dynamic variables).

DIAGNOSIS

Menu for diagnosis (events, etc.).

Source code in src/iodd_parser/types.py
class TopLevelMenuType(Enum):
    """
    Types of top-level menus in a role menu set.

    :cvar IDENTIFICATION: Menu for device identification variables.
    :cvar PARAMETER: Menu for device parameterization variables.
    :cvar OBSERVATION: Menu for observation (process data, dynamic variables).
    :cvar DIAGNOSIS: Menu for diagnosis (events, etc.).
    """

    IDENTIFICATION = "identification"
    PARAMETER = "parameter"
    OBSERVATION = "observation"
    DIAGNOSIS = "diagnosis"

Images

iodd_parser.IoddImage dataclass

An image extracted from an IODD zip archive.

Attributes:

Name Type Description
filename str

The filename of the image within the archive.

data bytes

The raw binary data of the image.

Source code in src/iodd_parser/types.py
@dataclass
class IoddImage:
    """
    An image extracted from an IODD zip archive.

    :ivar filename: The filename of the image within the archive.
    :ivar data: The raw binary data of the image.
    """

    filename: str
    data: bytes