use of org.eclipse.milo.examples.server.methods.GenerateEventMethod 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));
}
Aggregations