You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to instantiate two objects of the same type — e.g. TCD_InterfaceType from EUROMAP82.1 / PlasticsRubber (docs)
I am able to create the individual objects, but all the components and properties appear to be shared.
e.g. attempting to update TCD_Interface -> Identification -> Model on one object will update the value on both objects.
The only way I can manage to (lazily) designate that an object has a component (e.g. Identification)
But when associating the component to the object, it seems like the resulting components/properties are not unique, as noted above.
Note: I am sourcing the Node information from a nodeset.rs file generated using the provided gen_nodeset.js script
e.g.
TCD_InterfaceType
fnadd_objecttype_62(address_space:&mutAddressSpace){// ObjectTypelet browse_name = "1:TCD_InterfaceType";let display_name = "TCD_InterfaceType";let node_id = NodeId::new(4,1012);letmut node = ObjectType::new(&node_id, browse_name, display_name,false);
node.set_description(LocalizedText::from("Root ObjectType representing a temperature control device with its subcomponents"));let _ = address_space.insert(node,Some(&[(&NodeId::new(4,5044),&ReferenceTypeId::HasComponent,ReferenceDirection::Forward),(&NodeId::new(4,6557),&ReferenceTypeId::HasProperty,ReferenceDirection::Forward),(&NodeId::new(4,5047),&ReferenceTypeId::HasComponent,ReferenceDirection::Forward),(&NodeId::new(4,5049),&ReferenceTypeId::HasComponent,ReferenceDirection::Forward),(&NodeId::new(4,5050),&ReferenceTypeId::HasComponent,ReferenceDirection::Forward),(&NodeId::new(0,58),&ReferenceTypeId::HasSubtype,ReferenceDirection::Inverse),(&NodeId::new(4,1009),&ReferenceTypeId::GeneratesEvent,ReferenceDirection::Forward),(&NodeId::new(4,5048),&ReferenceTypeId::HasComponent,ReferenceDirection::Forward),]));}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to instantiate two objects of the same type — e.g.
TCD_InterfaceType
from EUROMAP82.1 / PlasticsRubber (docs)I am able to create the individual objects, but all the components and properties appear to be shared.
e.g. attempting to update
TCD_Interface
->Identification
->Model
on one object will update the value on both objects.The only way I can manage to (lazily) designate that an object has a component (e.g. Identification)
But when associating the component to the object, it seems like the resulting components/properties are not unique, as noted above.
Note: I am sourcing the
Node
information from anodeset.rs
file generated using the providedgen_nodeset.js
scripte.g.
TCD_InterfaceType
Example
ObjectBuilder
usageAm I approaching object creation entirely wrong?
Happy to provide further clarifying details if necessary.
Beta Was this translation helpful? Give feedback.
All reactions