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: 727
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardoModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1