09/26/2021
Hello
I'm working on a project that has an OPC UA server on one of the devices. The control system I'm using for the rest of the home doesn't allow me to use existing drivers so I'm having to author my own for the espoke language it uses.
Does anyone have some existing raw command examples that I can look at( command & data requests) and a list of avalable commands? I just need a couple to get me started, then I can crack on with it.
Looking through the web, the information I've found seems to imply it uses XML with namespaces.
Any help would be greatly appreciated.
Thanks
Duncan
05/30/2017
Does the language allow ANSI C plugins?
If so I recommend you start with an existing ANSI C stack.
The protocol is binary and the services (a.k.a. commands) are documented here:
https://reference.opcfoundatio.....ocs/Part4/
You can use the NETStandard Sample Client (https://github.com/OPCFoundati.....rd-Samples) + WireShark (the standard distribution supports the OpcUa binary protocol) to see what the raw messages look like. The raw messages are documented here:
https://reference.opcfoundatio.....ocs/Part6/
The XML is only used for configuration and is not related to the wire protocol.
05/30/2017
The easiest way to build a stack from scratch is to build a code generator that ingests the formal definition of the APIs and produces code in your language. The formal definition is here: https://files.opcfoundation.or.....rvices.xml
The schema is explained in Part 6: https://reference.opcfoundatio.....Part6/F.1/
If you want the bare minimum read-wrote-subscribe functionality you can look at this JavaScript prototype:
https://prototyping.opcfoundation.org/
The demo is currently not working because of the OAuth2 server is down. But the link to the code works.
If you have a existing device it likely does not support WebSockets and JSON but the concepts are the same.
1 Guest(s)