C++ Based OPC UA Client/Server/PubSub SDK  1.7.6.537

Optimized but limited version of the IOManager interface. More...

#include <iomanager2.h>

Public Member Functions

 IOManager2 ()
 Construction.
 
virtual ~IOManager2 ()
 Destruction.
 
virtual UaStatus beginRead (IOManager2Callback *pCallback, OpcUa_UInt32 hTransaction, const ServiceContext &serviceContext, OpcUa_Boolean *pProcessedFlags, VariableHandle **ppVariableHandleArray, OpcUa_ReadRequest *pReadRequest, OpcUa_ReadResponse *pReadResponse)=0
 Read values for a list of nodes. More...
 
virtual UaStatus beginWrite (IOManager2Callback *pCallback, OpcUa_UInt32 hTransaction, const ServiceContext &serviceContext, OpcUa_Boolean *pProcessedFlags, VariableHandle **ppVariableHandleArray, OpcUa_WriteRequest *pWriteRequest, OpcUa_WriteResponse *pWriteResponse)=0
 Write values for a list of nodes. More...
 
virtual UaStatus beginStartMonitoring (IOManager2Callback *pCallback, OpcUa_UInt32 hTransaction, const ServiceContext &serviceContext, const UaUInt32Array &callbackHandles, OpcUa_Boolean *pProcessedFlags, VariableHandle **ppVariableHandleArray, MonitoringContext *pMonitoringContextArray, IOVariableCallback **ppCallbackInterfaceArray)=0
 Begin start monitoring values for a list of nodes. More...
 
virtual UaStatus beginModifyMonitoring (IOManager2Callback *pCallback, OpcUa_UInt32 hTransaction, const ServiceContext &serviceContext, const UaUInt32Array &callbackHandles, OpcUa_Boolean *pProcessedFlags, VariableHandle **ppVariableHandleArray, const UaUInt32Array &hIOVariableArray, MonitoringContext *pMonitoringContextArray)=0
 Begin modify monitoring values for a list of nodes. More...
 
virtual UaStatus beginStopMonitoring (IOManager2Callback *pCallback, OpcUa_UInt32 hTransaction, const ServiceContext &serviceContext, const UaUInt32Array &callbackHandles, OpcUa_Boolean *pProcessedFlags, VariableHandle **ppVariableHandleArray, const UaUInt32Array &hIOVariableArray)=0
 Begin stop monitoring values for a list of nodes. More...
 

Detailed Description

Optimized but limited version of the IOManager interface.

The interface allows optimized access to one data source. It allows to access the in and out parameters of the Read and Write Services directly. Is is especially used for server implementations where the data access information is already consolidated in one interface. Therefore the multiplexing provided by the server SDK can be reduced to all other nodes not consolidated in one place like the type and diagnostic nodes managed by the server SDK.

The interface IOManager2Callback defines the corresponding callback methods for IOManager2.

Instances of this interface must be registered with the SDK using the method ServerManager::registerIOManager2. This is only possible if the define USE_IOMANAGER2 is set. It is recommended to provide also the IOManager interface implementation.

This is a very optimized version of the IOManager interface introducing several limitation.

  • This interface works only with the UA Module and not with the COM DA module or the internal read and write call implementation provided by the ServerManager
  • For performance reasons only one instance or a very small number of instances of this interface should be registered with the SDK
  • The interface can only be used with the source code version of the SDK by setting the define USE_IOMANAGER2

The methods of the interface provide direct access to the request and response parameters for read and write. The implementer of the method must check if the variable handle is not NULL (registered node) or if he is responsible for the namespace of the node in the request. The request may contain other nodes not handled by this IOManager2 instance. The processed flag must be set for the Nodes processed by the IOManager2 instance.
The IOManager2 instance is responsible for Value attributes of Variables if

If the monitoring of nodes should be handled through the normal IOManager implementation, the methods beginStartMonitoring, beginModifyMonitoring and beginStopMonitoring can return OpcUa_Good without implementing any action or callback. The IOManager2 implementation can be combined with the IOManager interface. Nodes not handled by any IOManager2 are passed to the responsible IOManagers.

Member Function Documentation

virtual UaStatus IOManager2::beginModifyMonitoring ( IOManager2Callback pCallback,
OpcUa_UInt32  hTransaction,
const ServiceContext serviceContext,
const UaUInt32Array callbackHandles,
OpcUa_Boolean *  pProcessedFlags,
VariableHandle **  ppVariableHandleArray,
const UaUInt32Array hIOVariableArray,
MonitoringContext pMonitoringContextArray 
)
pure virtual

Begin modify monitoring values for a list of nodes.

Parameters
pCallbackCallback interface used for the transaction. The IOManager2 must use this interface to finish the async transaction.
hTransactionHandle for the transaction used by the SDK to identify the transaction in the callbacks.
serviceContextService context including the session context used for the UA service call.
callbackHandlesArray of handles used for the callback to identify the processed node.
pProcessedFlagsArray of flags indicating if the node is processed. The size of the array matches the array size of the callbackHandles parameter.
ppVariableHandleArrayArray of variable handles provided by the NodeManager::getVariableHandle. The variable handle can be used to detect if the IOManager2 instance is responsible.
hIOVariableArrayArray of handles for the items returned in the finishStartMonitoring callback.
pMonitoringContextArrayArray of the monitoring context for the items to create. See MonitoringContext for more details
Returns
Error code
virtual UaStatus IOManager2::beginRead ( IOManager2Callback pCallback,
OpcUa_UInt32  hTransaction,
const ServiceContext serviceContext,
OpcUa_Boolean *  pProcessedFlags,
VariableHandle **  ppVariableHandleArray,
OpcUa_ReadRequest pReadRequest,
OpcUa_ReadResponse pReadResponse 
)
pure virtual

Read values for a list of nodes.

Parameters
pCallbackCallback interface used for the transaction. The IOManager2 must use this interface to finish the async transaction.
hTransactionHandle for the transaction used by the SDK to identify the transaction in the callbacks.
serviceContextService context including the session context used for the UA service call.
pProcessedFlagsArray of flags indicating if the node is processed. The size of the array matches the NoOfNodesToRead in the pReadRequest.
ppVariableHandleArrayArray of VariableHandle pointers. The the IOManager2 instance must check if the variable handle is not NULL and if it is responsible for processing the variable handle for registered nodes. The size of the array matches the NoOfNodesToRead in the pReadRequest.
pReadRequestThe read request containing the list of NodesToRead. If the IOManager2 is responsible for a Node, he must process the Node and must set the corresponding processed flag in the pProcessedFlags parameter. The total number of processed nodes must be indicated in the callback IOManager2Callback::finishRead
pReadResponseThe read response containing the list of Results for the read. The result array is allocated and the read results for the affected nodes can be copied directly to the corresponding Result array element.
Returns
Result code
virtual UaStatus IOManager2::beginStartMonitoring ( IOManager2Callback pCallback,
OpcUa_UInt32  hTransaction,
const ServiceContext serviceContext,
const UaUInt32Array callbackHandles,
OpcUa_Boolean *  pProcessedFlags,
VariableHandle **  ppVariableHandleArray,
MonitoringContext pMonitoringContextArray,
IOVariableCallback **  ppCallbackInterfaceArray 
)
pure virtual

Begin start monitoring values for a list of nodes.

Parameters
pCallbackCallback interface used for the transaction. The IOManager2 must use this interface to finish the async transaction.
hTransactionHandle for the transaction used by the SDK to identify the transaction in the callbacks.
serviceContextService context including the session context used for the UA service call.
callbackHandlesArray of handles used for the callback to identify the processed node.
pProcessedFlagsArray of flags indicating if the node is processed. The size of the array matches the array size of the hIOVariableArray parameter.
ppVariableHandleArrayArray of variable handles provided by the NodeManager::getVariableHandle
pMonitoringContextArrayArray of the monitoring context for the items to create. See MonitoringContext for more details
ppCallbackInterfaceArrayArray of callback interfaces used for data change callbacks to the MonitoredItem managed by the SDK.
Returns
Error code
virtual UaStatus IOManager2::beginStopMonitoring ( IOManager2Callback pCallback,
OpcUa_UInt32  hTransaction,
const ServiceContext serviceContext,
const UaUInt32Array callbackHandles,
OpcUa_Boolean *  pProcessedFlags,
VariableHandle **  ppVariableHandleArray,
const UaUInt32Array hIOVariableArray 
)
pure virtual

Begin stop monitoring values for a list of nodes.

Parameters
pCallbackCallback interface used for the transaction. The IOManager2 must use this interface to finish the async transaction.
hTransactionHandle for the transaction used by the SDK to identify the transaction in the callbacks.
serviceContextService context including the session context used for the UA service call.
callbackHandlesArray of handles used for the callback to identify the processed node.
pProcessedFlagsArray of flags indicating if the node is processed. The size of the array matches the array size of the callbackHandles paramter.
ppVariableHandleArrayArray of variable handles provided by the NodeManager::getVariableHandle. The variable handle can be used to detect if the IOManager2 instance is responsible.
hIOVariableArrayArray of handles for the items returned in the finishStartMonitoring callback.
Returns
Error code
virtual UaStatus IOManager2::beginWrite ( IOManager2Callback pCallback,
OpcUa_UInt32  hTransaction,
const ServiceContext serviceContext,
OpcUa_Boolean *  pProcessedFlags,
VariableHandle **  ppVariableHandleArray,
OpcUa_WriteRequest pWriteRequest,
OpcUa_WriteResponse pWriteResponse 
)
pure virtual

Write values for a list of nodes.

Parameters
pCallbackCallback interface used for the transaction. The IOManager2 must use this interface to finish the async transaction.
hTransactionHandle for the transaction used by the SDK to identify the transaction in the callbacks.
serviceContextService context including the session context used for the UA service call.
pProcessedFlagsArray of flags indicating if the node is processed. The size of the array matches the NoOfNodesToWrite in the pWriteRequest.
ppVariableHandleArrayArray of VariableHandle pointers. The the IOManager2 instance must check if the variable handle is not NULL and if it is responsible for processing the variable handle for registered nodes. The size of the array matches the NoOfNodesToWrite in the pWriteRequest.
pWriteRequestThe write request containing the list of NodesToWrite including the values to write. If the IOManager2 is responsible for a Node, he must process the Node and must set the corresponding processed flag in the pProcessedFlags parameter. The total number of processed nodes must be indicated in the callback IOManager2Callback::finishWrite
pWriteResponseThe write response containing the list of Results for the write. The result array is allocated and the write results for the affected nodes can be copied directly to the corresponding Result array element.
Returns
Result code

The documentation for this class was generated from the following file: