/*
* Copyright (c) 2019 the Eclipse Milo Authors
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.eclipse.milo.opcua.sdk.server.namespaces.loader;
import java.io.IOException;
import java.io.StringReader;
import org.eclipse.milo.opcua.sdk.core.Reference;
import org.eclipse.milo.opcua.sdk.server.api.NodeManager;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.BaseDataVariableTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.BuildInfoTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.ConditionVariableTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.DataTypeDescriptionTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.DataTypeDictionaryTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.FiniteStateVariableTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.FiniteTransitionVariableTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.ProgramDiagnosticTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.PropertyTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SamplingIntervalDiagnosticsArrayTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SamplingIntervalDiagnosticsTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.ServerDiagnosticsSummaryTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.ServerStatusTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.ServerVendorCapabilityTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionDiagnosticsArrayTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionDiagnosticsVariableTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsArrayTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SessionSecurityDiagnosticsTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.StateVariableTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SubscriptionDiagnosticsArrayTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.SubscriptionDiagnosticsTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.TransitionVariableTypeNode;
import org.eclipse.milo.opcua.sdk.server.model.nodes.variables.TwoStateVariableTypeNode;
import org.eclipse.milo.opcua.sdk.server.nodes.UaNode;
import org.eclipse.milo.opcua.sdk.server.nodes.UaNodeContext;
import org.eclipse.milo.opcua.stack.core.Identifiers;
import org.eclipse.milo.opcua.stack.core.serialization.OpcUaXmlStreamDecoder;
import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue;
import org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText;
import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
import org.eclipse.milo.opcua.stack.core.types.builtin.QualifiedName;
import org.eclipse.milo.opcua.stack.core.types.builtin.Variant;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UByte;
import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
import org.xml.sax.SAXException;
class VariableNodeLoader {
private final UaNodeContext context;
private final NodeManager<UaNode> nodeManager;
VariableNodeLoader(UaNodeContext context, NodeManager<UaNode> nodeManager) {
this.context = context;
this.nodeManager = nodeManager;
}
private void loadNode0() throws IOException, SAXException {
DataTypeDescriptionTypeNode node = new DataTypeDescriptionTypeNode(this.context, Identifiers.OpcUa_BinarySchema_RedundantServerDataType, new QualifiedName(0, "RedundantServerDataType"), new LocalizedText("en", "RedundantServerDataType"), 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_RedundantServerDataType, Identifiers.HasTypeDefinition, Identifiers.DataTypeDescriptionType.expanded(), true));
node.addReference(new Reference(Identifiers.OpcUa_BinarySchema_RedundantServerDataType, Identifiers.HasComponent, Identifiers.OpcUa_BinarySchema.expanded(), false));
StringBuilder sb = new StringBuilder();
sb.append("<String xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\">RedundantServerDataType</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);
}
private void loadNode1() throws IOException, SAXException {
DataTypeDescriptionTypeNode node = new DataTypeDescriptionTypeNode(this.context, Identifiers.OpcUa_BinarySchema_SamplingIntervalDiagnosticsDataType, new QualifiedName(0, "SamplingIntervalDiagnosticsDataType"), new LocalizedText("en", "SamplingIntervalDiagnosticsDataType"), 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_SamplingIntervalDiagnosticsDataType, Identifiers.HasTypeDefinition, Identifiers.DataTypeDescriptionType.expanded(), true));
node.addReference(new Reference(Identifiers.OpcUa_BinarySchema_SamplingIntervalDiagnosticsDataType, Identifiers.HasComponent, Identifiers.OpcUa_BinarySchema.expanded(), false));
StringBuilder sb = new StringBuilder();
sb.append("<String xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\">SamplingIntervalDiagnosticsDataType</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);
}
private void loadNode2() throws IOException, SAXException {
DataTypeDescriptionTypeNode node = new DataTypeDescriptionTypeNode(this.context, Identifiers.OpcUa_BinarySchema_ServerDiagnosticsSummaryDataType, new QualifiedName(0, "ServerDiagnosticsSummaryDataType"), new LocalizedText("en", "ServerDiagnosticsSummaryDataType"), 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_ServerDiagnosticsSummaryDataType, Identifiers.HasTypeDefinition, Identifiers.DataTypeDescriptionType.expanded(), true));
node.addReference(new Reference(Identifiers.OpcUa_BinarySchema_ServerDiagnosticsSummaryDataType, Identifiers.HasComponent, Identifiers.OpcUa_BinarySchema.expanded(), false));
StringBuilder sb = new StringBuilder();
sb.append("<String xmlns=\"http://opcfoundation.org/UA/2008/02/Types.xsd\">ServerDiagnosticsSummaryDataType</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);
}
p
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
蚀米洛 Milo是OPC UA的开源实现。 它包括一个高性能堆栈(通道,序列化,数据结构,安全性)以及在堆栈顶部构建的客户端和服务器SDK。 堆栈溢出标签: 邮件列表: : Maven 建筑米洛 使用JDK 8 ,从项目根目录运行mvn clean install 。 发布 版本发布到Maven Central,快照发布到Sonatype。 OPC UA客户端SDK < dependency> < groupId>org.eclipse.milo</ groupId> < artifactId>sdk-client</ artifactId> <
资源详情
资源评论
资源推荐
收起资源包目录
milo:Eclipse Milo:trade_mark:-OPC UA的开源实现(IEC 62541) (1600个子文件)
openssl.cnf 5KB
.gitignore 197B
notice.html 9KB
VariableNodeLoader.java 2.1MB
Identifiers.java 514KB
ObjectNodeLoader.java 308KB
CefactEngineeringUnits.java 298KB
DataTypeInitializer.java 262KB
DataTypeDictionaryInitializer.java 261KB
MethodNodeLoader.java 154KB
SessionDiagnosticsVariableType.java 137KB
ObjectTypeNodeLoader.java 121KB
SessionDiagnosticsVariableTypeNode.java 118KB
SubscriptionDiagnosticsType.java 97KB
SubscriptionDiagnosticsTypeNode.java 79KB
DataTypeNodeLoader.java 66KB
AddressSpace.java 65KB
SubscriptionManager.java 55KB
ManagedSubscription.java 54KB
VariableTypeNodeLoader.java 54KB
StatusCodes.java 53KB
HistoryServerCapabilitiesType.java 49KB
SessionFsmFactory.java 46KB
SessionManager.java 45KB
OpcUaXmlStreamDecoder.java 45KB
ProgramStateMachineType.java 43KB
ObjectTypeInitializer.java 43KB
ObjectTypeInitializer.java 43KB
OperationLimitsType.java 42KB
UaNode.java 42KB
ExampleNamespace.java 40KB
OpcUaClient.java 39KB
OpcUaBinaryStreamDecoder.java 38KB
ServerDiagnosticsSummaryType.java 38KB
HistoryServerCapabilitiesTypeNode.java 37KB
OpcUaBinaryStreamEncoder.java 37KB
UaVariableNode.java 37KB
ServerCapabilitiesType.java 37KB
SessionDiagnosticsVariableTypeNode.java 37KB
Subscription.java 36KB
ProgramStateMachineTypeNode.java 35KB
ProgramDiagnosticType.java 34KB
OpcUaSubscriptionManager.java 34KB
OpcUaClientIT.java 33KB
ServerDiagnosticsSummaryTypeNode.java 32KB
OperationLimitsTypeNode.java 32KB
ConditionType.java 31KB
AddressSpaceComposite.java 30KB
CertificateValidationUtil.java 30KB
UaStackServer.java 29KB
ServerCapabilitiesTypeNode.java 29KB
UascClientMessageHandler.java 29KB
BaseEventType.java 28KB
HistoricalDataConfigurationType.java 28KB
SessionSecurityDiagnosticsType.java 28KB
ProgramDiagnosticTypeNode.java 27KB
SubscriptionDiagnosticsTypeNode.java 26KB
DialogConditionType.java 26KB
UaVariableNode.java 25KB
SessionDiagnosticsDataType.java 25KB
NamespaceMetadataType.java 25KB
ConditionTypeNode.java 25KB
SessionSecurityDiagnosticsTypeNode.java 24KB
UaObjectNode.java 24KB
ServerType.java 24KB
DataTypeDictionaryReader.java 24KB
UaNode.java 23KB
ClientServerTest.java 23KB
HistoricalDataConfigurationTypeNode.java 23KB
BrowseHelper.java 22KB
BaseEventTypeNode.java 22KB
UascServerAsymmetricHandler.java 22KB
EventContentFilter.java 22KB
AbstractCodec.java 21KB
ExpandedNodeId.java 21KB
AuditOpenSecureChannelEventType.java 21KB
NamespaceMetadataTypeNode.java 21KB
DialogConditionTypeNode.java 20KB
ChunkDecoder.java 20KB
AlarmConditionType.java 20KB
SessionDiagnosticsVariable.java 20KB
NodeFactory.java 20KB
ServerTypeNode.java 19KB
ManagedItem.java 19KB
OpcUaNamespace.java 19KB
DefaultTrustListManager.java 19KB
ServerStatusType.java 18KB
BuildInfoType.java 18KB
AddressSpaceFilter.java 18KB
AuditOpenSecureChannelEventTypeNode.java 17KB
ChunkSerializationTest.java 17KB
DataTypeDictionaryManager.java 17KB
OpcUaSubscription.java 17KB
ChunkEncoder.java 17KB
AuditHistoryEventUpdateEventType.java 17KB
ServerStatusTypeNode.java 17KB
UaObjectNode.java 17KB
AlarmConditionTypeNode.java 17KB
ArrayItemType.java 16KB
TwoStateVariableType.java 16KB
共 1600 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16
HMI前线
- 粉丝: 22
- 资源: 4590
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- VMware 是一款功能强大的虚拟化软件,它允许用户在一台物理计算机上同时运行多个操作系统
- 31万条全国医药价格与采购数据.xlsx
- SQL注入详解,SQL 注入是一种常见的网络安全漏洞,攻击者通过在输入数据中插入恶意的 SQL 语句,欺骗应用程序执行这些恶意语句,从而获取、修改或删除数据库中的数据,甚至控制数据库服务器
- 用C语言实现哈夫曼编码:从原理到实现的详细解析
- py爱心代码高级粒子!!
- 爱心代码高级,拿去博得喜欢的人的欢心吧
- DZ-ID005-V1.0-20240911-原理图.zip
- 用C语言实现字符串去重功能
- java实现对ZKFBioFS200半导体指纹采集器对接
- NO.3学习样本,请参考第3章的内容配合学习使用
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1