OPC UA Interfaces are used to add a defined group of elements to an Object in an alternate way than containment or inheritance, similar to the way interfaces do in an object-oriented programming (OOP) language. Interfaces in OOP and OPC UA help alleviate some of the limitations of a single inheritance model by allowing an Object to “implement” multiple interfaces.

AML Role Classes serve a similar purpose in that an instance or an SUC can fulfil one or more Roles. For this reason, OPC UA InterfaceTypes are represented as Role Classes in AML in addition to being represented in the SUC as they naturally occur (since all OPC UA InterfaceTypes derive from the supertype BaseObjectType).

The AML RoleClasses that correspond to the UA InterfaceTypes contain no additional attributes. They only serve the purpose of annotating the SUCs that implement the Interfaces. Figure A.17 shows an example of an SUC (UA ObjectType) that implements several Roles that correspond to UA InterfaceTypes.

image041.png

Figure A.17 – SUC that implements multiple Roles