Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] new UaVariableNode not working

Mario,

You might look at the official examples instead: https://github.com/eclipse/milo/blob/master/milo-examples/server-examples/src/main/java/org/eclipse/milo/examples/server/ExampleNamespace.java

Everything added by that namespace would be your "own variable" in the server.


On Sat, Jul 13, 2019 at 12:25 AM Mario Neugebauer <mario.neugebauer@xxxxxxxxx> wrote:

Dear all,

I found milo as a very interesting project for OPC UA and I am glad that there is this approach to the OPC topic!

now I am experimenting with the server part of the examples in https://github.com/ctron/milo-ece2017 because I would like to set up a server for offering functionality to other OPC UA clients. I was able to successfully start the server like written in the HOWTO.md. With the UaExpert I can also connect and browse the standard objects and types.

Now I looked deeper into how to hook up individual information in the server. Therefore, in the example I see in the class CustomNamespace that there should be created a new UaVariableNode in line 69 with

final UaVariableNode variable = new UaVariableNode(
        context,
        newNodeId("look-at-me-i-am-right-here-hey-watch-out-woooohoo-here-i-am"),
        newQualifiedName("FooBar"),
        LocalizedText.english("Foo Bar")) {

Back in the UaExpert I was looking for the characteristic nodeId. Unfortunately, it does not show up anywhere. So I went into the debugging mode to find out how this part of the code is executed. Strange thing is, that this part of the code is not reached. Also I found that the method registerItems, in which the code is contained should be called by onStartup. But this method also is not called.

So finally, my question now is: How can I actually hook up own variables into a milo-based server?

Thank you very much in advance!

mario



_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top