use of org.eclipse.milo.opcua.sdk.server.nodes.UaMethodNode in project milo by eclipse.
the class ExampleNamespace method addGenerateEventMethod.
private void addGenerateEventMethod(UaFolderNode folderNode) {
UaMethodNode methodNode = UaMethodNode.builder(getNodeContext()).setNodeId(newNodeId("HelloWorld/generateEvent(eventTypeId)")).setBrowseName(newQualifiedName("generateEvent(eventTypeId)")).setDisplayName(new LocalizedText(null, "generateEvent(eventTypeId)")).setDescription(LocalizedText.english("Generate an Event with the TypeDefinition indicated by eventTypeId.")).build();
GenerateEventMethod generateEventMethod = new GenerateEventMethod(methodNode);
methodNode.setInputArguments(generateEventMethod.getInputArguments());
methodNode.setOutputArguments(generateEventMethod.getOutputArguments());
methodNode.setInvocationHandler(generateEventMethod);
getNodeManager().addNode(methodNode);
methodNode.addReference(new Reference(methodNode.getNodeId(), Identifiers.HasComponent, folderNode.getNodeId().expanded(), false));
}
use of org.eclipse.milo.opcua.sdk.server.nodes.UaMethodNode in project milo by eclipse.
the class MethodNodeLoader method loadNode116.
private void loadNode116() {
UaMethodNode node = new UaMethodNode(this.context, Identifiers.ProgramStateMachineType_Resume, new QualifiedName(0, "Resume"), new LocalizedText("en", "Resume"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), true, true);
node.addReference(new Reference(Identifiers.ProgramStateMachineType_Resume, Identifiers.HasCause, Identifiers.ProgramStateMachineType_SuspendedToRunning.expanded(), false));
node.addReference(new Reference(Identifiers.ProgramStateMachineType_Resume, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));
node.addReference(new Reference(Identifiers.ProgramStateMachineType_Resume, Identifiers.HasComponent, Identifiers.ProgramStateMachineType.expanded(), false));
this.nodeManager.addNode(node);
}
use of org.eclipse.milo.opcua.sdk.server.nodes.UaMethodNode in project milo by eclipse.
the class MethodNodeLoader method loadNode13.
private void loadNode13() {
UaMethodNode node = new UaMethodNode(this.context, Identifiers.ServerConfiguration_CertificateGroups_DefaultApplicationGroup_TrustList_AddCertificate, new QualifiedName(0, "AddCertificate"), new LocalizedText("en", "AddCertificate"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), true, true);
node.addReference(new Reference(Identifiers.ServerConfiguration_CertificateGroups_DefaultApplicationGroup_TrustList_AddCertificate, Identifiers.HasProperty, Identifiers.ServerConfiguration_CertificateGroups_DefaultApplicationGroup_TrustList_AddCertificate_InputArguments.expanded(), true));
node.addReference(new Reference(Identifiers.ServerConfiguration_CertificateGroups_DefaultApplicationGroup_TrustList_AddCertificate, Identifiers.HasComponent, Identifiers.ServerConfiguration_CertificateGroups_DefaultApplicationGroup_TrustList.expanded(), false));
this.nodeManager.addNode(node);
}
use of org.eclipse.milo.opcua.sdk.server.nodes.UaMethodNode in project milo by eclipse.
the class MethodNodeLoader method loadNode123.
private void loadNode123() {
UaMethodNode node = new UaMethodNode(this.context, Identifiers.Server_GetMonitoredItems, new QualifiedName(0, "GetMonitoredItems"), new LocalizedText("en", "GetMonitoredItems"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), true, true);
node.addReference(new Reference(Identifiers.Server_GetMonitoredItems, Identifiers.HasProperty, Identifiers.Server_GetMonitoredItems_InputArguments.expanded(), true));
node.addReference(new Reference(Identifiers.Server_GetMonitoredItems, Identifiers.HasProperty, Identifiers.Server_GetMonitoredItems_OutputArguments.expanded(), true));
node.addReference(new Reference(Identifiers.Server_GetMonitoredItems, Identifiers.HasComponent, Identifiers.Server.expanded(), false));
this.nodeManager.addNode(node);
}
use of org.eclipse.milo.opcua.sdk.server.nodes.UaMethodNode in project milo by eclipse.
the class OpcUaNamespace method configureGetMonitoredItems.
private void configureGetMonitoredItems() {
UaNode node = getNodeManager().get(Identifiers.Server_GetMonitoredItems);
if (node instanceof UaMethodNode) {
UaMethodNode methodNode = (UaMethodNode) node;
configureMethodNode(methodNode, GetMonitoredItemsMethodImpl::new);
} else {
logger.warn("GetMonitoredItems UaMethodNode not found.");
}
}
Aggregations