6.2. traversal - Functions for Traversing AAS Object structures
A module with helper functions for traversing AAS object structures.
- walk_semantic_ids_recursive(root: Referable) Iterator[Reference]
Traverse an AAS object hierarchy (e.g. a
Submodelwith all recursively containedSubmodelElements) recursively and return all non-empty (!= None) semanticIds.This is a generator function, yielding all the semanticIds. No
Referableobjects should be added, removed or moved to/from/in the AAS object hierarchy while iterating, as this could result in undefined behaviour.
- walk_submodel(collection: Submodel | SubmodelElementCollection | SubmodelElementList) Iterator[SubmodelElement]
Traverse the
SubmodelElementsin aSubmodel,SubmodelElementCollectionor aSubmodelElementListrecursively in post-order tree-traversal.This is a generator function, yielding all the
SubmodelElements. NoSubmodelElementsshould be added, removed or moved while iterating, as this could result in undefined behaviour.