本文整理汇总了Java中org.eclipse.milo.opcua.sdk.core.ValueRank类的典型用法代码示例。如果您正苦于以下问题:Java ValueRank类的具体用法?Java ValueRank怎么用?Java ValueRank使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ValueRank类属于org.eclipse.milo.opcua.sdk.core包,在下文中一共展示了ValueRank类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: valueRankToString
import org.eclipse.milo.opcua.sdk.core.ValueRank; //导入依赖的package包/类
public static String valueRankToString(int rank) {
Optional<ValueRank> valueRank = Arrays.stream(ValueRank.values()).filter(v -> v.getValue() == rank).findAny();
return String.format("%d (%s)", rank, valueRank.isPresent() ? valueRank.get() : "Unknown");
}
示例2: BasicProperty
import org.eclipse.milo.opcua.sdk.core.ValueRank; //导入依赖的package包/类
public BasicProperty(QualifiedName browseName, NodeId dataType, ValueRank valueRank, Class<T> javaType) {
this(browseName, dataType, valueRank.getValue(), javaType);
}
示例3: addArrayNodes
import org.eclipse.milo.opcua.sdk.core.ValueRank; //导入依赖的package包/类
private void addArrayNodes(UaFolderNode rootNode) {
UaFolderNode arrayTypesFolder = new UaFolderNode(
server.getNodeMap(),
new NodeId(namespaceIndex, "HelloWorld/ArrayTypes"),
new QualifiedName(namespaceIndex, "ArrayTypes"),
LocalizedText.english("ArrayTypes")
);
server.getNodeMap().addNode(arrayTypesFolder);
rootNode.addOrganizes(arrayTypesFolder);
for (Object[] os : STATIC_ARRAY_NODES) {
String name = (String) os[0];
NodeId typeId = (NodeId) os[1];
Object value = os[2];
Object array = Array.newInstance(value.getClass(), 4);
for (int i = 0; i < 4; i++) {
Array.set(array, i, value);
}
Variant variant = new Variant(array);
UaVariableNode node = new UaVariableNode.UaVariableNodeBuilder(server.getNodeMap())
.setNodeId(new NodeId(namespaceIndex, "HelloWorld/ArrayTypes/" + name))
.setAccessLevel(ubyte(AccessLevel.getMask(AccessLevel.READ_WRITE)))
.setUserAccessLevel(ubyte(AccessLevel.getMask(AccessLevel.READ_WRITE)))
.setBrowseName(new QualifiedName(namespaceIndex, name))
.setDisplayName(LocalizedText.english(name))
.setDataType(typeId)
.setTypeDefinition(Identifiers.BaseDataVariableType)
.setValueRank(ValueRank.OneDimension.getValue())
.setArrayDimensions(new UInteger[]{uint(0)})
.build();
node.setValue(new DataValue(variant));
node.setAttributeDelegate(new ValueLoggingDelegate());
server.getNodeMap().addNode(node);
arrayTypesFolder.addOrganizes(node);
}
}