13:50, EEST
December 20, 2021
Good morning,
Please i need clarification regarding the method
public Object onReadEvents(ServiceContext serviceContext, Object operationContext, NodeId nodeId, UaNode node,
Object continuationPoint, DateTime startTime, DateTime endTime, UnsignedInteger numValuesPerNode,
EventFilter filter, HistoryEvent historyEvent) throws StatusException
Can an OPC UA client make multiple requests at the same time?
Is it possible to identify the client’s request?
Thanks,
Francesco.
14:55, EEST
Moderators
February 11, 2020
Hello,
It is possible for an OPC UA Client to make multiple requests at the same time.
What do you mean with “Is it possible to identify the client’s request?”? Can you provide some context for this question? What type of identifying information are you expecting and what would you do with that information?
15:42, EEST
December 20, 2021
Dear Matti,
I’ll answer your questions below:
“Can you provide some context for this question?”
I would like to save the results of the search that the user has done to a cache.
For example, if the results of the search performed are 1000 records and if the maximum number of results that can be returned is 100 (numValuesPerNode), the client will have to perform 10 requests, according to continuationPoint.
I cannot use “continuationPoint” and “numValuesPerNode” as sql parameters (LIMIT, OFFSET).
“What type of identifying information are you expecting and what would you do with that information?”
I need the ID of the “transaction”. The session identifier is not unique because multiple event history requests could be made for the same session at the same time.
This improvement is not urgent, I would like to know if it was possible to identify the client requests.
Thanks,
Francesco.
17:48, EEST
April 3, 2012
If you can hold the values in memory, you can store them in the continuation point. The continuationpoint you give (return) is NOT the one the SDK will give to the Client. SDK will give a numeric one to the client and internally tracks the continuationpoint and gives it back to you (the parameter) when the client continues. If it still continues, modify the continuationpoint (return new one) with this info so you know then new starting point for the 3rd call.
Thus, if you are not given a continuationpoint by the SDK, it is a “new” HistoryRead call by the client and it should start from the first value. If there is a continuationpoint, then it continues. And technically you can have more than one “HistoryRead” active at the same time. There is a limit of concurrent continuationpoints and client can see this, but skipping rest of the details for now. So in short the continuationpoint (a custom java object, anything you like) must contain all the info to continue the HistoryRead.
Or maybe we missed/misunderstood something? If you meant the literal “what to return”, then it is the EventFilter that tells which data should be returned (you can look at the sampleconsoleserver, but it is somewhat simple example and we do not have any complex ones).
17:53, EEST
April 3, 2012
12:46, EEST
December 20, 2021
Dear Bjarne,
Thank you very much.
I figured out that I can exploit the object ContinuationPoint
public ->Object<- onReadEvents(ServiceContext serviceContext, Object operationContext, NodeId nodeId, UaNode node,
->Object continuationPoint<-, DateTime startTime, DateTime endTime, UnsignedInteger numValuesPerNode,
EventFilter filter, HistoryEvent historyEvent) throws StatusException {
to save search results that have not yet been sent to the client.
Best regards,
Francesco.
Most Users Ever Online: 1919
Currently Online:
22 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: 734
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1