XML address space modeler based on open62541 and python bindings

311 views
Skip to first unread message

Olivier Roulet-Dubonnet

unread,
Nov 13, 2016, 3:53:51 AM11/13/16
to open62541
Hi,

I have written a simple open source GUI address space modeler. I believe this is one of the potentially most useful open source projects I work on, but it has attracted very litlle attention so far, so I thought I should do some advertising around and ask for help-

It is written i python and currently uses internally python-opcua but, in theory,  it should very easy to use other servers like  open62541. I could integrate using command lines but it would be better to use Python bindings... As anyone succeeded in running open62451 from python using ctypes or whatever else?

and btw if anyone knows good way to add tests to qt based applications it would be great. I could not find any good solutions to test gui...

Thanks
Olivier

Olivier Roulet-Dubonnet

unread,
Nov 13, 2016, 4:24:10 AM11/13/16
to open62541
Forgot link to project https://github.com/FreeOpcUa/opcua-modeler

and bug report https://github.com/FreeOpcUa/opcua-modeler/issues/24

and client which shares most of its code with modeller https://github.com/FreeOpcUa/opcua-client-gui


Julius Pfrommer

unread,
Nov 16, 2016, 6:50:24 AM11/16/16
to open62541
Hey Olivier,

the modeller is looking quite nice. I see three ways for using it with open62541.

1.)
We have a nodeset compiler that transforms nodeset XML to C-code for setting up a server.
So with some minor scripting, open62541 servers can be generated from your tool.

Also, there is a work-in-progress PR for splitting our nodeset compiler into a backend with multiple code generation frontends.
https://github.com/open62541/open62541/pull/739

2.)
Our server SDK supports the nodemanagement services.
Since you have a client, there could be a "export to server" button that adds the nodeset to a running server.
But this of course requires that nodes are added in the correct ordering since we doe quite a few consistency checks for the information model.

3.)
In principle, open62541 can be used from python. But that will be rather cumbersome without a wrapper. If you got it to run with ctypes, that would be great to hear!

We will make sure to point to your project.
Maybe we can also pull your library as a dependency into our nodeset compiler. E.g. for parsing.
But I'm not sure about the consequences for licensing and how much that would simplify the nodeset compiler.

Best regards,
Julius

Olivier Roulet-Dubonnet

unread,
Nov 16, 2016, 7:28:12 AM11/16/16
to Julius Pfrommer, open62541
So with some minor scripting, open62541 servers can be generated from your tool.

Yes generating C code from GUI is a good idea


2.)
Our server SDK supports the nodemanagement services.

Good, then my plan should worl
 
Since you have a client, there could be a "export to server" button that adds the nodeset to a running server.

In fact, the modeller has a server running in the background. When nodes are added in UI, they are added to server using nodemanagement service, and report immediately errors if any. What I am proposing is to make a plugin so that your server is used instead of the python one. Thus all your consistency check will be executed online. and if you add xml export support, we will also be able to use it

I found out I am often starting the modeler now to debug issues since it is in fact a server and a graphical client that start together
 


3.)

 If you got it to run with ctypes, that would be great to hear!

I have done that kind of things 100 times before, so I should make it ;-) and tell you.. just need to free up some time...
 

Olivier Roulet-Dubonnet

unread,
Dec 26, 2016, 8:21:11 AM12/26/16
to Julius Pfrommer, open62541
I made a very simple wrapper there https://github.com/oroulet/open62541/tree/0.2/python_wrapper  . At the end I used cython. ctypes did require to much manual work. It should be possible tomake wrapper using only python c api, but cython seems simpler.
Seems to work good enough for my use. need to add a method to import xml, then maybe integrate building into CMakefile
Reply all
Reply to author
Forward
0 new messages