Search in sources :

Example 1 with FolderType

use of com.prosysopc.ua.types.opcua.FolderType in project FAAAST-Service by FraunhoferIOSB.

the class AasServiceNodeManager method addAasEnvironmentNode.

/**
 * Adds the AASEnvironment Node.
 */
private void addAasEnvironmentNode() {
    try {
        final UaObject objectsFolder = getServer().getNodeManagerRoot().getObjectsFolder();
        if (aasEnvironment != null) {
            String name = "AASEnvironment";
            LOG.info("addAasEnvironmentNode {}; to ObjectsFolder", name);
            QualifiedName browseName = UaQualifiedName.from(opc.i4aas.ObjectTypeIds.AASEnvironmentType.getNamespaceUri(), name).toQualifiedName(getNamespaceTable());
            NodeId nid = createNodeId(objectsFolder, browseName);
            FolderType ft = createInstance(AASEnvironmentType.class, nid, browseName, LocalizedText.english(name));
            LOG.info("addAasEnvironmentNode: Created class: {}", ft.getClass().getName());
            aasEnvironmentNode = (AASEnvironmentType) ft;
            objectsFolder.addComponent(aasEnvironmentNode);
        }
    } catch (Exception ex) {
        LOG.error("addAasEnvironmentNode Exception", ex);
        throw ex;
    }
}
Also used : UaQualifiedName(com.prosysopc.ua.UaQualifiedName) QualifiedName(com.prosysopc.ua.stack.builtintypes.QualifiedName) NodeId(com.prosysopc.ua.stack.builtintypes.NodeId) ByteString(com.prosysopc.ua.stack.builtintypes.ByteString) LangString(io.adminshell.aas.v3.model.LangString) UaObject(com.prosysopc.ua.nodes.UaObject) ServiceResultException(com.prosysopc.ua.stack.common.ServiceResultException) StatusException(com.prosysopc.ua.StatusException) MessageBusException(de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException) ServiceException(com.prosysopc.ua.ServiceException) UaNodeFactoryException(com.prosysopc.ua.nodes.UaNodeFactoryException) AddressSpaceException(com.prosysopc.ua.client.AddressSpaceException) FolderType(com.prosysopc.ua.types.opcua.FolderType)

Aggregations

ServiceException (com.prosysopc.ua.ServiceException)1 StatusException (com.prosysopc.ua.StatusException)1 UaQualifiedName (com.prosysopc.ua.UaQualifiedName)1 AddressSpaceException (com.prosysopc.ua.client.AddressSpaceException)1 UaNodeFactoryException (com.prosysopc.ua.nodes.UaNodeFactoryException)1 UaObject (com.prosysopc.ua.nodes.UaObject)1 ByteString (com.prosysopc.ua.stack.builtintypes.ByteString)1 NodeId (com.prosysopc.ua.stack.builtintypes.NodeId)1 QualifiedName (com.prosysopc.ua.stack.builtintypes.QualifiedName)1 ServiceResultException (com.prosysopc.ua.stack.common.ServiceResultException)1 FolderType (com.prosysopc.ua.types.opcua.FolderType)1 MessageBusException (de.fraunhofer.iosb.ilt.faaast.service.exception.MessageBusException)1 LangString (io.adminshell.aas.v3.model.LangString)1