Search in sources :

Example 1 with DataTypeEncodingTypeNode

use of org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode in project milo by eclipse.

the class DataTypeDictionaryManager method registerStructureDescription.

public void registerStructureDescription(StructureDescription description, NodeId binaryEncodingId) {
    structureDescriptions.put(description.getDataTypeId(), description);
    // Add a DataTypeDescriptionTypeNode with a ComponentOf reference to
    // dictionaryNode.
    DataTypeDescriptionTypeNode descriptionNode = new DataTypeDescriptionTypeNode(getNodeContext(), newNodeId(String.format("%s.Description", description.getName())), newQualifiedName(description.getName().getName()), LocalizedText.english(description.getName().getName()), LocalizedText.NULL_VALUE, uint(0), uint(0));
    descriptionNode.setValue(new DataValue(new Variant(description.getName().getName())));
    descriptionNode.setDataType(Identifiers.String);
    descriptionNode.addReference(new Reference(descriptionNode.getNodeId(), Identifiers.HasTypeDefinition, Identifiers.DataTypeDescriptionType.expanded(), Direction.FORWARD));
    descriptionNode.addReference(new Reference(descriptionNode.getNodeId(), Identifiers.HasComponent, dictionaryNode.getNodeId().expanded(), Direction.INVERSE));
    addNode(descriptionNode);
    // Add a DataTypeEncodingTypeNode with a HasDescription reference to
    // descriptionNode and an EncodingOf reference to the DataTypeNode.
    DataTypeEncodingTypeNode dataTypeEncodingNode = new DataTypeEncodingTypeNode(getNodeContext(), binaryEncodingId, new QualifiedName(0, "Default Binary"), LocalizedText.english("Default Binary"), LocalizedText.NULL_VALUE, uint(0), uint(0));
    dataTypeEncodingNode.addReference(new Reference(dataTypeEncodingNode.getNodeId(), Identifiers.HasTypeDefinition, Identifiers.DataTypeEncodingType.expanded(), Direction.FORWARD));
    dataTypeEncodingNode.addReference(new Reference(dataTypeEncodingNode.getNodeId(), Identifiers.HasDescription, descriptionNode.getNodeId().expanded(), Direction.FORWARD));
    dataTypeEncodingNode.addReference(new Reference(dataTypeEncodingNode.getNodeId(), Identifiers.HasEncoding, description.getDataTypeId().expanded(), Direction.INVERSE));
    addNode(dataTypeEncodingNode);
    dictionaryFile.reset();
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) DataTypeDescriptionTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.variables.DataTypeDescriptionTypeNode) 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) DataTypeEncodingTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode)

Example 2 with DataTypeEncodingTypeNode

use of org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode in project milo by eclipse.

the class ObjectNodeLoader method loadNode23.

private void loadNode23() {
    DataTypeEncodingTypeNode node = new DataTypeEncodingTypeNode(this.context, Identifiers.EndpointDescription_Encoding_DefaultXml, new QualifiedName(0, "Default XML"), new LocalizedText("en", "Default XML"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));
    node.addReference(new Reference(Identifiers.EndpointDescription_Encoding_DefaultXml, Identifiers.HasEncoding, Identifiers.EndpointDescription.expanded(), false));
    node.addReference(new Reference(Identifiers.EndpointDescription_Encoding_DefaultXml, Identifiers.HasDescription, Identifiers.OpcUa_XmlSchema_EndpointDescription.expanded(), true));
    node.addReference(new Reference(Identifiers.EndpointDescription_Encoding_DefaultXml, Identifiers.HasTypeDefinition, Identifiers.DataTypeEncodingType.expanded(), true));
    this.nodeManager.addNode(node);
}
Also used : Reference(org.eclipse.milo.opcua.sdk.core.Reference) QualifiedName(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName) DataTypeEncodingTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)

Example 3 with DataTypeEncodingTypeNode

use of org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode in project milo by eclipse.

the class ObjectNodeLoader method loadNode118.

private void loadNode118() {
    DataTypeEncodingTypeNode node = new DataTypeEncodingTypeNode(this.context, Identifiers.IssuedIdentityToken_Encoding_DefaultBinary, new QualifiedName(0, "Default Binary"), new LocalizedText("en", "Default Binary"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));
    node.addReference(new Reference(Identifiers.IssuedIdentityToken_Encoding_DefaultBinary, Identifiers.HasEncoding, Identifiers.IssuedIdentityToken.expanded(), false));
    node.addReference(new Reference(Identifiers.IssuedIdentityToken_Encoding_DefaultBinary, Identifiers.HasDescription, Identifiers.OpcUa_BinarySchema_IssuedIdentityToken.expanded(), true));
    node.addReference(new Reference(Identifiers.IssuedIdentityToken_Encoding_DefaultBinary, Identifiers.HasTypeDefinition, Identifiers.DataTypeEncodingType.expanded(), true));
    this.nodeManager.addNode(node);
}
Also used : Reference(org.eclipse.milo.opcua.sdk.core.Reference) QualifiedName(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName) DataTypeEncodingTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)

Example 4 with DataTypeEncodingTypeNode

use of org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode in project milo by eclipse.

the class ObjectNodeLoader method loadNode78.

private void loadNode78() {
    DataTypeEncodingTypeNode node = new DataTypeEncodingTypeNode(this.context, Identifiers.MdnsDiscoveryConfiguration_Encoding_DefaultBinary, new QualifiedName(0, "Default Binary"), new LocalizedText("en", "Default Binary"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));
    node.addReference(new Reference(Identifiers.MdnsDiscoveryConfiguration_Encoding_DefaultBinary, Identifiers.HasEncoding, Identifiers.MdnsDiscoveryConfiguration.expanded(), false));
    node.addReference(new Reference(Identifiers.MdnsDiscoveryConfiguration_Encoding_DefaultBinary, Identifiers.HasDescription, Identifiers.OpcUa_BinarySchema_MdnsDiscoveryConfiguration.expanded(), true));
    node.addReference(new Reference(Identifiers.MdnsDiscoveryConfiguration_Encoding_DefaultBinary, Identifiers.HasTypeDefinition, Identifiers.DataTypeEncodingType.expanded(), true));
    this.nodeManager.addNode(node);
}
Also used : Reference(org.eclipse.milo.opcua.sdk.core.Reference) QualifiedName(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName) DataTypeEncodingTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)

Example 5 with DataTypeEncodingTypeNode

use of org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode in project milo by eclipse.

the class ObjectNodeLoader method loadNode43.

private void loadNode43() {
    DataTypeEncodingTypeNode node = new DataTypeEncodingTypeNode(this.context, Identifiers.AddReferencesItem_Encoding_DefaultXml, new QualifiedName(0, "Default XML"), new LocalizedText("en", "Default XML"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));
    node.addReference(new Reference(Identifiers.AddReferencesItem_Encoding_DefaultXml, Identifiers.HasEncoding, Identifiers.AddReferencesItem.expanded(), false));
    node.addReference(new Reference(Identifiers.AddReferencesItem_Encoding_DefaultXml, Identifiers.HasDescription, Identifiers.OpcUa_XmlSchema_AddReferencesItem.expanded(), true));
    node.addReference(new Reference(Identifiers.AddReferencesItem_Encoding_DefaultXml, Identifiers.HasTypeDefinition, Identifiers.DataTypeEncodingType.expanded(), true));
    this.nodeManager.addNode(node);
}
Also used : Reference(org.eclipse.milo.opcua.sdk.core.Reference) QualifiedName(org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName) DataTypeEncodingTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)

Aggregations

Reference (org.eclipse.milo.opcua.sdk.core.Reference)121 DataTypeEncodingTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode)121 QualifiedName (org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName)121 LocalizedText (org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)120 DataTypeDescriptionTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.variables.DataTypeDescriptionTypeNode)1 DataValue (org.eclipse.milo.opcua.stack.core.types.builtin.DataValue)1 Variant (org.eclipse.milo.opcua.stack.core.types.builtin.Variant)1