Search in sources :

Example 1 with SessionSecurityDiagnosticsTypeNode

use of org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsTypeNode in project milo by eclipse.

the class SessionSecurityDiagnosticsVariableArray method createSessionSecurityDiagnosticsVariable.

private void createSessionSecurityDiagnosticsVariable(Session session) {
    try {
        int index = sessionSecurityDiagnosticsVariables.size();
        String id = Util.buildBrowseNamePath(node) + "[" + index + "]";
        NodeId elementNodeId = new NodeId(1, id);
        SessionSecurityDiagnosticsTypeNode elementNode = (SessionSecurityDiagnosticsTypeNode) nodeFactory.createNode(elementNodeId, Identifiers.SessionSecurityDiagnosticsType);
        elementNode.setBrowseName(new QualifiedName(1, "SessionSecurityDiagnostics"));
        elementNode.setDisplayName(new LocalizedText(node.getDisplayName().getLocale(), "SessionSecurityDiagnostics"));
        elementNode.setArrayDimensions(null);
        elementNode.setValueRank(ValueRank.Scalar.getValue());
        elementNode.setDataType(Identifiers.SessionSecurityDiagnosticsDataType);
        elementNode.setAccessLevel(AccessLevel.toValue(AccessLevel.READ_ONLY));
        elementNode.setUserAccessLevel(AccessLevel.toValue(AccessLevel.READ_ONLY));
        elementNode.addReference(new Reference(elementNode.getNodeId(), Identifiers.HasComponent, node.getNodeId().expanded(), Reference.Direction.INVERSE));
        diagnosticsNodeManager.addNode(elementNode);
        SessionSecurityDiagnosticsVariable sessionSecurityDiagnosticsVariable = new SessionSecurityDiagnosticsVariable(elementNode, session);
        sessionSecurityDiagnosticsVariable.startup();
        sessionSecurityDiagnosticsVariables.add(sessionSecurityDiagnosticsVariable);
    } catch (UaException e) {
        logger.warn("Failed to create SessionDiagnosticsVariableTypeNode for session id={}", session.getSessionId(), e);
    }
}
Also used : SessionSecurityDiagnosticsTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsTypeNode) Reference(org.eclipse.milo.opcua.sdk.core.Reference) UaException(org.eclipse.milo.opcua.stack.core.UaException) QualifiedName(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName) NodeId(org.eclipse.milo.opcua.stack.core.types.builtin.NodeId) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)

Example 2 with SessionSecurityDiagnosticsTypeNode

use of org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsTypeNode in project milo by eclipse.

the class VariableNodeLoader method loadNode540.

private void loadNode540() {
    SessionSecurityDiagnosticsTypeNode node = new SessionSecurityDiagnosticsTypeNode(this.context, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, new QualifiedName(0, "SessionSecurityDiagnostics"), new LocalizedText("en", "SessionSecurityDiagnostics"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.SessionSecurityDiagnosticsDataType, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SessionId.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientUserIdOfSession.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientUserIdHistory.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_AuthenticationMechanism.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_Encoding.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_TransportProtocol.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityMode.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityPolicyUri.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_ClientCertificate.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasTypeDefinition, Identifiers.SessionSecurityDiagnosticsType.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType.expanded(), false));
    this.nodeManager.addNode(node);
}
Also used : SessionSecurityDiagnosticsTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsTypeNode) DataValue(org.eclipse.milo.opcua.stack.core.types.builtin.DataValue) Reference(org.eclipse.milo.opcua.sdk.core.Reference) QualifiedName(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)

Example 3 with SessionSecurityDiagnosticsTypeNode

use of org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsTypeNode in project milo by eclipse.

the class VariableNodeLoader method loadNode200.

private void loadNode200() {
    SessionSecurityDiagnosticsTypeNode node = new SessionSecurityDiagnosticsTypeNode(this.context, Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, new QualifiedName(0, "SessionSecurityDiagnostics"), new LocalizedText("en", "SessionSecurityDiagnostics"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.SessionSecurityDiagnosticsDataType, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics_SessionId.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics_ClientUserIdOfSession.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics_ClientUserIdHistory.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics_AuthenticationMechanism.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics_Encoding.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics_TransportProtocol.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics_SecurityMode.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics_SecurityPolicyUri.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics_ClientCertificate.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasTypeDefinition, Identifiers.SessionSecurityDiagnosticsType.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasModellingRule, Identifiers.ModellingRule_ExposesItsArray.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionSecurityDiagnosticsArrayType_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionSecurityDiagnosticsArrayType.expanded(), false));
    this.nodeManager.addNode(node);
}
Also used : SessionSecurityDiagnosticsTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsTypeNode) DataValue(org.eclipse.milo.opcua.stack.core.types.builtin.DataValue) Reference(org.eclipse.milo.opcua.sdk.core.Reference) QualifiedName(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)

Example 4 with SessionSecurityDiagnosticsTypeNode

use of org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsTypeNode in project milo by eclipse.

the class VariableNodeLoader method loadNode1249.

private void loadNode1249() {
    SessionSecurityDiagnosticsTypeNode node = new SessionSecurityDiagnosticsTypeNode(this.context, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, new QualifiedName(0, "SessionSecurityDiagnostics"), new LocalizedText("en", "SessionSecurityDiagnostics"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.SessionSecurityDiagnosticsDataType, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_SessionId.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_ClientUserIdOfSession.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_ClientUserIdHistory.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_AuthenticationMechanism.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_Encoding.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_TransportProtocol.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_SecurityMode.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_SecurityPolicyUri.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics_ClientCertificate.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasTypeDefinition, Identifiers.SessionSecurityDiagnosticsType.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));
    node.addReference(new Reference(Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder_SessionSecurityDiagnostics, Identifiers.HasComponent, Identifiers.SessionsDiagnosticsSummaryType_ClientName_Placeholder.expanded(), false));
    this.nodeManager.addNode(node);
}
Also used : SessionSecurityDiagnosticsTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsTypeNode) DataValue(org.eclipse.milo.opcua.stack.core.types.builtin.DataValue) Reference(org.eclipse.milo.opcua.sdk.core.Reference) QualifiedName(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)

Aggregations

Reference (org.eclipse.milo.opcua.sdk.core.Reference)4 SessionSecurityDiagnosticsTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsTypeNode)4 LocalizedText (org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)4 QualifiedName (org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName)4 DataValue (org.eclipse.milo.opcua.stack.core.types.builtin.DataValue)3 UaException (org.eclipse.milo.opcua.stack.core.UaException)1 NodeId (org.eclipse.milo.opcua.stack.core.types.builtin.NodeId)1