use of org.eclipse.milo.opcua.sdk.server.model.nodes.objects.ServerCapabilitiesTypeNode in project milo by eclipse.
the class ObjectNodeLoader method loadNode157.
private void loadNode157() {
ServerCapabilitiesTypeNode node = new ServerCapabilitiesTypeNode(this.context, Identifiers.Server_ServerCapabilities, new QualifiedName(0, "ServerCapabilities"), new LocalizedText("en", "ServerCapabilities"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasProperty, Identifiers.Server_ServerCapabilities_ServerProfileArray.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasProperty, Identifiers.Server_ServerCapabilities_LocaleIdArray.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasProperty, Identifiers.Server_ServerCapabilities_MinSupportedSampleRate.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasProperty, Identifiers.Server_ServerCapabilities_MaxBrowseContinuationPoints.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasProperty, Identifiers.Server_ServerCapabilities_MaxQueryContinuationPoints.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasProperty, Identifiers.Server_ServerCapabilities_MaxHistoryContinuationPoints.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasProperty, Identifiers.Server_ServerCapabilities_SoftwareCertificates.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasProperty, Identifiers.Server_ServerCapabilities_MaxArrayLength.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasProperty, Identifiers.Server_ServerCapabilities_MaxStringLength.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasProperty, Identifiers.Server_ServerCapabilities_MaxByteStringLength.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasComponent, Identifiers.Server_ServerCapabilities_OperationLimits.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasComponent, Identifiers.Server_ServerCapabilities_ModellingRules.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasComponent, Identifiers.Server_ServerCapabilities_AggregateFunctions.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasTypeDefinition, Identifiers.ServerCapabilitiesType.expanded(), true));
node.addReference(new Reference(Identifiers.Server_ServerCapabilities, Identifiers.HasComponent, Identifiers.Server.expanded(), false));
this.nodeManager.addNode(node);
}
use of org.eclipse.milo.opcua.sdk.server.model.nodes.objects.ServerCapabilitiesTypeNode in project milo by eclipse.
the class ObjectNodeLoader method loadNode151.
private void loadNode151() {
ServerCapabilitiesTypeNode node = new ServerCapabilitiesTypeNode(this.context, Identifiers.ServerType_ServerCapabilities, new QualifiedName(0, "ServerCapabilities"), new LocalizedText("en", "ServerCapabilities"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasProperty, Identifiers.ServerType_ServerCapabilities_ServerProfileArray.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasProperty, Identifiers.ServerType_ServerCapabilities_LocaleIdArray.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasProperty, Identifiers.ServerType_ServerCapabilities_MinSupportedSampleRate.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasProperty, Identifiers.ServerType_ServerCapabilities_MaxBrowseContinuationPoints.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasProperty, Identifiers.ServerType_ServerCapabilities_MaxQueryContinuationPoints.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasProperty, Identifiers.ServerType_ServerCapabilities_MaxHistoryContinuationPoints.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasProperty, Identifiers.ServerType_ServerCapabilities_SoftwareCertificates.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasComponent, Identifiers.ServerType_ServerCapabilities_ModellingRules.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasComponent, Identifiers.ServerType_ServerCapabilities_AggregateFunctions.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasTypeDefinition, Identifiers.ServerCapabilitiesType.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));
node.addReference(new Reference(Identifiers.ServerType_ServerCapabilities, Identifiers.HasComponent, Identifiers.ServerType.expanded(), false));
this.nodeManager.addNode(node);
}
use of org.eclipse.milo.opcua.sdk.server.model.nodes.objects.ServerCapabilitiesTypeNode in project milo by eclipse.
the class OpcUaNamespace method configureServerObject.
private void configureServerObject() {
ServerTypeNode serverTypeNode = (ServerTypeNode) getNodeManager().get(Identifiers.Server);
assert serverTypeNode != null;
// This Node is optional and we don't support it, so delete it entirely.
serverTypeNode.getNamespacesNode().delete();
serverTypeNode.getNamespaceArrayNode().getFilterChain().addLast(AttributeFilters.getValue(ctx -> new DataValue(new Variant(server.getNamespaceTable().toArray()))));
serverTypeNode.getServerArrayNode().getFilterChain().addLast(AttributeFilters.getValue(ctx -> new DataValue(new Variant(server.getServerTable().toArray()))));
serverTypeNode.setAuditing(false);
serverTypeNode.getServerDiagnosticsNode().setEnabledFlag(false);
serverTypeNode.setServiceLevel(ubyte(255));
ServerStatusTypeNode serverStatus = serverTypeNode.getServerStatusNode();
BuildInfo buildInfo = server.getConfig().getBuildInfo();
serverStatus.setBuildInfo(buildInfo);
serverStatus.getBuildInfoNode().setBuildDate(buildInfo.getBuildDate());
serverStatus.getBuildInfoNode().setBuildNumber(buildInfo.getBuildNumber());
serverStatus.getBuildInfoNode().setManufacturerName(buildInfo.getManufacturerName());
serverStatus.getBuildInfoNode().setProductName(buildInfo.getProductName());
serverStatus.getBuildInfoNode().setProductUri(buildInfo.getProductUri());
serverStatus.getBuildInfoNode().setSoftwareVersion(buildInfo.getSoftwareVersion());
serverStatus.setCurrentTime(DateTime.now());
serverStatus.setSecondsTillShutdown(uint(0));
serverStatus.setShutdownReason(LocalizedText.NULL_VALUE);
serverStatus.setState(ServerState.Running);
serverStatus.setStartTime(DateTime.now());
serverStatus.getCurrentTimeNode().getFilterChain().addLast(AttributeFilters.getValue(ctx -> new DataValue(new Variant(DateTime.now()))));
serverStatus.getFilterChain().addLast(AttributeFilters.getValue(ctx -> {
ServerStatusTypeNode serverStatusNode = (ServerStatusTypeNode) ctx.getNode();
ExtensionObject xo = ExtensionObject.encode(server.getSerializationContext(), new ServerStatusDataType(serverStatusNode.getStartTime(), DateTime.now(), serverStatusNode.getState(), serverStatusNode.getBuildInfo(), serverStatusNode.getSecondsTillShutdown(), serverStatusNode.getShutdownReason()));
return new DataValue(new Variant(xo));
}));
final OpcUaServerConfigLimits limits = server.getConfig().getLimits();
ServerCapabilitiesTypeNode serverCapabilities = serverTypeNode.getServerCapabilitiesNode();
serverCapabilities.setServerProfileArray(new String[] { "http://opcfoundation.org/UA-Profile/Server/StandardUA" });
serverCapabilities.setLocaleIdArray(new String[] { Locale.ENGLISH.getLanguage() });
serverCapabilities.setMaxArrayLength(limits.getMaxArrayLength());
serverCapabilities.setMaxStringLength(limits.getMaxStringLength());
serverCapabilities.setMaxByteStringLength(limits.getMaxByteStringLength());
serverCapabilities.setMaxBrowseContinuationPoints(limits.getMaxBrowseContinuationPoints());
serverCapabilities.setMaxHistoryContinuationPoints(limits.getMaxHistoryContinuationPoints());
serverCapabilities.setMaxQueryContinuationPoints(limits.getMaxQueryContinuationPoints());
serverCapabilities.setMinSupportedSampleRate(limits.getMinSupportedSampleRate());
OperationLimitsTypeNode limitsNode = serverCapabilities.getOperationLimitsNode();
limitsNode.setMaxMonitoredItemsPerCall(limits.getMaxMonitoredItemsPerCall());
limitsNode.setMaxNodesPerBrowse(limits.getMaxNodesPerBrowse());
limitsNode.setMaxNodesPerHistoryReadData(limits.getMaxNodesPerHistoryReadData());
limitsNode.setMaxNodesPerHistoryReadEvents(limits.getMaxNodesPerHistoryReadEvents());
limitsNode.setMaxNodesPerHistoryUpdateData(limits.getMaxNodesPerHistoryUpdateData());
limitsNode.setMaxNodesPerHistoryUpdateEvents(limits.getMaxNodesPerHistoryUpdateEvents());
limitsNode.setMaxNodesPerMethodCall(limits.getMaxNodesPerMethodCall());
limitsNode.setMaxNodesPerNodeManagement(limits.getMaxNodesPerNodeManagement());
limitsNode.setMaxNodesPerRead(limits.getMaxNodesPerRead());
limitsNode.setMaxNodesPerRegisterNodes(limits.getMaxNodesPerRegisterNodes());
limitsNode.setMaxNodesPerTranslateBrowsePathsToNodeIds(limits.getMaxNodesPerTranslateBrowsePathsToNodeIds());
limitsNode.setMaxNodesPerWrite(limits.getMaxNodesPerWrite());
serverTypeNode.getServerRedundancyNode().setRedundancySupport(RedundancySupport.None);
configureGetMonitoredItems();
configureResendData();
}
Aggregations