Idataobject, Iadvisesink, Iopcasyncio2 – IDEC WindSRV User Manual

Page 47: Iasyncio3, Iconnectionpointcontainer (group)

Advertising
background image

46

www.kepware.com

KEPServerEX5 Help

'queued' and the function will return immediately so that the client can continue to run. Each operation is treated as a
'transaction' and is associated with a Transaction ID. As the operations are completed, a callback will be made to the
IAdvise Sink in the client (if one has been established). The information in the callback will indicate the Transaction ID
and the error results. By convention, 0 is an invalid Transaction ID.

Cancel - Requests that the server cancel an outstanding transaction.

Read - Reads one or more items in a group. The results are returned via the IAdvise Sink connection established
through the IDataObject. For cache Reads the data is only valid if both the group and the item are active. Device
Reads are not affected by the active state of the group or item.

Refresh - Forces a callback for all active items in the group, whether they have changed or not. Inactive items
are not included in the callback.

Write - Writes one or more items in a group. The results are returned via the IAdviseSink connection established
through the IDataObject.

IDataObject

IDataObject is implemented on the OPCGroup rather than on the individual items. This allows the creation of an Advise
connection between the client and the group using the OPC Data Stream Formats for the efficient data transfer.

DAdvise - Create a connection for a particular 'stream' format between the OPC Group and the Client.

DUnadvise - Terminate a connection between the OPC Group and the Client.

IAdviseSink

The client only has to provide a full implementation of OnDataChange.

OnDataChange - This method is provided by the client to handle notifications from the OPC Group for exception
based data changes, Async Reads and Refreshes and Async Write Complete.

IOPCAsyncIO2

This interface is similar to IOPCAsync(OPC 1.0) and is intended to replace IOPCAsyncIO. It was added in OPC 2.05.

Cancel2 - Requests that the server cancel an outstanding transaction.

GetEnable - Retrieves the last Callback Enable value set with SetEnable.

Read - Reads one or more items in a group. The results are returned via the client's IOPCDataCallback
connection established through the server's IConnectionPointContainer. Reads are from 'Device' and are not
affected by the active state of the group or item.

Refresh2 - Forces a callback to IOPCDataCallback::OnDataChange for all active items in the group, whether they
have changed or not. Inactive items are not included in the callback.

SetEnable - Controls the operation of OnDataChange. Setting Enable to False will disable any OnDataChange
callbacks with a transaction ID of 0 (which are not the result of a Refresh). The initial value of this variable when
the group is created is True; thus, OnDataChange callbacks are enabled by default.

Write - Writes one or more items in a group. The results are returned via the client's IOPCDataCallback
connection established through the server's IConnectionPointContainer.

IAsyncIO3

This interface was added to enhance the existing IOPCAsyncIO2 interface.

ReadMaxAge - Reads one or more values, qualities and timestamps for the items specified. This is functionally
similar to the OPCSyncIO::Read method except it is asynchronous and no source is specified (Device or cache).
The server will make the determination as whether the information will be obtained from the Device or cache.
This decision will be based upon the MaxAge parameter. If the information in the cache is within the MaxAge,
then the data will be obtained from the cache; otherwise, the server must access the Device for the requested
information.

WriteVQT - Writes one or more values, qualities and timestamps for the items specified. The results are
returned via the client's IOPCDataCallback connection established through the server's
IConnectionPointContainer. This is functionally similar to the IOPCAsyncIO2::Write except that Quality and
Timestamp may be written. If a client attempts to write VQ, VT or VQT it should expect that the server will Write
them all or none at all.

RefreshMaxAge - Forces a callback to IOPCDataCallback::OnDataChange for all active items in the group,
whether or not they have changed. Inactive items are not included in the callback. The MaxAge value determines
where the data is obtained. There will be only one MaxAge value, which determines the MaxAge for all active
items in the group. This means some of the values may be obtained from cache while others can be obtained
from the Device, depending on the type of the data in the cache.

IConnectionPointContainer (Group)

This interface provides functionality similar to the IDataObject but is easier to implement and to understand. It also
provides the functionality missing from the IDataObject Interface. The client must use the new IOPCAsyncIO2 interface
to communicate via connections established with this interface. The 'old' IOPCAsnyc will continue to communicate via

Advertising