Closed s-heppner closed 1 year ago
@s-heppner thanks! We also need to add assertion test for that logic to make sure we didn't miss anything.
Someone please check the docstring of ID_short_type
. Something was very wrong with the docstring references and I got a ton of errors
Superseded by #256.
This implements the missing invariant for AASd-117 namely, that any
Referable
that is not direct child of aSubmodel_element_list
must have itsID_short
set. This fixes #253.Since it is impossible to access an object's parent, we need to implement it in a creative way. Therefore, we add the invariant to every
Referable
object that it can apply to:Asset_administration_shell
: An AAS-object can never be a child of aSubmodel_element_list
Submodel
: Similarly, aSubmodel
-object is never a child of aSubmodel_element_list
. Additionaly, every child of aSubmodel
is evidentally not a child of aSubmodel_element_list
.Submodel_element_collection
: Every child of a SEC is never a child of aSubmodel_element_list
. Careful, though, aSubmodel_element_collection
may be a child of aSubmodel_element_list
though. Therefore, we cannot check for its ownID_short
to be set.Operation_variable
: has avalue
, that is not child of aSubmodel_element_list
, therefore check that itsID_short
is notNone
Note that the logic already existed for most objects, but there was no reference to the constraint