Skip to main content

Crate dpp_aas

Crate dpp_aas 

Source
Expand description

dpp-aas — Asset Administration Shell (IDTA) projection of a passport.

The IDTA AAS metamodel (IDTA-01001-3-0) is the interoperability standard used by EU Industry 4.0 and Catena-X data spaces. Passports published through Odal Node must be expressible as AAS shells + submodels for ecosystem registry interoperability.

Pure, stateless crate with no I/O or network dependencies. Compiles to both std and wasm32.

§Key types

§Primary entry point

build_aas_from_passport maps a typed Passport plus a GS1 GTIN string into a complete (AasShell, Vec<AasSubmodel>) ready for serialisation or registry submission. The shell references its submodels by ID following the IDTA AAS Part 2 API pattern — shell and submodels are served from separate endpoints.

Always produces five core submodels: ProductIdentification, ManufacturerInformation, EnvironmentalImpact, MaterialComposition, Repairability. If passport.sector_data is Some, a sixth sector-specific submodel is appended (BatteryTechnicalData, TextileMaterialDeclaration, ElectronicsProductData, or a generic SectorData fallback for sectors without a dedicated template yet).

The lower-level map_dpp_to_aas_submodel remains available as a generic JSON-to-submodel escape hatch.

§This crate emits identifiers, not conformance

Producing AAS-shaped output is not the same as conforming to an IDTA specification, and nothing here should be described as IDTA-conformant.

Every semanticId emitted is either in the urn:odal-node: namespace — our own concept, honestly named — or carries a provenance record in semantic_ids/allowlist.json naming who verified it against the authority’s own published source, and when. That rule is enforced by a test, not by a comment, because six identifiers claiming IDTA and ECLASS authority once sat here behind comments asking someone to check them.

Split out of dpp-digital-link, which retains the GS1 parser this used to ship alongside.

Modules§

semantic_ids

Structs§

AasCollection
An AAS SubmodelElementCollection — a named group of elements.
AasEnvironment
IDTA AAS Environment — the self-contained document form, carrying shells and submodels together in one payload.
AasProperty
An AAS Property — a single leaf-level value.
AasReference
An AAS ReferenceElement — an external link (URL/URN).
AasSemId
IDTA AAS Part 1 §5.3.11 Reference — typed container for semantic identifiers.
AasSemIdKey
IDTA AAS Part 1 §5.3.11 Key — one segment of a semantic identifier reference.
AasShell
AAS Shell — the top-level container for a product’s digital twin.
AasSubmodel
An AAS Submodel — one named grouping of product data.
AasSubmodelRef
A reference from an AasShell to one of its submodels (ID only).
AssetInformation
AAS asset identification block.
SpecificAssetId
A name/value specific asset identifier (e.g., gtin, batchId).
SubmodelTemplate
Metadata for a single AAS submodel template binding.

Enums§

AasDataType
AAS data type for Property values.
AasError
Why an AAS projection could not be built.
AasSubmodelElement
AAS SubmodelElement — a property, collection, or external reference.

Functions§

boolean_property
Create a boolean Property element.
build_aas_environment
Build a complete AasEnvironment — the self-contained document form, shells and submodels in one payload.
build_aas_from_passport
Map a Passport and its GS1 GTIN into a complete AAS shell + submodels, carrying only what audience may see.
double_property
Create a double (float) Property element.
integer_property
Create an integer Property element.
map_dpp_to_aas_submodel
Map a raw JSON payload to a single AAS Submodel.
placeholder_templates
Returns every sector template whose semantic ID is still a placeholder.
sector_submodel_template
Look up the AAS submodel template binding for a catalog sector key.
string_property
Create a string Property element.