本文整理汇总了Java中org.eclipse.milo.opcua.stack.core.types.builtin.Variant类的典型用法代码示例。如果您正苦于以下问题:Java Variant类的具体用法?Java Variant怎么用?Java Variant使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Variant类属于org.eclipse.milo.opcua.stack.core.types.builtin包,在下文中一共展示了Variant类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: parseValue
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的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
示例2: getPrimitiveArrayVariants
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
@DataProvider(name = "PrimitiveArrayVariantProvider")
public Object[][] getPrimitiveArrayVariants() {
return new Object[][]{
{new Variant(new int[]{0, 1, 2, 3}),
new Variant(new Integer[]{0, 1, 2, 3})},
{new Variant(new int[][]{{0, 1}, {2, 3}}),
new Variant(new Integer[][]{{0, 1}, {2, 3}})},
{new Variant(new long[]{0L, 1L, 2L, 3L}),
new Variant(new Long[]{0L, 1L, 2L, 3L})},
{new Variant(new long[][]{{0L, 1L}, {2L, 3L}}),
new Variant(new Long[][]{{0L, 1L}, {2L, 3L}})}
};
}
开发者ID:eclipse,项目名称:milo,代码行数:17,代码来源:VariantSerializationTest.java
示例3: toString
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
public static String toString(final Variant value) {
return String.format("%s : %s",
value.getDataType() // get data type
.map(id -> NodeIds.lookup(id).orElse(id.toParseableString())) // map to ID or use node id
.orElse("<unknown>"), // default to "unknown"
value.getValue());
}
开发者ID:ctron,项目名称:milo-ece2017,代码行数:9,代码来源:Values.java
示例4: write
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的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
示例5: buildNode189
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode189()
throws Exception {
UaVariableNode node = new BaseDataVariableNode(this.nodeMap, NodeId.parse("ns=0;i=12844"), new QualifiedName(0, "SetPublishingModeCount"), new LocalizedText("en", "SetPublishingModeCount"), 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=12844"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=12816"), NodeClass.Variable, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=12844"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=63"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=12844"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=12844"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=12816"), NodeClass.Variable, false));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java
示例6: buildNode234
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode234()
throws Exception {
UaVariableNode node = new DataTypeDescriptionNode(this.nodeMap, NodeId.parse("ns=0;i=8855"), new QualifiedName(0, "SessionDiagnosticsDataType"), new LocalizedText("en", "SessionDiagnosticsDataType"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=12"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
node.addReference(new Reference(NodeId.parse("ns=0;i=8855"), NodeId.parse("ns=0;i=39"), ExpandedNodeId.parse("svr=0;i=866"), NodeClass.Object, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=8855"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=8252"), NodeClass.Variable, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=8855"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=69"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=8855"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=8252"), NodeClass.Variable, false));
String valueXml;
OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(new StringReader(new String("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><ns2:String 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\">//xs:element[@name='SessionDiagnosticsDataType']</ns2:String>")));
Object valueObject = decoder.readVariantValue();
DataValue value = new DataValue(new Variant(valueObject));
node.setValue(value);
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:15,代码来源:UaVariableLoader.java
示例7: buildNode397
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode397()
throws Exception {
UaVariableNode node = new PropertyNode(this.nodeMap, NodeId.parse("ns=0;i=13836"), new QualifiedName(0, "LastUpdateTime"), new LocalizedText("en", "LastUpdateTime"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=294"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
node.addReference(new Reference(NodeId.parse("ns=0;i=13836"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=13815"), NodeClass.Object, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=13836"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=68"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=13836"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=13836"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=13815"), NodeClass.Object, false));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java
示例8: buildNode358
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode358()
throws Exception {
UaVariableNode node = new FiniteStateVariableNode(this.nodeMap, NodeId.parse("ns=0;i=9456"), new QualifiedName(0, "CurrentState"), new LocalizedText("en", "CurrentState"), 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=9456"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=9455"), NodeClass.Object, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=9456"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=9457"), NodeClass.Variable, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=9456"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=2760"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=9456"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=9456"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=9455"), NodeClass.Object, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=9456"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=9457"), NodeClass.Variable, true));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:12,代码来源:UaVariableLoader.java
示例9: buildNode249
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode249()
throws Exception {
UaVariableNode node = new BaseDataVariableNode(this.nodeMap, NodeId.parse("ns=0;i=8893"), new QualifiedName(0, "DiscardedMessageCount"), new LocalizedText("en", "DiscardedMessageCount"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=7"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
node.addReference(new Reference(NodeId.parse("ns=0;i=8893"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2172"), NodeClass.VariableType, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=8893"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=63"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=8893"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=8893"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2172"), NodeClass.VariableType, false));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java
示例10: buildNode744
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode744()
throws Exception {
UaVariableNode node = new PropertyNode(this.nodeMap, NodeId.parse("ns=0;i=2395"), new QualifiedName(0, "RecycleCount"), new LocalizedText("en", "RecycleCount"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=6"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
node.addReference(new Reference(NodeId.parse("ns=0;i=2395"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2391"), NodeClass.ObjectType, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=2395"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=68"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2395"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2395"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2391"), NodeClass.ObjectType, false));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java
示例11: setQuality
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
@Override
public synchronized void setQuality(StatusCode quality) {
if (lastValue == null) {
setValue(new DataValue(Variant.NULL_VALUE, quality, DateTime.now(), DateTime.now()));
} else {
DataValue value = new DataValue(
lastValue.getValue(),
quality,
DateTime.now(),
DateTime.now());
setValue(value);
}
}
开发者ID:eclipse,项目名称:milo,代码行数:15,代码来源:MonitoredDataItem.java
示例12: buildNode175
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode175()
throws Exception {
UaVariableNode node = new BaseDataVariableNode(this.nodeMap, NodeId.parse("ns=0;i=12830"), new QualifiedName(0, "TotalRequestCount"), new LocalizedText("en", "TotalRequestCount"), 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=12830"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=12816"), NodeClass.Variable, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=12830"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=63"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=12830"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=12830"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=12816"), NodeClass.Variable, false));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java
示例13: buildNode1247
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode1247()
throws Exception {
UaVariableNode node = new BaseDataVariableNode(this.nodeMap, NodeId.parse("ns=0;i=12136"), new QualifiedName(0, "BrowseNextCount"), new LocalizedText("en", "BrowseNextCount"), 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=12136"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=12098"), NodeClass.Variable, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=12136"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=63"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=12136"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=12136"), 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
示例14: buildNode593
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode593()
throws Exception {
UaVariableNode node = new BaseDataVariableNode(this.nodeMap, NodeId.parse("ns=0;i=2140"), new QualifiedName(0, "CurrentTime"), new LocalizedText("en", "CurrentTime"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=294"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
node.addReference(new Reference(NodeId.parse("ns=0;i=2140"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2138"), NodeClass.VariableType, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=2140"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=63"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2140"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2140"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2138"), NodeClass.VariableType, false));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java
示例15: buildNode200
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode200()
throws Exception {
UaVariableNode node = new BaseDataVariableNode(this.nodeMap, NodeId.parse("ns=0;i=12855"), new QualifiedName(0, "TranslateBrowsePathsToNodeIdsCount"), new LocalizedText("en", "TranslateBrowsePathsToNodeIdsCount"), 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=12855"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=12816"), NodeClass.Variable, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=12855"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=63"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=12855"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=12855"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=12816"), NodeClass.Variable, false));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java
示例16: buildNode555
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode555()
throws Exception {
UaVariableNode node = new PropertyNode(this.nodeMap, NodeId.parse("ns=0;i=2044"), new QualifiedName(0, "SourceNode"), new LocalizedText("en", "SourceNode"), new LocalizedText("en", "The source of the event."), UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=17"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
node.addReference(new Reference(NodeId.parse("ns=0;i=2044"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2041"), NodeClass.ObjectType, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=2044"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=68"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2044"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2044"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2041"), NodeClass.ObjectType, false));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableLoader.java
示例17: buildNode272
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode272()
throws Exception {
UaVariableNode node = new ConditionVariableNode(this.nodeMap, NodeId.parse("ns=0;i=9020"), new QualifiedName(0, "Quality"), new LocalizedText("en", "Quality"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=19"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
node.addReference(new Reference(NodeId.parse("ns=0;i=9020"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2782"), NodeClass.ObjectType, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=9020"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=9021"), NodeClass.Variable, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=9020"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=9002"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=9020"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=9020"), NodeId.parse("ns=0;i=47"), ExpandedNodeId.parse("svr=0;i=2782"), NodeClass.ObjectType, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=9020"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=9021"), NodeClass.Variable, true));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:12,代码来源:UaVariableLoader.java
示例18: buildNode751
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode751()
throws Exception {
UaVariableNode node = new PropertyNode(this.nodeMap, NodeId.parse("ns=0;i=2405"), new QualifiedName(0, "StateNumber"), new LocalizedText("en", "StateNumber"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=7"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
node.addReference(new Reference(NodeId.parse("ns=0;i=2405"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2404"), NodeClass.Object, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=2405"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=68"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2405"), NodeId.parse("ns=0;i=37"), ExpandedNodeId.parse("svr=0;i=78"), NodeClass.Object, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2405"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2404"), NodeClass.Object, false));
String valueXml;
OpcUaXmlStreamDecoder decoder = new OpcUaXmlStreamDecoder(new StringReader(new String("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><ns2:UInt32 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\">3</ns2:UInt32>")));
Object valueObject = decoder.readVariantValue();
DataValue value = new DataValue(new Variant(valueObject));
node.setValue(value);
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:15,代码来源:UaVariableLoader.java
示例19: buildNode1148
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode1148()
throws Exception {
UaVariableNode node = new PropertyNode(this.nodeMap, NodeId.parse("ns=0;i=3709"), new QualifiedName(0, "RedundancySupport"), new LocalizedText("en", "RedundancySupport"), new LocalizedText("en", "Indicates what style of redundancy is supported by the server."), UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=851"), -1, new UInteger[]{}, UByte.valueOf(1), UByte.valueOf(1), 0.0D, false);
node.addReference(new Reference(NodeId.parse("ns=0;i=3709"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2296"), NodeClass.Object, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=3709"), NodeId.parse("ns=0;i=40"), ExpandedNodeId.parse("svr=0;i=68"), NodeClass.VariableType, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=3709"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2296"), NodeClass.Object, false));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:9,代码来源:UaVariableLoader.java
示例20: buildNode21
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant; //导入依赖的package包/类
private void buildNode21() {
UaVariableTypeNode node = new UaVariableTypeNode(this.nodeMap, NodeId.parse("ns=0;i=2373"), new QualifiedName(0, "TwoStateDiscreteType"), new LocalizedText("en", "TwoStateDiscreteType"), LocalizedText.NULL_VALUE, UInteger.valueOf(0L), UInteger.valueOf(0L), new DataValue(Variant.NULL_VALUE), NodeId.parse("ns=0;i=1"), -2, new UInteger[]{}, false);
node.addReference(new Reference(NodeId.parse("ns=0;i=2373"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2374"), NodeClass.Variable, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2373"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2375"), NodeClass.Variable, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2373"), NodeId.parse("ns=0;i=45"), ExpandedNodeId.parse("svr=0;i=2372"), NodeClass.VariableType, false));
node.addReference(new Reference(NodeId.parse("ns=0;i=2373"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2374"), NodeClass.Variable, true));
node.addReference(new Reference(NodeId.parse("ns=0;i=2373"), NodeId.parse("ns=0;i=46"), ExpandedNodeId.parse("svr=0;i=2375"), NodeClass.Variable, true));
this.nodeMap.addNode(node);
}
开发者ID:eclipse,项目名称:milo,代码行数:10,代码来源:UaVariableTypeLoader.java
注:本文中的org.eclipse.milo.opcua.stack.core.types.builtin.Variant类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论