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
Sending events without generating classes
November 29, 2016
9:36, EET
Avatar
Sascha
New Member
Members
Forum Posts: 2
Member Since:
November 29, 2016
sp_UserOfflineSmall Offline

Hello,

Is there a way to send events without generating “MyEventType” classes? For example we load an UA-Model.xml in which an eventtype & node is defined. We know the node ids (and also the ids of it’s properties) but we did not find a way to trigger them. Could you provide a code snippet?

Thanks!

November 30, 2016
15:43, EET
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello Sascha,

Thank you for the question. The SDK is designed so that this is the only sensible way to deal with Events. Do you have some reason that generating or writing the EventType classes is not working for you? As you already have the UaNodeset file, the codegen should work nicely in this situation.

December 14, 2016
11:22, EET
Avatar
Sascha
New Member
Members
Forum Posts: 2
Member Since:
November 29, 2016
sp_UserOfflineSmall Offline

Thanks for the answer,

we have a generic communication interface (currently using another protocol) and the variables which will be linked to the events is only known after the startup. Using classes would require that we generate and load them during runtime and then fill them via reflection. It would be much less error prone if we could skip this step and set the variables directly.

Would it be possible to send events without classes if we buy also the source code of the sdk?

br
Sascha

December 14, 2016
15:17, EET
Avatar
Heikki Tahvanainen
Moderator
Members

Moderators
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hi,

So, did I understand correctly that the UaNodeset file containing the event types will become available for your application only during the runtime? And after the file becomes available, you would like to be able to create EventTypes dynamically?

In the current version of the Java SDK, this kind of feature is not available even if you bought the source code edition. Of course ‘everything’ is possible, but it’s hard to estimate how big of a change this would be in practice. However, we always try to provide features that are requested so this could potentially be implemented in the future.

Just to provide some backgroud, you always need to define the EventType and the EventType needs to be visible in the servers address space. This requirement comes from the OPC UA specification and there would be no sense to not work according to specification in this case.

Perhaps the most practical and still OPC UA compliant solution in this case would be that you create your EventType, for example named DynamicEventType. Then, you would define properties/variables in this EventType so that you can always set your variable values defined during the runtime in these properties/variables.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 682

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, 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: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1