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
CodeGeneration from NodeSet.xml
October 10, 2014
19:02, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 144
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

I’m doing my first steps using the model code generator. The generated code exposes 2 errors:
* The ApplicationInstanceCertificate DataType (ApplicationInstanceCertificate,311,DataType) cannot be found in the OPC UA Stack’s built-in types (that’s where the generated import statement tries to pull it from), and
* the generated setDisplayName() method signature in the interface has a throws StatusException, while the overwritten method in UANode has not.
While the latter can be worked around by commenting out the “throws” clause, the missing ApplicationInstanceCertificateType is a bit more difficult to deal with. The NodeSet2.xml which has been shipped with the SDK does contain the ApplicationInstanceCertificate DataType. Am I possibly missing an import?

NB: the codegen-standalone.jar is labeled with version 2.0.0 while the rest of the SDK is at 2.0.2.

Many thanks,
Hans-Uwe

October 10, 2014
19:48, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes, ApplicationInstanceCertificate is a subtype of ByteString and seems that they are not generated at the moment. Maybe you can use just ByteString instead?

Hmm. setDisplayName() should not be generated, IMO. Or do you have a member that is called such in your type?

The codegen hasn’t been changed between the versions (and the version is currently hard-coded).

October 10, 2014
20:09, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 144
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Yes, ByteString is what I fell back to. Is there a list of currently not generated types available or is this the only one?
Well, shame on me. I indeed forgot about a property, which I carelessly named “DisplayName”. Stupid.

Thanks a lot again!

Cheers, Hans-Uwe

October 10, 2014
20:16, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Only Enumerated and Structure types are generated at the moment.

The codeine should do a sanity check of it’s own, to avoid the compilation problems with the generated code. Let’s see if we get such added in there at some point ;)

October 10, 2014
20:29, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Jouni Aro said
The codeine should do …

I was wondering why I always tend to write ‘codeine’, when I should write ‘codegen’ – until I noticed that the proofreader of my browser (Safari) makes an autocorrection ‘codegen -> codeine’! Had to teach it that it’s a valid word…

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
64 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 738

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6451

Newest Members:

jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1