Search in sources :

Example 16 with LocalizedText

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

the class VariableNodeLoader method loadNode218.

private void loadNode218() throws IOException, SAXException {
    DataTypeDescriptionTypeNode node = new DataTypeDescriptionTypeNode(this.context, Identifiers.OpcUa_BinarySchema_DiscoveryConfiguration, new QualifiedName(0, "DiscoveryConfiguration"), new LocalizedText("en", "DiscoveryConfiguration"), 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_DiscoveryConfiguration, Identifiers.HasTypeDefinition, Identifiers.DataTypeDescriptionType.expanded(), true));
    node.addReference(new Reference(Identifiers.OpcUa_BinarySchema_DiscoveryConfiguration, Identifiers.HasComponent, Identifiers.OpcUa_BinarySchema.expanded(), false));
    StringBuilder sb = new StringBuilder();
    sb.append("<String xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\">DiscoveryConfiguration</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)

Example 17 with LocalizedText

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

the class VariableNodeLoader method loadNode20.

private void loadNode20() {
    PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.DataTypeDescriptionType_DictionaryFragment, new QualifiedName(0, "DictionaryFragment"), new LocalizedText("en", "DictionaryFragment"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.ByteString, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);
    node.addReference(new Reference(Identifiers.DataTypeDescriptionType_DictionaryFragment, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));
    node.addReference(new Reference(Identifiers.DataTypeDescriptionType_DictionaryFragment, Identifiers.HasModellingRule, Identifiers.ModellingRule_Optional.expanded(), true));
    node.addReference(new Reference(Identifiers.DataTypeDescriptionType_DictionaryFragment, Identifiers.HasProperty, Identifiers.DataTypeDescriptionType.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 18 with LocalizedText

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

the class VariableNodeLoader method loadNode1091.

private void loadNode1091() throws IOException, SAXException {
    PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.RedundancySupport_EnumStrings, new QualifiedName(0, "EnumStrings"), new LocalizedText("en", "EnumStrings"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.LocalizedText, 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.RedundancySupport_EnumStrings, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));
    node.addReference(new Reference(Identifiers.RedundancySupport_EnumStrings, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));
    node.addReference(new Reference(Identifiers.RedundancySupport_EnumStrings, Identifiers.HasProperty, Identifiers.RedundancySupport.expanded(), false));
    StringBuilder sb = new StringBuilder();
    sb.append("<ListOfLocalizedText xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\"><LocalizedText><Locale>          </Locale><Text>None</Text>        </LocalizedText><LocalizedText><Locale>          </Locale><Text>Cold</Text>        </LocalizedText><LocalizedText><Locale>          </Locale><Text>Warm</Text>        </LocalizedText><LocalizedText><Locale>          </Locale><Text>Hot</Text>        </LocalizedText><LocalizedText><Locale>          </Locale><Text>Transparent</Text>        </LocalizedText><LocalizedText><Locale>          </Locale><Text>HotAndMirrored</Text>        </LocalizedText>      </ListOfLocalizedText>");
    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 19 with LocalizedText

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

the class VariableNodeLoader method loadNode1122.

private void loadNode1122() {
    PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.AuditConditionAcknowledgeEventType_Comment, new QualifiedName(0, "Comment"), new LocalizedText("en", "Comment"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.LocalizedText, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);
    node.addReference(new Reference(Identifiers.AuditConditionAcknowledgeEventType_Comment, Identifiers.HasTypeDefinition, Identifiers.PropertyType.expanded(), true));
    node.addReference(new Reference(Identifiers.AuditConditionAcknowledgeEventType_Comment, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));
    node.addReference(new Reference(Identifiers.AuditConditionAcknowledgeEventType_Comment, Identifiers.HasProperty, Identifiers.AuditConditionAcknowledgeEventType.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 20 with LocalizedText

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

the class VariableNodeLoader method loadNode1233.

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

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