Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Decode ExtensionObject
July 25, 2017
14:17, EEST
Avatar
Matthias Schneider
New Member
Members
Forum Posts: 1
Member Since:
July 25, 2017
sp_UserOfflineSmall Offline

Hey,

I’m trying to make a java program that acts as a kind of middleware. It reads structures from a TwinCAT OPC UA server, puts their values into a JSON and sends it to an other server.

For testing I created in the PLC a sample struct with two variables: https://ibb.co/mmRZ9k
If I read the node, the DataValue is a ExtensionObject with binary encoding. The values of the structure variables (bVar1 and fVar2) should be read and put into a JSON object. So the result is something like this:
{
“bVar1” : false
“fVar2” : 0
}
The structure above is just an example. The structures to be read are only known at runtime.

My Problem is that I don’t know how to decode the binary ExtensionObject to get access to the values of the structure variables.

July 25, 2017
15:54, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Unfortunately, the current version of the Client Java SDK is not capable of decoding custom structures. Work is on the way to add support for this in the next release. If you contact us by email, we can see if we could provide you something to try out a bit sooner.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online: rocket science
11 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 76

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 685

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6257

Newest Members:

Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule, rashadbrownrigg, christi10l, ahamad1, Flores Frederick, ellenmoss, harriettscherer

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 320, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1