Code Monkey home page Code Monkey logo

opcua-modeler's Introduction

Open Source C++ OPC-UA Server and Client Library

Build Status

LGPL OPC-UA server and client library written in C++ and with a lot of code auto-generated from xml specification using python.

Python bindings can be found in the python directory.

code: https://github.com/FreeOpcUa/freeopcua
website: http://freeopcua.github.io/
mailing list: https://groups.google.com/forum/#!forum/freeopcua

Currently supported:

  • read, write, browse
  • translateBrowsePathToNodeId
  • DataChange Events
  • Events
  • Subscriptions
  • complete opc-ua address space generated from xml specification
  • Method call from client
  • Linux and Windows(VS13) support

Work in progress

  • StatusChange Events
  • Filtering
  • Documentation
  • Automatic generation of binary protocol from OPC schema files
    • Methods on server side

Not implemented yet (patches are welcome)

  • History
  • Security: Authentication, Certificates handling, ..

Usage

Documentation is sparse but several examples are availables:

C++ examples in https://github.com/FreeOpcUa/freeopcua/tree/master/src/examples
Python examples in https://github.com/FreeOpcUa/freeopcua/tree/master/python/src
https://github.com/FreeOpcUa/freeopcua/blob/master/python/tests/test_highlevel.py can also be a usefull source of information

Example minimal client in python

  client = opcua.Client(False)
  client.connect("opc.tcp://10.10.10.4:4841/OPCUA/AnyServer/")

  objects = client.get_objects_node()
  print("Children of objects are: ", objects.get_children())

  var = objects.get_child(["3:AnObject", "AVariable"])
  print("Value of variable is: ", var.get_value())
  
  client.disconnect()

Tested clients and servers with default settings

  • uaexperts client application
  • node-opcua (client and server tested)
  • ignition server
  • Beckhoff PLC (seems to be some issues, but mostly working)
  • ignition open-source sdk (server tested)
  • quickopc client sdk
  • prosysopc demo client
  • prosysopc demo server
  • unified automation sdk (client and server tested)

Installation

An environment supporting c++11 is necessary: gcc-4.8+, clang 3.4 or VS2013

Ubuntu (Debians)

There is a script debian.soft in the root for installing all required soft to build all repositories.

Using GNU autotools

autoreconf -f -i
./configure --prefix=/path/to/server
make 
make check
make install
cd /path/to/server
LD_LIBRARY_PATH=./lib ./bin/opcuaserver

Using cmake

Linux

mkdir build
cd build
cmake ..
make
make test

Windows

Boost and libxml2 are necessary

rem compiling
mkdir build
cd build
cmake .. -DBOOST_ROOT=c:\boost_1_56
cmake --build
ctest -C Debug
cd bin\Debug
example_server.exe

Docker

docker build .

Developement

C++ style

  • 2 spaces not tab
  • CamelCase
  • Local variables start with small letter
  • Global/member variables starts with capital letters
  • Use provided automatic formatter (Artistic Style) by invoking ./restyle

python code and API should follows PEP8 (many places should be fixed)

Address space and most protocol code are auto-generated and should not be modified directly. Every auto-generated file starts with a mention that it should not be edited. There's a lot of old hand written protocol code left that should use the auto-generated code. This is done by uncommenting struct names in schemas/generate_protocol.py and removing old code and files in src/protocol and include/opc/ua/protocol/

opcua-modeler's People

Contributors

benkinooby avatar oroulet avatar pro avatar swamper123 avatar zerox1212 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opcua-modeler's Issues

Unexpected (problematic?) XML output of data variables 'value' components

When I create a variable of any underlying data type, within the saved XML the format is as follows:

<Value>
   <uax:Double>0.0</uax:Double>
</Value>

I'd expect something more like the following, so that an interpreter is able to create the correct value object component under a variable type object. See the example of the open62541 XML node-set compiler for reference.

<Value>
    <ListOfExtensionObject>
        <ExtensionObject>
            <TypeId>
                <Identifier>i=63</Identifier>
            </TypeId>
            <Body>
                <Argument>
                    <Name>stopped</Name>
                    <DataType>
                        <Identifier>i=11</Identifier>
                    </DataType>
                    <ValueRank>-1</ValueRank>
                    <ArrayDimensions></ArrayDimensions>
                    <Description/>
                </Argument>
            </Body>
        </ExtensionObject>
    </ListOfExtensionObject>
</Value>

This issue in node-red-contrib-iiot-opcua is the underlying use-case problem. Basically a node-set compiler of the node-opcua is not able to interpret the xml file correctly, which leads to the 'value' component not being created thus no read/write operations are possible. I'm not quite sure yet, if this is a problem with the modeler or the node-red or node-opcua projects.

Master Plan

Work in progress, feel free to fix and/or comments
every steps/module here is checked when it is roughly implemented. polishing will come later

0.1

  • initial UI taken from UA client
  • actions to add nodes
  • Improve, add missing icons
  • save dialog windows sizes and better default size
  • Implement namespace editor on top left (simle treeview showing NamespaceArray node with add and remove namespaces actions)
  • import xml
  • save xml
  • Use another font/color to clearly differentiate added nodes that will be exported
  • keep track of all added nodes (need small modifications of python.opcua)
  • finish UI shown when adding nodes, must be possible to specify node type and values for variables. Other attributes will be specified in Attribute editor
  • finish Attribute editor, currently it only show attributes, apart from Value. Should use
  • Copy/past actions to copy nodes and attributes when mass creating nodes

0.2

  • Fix export of lists
  • Fix export of ExtensionObjects
  • remember last used values when adding nodes since users probably add many nodes of same types (to discuss)
  • release to pip
  • enable column resizing of qt views
  • add support for designing methods
  • Value attribute doesn't need to show server/source timestamps

0.3

0.4

  • never crash UI
  • [x ] polish
  • better editor for extension objects
  • better editor/viewer for arrays
  • Do not use dialogs in namespace editor and allow for editing
  • use other servers internally for example open62541. that should be easy
  • more adaptive contextual menu

0.5

  • Implement reference editor
  • Use our own (minimal) file format uamodel to keep reference to external nodesets...

0.5.5

  • better UI for methods
  • Find a smart way to allow user to create their own custom ua structures (extensionobjects) (Important!!!)

0.6

  • do not close dialogs before node is created so users can retry before crashing
  • recent files menu
  • open tree to last used node after opening file
  • Edit methods

later:

  • restrict custom namespace to one? (uamodeler does it)
  • disable creating node in ns 0?
  • Instantiate Action (Maybe)
  • Cut Action (Maybe)
  • allow to modify node id and update links/references when changing nodeid of a node (maybe)
  • Display dialog to set namespace and maybe nodeid creation strategy and type when copying/instantiating nodes

Multiple issues re-exporting xml

I loaded the "Devices Information Model" (from https://opcfoundation.org/UA/schemas/DI/1.00/Opc.Ua.Di.NodeSet2.xml) into the modeler and then just hit "Save As" (without any modification).

What I expected was to get the same XML back.

But unfortunately there are some issues here:

  • The order of the XML elements is different. TODO: Check if the specification says something about how to order the XML elements
  • The description value is invalid. It exports: Description="b'Defines the basic information components for all configurable elements in a device topology'" (Note the additional b and quotation) as an attribute. It should be a child tag.
  • The namespace urn:freeopcua:python:server should not be added automatically. We are using open62541 and thus don't need this namespace in the XML
  • The standard indentation for the official OPC UA XML files is 2 spaces, not 4 spaces
  • The attribute IsForward="true" should not be printed if it is the default value true. Only if false
  • The attribute IsAbstract="false" should not be printed if it is the default value false. Only if true

Open XML functionality does not work

I have installed a version with pip3.
I expect that this version should be able to open example.xml.
However I get the following error:

uamodeler.uamodeler - INFO - Starting server on opc.tcp://0.0.0.0:48400/freeopcua/uamodeler/')
opcua.server.address_space - WARNING - AddNodesItem: Requested NodeId NumericNodeId(i=2001) already exists')
uawidgets.utils - ERROR - The requested node id is already used by another node.(BadNodeIdExists)')
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/uawidgets/utils.py", line 21, in wrapper
result = func(self, *args)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/uamodeler.py", line 357, in _open
path = self._import(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/uamodeler.py", line 334, in _import
new_nodes = self.server_mgr.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/server_manager.py", line 72, in import_xml
return self._backend.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/server_manager.py", line 105, in import_xml
return self._server.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/opcua/server/server.py", line 422, in import_xml
return importer.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/opcua/common/xmlimporter.py", line 63, in import_xml
node = self.add_object_type(nodedata)
File "/usr/local/lib/python3.4/dist-packages/opcua/common/xmlimporter.py", line 171, in add_object_type
res[0].StatusCode.check()
File "/usr/local/lib/python3.4/dist-packages/opcua/ua/uatypes.py", line 201, in check
raise UaStatusCodeError(self.value)
opcua.ua.uaerrors._auto.BadNodeIdExists: The requested node id is already used by another node.(BadNodeIdExists)
uamodeler.uamodeler - INFO - Starting server on opc.tcp://0.0.0.0:48400/freeopcua/uamodeler/')
opcua.server.address_space - WARNING - AddNodesItem: Requested NodeId NumericNodeId(i=2001) already exists')
uawidgets.utils - ERROR - The requested node id is already used by another node.(BadNodeIdExists)')
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/uawidgets/utils.py", line 21, in wrapper
result = func(self, *args)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/uamodeler.py", line 357, in _open
path = self._import(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/uamodeler.py", line 334, in _import
new_nodes = self.server_mgr.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/server_manager.py", line 72, in import_xml
return self._backend.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/server_manager.py", line 105, in import_xml
return self._server.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/opcua/server/server.py", line 422, in import_xml
return importer.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/opcua/common/xmlimporter.py", line 63, in import_xml
node = self.add_object_type(nodedata)
File "/usr/local/lib/python3.4/dist-packages/opcua/common/xmlimporter.py", line 171, in add_object_type
res[0].StatusCode.check()
File "/usr/local/lib/python3.4/dist-packages/opcua/ua/uatypes.py", line 201, in check
raise UaStatusCodeError(self.value)
opcua.ua.uaerrors._auto.BadNodeIdExists: The requested node id is already used by another node.(BadNodeIdExists)
uamodeler.uamodeler - INFO - Starting server on opc.tcp://0.0.0.0:48400/freeopcua/uamodeler/')
uamodeler.uamodeler - INFO - Starting server on opc.tcp://0.0.0.0:48400/freeopcua/uamodeler/')
opcua.server.address_space - WARNING - AddNodesItem: Requested NodeId NumericNodeId(i=2001) already exists')
uawidgets.utils - ERROR - The requested node id is already used by another node.(BadNodeIdExists)')
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/uawidgets/utils.py", line 21, in wrapper
result = func(self, *args)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/uamodeler.py", line 357, in _open
path = self._import(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/uamodeler.py", line 334, in _import
new_nodes = self.server_mgr.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/server_manager.py", line 72, in import_xml
return self._backend.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/server_manager.py", line 105, in import_xml
return self._server.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/opcua/server/server.py", line 422, in import_xml
return importer.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/opcua/common/xmlimporter.py", line 63, in import_xml
node = self.add_object_type(nodedata)
File "/usr/local/lib/python3.4/dist-packages/opcua/common/xmlimporter.py", line 171, in add_object_type
res[0].StatusCode.check()
File "/usr/local/lib/python3.4/dist-packages/opcua/ua/uatypes.py", line 201, in check
raise UaStatusCodeError(self.value)
opcua.ua.uaerrors._auto.BadNodeIdExists: The requested node id is already used by another node.(BadNodeIdExists)
uamodeler.uamodeler - INFO - Starting server on opc.tcp://0.0.0.0:48400/freeopcua/uamodeler/')
uamodeler.uamodeler - INFO - Starting server on opc.tcp://0.0.0.0:48400/freeopcua/uamodeler/')
opcua.server.address_space - WARNING - AddNodesItem: Requested NodeId NumericNodeId(i=2001) already exists')
uawidgets.utils - ERROR - The requested node id is already used by another node.(BadNodeIdExists)')
Traceback (most recent call last):
File "/usr/local/lib/python3.4/dist-packages/uawidgets/utils.py", line 21, in wrapper
result = func(self, *args)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/uamodeler.py", line 357, in _open
path = self._import(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/uamodeler.py", line 334, in _import
new_nodes = self.server_mgr.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/server_manager.py", line 72, in import_xml
return self._backend.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/uamodeler/server_manager.py", line 105, in import_xml
return self._server.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/opcua/server/server.py", line 422, in import_xml
return importer.import_xml(path)
File "/usr/local/lib/python3.4/dist-packages/opcua/common/xmlimporter.py", line 63, in import_xml
node = self.add_object_type(nodedata)
File "/usr/local/lib/python3.4/dist-packages/opcua/common/xmlimporter.py", line 171, in add_object_type
res[0].StatusCode.check()
File "/usr/local/lib/python3.4/dist-packages/opcua/ua/uatypes.py", line 201, in check
raise UaStatusCodeError(self.value)
opcua.ua.uaerrors._auto.BadNodeIdExists: The requested node id is already used by another node.(BadNodeIdExists)

Delete csvtoxml folder

This just a notice that we can now delete csvtoxml folder in this repository. This tool was a hack I made because there was no free modeling tool available. It's left over from before we decided to use the server in the background for designing an address space.

opcua-modeler is good enough now that we will never need this.

[master] Adding namespace results in a crash

I run master. New project -> right-click "Add namespace" -> "test" as value

Traceback (most recent call last):
  File "C:\Users\z\Documents\freeopcua-modeler\opcua-widgets\uawidgets\uti
ls.py", line 21, in wrapper
    result = func(self, *args)
  File "C:\Users\z\Documents\freeopcua-modeler\opcua-modeler\uamodeler\nam
espace_widget.py", line 127, in setModelData
    self.logger.info("Writting namespace array: %s", uries)
AttributeError: 'MyDelegate' object has no attribute 'logger'

During handling of the above exception, another exception occurred:

TypeError: NamespaceWidget.error[str].emit(): argument 1 has unexpected type 'At
tributeError'

[Feature] Generate relevant Python code for objects

In UaModeler you can compile c / c++ code that are compliant with UA SDK.
This could be a great feature in the opcua modeler too. Thus, you can create your information model and generate the necessary python objects that are needed if you want to use the model in the freeopcua-python context.

Example: Structure datatypes (see BuildInfo of standard spec as example)

Exporter Not Exporting GUID as Structure

Exporting a GUID results in XML like this:

<Value>
  <uax:Guid>00000000-0000-0000-0000-000000000000</uax:Guid>
</Value>

It should be exported as a structure:

<Value>
  <uax:Guid>
    <uax:String>00000000-0000-0000-0000-000000000000</uax:String>
  </uax:Guid>
</Value>

Load multiple XML but only export custom added nodes

In OPC UA you can use multiple XML files as a basis and on top of them build your own information model.

E.g. I also want to use the "Devices" IM (https://opcfoundation.org/UA/schemas/DI/1.00/Opc.Ua.Di.NodeSet2.xml) for my modelling, and based on this build my own IM, let's say Namespace "urn:somestuff".
After modelling my own IM I only want to export the stuff I defined, not the whole "Devices" IM again, because it will be loaded separately into my OPC UA Server, so I only want to export the "urn:somestuff".

As far as I can see it that's currently not possible?

[Feature] Generate UML from UA Model

Hello,

it would be great if we could generate some UML class diagramm from a UA model.

If you read a companion spec, you might have seen some UML diagramms that visualize the UA model. I think that these diagramms are a good way to get a fast understanding of the given model. Thus, if you have to write some documentation of your model, you would have a "single source of truth". One might even create some special extensions for the opcua-modeler nodes in order to document the model / type / ... nodes and create some sort of auto-documentation from the UA model.

Since I am not familiar if there is some sort of XML specification for UML diagramms, I can not make an suggestion on technical details here.

[0.4] Saving Symmetric Reference Types does not work

Hi, i got a symmetric reference type without inverseName

  <UAReferenceType BrowseName="1:zz" NodeId="ns=1;i=4002" Symmetric="true">
    <DisplayName>zz</DisplayName>
    <References>
      <Reference IsForward="false" ReferenceType="HasSubtype">i=32</Reference>
    </References>
  </UAReferenceType>

Saving gives an error:
File "C:\freeopcua-modeler\python-opcua\opcua\common\xmlexporter.py", line 299, in add_etree_reference_type
self._add_sub_el(obj_el, 'InverseName', var.Value.Value.Text.decode('utf-8'))
AttributeError: 'NoneType' object has no attribute 'decode'

Odd behavour when adding XML-defined objects

Hi,

I stumbled upon some odd behaviour while trying to understand how to use XML Schemas. I used the myNS.xml example from open62541 docs.

So the opcua-modeler shows the object definitionas as expected (in Types/Object Types):

Object Definition

In the definition, Pump is a child of FieldDevice. However, if I add a new object (in Objects/a folder) as defined above, then unexpected results happen:
objects

The device object has just two subnodes (ManufacturerName and ModelName), with no pump in it. Then if pump is added, it has all its subnodes plus ManufacturerName and ModelName. The last two variables are actually siblings of the pump and should not get as children in the pump description.

So the question is whether it is desired behaviour, there is something funny in the XML description, or whether there is a bug in the modeler handling objects?

cheers, Nikolay

svg warnings

qt.svg: :/folder.svg:141:6: Could not resolve property: pattern5614
qt.svg: :/folder.svg:141:6: Could not resolve property: pattern5626
qt.svg: :/folder.svg:141:6: Could not resolve property: pattern5614
qt.svg: :/folder.svg:141:6: Could not resolve property: pattern5626
qt.svg: :/folder.svg:141:6: Could not resolve property: pattern5614
qt.svg: :/folder.svg:141:6: Could not resolve property: pattern5626

and how could i connect to local opc-server?

Access "Current Read" Not Shown

Nodes which are read only don't show their access level properly.

Node that has Current Read only:
image

Node with both Read and Write:
image

How to connect to local opc server?

if i have an opc Server,how could i make them connect,maybe this question can be interpreted as where in the code "opcua-modeler" could i change to make it communicate with my local server, i provide local server's address or the code could identified the address of server by its own?

Wrong XML export of UAReferenceType

Hi,

XML the export of UAReferenceType is serialized like this

<DisplayName></DisplayName>
<InserseName></InverseName>
<References></References>

however UANodeSet.xsd requires the following order:

<DisplayName></DisplayName>
<References></References>
<InserseName></InverseName>

Open Should Clear Address Space after OK

If a model is open, and you press the open button, it clears the entire address space before allowing a new xml to be selected.

It should only clear the address space if a new xml is actually selected, that way cancel function works as expected (no changes to currently loaded address space).

Not able to create a property under a variable

Is this a design decision or expected behaviour? I was expecting to be able to create PropertyType-Variables under other Variables. In the documentation I've only read that PropertyType-Variables cannot be placed under other PropertyType-Variables. So does this apply to all variables?

Running Latest Release in Windows

I'm normally always running python code directly from an IDE. However today I tried to run modeler after installing via pip.

In windows you cannot do python opcua-modeler or python uamodeler.py .

You have to open the python console and type

>>>from uamodeler.uamodeler import main
>>>main()

Am I missing something obvious?

Could it cread ModellingRule?

I created my address space, but there is no ModellingRule in the xml. When I implement the new model with open62541(a opc ua sdk), it can't present the correct variant , because that variant has no ModellingRule. So help!

Installation help

Love the effort, and would really like to test the tool.

I thought I installed everything needed but when I try running app.py it complains as follows:

C:\Some\opcua-modeler-master>python app.py Traceback (most recent call last): File "app.py", line 3, in <module> main() File "C:\Some\opcua-modeler-master\uamodeler\uamodeler.py", line 434, in main modeler = UaModeler() File "C:\Some\opcua-modeler-master\uamodeler\uamodeler.py", line 58, in __init__ self._restore_state() File "C:\Some\opcua-modeler-master\uamodeler\uamodeler.py", line 182, in _restore_state self.restoreState(self.settings.value("main_window_state", b"")) TypeError: restoreState(self, Union[QByteArray, bytes, bytearray], version: int = 0): argument 1 has unexpected type 'sip.voidptr'

of course, I have limited experience in python (but no one else is creating a free infomodel tool)...

Add Unit Test for GUI

If I get some free time in the next weeks I was thinking about expanding my knowledge on unit tests. I have never wrote them before.

I read this and it doesn't look that difficult, but I think we should add this to modeler.
http://johnnado.com/pyqt-qtest-example/

I will probably need help because I'm inexperienced.

Uri Export

Why are Uris over 2 the only ones exported?
uris = self.server.get_namespace_array()[2:]

Shouldn't indexes of 1 or greater be exported?

opcua-modeler: command not found

Trying to instal and run opcua-modeler:

$ pip3 install opcua-modeler
...
Successfully installed freeopcua lxml-3.5.0 opcua-modeler opcua-widgets python-dateutil pytz six-1.10.0
$ opcua-modeler
opcua-modeler: command not found

Where am I going wrong?

[0.3.1] Random crashes with module 'opcua.ua' has no attribute 'test_bit'

Traceback (most recent call last):
File "\WinPython-64bit-3.5.2.3Qt5\python-3.5.2.amd64
\lib\site-packages\uawidgets\attrs_widget.py", line 204, in createEditor
return BitEditor(parent, attr, dv.Value.Value)
File "\WinPython-64bit-3.5.2.3Qt5\python-3.5.2.amd64
\lib\site-packages\uawidgets\attrs_widget.py", line 30, in init
if ua.test_bit(val, el.value):
AttributeError: module 'opcua.ua' has no attribute 'test_bit'

First namespace

I have a problem reading a value from the internal OPC server. I use the QuickOPC toolkit and get the error message:

"The first namespace in the table must be the OPC-UA namespace."

After loading example.xml the namespace array contains:
[0] urn:freeopcua:python:server
[1] urx:mycompany:myproject

grafik

The screenshot that comes with the folder opcua-modeler (screenshot.png) shows index 0 with the value http://opcfoundation.org/UA/.

So, is the index 0 problem a bug or can I configure it somehow?

Since I used git clone, I assume, I have the most recent version ...

Best regards!

Importing comapnions Specs from VDMA-Euromap oraganisation

Devlopers I am trying to use this tool for my personal OPC_UA project. I want to create a instance model using nodsets released by Euromap organisation. I am attaching the link for downloading nodeset xml files from the organisations homepage.
http://www.euromap.org/en/euromap83 (Opc_Ua.EUROMAP83.NodeSet2.xml)
http://www.euromap.org/en/euromap77 (Opc_Ua.EUROMAP77.NodeSet2.xml)

using these two nodesets I want to create a new model, but if I try to add these nodesets I get exceptions. Commercial modellers such as UA Modeler can use these Nodesets.

Euromap is European Plastic and Rubber organisation, and Euromap Companion Specs will be used by industries all over world as European standards are taken as norm in most countries, so i think solwing this issue will open a large pool of user and supporters for this project.

Thanks

New Edit 11.07.2018########

Here is the exception when I try to add euromap 83 namespace from xml file. Before it I have addede da.di namespace.

em83capture

[0.3.1] Unable to set value for attributes on type-level

The indicator is showing both type and value as "None" and crashes

showing error: invalid literal for int() with base 10: 'None' 1
Traceback (most recent call last):
File "\WinPython-64bit-3.5.2.3Qt5\python-3.5.2.amd64
\lib\site-packages\uawidgets\attrs_widget.py", line 237, in setModelData
dv.Value = string_to_variant(text, dtype)
File "\Downloads\WinPython-64bit-3.5.2.3Qt5\python-3.5.2.amd64
\lib\site-packages\opcua\common\ua_utils.py", line 113, in string_to_variant
return ua.Variant(string_to_val(string, vtype), vtype)
File "\WinPython-64bit-3.5.2.3Qt5\python-3.5.2.amd64
\lib\site-packages\opcua\common\ua_utils.py", line 84, in string_to_val
val = int(string)
ValueError: invalid literal for int() with base 10: 'None'

I have to add Value Node in XML manually

[0.4] How to load additional NodeSets

I have a dedicated files for instance (i.xml) and type (t.xml) node sets. How can I load t.xml first and i.xml later and work in it? Currently I can add both of them as reference node sets, but then opening a new file reloads the whole server.

ImportError: no such module uamodeler.uamodeler

Installed from pip version 0.4.0
Tried to run opcua-modeler and got this error:


 $ opcua-modeler
 Traceback (most recent call last):
   File "C:\Python27\Scripts\opcua-modeler-script.py", line 9, in <module>
     load_entry_point('opcua-modeler==0.4.0', 'console_scripts', 'opcua-modeler')()
   File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 542, in load_entry_point
     return get_distribution(dist).load_entry_point(group, name)
   File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2569, in load_entry_point
     return ep.load()
   File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2229, in load
     return self.resolve()
   File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2235, in resolve
     module = __import__(self.module_name, fromlist=['__name__'], level=0)
 ImportError: No module named uamodeler.uamodeler

uamodeler module is missing the __init__.py file to allow it to be imported as a module.

Handle Methods Correctly

I'm look at fixing methods.

When comparing to UAModeler, I see that the simple method I created requires an extension object.

Is this normal? Do we need to support extension objects to support methods?

Method Argument in UAModeler:
You can see that UAModeler only keeps track of what kind of extension object to make, in this case (296 = Argument)
image

This is the XML that gets created.
image

This also breaks Free OPC UA Modeler, because it does not parse out the extension object at this time (see Value attribute):
image

If I can get some clues on how to approach this I can begin working on it.

support other internal servers (open62541 for example)

Should not be hard, I need to make a simple plugin architecture and use our client to access the internal server and optionaly support xml if server does not have xml support. It does require the server to support the node management service though!

@Pro @jpfr Does open62541 has python wrapper? or should I use Cython? I coult not find any ref to python in your repository, but I kind of remember seing something..... I could also simply start the server as an external command but that will make it hard to kill it properly...

Nodes with Children Don't Export

Currently, adding nodes with children doesn't export all the nodes.

For example if you instantiate an Object from an Object type which has children, only the instantiated object is exported.

When an object is added, we need to search for children recursively in _after_add method.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.