com.prosysopc.ua.server
Class MethodManager
java.lang.Object
com.prosysopc.ua.server.ServiceManagerBase
com.prosysopc.ua.server.MethodManager
- Direct Known Subclasses:
- MethodManagerUaNode
public abstract class MethodManager
- extends ServiceManagerBase
An interface that defines the OPC UA method handling.
|
Method Summary |
org.opcfoundation.ua.builtintypes.Variant[] |
callMethod(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId objectId,
org.opcfoundation.ua.builtintypes.NodeId methodId,
org.opcfoundation.ua.builtintypes.Variant[] inputArguments,
org.opcfoundation.ua.builtintypes.StatusCode[] inputArgumentResults,
org.opcfoundation.ua.builtintypes.DiagnosticInfo[] inputArgumentDiagnosticInfos)
Handle a method call. |
static void |
checkInputArguments(Class<?>[] expectedTypes,
org.opcfoundation.ua.builtintypes.Variant[] inputArguments,
org.opcfoundation.ua.builtintypes.StatusCode[] inputArgumentResults,
org.opcfoundation.ua.builtintypes.DiagnosticInfo[] inputArgumentDiagnosticInfos,
boolean acceptNulls)
Validates the input arguments that they are of expected type. |
static void |
checkInputArguments(Class<?>[] expectedTypes,
org.opcfoundation.ua.builtintypes.Variant[] inputArguments,
org.opcfoundation.ua.builtintypes.StatusCode[] inputArgumentResults,
org.opcfoundation.ua.builtintypes.DiagnosticInfo[] inputArgumentDiagnosticInfos,
boolean[] acceptNulls)
Validates the input arguments that they are of expected type. |
NodeManager |
getNodeManager()
|
| Methods inherited from class com.prosysopc.ua.server.ServiceManagerBase |
arrayDimensionsMatch, checkIsMethod, checkIsValueNode, checkIsVariable, checkIsVariableOrVariableType, dataTypeEquals, getNode, getNode, getNode, getNode, getNodeManagerTable, getServer, getSubscriptionManager, isValueNode, isVariable, listenerError, requireUaNode |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodManager
public MethodManager(NodeManager nodeManager)
- Parameters:
nodeManager -
checkInputArguments
public static void checkInputArguments(Class<?>[] expectedTypes,
org.opcfoundation.ua.builtintypes.Variant[] inputArguments,
org.opcfoundation.ua.builtintypes.StatusCode[] inputArgumentResults,
org.opcfoundation.ua.builtintypes.DiagnosticInfo[] inputArgumentDiagnosticInfos,
boolean acceptNulls)
throws StatusException
- Validates the input arguments that they are of expected type. You can use this method from your
own method handler to check the input arguments before actually using them. It will return
correct status codes and throws a StatusException if the length of inputArguments or any of the
argument types do not match the expectedTypes.
- Parameters:
expectedTypes - the expected argument typesinputArguments - the actual inputArgumentsinputArgumentResults - the array to fill with argument resultsinputArgumentDiagnosticInfos - the array to fill with diagnosticInfos for the invalid
argumentsacceptNulls - whether NULL values are accepted for any argument
- Throws:
StatusException - if the length of inputArguments does not match the expectedTypes or the
value types do not match
checkInputArguments
public static void checkInputArguments(Class<?>[] expectedTypes,
org.opcfoundation.ua.builtintypes.Variant[] inputArguments,
org.opcfoundation.ua.builtintypes.StatusCode[] inputArgumentResults,
org.opcfoundation.ua.builtintypes.DiagnosticInfo[] inputArgumentDiagnosticInfos,
boolean[] acceptNulls)
throws StatusException
- Validates the input arguments that they are of expected type. You can use this method from your
own method handler to check the input arguments before actually using them. It will return
correct status codes and throws a StatusException if the length of inputArguments or any of the
argument types do not match the expectedTypes.
- Parameters:
expectedTypes - the expected argument typesinputArguments - the actual inputArgumentsinputArgumentResults - the array to fill with argument resultsinputArgumentDiagnosticInfos - the array to fill with diagnosticInfos for the invalid
argumentsacceptNulls - whether NULL values are accepted - each element defines the rule for that
argument.
- Throws:
StatusException - if the length of inputArguments does not match the expectedTypes or the
value types do not match
callMethod
public org.opcfoundation.ua.builtintypes.Variant[] callMethod(ServiceContext serviceContext,
org.opcfoundation.ua.builtintypes.NodeId objectId,
org.opcfoundation.ua.builtintypes.NodeId methodId,
org.opcfoundation.ua.builtintypes.Variant[] inputArguments,
org.opcfoundation.ua.builtintypes.StatusCode[] inputArgumentResults,
org.opcfoundation.ua.builtintypes.DiagnosticInfo[] inputArgumentDiagnosticInfos)
throws StatusException
- Handle a method call.
- Parameters:
session - objectId - The object to which method appliesmethodId - The method to callinputArguments - optional input argument valuesinputArgumentDiagnosticInfos - inputArgumentResults -
- Returns:
- optional output argument values
- Throws:
StatusException - if the call fails
getNodeManager
public NodeManager getNodeManager()
- Returns:
- the nodeManager which the MethodManager is using
Copyright © 2018. All rights reserved.