Click or drag to resize

Buffered Queues Interface

Home
Buffered queues interface

Access to the data queues in DataPorter provides buffering of values that are read from OPC Server. This assures that none of the values are lost during the reading process.

To configure a transaction that uses buffering, the Buffered Access Queue operation should be used (this operation block is named "Buffer"). The name of the queue (that will be used by the client to connect) is configured as an Operation parameter (see figure below, where the queue name is configured as “Queue 1”).

Queue Interface
Figure 1: Queue Interface

The figure below shows the sequence of actions performed during the process of buffered read by the sample client application.

Buffered Read Example Sequence
Figure 2: Buffered read example sequence

In the figure above, the following steps are done:

  1. Listing of available queues:

    • Client gets available queues (GetAvaliableQueues),

    • DataPorter returns the list of available queues (string[] Avaliable Queues),

  2. Connection to the queue:

    • Client connects to queue using the queue name (ConnectToQueue (parameter name as a string)).

    • Server (OPCAdvancedDataAccess service) responds with a queue identifier (QueueHashID as a string).

  3. Transaction:

    • Client requests data by sending StartTransaction (parameter QueueHashID as a string); this informs the OPCAdvancedDataAccess service to begin data transfer.

    • OPCAdvancedDataAccess sends all tags from queue as an array of ItemValueResult.

    • The queue is blocked while the client processes the data. If an error occurs, the client can return to the previous point (Start transaction) and receives the same data again.

    • If no error occurs during data processing the client sends End transaction (function EndTransaction (parameter QueueHashID as a string)) – this is information for OPCAdvancedDataAccess that data processing has been finished. Thereafter OPCAdvancedDataAccess and DataPorter delete processed data, new data (if any) is put from the temporary queue to the main queue.

  4. The client waits some time and returns to Start transaction (step 3).