Skip to main content

Organizes links

A folder or a list often points at nodes that live elsewhere: a ListToRestrict folder that gathers the settings an operator may change, a Shortcuts folder on a panel. In OPC UA each of those is an Organizes reference from the folder to the node. A references: entry says it, but it takes a referenceType, a source and a target per link, each a path.

Under organizes:, a string item is such a link: an Organizes reference from the entry that holds the list to the node the string names. An object item keeps its meaning: it declares a child (see A folder a type organizes). Both may be mixed in one list.

In a type: $Name​

A folder that organizes two members of its type
objectTypes:
- browseName: ControllerType
components:
- browseName: Settings
typeDefinition: ua:BaseObjectType
components:
- browseName: Speed
dataType: ua:Double
- browseName: MaxAcceleration
dataType: ua:Double
- browseName: ListToRestrict
typeDefinition: ua:FolderType
organizes: [$Speed, $MaxAcceleration]

Inside a type, $Name is the member of that type whose BrowseName is Name, at any depth: here Settings/Speed, without spelling the path. The compiler looks at the members the type declares first; only when none has the name does it look at the members the type inherits from its supertypes.

It is the same NodeSet as the long form:

The same links as references: entries
objectTypes:
- browseName: ControllerType
components:
- browseName: Settings
typeDefinition: ua:BaseObjectType
components:
- browseName: Speed
dataType: ua:Double
- browseName: MaxAcceleration
dataType: ua:Double
- browseName: ListToRestrict
typeDefinition: ua:FolderType
references:
- referenceType: ua:Organizes
source: /ListToRestrict
target: /Settings/Speed
- referenceType: ua:Organizes
source: /ListToRestrict
target: /Settings/MaxAcceleration

The links belong to the type, so every instance of it gets them between its own copies of the members.

An inherited member​

Organizing a member the type inherits
objectTypes:
- browseName: AxisType
components:
- browseName: Speed
dataType: ua:Double
- browseName: LinearAxisType
subtypeOf: AxisType
components:
- browseName: Limits
typeDefinition: ua:FolderType
organizes: [$Speed]

LinearAxisType declares no Speed, so $Speed is the one it inherits from AxisType.

When the name is not enough​

Two members of the same type may share a BrowseName: each axis of a robot has a Speed. $Speed is then an error, DSL-E-LINK-001, that lists the candidates with their paths. Say which one you mean with its path from the type, or give it a name with $anchor:

A path, or an anchor, when the BrowseName is ambiguous
objectTypes:
- browseName: RobotType
components:
- browseName: Axis1
typeDefinition: ua:BaseObjectType
components:
- browseName: Speed
dataType: ua:Double
- browseName: Axis2
typeDefinition: ua:BaseObjectType
components:
- browseName: Speed
$anchor: Axis2Speed
dataType: ua:Double
- browseName: Limits
typeDefinition: ua:FolderType
organizes:
- /Axis1/Speed
- $Axis2Speed

In a type, a path that starts with / starts at the type, wherever the entry that holds the link sits. A name that matches no member is DSL-E-LINK-002.

Outside types​

On an instance, a string item is a browse path as anywhere else: $Name is an instance (its $anchor, or its BrowseName), and / is the entry that holds the list. The instance may be declared further down.

A folder of shortcuts to other instances
instances:
- browseName: Shortcuts
typeDefinition: ua:FolderType
organizedBy: /ua:Objects
organizes: [$Machine]
- browseName: Machine
typeDefinition: ua:BaseObjectType
organizedBy: /ua:Objects

Other reference types​

Only Organizes has this short form. Any other reference type is written as a references: entry.

Reversing a NodeSet​

opcua-modeler reverse writes an Organizes reference between two members of a type as a link on the entry of its source: $Name when it names that node unambiguously, its path from the type otherwise. A reference whose source the model does not declare (a member inherited unchanged) stays a references: entry.