|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CallableListener
Interface for listening method calls from a UaCallable node.
UaCallable.addCallListener(CallableListener)| Method Summary | |
|---|---|
boolean |
onCall(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId objectId,
UaNode object,
org.opcfoundation.ua.builtintypes.NodeId methodId,
UaMethod method,
org.opcfoundation.ua.builtintypes.Variant[] inputArguments,
org.opcfoundation.ua.builtintypes.StatusCode[] inputArgumentResults,
org.opcfoundation.ua.builtintypes.DiagnosticInfo[] inputArgumentDiagnosticInfos,
org.opcfoundation.ua.builtintypes.Variant[] outputs)
A method call notification. |
| Method Detail |
|---|
boolean onCall(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId objectId,
UaNode object,
org.opcfoundation.ua.builtintypes.NodeId methodId,
UaMethod method,
org.opcfoundation.ua.builtintypes.Variant[] inputArguments,
org.opcfoundation.ua.builtintypes.StatusCode[] inputArgumentResults,
org.opcfoundation.ua.builtintypes.DiagnosticInfo[] inputArgumentDiagnosticInfos,
org.opcfoundation.ua.builtintypes.Variant[] outputs)
throws StatusException
Use onCall to check whether the called method is the one that you handle. If so, return true, and set the outputs. Do not create a new array for the outputs, just assign your values in there - it is already created for the length defined by the OutputArguments of the UaMethod.
If you find errors in the inputArguments, fill in the inputArgumentResults and inputArgumentDiagnosticInfos respectively. They are also preallocated.
serviceContext - objectId - the ID of the node whose method is being calledobject - the object node whose method is being called, if availablemethodId - the ID of the method being calledmethod - the method node being called, if availableinputArguments - input argument valuesinputArgumentResults - room for argument errors. Fill in the array if you encounter errors
in the values.inputArgumentDiagnosticInfos - room for diagnostic info, in case of errors.outputs - room for output values. The array is pre-created, so just fill in the values.
StatusException - if there are errors in the method handling. For example, if you set
inputArgumentResults, you should throw a StatusException with
StatusCodes.Bad_InvalidArgument
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||