16:57, EEST
February 26, 2020
10:42, EEST
April 3, 2012
Hi,
In OPC UA there exists standard Methods for ConditionType named ConditionRefresh (https://reference.opcfoundation.org/v104/Core/docs/Part9/5.5.7/) and ConditionRefresh2 (https://reference.opcfoundation.org/v104/Core/docs/Part9/5.5.8/).
They cause the server to resend events for Conditions (Alarms are Conditions), either on the whole Subscription level (ConditionRefresh) or for a single MonitoredItem (ConditionRefresh2).
You can call them e.g. like this:
client.call(Identifiers.ConditionType, Identifiers.ConditionType_ConditionRefresh,
new Variant[] {new Variant(subscription.getSubscriptionId())});
} catch (Exception e) {
// Handle errors here
}
P.S. Generally I would expect more servers to support ConditionRefresh than ConditionRefresh2, since ConditionRefresh2 is defined in later versions of the specification. Still both do require that the server’s do support them.
11:22, EEST
February 26, 2020
Hi Bjarne,
thanks a lot for your answer and details, it is exactly what I was looking for.
I understood that readHistoryEvents was not the way to go. After reading the specs, I was looking for a method called ConditionRefresh() in the SDK source code but did not find anything … Don’t you think and would be convenient to wrap the code you provided into a public method in UaClient ?
Cheers,
Fabien.
13:28, EEST
April 3, 2012
This is at least the intended way by the specification. In theory you probably could get the same info via reading event history, but basically then you would need to filter that by yourself to know which are e.g. active.
We are aware that a helper method for this could be useful. Probably would be more like Subscription.conditionRefresh() and/or MonitoredEventItem.conditionRefresh() when we actually implement it. Generally speaking we are aware of literally 100s of improvements etc. we could do, it is just a matter of how they are prioritized.
Most Users Ever Online: 1919
Currently Online:
21 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: 735
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1