admin-shell-io / questions-and-answers

This repository aims for providing answers to often asked questions in the context of the Asset Administration Shell.
https://admin-shell-io.github.io/questions-and-answers/
Creative Commons Attribution 4.0 International
25 stars 6 forks source link

Composing References to AAS/Submodels/SubmodelElements the right way #94

Open alexgordtop opened 1 year ago

alexgordtop commented 1 year ago

There are Submodels that are obviously bound to an AssetAdministrationShell like DigitalNameplate. Additionally there are AAS specific instances of Submodels, that may be used multiple times within an AAS.

Think about the TimeSeries Submodel: An AAS (A1) may have one instance of TimeSeries for electrical power consumption, one for vibrations and another one for weather.

When another AAS (A2) tries to model an overview of vibrations in different parts of a bigger Asset, then it would be very helpful, to have the opportunity, to drill down to the originally monitored Asset (A1) to check other monitoring data. So a "vibration sources / overview" Submodel would explicitly reference the TimeSeries of other AASs.

My proposal would be to start references on Submodels of other AAS with the referenced AAS as first key:

{
    "keys": [
        {
            "type": "AssetAdministrationShell",
            "local": false,
            "value": "op.basyx.generic_sensor/AccelerationSensor_4711:1",
            "idType": "Custom"
        },
        {
            "type": "Submodel",
            "local": false,
            "value": "op.basyx.generic_sensor/AccelerationSensor_4711/Conf_20230320T0000:1",
            "idType": "Custom"
        }
    ]
}

As a rule of thumb:

Does the group agree with this strategy?

alexgordtop commented 11 months ago

Discussion in Best-Practice-Group on 2023-12-18:

arnoweiss commented 10 months ago

Firstly, I don't think the json above is valid. A Key only has a type and a value field.

For your use-case, I don't understand why you're suggesting to treat Submodel-Templates and -Instances differently (in RoT1, RoT2). Submodels are globally, uniquely identifiable so a Reference to them doesn't need any context. If it's an offline use-case, the Submodel can be fetched from the submodels section of an Environment. For online use-cases, the Submodel can be fetched via the logical GetSubmodel operation (assuming endpoints are known or at least discoverable).

As correctly identified, AASd-125 is the relevant constraint here. I think it's important to have and even think it should apply to GlobalReferences too. Currently, it would be possible to chain multiple keys of type ExternalReference and I don't see the point in that.

StenGruener commented 10 months ago

@alexgordtop Hi Alex, did you create an issues in the https://github.com/admin-shell-io/aas-specs in the meantime which can be cross-refernced here?