Replies: 1 comment
-
This is a tricky question that depends on how you've implemented alarms and events. In your AddressSpace implementation you'd probably want to override @Override
protected MethodInvocationHandler getInvocationHandler(NodeId objectId, NodeId methodId) throws UaException {
if (methodId.equals(NodeIds.AcknowledgeableConditionType_Acknowledge)) {
// TODO if objectId == conditionId of some AcknowledgeableConditionType instance, do some acknowledge logic?
} else {
return super.getInvocationHandler(objectId, methodId);
}
} The acknowledge method is called using the condition id as the object id. Presumably you have some kind of bookkeeping that knows what alarm/condition instances are currently active and what their state is. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear author,
I am having a trouble with acknowledging an Alarm in UAExpert. When I try to acknowledge it, it prompts me to enter a message, however after entering a message, nothing happened, I expected the Alarm to switch “acknowledged” mode.
I saw that you have following function
@OverRide
public void call(CallContext context, List requests) {
List results = Lists.newArrayListWithCapacity(requests.size());
System.out.println(requests.size());
results.add(
new CallMethodResult(
new StatusCode(StatusCodes.Good_CallAgain),
new StatusCode[0],
new DiagnosticInfo[0],
new Variant[0]
));
context.success(results);
}
I overrode this method because the acknowledge action calls this function, but I am not sure how to create a proper response. Could you please help me with an example that would allow the alarm status to be updated to "acknowledged"?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions