Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CoreAASExtension

This class represents the extension part of the OPC UA Server relevant to the CoreAAS Information Model.
An instance of CoreAASExtension provides all the methods to populate the AddressSpace with instances of the ObjectTypes coming from CoreAAS.
Furthermore it provides the Constructors for the Structured DataType defined in CoreAAS and lot of utilities methods to find Nodes in the Namespace of CoreAAS.

Hierarchy

  • CoreAASExtension

Index

Constructors

constructor

Properties

addressSpace

addressSpace: AddressSpace

The Address Space instance of the current OPC UA Server.

coreaasXmlFile

coreaasXmlFile: string = path.join(__dirname, "../nodesets/coreaas.xml")

The absolute path to the CoreAAS xml file.

identifiableMap

identifiableMap: Map<string, UAObject> = new Map()

A Map containing all the Identifiables' ids as key and the relevant UAObject as value. This attribute can be useful to implement function to resolve AAS References into Objects in the AddressSpace.

namespaceUri

namespaceUri: string = "http://dieei.unict.it/coreAAS/"

The complete URI of CoreAAS.

Accessors

Identifier

  • get Identifier(): object

Key

  • get Key(): object

coreAASNamespace

  • get coreAASNamespace(): Namespace

namespace

  • get namespace(): Namespace

namespaceIndex

  • get namespaceIndex(): number

Methods

addAASFile

addAASReference

addAASView

addAdministrativeInformation

addAnnotatedRelationshipElement

addAsset

addAssetAdministrationShell

addCapability

addConceptDescription

addConceptDictionary

addDataSpecificationIEC61360

addEmbeddedDataSpecification

addEntity

addRange

addReferenceElement

addRelationshipElement

addSubmodel

addSubmodelElementCollection

addSubmodelProperty

fetchAASReference

  • This function look in the AddressSpace for the entity Object pointed by ref and returns an UAObject eventually.
    Two version of this function exist: the version with a callback and the version with the return value. Using a callback avoid this function to return a value, and viceversa.

    Parameters

    • ref: AASReferenceObject

      An AASReferenceType Instance representing the the AAS reference to fetch.

    • Optional callback: Function

      A callback function that receive an Error as first parameter or the found Object as second parameter.

      example:

      //The following AAS Reference is created as example. Let's supposte is already exists in the AddressSpace.
       let ref = server.coreaas.addAASReference({
           organizedBy: aas_1,
           browseName: "ereoto",
           keys: [
               new Key({
                   idType: KeyType.URI,
                   local: true,
                   type: KeyElements.Submodel,
                   value: "http://www.zvei.de/demo/submodel/12345679"
               }),
               new Key({
                   idType: KeyType.idShort,
                   local: true,
                   type: KeyElements.SubmodelElementCollection,
                   value: "Measurement"
               }),
               new Key({
                   idType: KeyType.idShort,
                   local: true,
                   type: KeyElements.Property,
                   value: "rotationSpeed"
               })
           ]
       });
       //This version of the function use a callback.
       server.coreaas.fetchAASReference(ref, function(err: Error , obj: UAObject) {
           if (err) {
               return console.log(err);
           }
           console.log(obj);
       });
       //This version of the function retruns the value or null otherwise.
       let result = server.coreaas.fetchAASReference(ref);
       console.log(result);

    Returns UAObject | void

findCoreAASDataType

  • findCoreAASDataType(name: string): UADataType | null
  • Find and returns a DataType in the CoreAAS Namespace, otherwise return null.

    Parameters

    • name: string

      The name of the DataType to find.

    Returns UADataType | null

findCoreAASObjectType

  • findCoreAASObjectType(name: string): UAObjectType | null
  • Find and returns an ObjectType in the CoreAAS Namespace, otherwise return null.

    Parameters

    • name: string

      The name of the ObjectType to find.

    Returns UAObjectType | null

findCoreAASReferenceType

  • findCoreAASReferenceType(name: string): UAReferenceType | null
  • Find and returns a ReferenceType in the CoreAAS Namespace, otherwise return null.

    Parameters

    • name: string

      The name of the ReferenceType to find.

    Returns UAReferenceType | null

getAASReferenceType

  • getAASReferenceType(): UAObjectType

getAASType

  • getAASType(): UAObjectType

getAdministrativeInformationType

  • getAdministrativeInformationType(): UAObjectType

getAssetType

  • getAssetType(): UAObjectType

Generated using TypeDoc