MandatoryPlaceholder for subcomponent ob another type

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
sxdev
Full Member
Full Member
Posts: 7
Joined: 25 Mar 2020, 09:07

MandatoryPlaceholder for subcomponent ob another type

Post by sxdev »

Hello,

I am modelling types, with the following (very simplified) architecture:

ListItemType (subtype of BaseObjectType)
ListType (NodeId 1; subtype of BaseObjectType) -HasComponent-> <ListItem> (ListItemType; MandatoryPlaceholder)
AggregatingType (subtype of BaseObjectType) -HasComponent-> List (ListType; Optional)

When modelling this, UaModeler automatically creates a "ListItem" instance in the "List" of the "AggregatingType" (probably because of the MandatoryPlaceholder modelling rule), so the "AggregatingType" actually looks like this:
AggregatingType (subtype of BaseObjectType) -HasComponent-> List (ListType; Optional) -HasComponent-> ListItem (NodeId 2; ListItemType)

When I check the consistency of the model, the test "StronglyTyping" fails with:
InstanceDeclaration ListItem (NodeId 2) cannot be found in Type ListType (NodeId 1)

When I manually delete the "ListItem", the test succeeds.

Now, the actual question is: Is my architecture screwed, because I have to instantiate at least one "<ListItem>" in the "AggregatingType" as UaModeler does, or is UaModeler too duteous and the manual deletion of the "ListItem" is the correct solution.
(For my understanding, the MandatoryPlaceholder shall not apply in the way UaModeler does here, but please correct me if I'm wrong with the OPC UA specification.)

Thanks!

Post Reply