Raw command layout and commands|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Raw command layout and commands
Avatar
Duncan Ellis
Member
Members
Forum Posts: 3
Member Since:
09/26/2021
sp_UserOfflineSmall Offline
1
09/26/2021 - 13:24
sp_Permalink sp_Print

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

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
09/26/2021 - 22:40
sp_Permalink sp_Print

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.

Avatar
Duncan Ellis
Member
Members
Forum Posts: 3
Member Since:
09/26/2021
sp_UserOfflineSmall Offline
3
09/27/2021 - 03:16
sp_Permalink sp_Print

HI Randy

 

Thanks for the fast reply. Can't use any plugins at all. Its a home automation system that has a bespoke language(similar to Java - but it doesn't allow use of standard plugins)

 

Thanks for the info, Will have a breeze through it.

 

Thanks very much!!!!!!

 

Duncan

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
09/27/2021 - 05:42
sp_Permalink sp_Print

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.

Avatar
Duncan Ellis
Member
Members
Forum Posts: 3
Member Since:
09/26/2021
sp_UserOfflineSmall Offline
5
10/10/2021 - 04:13
sp_Permalink sp_Print

Thanks very much!

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 25
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855