Search in sources :

Example 21 with LocalizedText

use of org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText in project milo by eclipse.

the class VariableNodeLoader method loadNode459.

private void loadNode459() throws IOException, SAXException {
    PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_OpenWithMasks_InputArguments, new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.Argument, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);
    node.addReference(new Reference(Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_OpenWithMasks_InputArguments, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));
    node.addReference(new Reference(Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_OpenWithMasks_InputArguments, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));
    node.addReference(new Reference(Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_OpenWithMasks_InputArguments, Identifiers.HasProperty, Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_OpenWithMasks.expanded(), false));
    StringBuilder sb = new StringBuilder();
    sb.append("<ListOfExtensionObject xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><ExtensionObject><TypeId><Identifier>i=297</Identifier>          </TypeId><Body><Argument><Name>Masks</Name><DataType><Identifier>i=7</Identifier>              </DataType><ValueRank>-1</ValueRank><ArrayDimensions/>            </Argument>          </Body>        </ExtensionObject>      </ListOfExtensionObject>");
    String xml = sb.toString();
    OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));
    Object o = decoder.readVariantValue();
    DataValue value = new DataValue(new Variant(o));
    node.setValue(value);
    this.nodeManager.addNode(node);
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) 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) StringReader(java.io.StringReader) PropertyTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.variables.PropertyTypeNode) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText) OpcUaXmlStreamDecoder(org.eclipse.milo.opcua.stack.core.serialization.OpcUaXmlStreamDecoder)

Example 22 with LocalizedText

use of org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText in project milo by eclipse.

the class VariableNodeLoader method loadNode893.

private void loadNode893() {
    PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerType_ServerCapabilities_ServerProfileArray, new QualifiedName(0, "ServerProfileArray"), new LocalizedText("en", "ServerProfileArray"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.String, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);
    node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities_ServerProfileArray, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));
    node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities_ServerProfileArray, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));
    node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities_ServerProfileArray, Identifiers.HasProperty, Identifiers.ServerType_ServerCapabilities.expanded(), false));
    this.nodeManager.addNode(node);
}
Also used : 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) PropertyTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.variables.PropertyTypeNode) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)

Example 23 with LocalizedText

use of org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText in project milo by eclipse.

the class VariableNodeLoader method loadNode325.

private void loadNode325() {
    PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.FileDirectoryType_FileName_Placeholder_Size, new QualifiedName(0, "Size"), new LocalizedText("en", "Size"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.UInt64, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);
    node.addReference(new Reference(Identifiers.FileDirectoryType_FileName_Placeholder_Size, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));
    node.addReference(new Reference(Identifiers.FileDirectoryType_FileName_Placeholder_Size, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));
    node.addReference(new Reference(Identifiers.FileDirectoryType_FileName_Placeholder_Size, Identifiers.HasProperty, Identifiers.FileDirectoryType_FileName_Placeholder.expanded(), false));
    this.nodeManager.addNode(node);
}
Also used : 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) PropertyTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.variables.PropertyTypeNode) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)

Example 24 with LocalizedText

use of org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText in project milo by eclipse.

the class VariableNodeLoader method loadNode472.

private void loadNode472() throws IOException, SAXException {
    PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ServerConfiguration_CertificateGroups_DefaultHttpsGroup_TrustList_Read_InputArguments, new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.Argument, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);
    node.addReference(new Reference(Identifiers.ServerConfiguration_CertificateGroups_DefaultHttpsGroup_TrustList_Read_InputArguments, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));
    node.addReference(new Reference(Identifiers.ServerConfiguration_CertificateGroups_DefaultHttpsGroup_TrustList_Read_InputArguments, Identifiers.HasProperty, Identifiers.ServerConfiguration_CertificateGroups_DefaultHttpsGroup_TrustList_Read.expanded(), false));
    StringBuilder sb = new StringBuilder();
    sb.append("<ListOfExtensionObject xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><ExtensionObject><TypeId><Identifier>i=297</Identifier>          </TypeId><Body><Argument><Name>FileHandle</Name><DataType><Identifier>i=7</Identifier>              </DataType><ValueRank>-1</ValueRank><ArrayDimensions/>            </Argument>          </Body>        </ExtensionObject><ExtensionObject><TypeId><Identifier>i=297</Identifier>          </TypeId><Body><Argument><Name>Length</Name><DataType><Identifier>i=6</Identifier>              </DataType><ValueRank>-1</ValueRank><ArrayDimensions/>            </Argument>          </Body>        </ExtensionObject>      </ListOfExtensionObject>");
    String xml = sb.toString();
    OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));
    Object o = decoder.readVariantValue();
    DataValue value = new DataValue(new Variant(o));
    node.setValue(value);
    this.nodeManager.addNode(node);
}
Also used : Variant(org.eclipse.milo.opcua.stack.core.types.builtin.Variant) 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) StringReader(java.io.StringReader) PropertyTypeNode(org.eclipse.milo.opcua.sdk.server.model.nodes.variables.PropertyTypeNode) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText) OpcUaXmlStreamDecoder(org.eclipse.milo.opcua.stack.core.serialization.OpcUaXmlStreamDecoder)

Example 25 with LocalizedText

use of org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText in project milo by eclipse.

the class VariableNodeLoader method loadNode1203.

private void loadNode1203() throws IOException, SAXException {
    DataTypeDescriptionTypeNode node = new DataTypeDescriptionTypeNode(this.context, Identifiers.OpcUa_BinarySchema_XVType, new QualifiedName(0, "XVType"), new LocalizedText("en", "XVType"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.String, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);
    node.addReference(new Reference(Identifiers.OpcUa_BinarySchema_XVType, Identifiers.HasTypeDefinition, Identifiers.DataTypeDescriptionType.expanded(), true));
    node.addReference(new Reference(Identifiers.OpcUa_BinarySchema_XVType, Identifiers.HasComponent, Identifiers.OpcUa_BinarySchema.expanded(), false));
    StringBuilder sb = new StringBuilder();
    sb.append("<String xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\">XVType</String>");
    String xml = sb.toString();
    OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(context.getServer().getSerializationContext()).setInput(new StringReader(xml));
    Object o = decoder.readVariantValue();
    DataValue value = new DataValue(new Variant(o));
    node.setValue(value);
    this.nodeManager.addNode(node);
}
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) StringReader(java.io.StringReader) LocalizedText(org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText) OpcUaXmlStreamDecoder(org.eclipse.milo.opcua.stack.core.serialization.OpcUaXmlStreamDecoder)

Aggregations

LocalizedText (org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText)1573 QualifiedName (org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName)1555 Reference (org.eclipse.milo.opcua.sdk.core.Reference)1546 DataValue (org.eclipse.milo.opcua.stack.core.types.builtin.DataValue)865 PropertyTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.variables.PropertyTypeNode)476 Variant (org.eclipse.milo.opcua.stack.core.types.builtin.Variant)247 StringReader (java.io.StringReader)243 OpcUaXmlStreamDecoder (org.eclipse.milo.opcua.stack.core.serialization.OpcUaXmlStreamDecoder)243 BaseDataVariableTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.variables.BaseDataVariableTypeNode)227 UaMethodNode (org.eclipse.milo.opcua.sdk.server.nodes.UaMethodNode)150 UaDataTypeNode (org.eclipse.milo.opcua.sdk.server.nodes.UaDataTypeNode)130 UaObjectTypeNode (org.eclipse.milo.opcua.sdk.server.nodes.UaObjectTypeNode)121 DataTypeEncodingTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.objects.DataTypeEncodingTypeNode)120 DataTypeDescriptionTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.variables.DataTypeDescriptionTypeNode)73 AggregateFunctionTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.objects.AggregateFunctionTypeNode)37 UaVariableTypeNode (org.eclipse.milo.opcua.sdk.server.nodes.UaVariableTypeNode)37 UaReferenceTypeNode (org.eclipse.milo.opcua.sdk.server.nodes.UaReferenceTypeNode)27 CertificateGroupFolderTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.objects.CertificateGroupFolderTypeNode)20 TransitionTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.objects.TransitionTypeNode)19 FolderTypeNode (org.eclipse.milo.opcua.sdk.server.model.nodes.objects.FolderTypeNode)18