• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DataValue类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.milo.opcua.stack.core.types.builtin.DataValue的典型用法代码示例。如果您正苦于以下问题:Java DataValue类的具体用法?Java DataValue怎么用?Java DataValue使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataValue类属于org.eclipse.milo.opcua.stack.core.types.builtin包,在下文中一共展示了DataValue类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: onSubscriptionValue

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
private void onSubscriptionValue(UaMonitoredItem item, DataValue dataValue) {
    log.debug("Subscription value received: item={}, value={}",
            item.getReadValueId().getNodeId(), dataValue.getValue());
    NodeId tagId = item.getReadValueId().getNodeId();
    devicesByTags.getOrDefault(tagId, Collections.emptyList()).forEach(
            device -> {
                device.updateTag(tagId, dataValue);
                List<KvEntry> attributes = device.getAffectedAttributes(tagId, dataValue);
                if (attributes.size() > 0) {
                    gateway.onDeviceAttributesUpdate(device.getDeviceName(), attributes);
                }
                List<TsKvEntry> timeseries = device.getAffectedTimeseries(tagId, dataValue);
                if (timeseries.size() > 0) {
                    gateway.onDeviceTelemetry(device.getDeviceName(), timeseries);
                }
            }
    );
}
 
开发者ID:osswangxining,项目名称:iot-edge-greengrass,代码行数:19,代码来源:OpcUaServerMonitor.java


示例2: dumpValues

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
public static void dumpValues(final PrintStream out, final List<NodeId> nodeIds, final List<DataValue> values) {
    final int len = Integer.max(nodeIds.size(), values.size());

    final List<List<String>> data = new ArrayList<>(len);

    for (int i = 0; i < Integer.min(nodeIds.size(), values.size()); i++) {

        final List<String> row = new ArrayList<>(5);
        data.add(row);

        final DataValue value = values.get(i);

        row.add(nodeIds.get(i).toParseableString());
        row.add(toString(value.getValue()));
        row.add(toString(value.getStatusCode()));
        row.add(TIMESTAMP_FORMATTER.format(value.getServerTime().getJavaDate().toInstant()));
        row.add(TIMESTAMP_FORMATTER.format(value.getSourceTime().getJavaDate().toInstant()));
    }

    Tables.showTable(out,
            Arrays.asList("Node Id", "Value", "State", "Timestamp(Server)", "Timestamp(Source)"),
            data,
            2);

    System.out.println();
}
 
开发者ID:ctron,项目名称:milo-ece2017,代码行数:27,代码来源:Values.java


示例3: read

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
@Override
public void read(
        final ReadContext context,
        final Double maxAge,
        final TimestampsToReturn timestamps,
        final List<ReadValueId> readValueIds) {

    final List<DataValue> results = new ArrayList<>(readValueIds.size());

    for (final ReadValueId id : readValueIds) {
        final ServerNode node = this.nodeMap.get(id.getNodeId());

        final DataValue value = node != null
                ? node.readAttribute(new AttributeContext(context), id.getAttributeId())
                : new DataValue(StatusCodes.Bad_NodeIdUnknown);

        results.add(value);
    }

    // report back with result

    context.complete(results);
}
 
开发者ID:ctron,项目名称:milo-ece2017,代码行数:24,代码来源:CustomNamespace.java


示例4: VariableTypeNodeAttributes

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
public VariableTypeNodeAttributes(
    NodeId nodeId,
    QualifiedName browseName,
    LocalizedText displayName,
    LocalizedText description,
    UInteger writeMask,
    UInteger userWriteMask,
    DataValue value,
    NodeId dataType,
    int valueRank,
    UInteger[] arrayDimensions,
    boolean isAbstract) {

    super(nodeId, NodeClass.VariableType, browseName, displayName, description, writeMask, userWriteMask);

    this.value = value;
    this.dataType = dataType;
    this.valueRank = valueRank;
    this.arrayDimensions = arrayDimensions;
    this.isAbstract = isAbstract;
}
 
开发者ID:digitalpetri,项目名称:uanodeset-parser,代码行数:22,代码来源:VariableTypeNodeAttributes.java


示例5: parseValue

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
public static DataValue parseValue(Object value, Marshaller marshaller) {
    JAXBElement<?> jaxbElement = JAXBElement.class.cast(value);

    StringWriter sw = new StringWriter();

    try {
        marshaller.marshal(jaxbElement, sw);
    } catch (JAXBException e) {
        LOGGER.warn("unable to marshal JAXB element: " + jaxbElement, e);
        return new DataValue(Variant.NULL_VALUE);
    }

    String xmlString = sw.toString();
    try {
        XmlDecoder xmlDecoder = new XmlDecoder(new StringReader(xmlString));
        Object valueObject = xmlDecoder.decodeVariantValue();

        return new DataValue(new Variant(valueObject));
    } catch (Throwable t) {
        LOGGER.warn("unable to parse Value: " + xmlString, t);
        return new DataValue(Variant.NULL_VALUE);
    }
}
 
开发者ID:digitalpetri,项目名称:uanodeset-parser,代码行数:24,代码来源:AttributeUtil.java


示例6: buildNode680

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
private void buildNode680()
    throws Exception {
    UaVariableNode node = new BuildInfoNode(this.nodeMap, NodeId.parse("ns=0;i=2260"), new QualifiedName(0, "BuildInfo"), new LocalizedText("en", "BuildInfo"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=338"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2256"), NodeClass.Variable, false));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2262"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2263"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2261"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2264"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2265"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2266"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=3051"), NodeClass.VariableType, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2256"), NodeClass.Variable, false));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2262"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2263"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2261"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2264"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2265"), NodeClass.Variable, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2260"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2266"), NodeClass.Variable, true));
    this.nodeMap.addNode(node);
}
 
开发者ID:eclipse,项目名称:milo,代码行数:21,代码来源:UaVariableLoader.java


示例7: readDataAttributes

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
private CompletableFuture<List<DataValue>> readDataAttributes(Session session, Namespace namespace, NodeId itemId) {
    Function<AttributeId, ReadValueId> f = id ->
        new ReadValueId(itemId, id.uid(), null, QualifiedName.NULL_VALUE);

    CompletableFuture<List<DataValue>> future = new CompletableFuture<>();

    ReadContext readContext = new ReadContext(
        server, session, future, new DiagnosticsContext<>());

    List<ReadValueId> attributes = newArrayList(
        f.apply(AttributeId.AccessLevel),
        f.apply(AttributeId.UserAccessLevel),
        f.apply(AttributeId.MinimumSamplingInterval));

    namespace.read(readContext, 0.0, TimestampsToReturn.Neither, attributes);

    return future;
}
 
开发者ID:eclipse,项目名称:milo,代码行数:19,代码来源:SubscriptionManager.java


示例8: setViewAttribute

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
default void setViewAttribute(
    AttributeContext context,
    ViewNode node,
    AttributeId attributeId,
    DataValue value) throws UaException {

    switch (attributeId) {
        case ContainsNoLoops:
            setContainsNoLoops(context, node, AttributeUtil.extract(value));
            break;
        case EventNotifier:
            setEventNotifier(context, node, AttributeUtil.extract(value));
            break;

        default:
            setBaseAttribute(context, node, attributeId, value);
    }
}
 
开发者ID:eclipse,项目名称:milo,代码行数:19,代码来源:GetSetViewNode.java


示例9: getAffectedAttributes

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
public List<KvEntry> getAffectedAttributes(NodeId tagId, DataValue dataValue) {
    List<AttributesMapping> attributes = getAttributesMapping(tagId);
    if (attributes.size() > 0) {
        return getKvEntries(attributes);
    } else {
        return Collections.emptyList();
    }
}
 
开发者ID:osswangxining,项目名称:iot-edge-greengrass,代码行数:9,代码来源:OpcUaDevice.java


示例10: getAffectedTimeseries

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
public List<TsKvEntry> getAffectedTimeseries(NodeId tagId, DataValue dataValue) {
    List<AttributesMapping> attributes = getAttributesMapping(tagId);
    if (attributes.size() > 0) {
        return getKvEntries(attributes).stream()
                .map(kv -> new BasicTsKvEntry(dataValue.getSourceTime().getJavaTime(), kv))
                .collect(Collectors.toList());
    } else {
        return Collections.emptyList();
    }
}
 
开发者ID:osswangxining,项目名称:iot-edge-greengrass,代码行数:11,代码来源:OpcUaDevice.java


示例11: read

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
public static CompletableFuture<List<DataValue>> read(
        final OpcUaClient client,
        final AttributeId attributeId,
        final NodeId... nodeIds) {

    return client
            .read(
                    0,
                    Both,
                    asList(nodeIds),
                    nCopies(nodeIds.length, attributeId.uid()));
}
 
开发者ID:ctron,项目名称:milo-ece2017,代码行数:13,代码来源:Read.java


示例12: write

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
public static CompletableFuture<StatusCode> write(
        final OpcUaClient client,
        final NodeId nodeId,
        final Object value) {

    return client.writeValue(nodeId, new DataValue(new Variant(value)));
}
 
开发者ID:ctron,项目名称:milo-ece2017,代码行数:8,代码来源:Write.java


示例13: VariableNodeAttributes

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
public VariableNodeAttributes(
    NodeId nodeId,
    QualifiedName browseName,
    LocalizedText displayName,
    LocalizedText description,
    UInteger writeMask,
    UInteger userWriteMask,
    DataValue value,
    NodeId dataType,
    int valueRank,
    UInteger[] arrayDimensions,
    UByte accessLevel,
    UByte userAccessLevel,
    Double minimumSamplingInterval,
    boolean historizing) {

    super(nodeId, NodeClass.Variable, browseName, displayName, description, writeMask, userWriteMask);

    this.value = value;
    this.dataType = dataType;
    this.valueRank = valueRank;
    this.arrayDimensions = arrayDimensions;
    this.accessLevel = accessLevel;
    this.userAccessLevel = userAccessLevel;
    this.minimumSamplingInterval = minimumSamplingInterval;
    this.historizing = historizing;
}
 
开发者ID:digitalpetri,项目名称:uanodeset-parser,代码行数:28,代码来源:VariableNodeAttributes.java


示例14: buildNode587

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
private void buildNode587()
    throws Exception {
    UaVariableNode node = new PropertyNode(this.nodeMap, NodeId.parse("ns=0;i=2103"), new QualifiedName(0, "NewValue"), new LocalizedText("en", "NewValue"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=24"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
    node.addReference(new Reference(NodeId.parse("ns=0;i=2103"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2100"), NodeClass.ObjectType, false));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2103"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=68"), NodeClass.VariableType, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2103"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2103"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2100"), NodeClass.ObjectType, false));
    this.nodeMap.addNode(node);
}
 
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java


示例15: buildNode590

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
private void buildNode590()
    throws Exception {
    UaVariableNode node = new PropertyNode(this.nodeMap, NodeId.parse("ns=0;i=2129"), new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=24"), 1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
    node.addReference(new Reference(NodeId.parse("ns=0;i=2129"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2127"), NodeClass.ObjectType, false));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2129"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=68"), NodeClass.VariableType, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2129"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2129"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2127"), NodeClass.ObjectType, false));
    this.nodeMap.addNode(node);
}
 
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java


示例16: buildNode1002

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
private void buildNode1002()
    throws Exception {
    UaVariableNode node = new PropertyNode(this.nodeMap, NodeId.parse("ns=0;i=11461"), new QualifiedName(0, "ValueAsText"), new LocalizedText("en", "ValueAsText"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=21"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
    node.addReference(new Reference(NodeId.parse("ns=0;i=11461"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=11238"), NodeClass.VariableType, false));
    node.addReference(new Reference(NodeId.parse("ns=0;i=11461"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=68"), NodeClass.VariableType, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=11461"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=11461"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=11238"), NodeClass.VariableType, false));
    this.nodeMap.addNode(node);
}
 
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java


示例17: mapMessage

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
private Message mapMessage(final DataValue value) {
	if (value == null) {
		return null;
	}

	final DefaultMessage result = new DefaultMessage();

	Messages.fillFromDataValue(value, result);

	return result;
}
 
开发者ID:ctron,项目名称:de.dentrassi.camel.milo,代码行数:12,代码来源:MiloClientConsumer.java


示例18: buildNode679

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
private void buildNode679()
    throws Exception {
    UaVariableNode node = new BaseDataVariableNode(this.nodeMap, NodeId.parse("ns=0;i=2259"), new QualifiedName(0, "State"), new LocalizedText("en", "State"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=852"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
    node.addReference(new Reference(NodeId.parse("ns=0;i=2259"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2256"), NodeClass.Variable, false));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2259"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=63"), NodeClass.VariableType, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=2259"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2256"), NodeClass.Variable, false));
    this.nodeMap.addNode(node);
}
 
开发者ID:eclipse,项目名称:milo,代码行数:9,代码来源:UaVariableLoader.java


示例19: buildNode1228

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
private void buildNode1228()
    throws Exception {
    UaVariableNode node = new BaseDataVariableNode(this.nodeMap, NodeId.parse("ns=0;i=12117"), new QualifiedName(0, "HistoryUpdateCount"), new LocalizedText("en", "HistoryUpdateCount"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=871"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
    node.addReference(new Reference(NodeId.parse("ns=0;i=12117"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=12098"), NodeClass.Variable, false));
    node.addReference(new Reference(NodeId.parse("ns=0;i=12117"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=63"), NodeClass.VariableType, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=12117"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=12117"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=12098"), NodeClass.Variable, false));
    this.nodeMap.addNode(node);
}
 
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java


示例20: buildNode54

import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue; //导入依赖的package包/类
private void buildNode54()
    throws Exception {
    UaVariableNode node = new PropertyNode(this.nodeMap, NodeId.parse("ns=0;i=12547"), new QualifiedName(0, "OutputArguments"), new LocalizedText("en", "OutputArguments"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=296"), 1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
    node.addReference(new Reference(NodeId.parse("ns=0;i=12547"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=12546"), NodeClass.Method, false));
    node.addReference(new Reference(NodeId.parse("ns=0;i=12547"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=68"), NodeClass.VariableType, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=12547"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
    node.addReference(new Reference(NodeId.parse("ns=0;i=12547"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=12546"), NodeClass.Method, false));
    String valueXml;
    OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(new StringReader(new String("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><ns2:ListOfExtensionObject xmlns=\"http://opcfoundation.org/BinarySchema/\" xmlns:ns2=\"http://opcfoundation.org/UA/2008/02/Types.xsd\" xmlns:ns3=\"http://opcfoundation.org/UA/2011/03/UANodeSet.xsd\"><ns2:ExtensionObject><ns2:TypeId><ns2:Identifier>i=297</ns2:Identifier></ns2:TypeId><ns2:Body><ns2:Argument><ns2:Name>ApplyChangesRequired</ns2:Name><ns2:DataType><ns2:Identifier>i=1</ns2:Identifier></ns2:DataType><ns2:ValueRank>-1</ns2:ValueRank><ns2:ArrayDimensions/><ns2:Description xsi:nil=\"true\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/></ns2:Argument></ns2:Body></ns2:ExtensionObject></ns2:ListOfExtensionObject>")));
    Object valueObject = decoder.readVariantValue();
    DataValue value = new DataValue(new Variant(valueObject));
    node.setValue(value);
    this.nodeMap.addNode(node);
}
 
开发者ID:eclipse,项目名称:milo,代码行数:15,代码来源:UaVariableLoader.java



注:本文中的org.eclipse.milo.opcua.stack.core.types.builtin.DataValue类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java BeanAttributes类代码示例发布时间:2022-05-22
下一篇:
Java AMLauncherEvent类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap