- Index

< Previous |  | Next >

# Digitec D3 Streaming Interface Adapter Sample

## Introduction

This sample demonstrates the use of the TIBCO StreamBase® Adapter for Digitec D3 Streaming Interface. See Digitec D3 Streaming Interface Adapter for details on the use and structure of this adapter.

## Running This Sample in StreamBase Studio

1. Double-click to open the sample application, `D3StreamingSample.sbapp`.

2. Select the Digitec D3 Streaming adapter and select the Adapter Properties tab. Fill in the required information with your D3 server name and port.

3. Click the Run button. This opens the SB Test/Debug perspective and starts the module.

4. The file `initial-subscribe.csv` has two currency pairs that will subscribed to as soon as the adapter is connected to the D3 Pricing Engine.

5. The `UpdateOut` output port emits tuples as market data is returned from the D3 Pricing Engine.

6. If you wish to subscribe to other currency pairs, select the Manual Input view. Set the command field to `subscribe`, the `SubscriptionID` field to a unique string (such as `someID1234`), and the `symbol` field to a currency pair (such as `GBPUSD`). Click Send Data.

7. When done, press F9 or click the Terminate EventFlow Fragment button.

## Running This Sample in Terminal Windows

This section describes how to run the sample in UNIX terminal windows or Windows command prompt windows. On Windows, be sure to use the StreamBase Command Prompt from the Start menu as described in the Test/Debug Guide, not the default command prompt.

1. Use StreamBase Studio to set up the Digitec D3 Streaming adapter properties as described in the previous section.

2. Open two terminal windows on UNIX, or two StreamBase Command Prompt s on Windows. In each window, navigate to your workspace copy of the sample, as described above.

3. In window 1, type:

   `sbd D3StreamingSample.sbapp`

4. In window 2, type:

   `sbc dequeue -v`

5. Look for market data tuples for the currency pairs in the `initial-subscribe.csv` file on the `UpdateOut` output stream.

## Importing This Sample into StreamBase Studio

In StreamBase Studio, import this sample with the following steps:

- From the top-level menu, click File → Load StreamBase Sample.

- Type `digi` in the search field.

- From the StreamBase Market Data Adapters category, select the Digitec D3 sample.

- Click OK.

StreamBase Studio creates a project for this sample.

## Sample Location

When you load the sample into StreamBase Studio, Studio copies the sample project's files to your Studio workspace, which is normally part of your home directory, with full access rights.

### Important

Load this sample in StreamBase Studio, and thereafter use the Studio workspace copy of the sample to run and test it, even when running from the command prompt.

Using the workspace copy of the sample avoids permission problems. The default workspace location for this sample is:

    studio-workspace/sample_adapter_embedded_d3-streaming

See Default Installation Directories for the default location of `studio-workspace` on your system.