Open ghost opened 7 years ago
You can't pass a Python object to that function. I don't know if you are new to OPC UA, but the language ("object", "type", "property") are almost always in the scope of the OPC UA spec. That function expects an OPC UA object. The objecttype
parameter of add_object
is a structure of nodes that are defined in the server as an "object type". add_object
with the object type parameter will instantiate a copy of the object type structure.
In other words you first have to define your custom structure as OPC UA obect type.
Are your using the package or running the code from the master? I do not think that feature is in the released package. I recommend you pull the code from the master and try it.
Is it possible to simply add an custom object to my server without setting every attribute? For example:
After that I want to get this object from my client. I got the following code from this example https://github.com/FreeOpcUa/python-opcua/blob/master/examples/client_read-custom_structures.py
It throws the following error:
Is this method not yet implemented?