26.10.2014 Views

Reuters AdfinX Real Time 1.0 Library User Guide (Doc. No. 4510529)

Reuters AdfinX Real Time 1.0 Library User Guide (Doc. No. 4510529)

Reuters AdfinX Real Time 1.0 Library User Guide (Doc. No. 4510529)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong><br />

<strong>User</strong>'s <strong>Guide</strong>


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Last Revised 21 May 02<br />

Copyright © <strong>Reuters</strong> 2002 All rights reserved.<br />

Republication or redistribution of <strong>Reuters</strong> content is expressly prohibited without the prior written consent of <strong>Reuters</strong>.<br />

Except as permitted by law, no part of this document may be reproduced or transmitted by any process or means without the<br />

prior consent of REUTERS Limited.<br />

<strong>Reuters</strong>, by publishing this document, does not guarantee that any information contained herein is and will remain accurate or<br />

that use of the information will ensure correct and faultless operation of the relevant service or equipment. <strong>Reuters</strong>, its agents<br />

and employees shall not be held liable to or through any user for any loss or damage whatsoever resulting from reliance on the<br />

information contained herein.<br />

EFFIX, PowerPlus Pro, and Adfin are registered trademarks of the <strong>Reuters</strong> Group.<br />

EFFIX Order Management System (OMS), EFFIX Licensing System (ELS), FxNSC, PIXL, PowerBase, and ROMS (<strong>Reuters</strong><br />

Order Management) are trademarks of the <strong>Reuters</strong> Group.<br />

IDN, Network Management (NMS), <strong>Reuters</strong> DTS (Data Transformation System), <strong>Reuters</strong> DTM (Data Transformation Manager),<br />

<strong>Reuters</strong> IPS (Internal Page Server), <strong>Reuters</strong> DCS (Data Contribution Servers), <strong>Reuters</strong> OCS (Optimizing Contribution Server),<br />

<strong>Reuters</strong> Dealing 2000, <strong>Reuters</strong> GLCS (Global Limits Control System), <strong>Reuters</strong> KreditNet, <strong>Reuters</strong> KVAR+, <strong>Reuters</strong> News 2000,<br />

RQF, RSF and <strong>Reuters</strong> Triarch are trademarks of REUTERS Limited.<br />

<strong>Reuters</strong> and the <strong>Reuters</strong> sphere logo are registered trademarks and trademarks of the <strong>Reuters</strong> group of companies around the<br />

world.<br />

Microsoft Windows, Windows NT, Visual Basic and MS-DOS are registered trademarks, and Microsoft Excel, Microsoft Word,<br />

and Microsoft Internet Explorer are products of Microsoft Corp. in the United States and other countries. Sun, Sun<br />

Microsystems, Solaris and SunOS are trademarks of Sun Microsystems Inc. TIB is a registerd trademark, and Rendezvous is a<br />

trademark of TIBCO Software Inc. UNIX is a registered trademark in the United States and other countries, licensed exclusively<br />

through X/Open Company Limited.<br />

Published by <strong>Reuters</strong> Limited, 85 Fleet Street, London EC4P 4AJ<br />

<strong>Reuters</strong> Financial Software<br />

6, rue Godefroy<br />

F-92821 Puteaux<br />

France<br />

Tel: +33 1 47 62 64 66<br />

Fax: +33 1 47 62 64 99<br />

Internet: http://www.effix.fr<br />

Support<br />

Tel: +33 1 47 62 67 00<br />

Email: marvin.help@reuters.com<br />

Subscribe to the Marvin Newsletter: marvin.mailing@reuters.com<br />

2


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

TABLE OF CONTENTS<br />

1. INTRODUCING ADFINX REAL TIME <strong>1.0</strong> LIBRARY ................................................... 7<br />

1.1. OVERVIEW ............................................................................................................................... 7<br />

1.1.1. Accessing <strong>Real</strong> <strong>Time</strong> Data................................................................................................. 7<br />

1.1.2. Settings File........................................................................................................................ 7<br />

1.2. HOW TO USE ADFINX CONTROLS........................................................................................ 7<br />

1.2.1. Usage ................................................................................................................................. 7<br />

1.2.2. AdxRtxLib Overview ........................................................................................................... 8<br />

2. ADXRTLIST............................................................................................................... 10<br />

2.1. ADXRTLIST PROPERTIES .................................................................................................... 10<br />

2.1.1. Source .............................................................................................................................. 10<br />

2.1.2. Mode ................................................................................................................................ 10<br />

2.1.3. DebugLevel ...................................................................................................................... 11<br />

2.1.4. ErrorMode ........................................................................................................................ 11<br />

2.1.5. ErrorCode......................................................................................................................... 11<br />

2.1.6. ErrorString ........................................................................................................................ 12<br />

2.1.7. Attribute ............................................................................................................................ 12<br />

2.1.8. <strong>User</strong>Tag............................................................................................................................ 12<br />

2.1.9. ListFields .......................................................................................................................... 13<br />

2.1.10. ListItems........................................................................................................................... 14<br />

2.1.11. FieldListCount .................................................................................................................. 15<br />

2.1.12. ItemListCount ................................................................................................................... 16<br />

2.1.13. Value ................................................................................................................................ 17<br />

2.1.14. FieldStatus ....................................................................................................................... 17<br />

2.1.15. ItemStatus ........................................................................................................................ 18<br />

2.1.16. ListStatus.......................................................................................................................... 19<br />

2.1.17. SourceStatus.................................................................................................................... 19<br />

2.2. ADXRTLIST METHODS.......................................................................................................... 20<br />

2.2.1. IsRegisteredField ............................................................................................................. 20<br />

2.2.2. IsRegisteredItem .............................................................................................................. 21<br />

2.2.3. RegisterItems ................................................................................................................... 22<br />

2.2.4. UnregisterItems................................................................................................................ 23<br />

2.2.5. UnregisterAllItems............................................................................................................ 23<br />

2.2.6. UnregisterFields ............................................................................................................... 24<br />

2.2.7. StartUpdates .................................................................................................................... 24<br />

3


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

2.2.8. StopUpdates..................................................................................................................... 25<br />

2.2.9. CloseAllLinks.................................................................................................................... 25<br />

2.3. ADXRTLIST EVENTS ............................................................................................................. 26<br />

2.3.1. OnUpdate ......................................................................................................................... 26<br />

2.3.2. OnImage........................................................................................................................... 26<br />

2.3.3. On<strong>Time</strong> ............................................................................................................................ 27<br />

2.3.4. OnStatusChange.............................................................................................................. 27<br />

2.4. ADXRTLIST ILISTEVENTS INTERFACE ............................................................................... 27<br />

2.4.1. ListAdvise ......................................................................................................................... 28<br />

2.4.2. ListUnadvise..................................................................................................................... 28<br />

2.4.3. OnUpdate ......................................................................................................................... 29<br />

2.4.4. OnImage........................................................................................................................... 29<br />

2.4.5. On<strong>Time</strong> ............................................................................................................................ 29<br />

2.4.6. OnStatusChange.............................................................................................................. 30<br />

3. ADXRTCONTRIBUTE ............................................................................................... 31<br />

3.1. ADXRTCONTRIBUTE PROPERTIES..................................................................................... 31<br />

3.1.1. ErrorMode ........................................................................................................................ 31<br />

3.1.2. ErrorCode......................................................................................................................... 31<br />

3.1.3. ErrorString ........................................................................................................................ 31<br />

3.1.4. Mode ................................................................................................................................ 31<br />

3.1.5. Attribute ............................................................................................................................ 32<br />

3.1.6. Source .............................................................................................................................. 33<br />

3.1.7. ItemName......................................................................................................................... 33<br />

3.1.8. RunStatus......................................................................................................................... 33<br />

3.2. ADXRTCONTRIBUTE METHODS.......................................................................................... 33<br />

3.2.1. Contribute......................................................................................................................... 33<br />

4. ADXRTCHAIN ........................................................................................................... 35<br />

4.1. ADXRTCHAIN PROPERTIES................................................................................................. 35<br />

4.1.1. Mode ................................................................................................................................ 35<br />

4.1.2. ErrorMode ........................................................................................................................ 36<br />

4.1.3. ErrorCode......................................................................................................................... 36<br />

4.1.4. ErrorString ........................................................................................................................ 36<br />

4.1.5. Attribute ............................................................................................................................ 36<br />

4.1.6. Source .............................................................................................................................. 37<br />

4.1.7. ItemName......................................................................................................................... 37<br />

4.1.8. Data.................................................................................................................................. 37<br />

4.1.9. DataStatus........................................................................................................................ 37<br />

4


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

4.1.10. RunStatus......................................................................................................................... 38<br />

4.1.11. SourceStatus.................................................................................................................... 38<br />

4.2. ADXRTCHAIN METHODS ...................................................................................................... 39<br />

4.2.1. RequestChain................................................................................................................... 39<br />

4.3. ADXRTCHAIN EVENTS.......................................................................................................... 39<br />

4.3.1. OnUpdate ......................................................................................................................... 39<br />

4.3.2. OnStatusChange.............................................................................................................. 39<br />

5. ADXRTHISTORY....................................................................................................... 41<br />

5.1. ADXRTHISTORY PROPERTIES ............................................................................................ 41<br />

5.1.1. Mode ................................................................................................................................ 41<br />

5.1.2. ErrorMode ........................................................................................................................ 42<br />

5.1.3. ErrorCode......................................................................................................................... 42<br />

5.1.4. ErrorString ........................................................................................................................ 43<br />

5.1.5. Attribute ............................................................................................................................ 43<br />

5.1.6. Source .............................................................................................................................. 43<br />

5.1.7. ItemName......................................................................................................................... 43<br />

5.1.8. Data.................................................................................................................................. 43<br />

5.1.9. DataStatus........................................................................................................................ 44<br />

5.1.10. RunStatus......................................................................................................................... 44<br />

5.1.11. ExistingFields ................................................................................................................... 44<br />

5.2. ADXRTHISTORY METHODS ................................................................................................. 45<br />

5.2.1. RequestHistory................................................................................................................. 45<br />

5.2.2. FlushData ......................................................................................................................... 45<br />

5.3. ADXRTHISTORY EVENTS..................................................................................................... 45<br />

5.3.1. OnUpdate ......................................................................................................................... 45<br />

6. ADXRTXLIB PARAMETERS AND CONSTANTS...................................................... 46<br />

6.1. ADXRTXLIB ENUMERATED TYPES...................................................................................... 46<br />

6.1.1. RT_ItemStatus ................................................................................................................. 46<br />

6.1.2. RT_FieldStatus................................................................................................................. 46<br />

6.1.3. RT_SourceStatus............................................................................................................. 46<br />

6.1.4. RT_ListStatus................................................................................................................... 47<br />

6.1.5. RT_ItemRowView............................................................................................................. 47<br />

6.1.6. RT_FieldRowView............................................................................................................ 47<br />

6.1.7. RT_ItemColumnView ....................................................................................................... 47<br />

6.1.8. RT_FieldColumnView....................................................................................................... 48<br />

6.1.9. RT_RunMode................................................................................................................... 48<br />

5


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

6.1.10. RT_DataStatus................................................................................................................. 49<br />

6.1.11. RT_RunStatus.................................................................................................................. 49<br />

6.1.12. RT_DebugLevel ............................................................................................................... 49<br />

6.1.13. AdxErrorMode .................................................................................................................. 50<br />

6.1.14. AdxAttrRtList .................................................................................................................... 50<br />

6.1.15. AdxAttrRtContribute ......................................................................................................... 50<br />

6.1.16. AdxAttrRtChain................................................................................................................. 51<br />

6.1.17. AdxAttrRtHistory............................................................................................................... 51<br />

6


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

1. INTRODUCING ADFINX REAL TIME <strong>1.0</strong> LIBRARY<br />

1.1. OVERVIEW<br />

1.1.1. Accessing <strong>Real</strong> <strong>Time</strong> Data<br />

The <strong>Real</strong> <strong>Time</strong> ActiveX Component <strong>Library</strong> (AdxRtxLib) provides a number of components allowing<br />

user applications to retrieve and contribute real time data sources. The components that AdxRtxLib<br />

supplies provide dual interfaces.<br />

While it is compatible with most DDE servers, <strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> can also be directly interfaced with<br />

real time data sources, such as <strong>Reuters</strong> Triarch or TIB/Rendezvous.<br />

Four data object components are provided. These are AdxRtList, AdxRtContribute,<br />

AdxRtHistory and AdxRtChain.<br />

1.1.2. Settings File<br />

To fit <strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> to your needs, the file m_rtuser.dat holds user data settings related to real<br />

time. This file allows the user to define <strong>Real</strong> <strong>Time</strong> drivers, field separators, and the path for the log file.<br />

1.2. HOW TO USE ADFINX CONTROLS<br />

1.2.1. Usage<br />

Registration<br />

Following are the main ways to reference <strong>AdfinX</strong> controls in different languages:<br />

Visual Basic<br />

To be able to use the components from the Visual Basic IDE, use the “Project Components…”<br />

menu item, and, in the “Controls” property page tab of the dialog, tick the entry for the “<strong>AdfinX</strong> <strong>Real</strong><br />

<strong>Time</strong> Type <strong>Library</strong>” — this will add the four <strong>Real</strong> <strong>Time</strong> objects to your component toolbox. You will be<br />

able to find them with the Object Browser too.<br />

VBA (Microsoft Excel)<br />

On the Tools menu, click References and then select the modules you want to use. Click OK.<br />

VBA (Microsoft Visual Basic)<br />

On the Project menu, click References and then select the modules you want to use. Click OK.<br />

In order to use the <strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> controls in your application, you must then:<br />

On the Project menu, click Components and then select the modules you want to use. Click OK.<br />

C++ (Microsoft Visual C++)<br />

Use the #import directive to incorporate information from a type library which describes the COM<br />

interface.<br />

For example, the <strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> module is referenced as follows:<br />

#import “..\\..\\..\\rtx.dll<br />

7


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Microsoft FrontPage Editor<br />

On the Insert menu, click Advanced and then click <strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> control.<br />

HTML<br />

The AdxRtList control is referenced as follows:<br />

<br />

The clsid is the unique identifier for the <strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> library.<br />

1.2.2. AdxRtxLib Overview<br />

The AdxRtxLib component provides a way of accessing real time market data from within Windows<br />

applications using standard ActiveX technology.<br />

<strong>Real</strong> time market data are organized as items, which are in turn composed of fields that hold individual<br />

atomic values. An item might represent the information concerning an individual bond, for example.<br />

Items are themselves provided by data sources. When the data in an item needs to change, its source<br />

updates the required fields, keeping their values up to date.<br />

<strong>Real</strong> time market data<br />

The AdxRtxLib component allows a program to retrieve the field values from market data items<br />

and can inform the program when the source changes them. Using this component, the program<br />

can perform a variety of tasks:<br />

Maintaining lists of items providing real time market data;<br />

Managing the list of fields within those items whose values are required;<br />

Handling updates made to field values by the data source;<br />

Allowing the retrieval of a single item image (“snapshot”), which will not be kept up to date.<br />

Historical market data<br />

Some data sources also allow historical data concerning individual items; the AdxRtxLib<br />

component provides a mechanism for retrieving such data.<br />

Contribution<br />

Some data sources also allow contribution, whereby new values are supplied for item fields. All<br />

consumers of the source will be informed of updates to those items in the usual way. Once again,<br />

the AdxRtxLib component allows a program to contribute data in this way.<br />

The AdxRtxLib Objects<br />

To support this functionality within a program, the AdxRtxLib component provides objects of the<br />

following types:<br />

The AdxRtList object represents a collection of items, every item being a collection of fields. By<br />

iterating through the collection, the program can retrieve information about any item or any field.<br />

The AdxRtContribute object enables the contribution of new values for a set of fields in an item.<br />

The AdxRtHistory object allows the program to request historical data concerning an item.<br />

The AdxRtChain object allows for the retrieval of chains: these are lists of item names provided by<br />

the data source.<br />

8


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

The following figure illustrates the AdxRtxLib architecture:<br />

Each of the objects provided is described in the following chapters.<br />

The AdxRtxLib component functionality is provided using ActiveX interfaces. These are implemented<br />

by the RTX.DLL file.<br />

9


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

2. ADXRTLIST<br />

2.1. ADXRTLIST PROPERTIES<br />

2.1.1. Source<br />

Source<br />

Name of the data source as a string.<br />

Arguments<br />

<strong>No</strong>ne<br />

Error Handling<br />

Depends on the value of the DebugLevel general property, as follows:<br />

RT_DEBUG_NO<br />

If the source is already known as invalid or down, an exception is raised. If the status of the<br />

source is unknown, then the process continues without any warning or error.<br />

RT_DEBUG_IMMEDIATE<br />

When using SSL, the source is checked for validity. If it is not valid an exception is raised<br />

before setting a new property value.<br />

If the source is unknown or down an exception is raised.<br />

It is important to note that in this mode the setting of the Source property could be very slow.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

'Declare as global variable'<br />

'Create an instance of the list object. This syntax is more<br />

efficient than when only the new instruction is used. Otherwise,<br />

before execution, Visual Basic will test each statement<br />

containing list for the value <strong>No</strong>thing. '<br />

list.Source = "IDN_SELECTFEED"<br />

'Set the source name to "IDN_SELECTFEED"'<br />

2.1.2. Mode<br />

Mode<br />

This property describes various behavioural aspects of the AdxRtList object. In particular, it<br />

determines how the list object will deliver data update events to the client application. The allowed<br />

parameters are:<br />

FRQ : The frequency of regularly generated events. If the list’s StartUpdates<br />

method was called with the run mode value RT_MODE_ONTIME or<br />

RT_MODE_ONTIME_IF_UPDATED, On<strong>Time</strong> events will be triggered at this<br />

frequency. The minimum frequency is one event per second.<br />

FRQ:iH set a frequency of one event every i hours.<br />

FRQ:iM set a frequency of one event every i minutes.<br />

FRQ:iS set a frequency of one event every i seconds.<br />

The default frequency is one event every 10 seconds.<br />

10


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

TIMEOUT : The maximum time in seconds to allow for the arrival of data images for the<br />

items of the list.<br />

TIMEOUT:i set a timeout period of i seconds.<br />

By default, its value is zero, indicating that no timeout is in effect.<br />

Arguments<br />

<strong>No</strong>ne<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

'Declare as global variable'<br />

'Create an instance of the list object. This syntax is more<br />

efficient than when only the new instruction is used. Otherwise,<br />

before execution, Visual Basic will test each statement<br />

containing list for the value <strong>No</strong>thing. '<br />

list.Source = "IDN_SELECTFEED"<br />

'Set the source name to "IDN_SELECTFEED"'<br />

list.StartUpdates RT_MODE_TIME<br />

list.Mode = "FRQ:10s"<br />

2.1.3. DebugLevel<br />

DebugLevel<br />

This property defines the support for debugging provided by the AdxRtList object. It takes a value<br />

from the RT_DebugLevel enumeration.<br />

Arguments<br />

<strong>No</strong>ne<br />

2.1.4. ErrorMode<br />

ErrorMode<br />

This property sets the error mode for the object. When an error is detected, this property is consulted<br />

to see what action should be taken by the object to inform the user of the application. It must be<br />

assigned a value from the AdxErrorMode enumeration.<br />

By default the error mode is set to EXCEPTION.<br />

Arguments<br />

<strong>No</strong>ne<br />

2.1.5. ErrorCode<br />

ErrorCode<br />

This property retrieves the error code of the latest error encountered by the object as an integer value.<br />

If the ErrorMode property of the object is set to NO_EXCEPTION, this value must be consulted by the<br />

client application to determine whether an error has occurred.<br />

11


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Arguments<br />

<strong>No</strong>ne<br />

2.1.6. ErrorString<br />

ErrorString<br />

This property retrieves a string describing the latest error encountered by the object. If the ErrorMode<br />

property of the object is set to NO_EXCEPTION, this value can be consulted by the client application<br />

when the ErrorCode property indicates that an error has occurred.<br />

Arguments<br />

<strong>No</strong>ne<br />

2.1.7. Attribute<br />

Attribute(AttrID)<br />

Allows the consultation of various settings applying to the object. These are the settings that can be<br />

changed for the object by assigning values to the Mode property.<br />

Arguments<br />

AttrID<br />

An identification of the attribute, passed as a Variant. This can be either an<br />

identifying code taken from the AdxAttrRtList enumeration or a string<br />

containing the keyword used to set the attribute using the Mode property.<br />

Return Value<br />

The value of the requested attribute of type Variant.<br />

2.1.8. <strong>User</strong>Tag<br />

<strong>User</strong>Tag(ItemName, FieldName)<br />

Allows information to be associated with an item or with a single field of an item in the list. The value is<br />

held in the association as a Variant.<br />

Different user tag values associated with items and fields can be consulted using ListItems and<br />

ListFields. The tag associated with an item is also provided as a parameter to the OnUpdate event<br />

callback function.<br />

<strong>No</strong>te that user tag values related to fields must be integer values (of type Long).<br />

Arguments<br />

ItemName<br />

FieldName<br />

The name of the required item as a string.<br />

The name of the field to which the user tag will apply. If FieldName has the<br />

form "" (the empty string) or "*" then the user tag is applied to the whole<br />

item, otherwise it concerns the field itself.<br />

Return Value<br />

When used to fetch the user tag, a Variant value is returned.<br />

12


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Error Handling<br />

An error exception may be thrown in the following cases:<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

If either the ItemName or the FieldName has not been registered in the AdxRtList object (using<br />

RegisterItems), an exception will be thrown indicating the invalid argument.<br />

If the user tag is not an integer value and the FieldName indicates a valid field, an exception will<br />

be thrown indicating the invalid argument.<br />

If the DebugLevel general property is RT_DEBUG_NO, and either the ItemName or the<br />

FieldName is already known to be invalid, an exception will be thrown indicating the invalid<br />

argument.<br />

If the DebugLevel general property is RT_DEBUG_IMMEDIATE, the program waits for a callback to<br />

determine the validity of either ItemName or FieldName. If either is invalid, an exception will be<br />

thrown indicating the invalid argument. <strong>No</strong>te that this approach is inherently slow.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

list.<strong>User</strong>Tag("RTR.L", "") = "Port:cld"<br />

'Associate the string value "Port:cld" with the item "RTR.L"<br />

of list‘s item list. When the OnUpdate event associated with<br />

this item is handled, this string value is passed as the <strong>User</strong>Tag<br />

parameter to the callback function. '<br />

list.<strong>User</strong>Tag("DEM=", "BID") = 100<br />

'Associate the integer value 100 with the item "DEM=" of list‘s<br />

item list. '<br />

2.1.9. ListFields<br />

ListFields(ItemName, RView, CView)<br />

This property supplies an item’s field information in a two dimensional array of Variant. The array<br />

can have up to four columns. The first column identifies the fields. Other, optional columns supply field<br />

data values, field status (see the RT_FieldStatus enumeration) and user tag (see the <strong>User</strong>Tag<br />

property) values.<br />

The RView and CView parameters control the contents of the array.<br />

Arguments<br />

ItemName<br />

RView<br />

CView<br />

The name of the required item as a string.<br />

One of the values from the RT_FieldRowView enumeration. This specifies<br />

that the array should contain a row for each field supplied by the item, or<br />

each registered field of the item, or only each updated field of the item<br />

(changed since the last update was handled).<br />

A combination of values from the RT_FieldColumnView enumeration. This<br />

specifies which of the three optional columns will be supplied: data, status<br />

and user tag. The enumeration values should be combined by adding them<br />

together.<br />

13


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Return Value<br />

The property is supplied as a variant array of fields or an empty variant if an error has occurred.<br />

Error Handling<br />

An error exception may be thrown in the following cases:<br />

If RView is set to RT_FRV_UPDATED and the property is queried outside of an event callback (i.e.<br />

one of OnImage, OnUpdate or On<strong>Time</strong>), the return array will be empty. In this case an error<br />

exception will be thrown.<br />

If RView is set to RT_FRV_EXISTING and CView includes the RT_FCV_USERTAG flag, an error<br />

exception will be thrown because user tags can be set only for registered fields.<br />

If either RView or CView contain invalid values, an error exception will be thrown.<br />

<strong>No</strong>tes<br />

By default, RView is set to RT_FRV_ALL, and CView to the combination (RT_FCV_VALUE +<br />

RT_FCV_USERTAG).<br />

It should be noted that the RT_FRV_EXISTING mode is only valid with certain platforms such as<br />

SSL.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim MyArray as Variant<br />

MyArray = list.ListFields("DEM=", RT_FRV_ALL, RT_FCV_VALUE)<br />

'The returned array will contain the names and values of all<br />

fields available in the "DEM=" item. '<br />

FieldName = MyArray(2, 0)<br />

FieldData = MyArray(2, 1)<br />

'FieldName contains the value of the third element of the first<br />

column of the array; this is the third field’s name. '<br />

'FieldData contains the value of the third element of the<br />

second column of the array; this is the third field’s value. '<br />

2.1.10. ListItems<br />

ListItems(RView, CView)<br />

This property supplies item information in a two dimensional array of Variant. The array can have up<br />

to three columns. The first column identifies the items. Other, optional columns supply item status (see<br />

the RT_ItemStatus enumeration) and user tag values for each item (see the <strong>User</strong>Tag property)<br />

values.<br />

The RView and CView parameters control the contents of the array.<br />

Arguments<br />

RView<br />

CView<br />

One of the values from the RT_ItemRowView enumeration. This specifies<br />

that the array should contain a row for each registered item, or only a row for<br />

each item that has been updated.<br />

A combination of values from the RT_ItemColumnView enumeration. This<br />

specifies which of the two optional columns will be supplied: status and user<br />

tag. The enumeration values should be combined by adding them together.<br />

14


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Return Value<br />

The property is supplied as a variant array of items or an empty variant if an error has occurred.<br />

Error Handling<br />

An error exception may be thrown in the following cases:<br />

If RView is set to RT_IRV_UPDATED and the property is queried outside of an event callback (i.e.<br />

one of OnImage, OnUpdate or On<strong>Time</strong>), the return array will be empty. In this case, an error<br />

exception will be thrown.<br />

If either RView or CView contain invalid values, an error exception will be thrown.<br />

<strong>No</strong>tes<br />

By default, RView is set to RT_IRV_ALL, and CView to RT_ICV_USERTAG.<br />

It should be noted that the RT_IRV_ALL mode is only valid with certain platforms (all except DDE).<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim MyArray as Variant<br />

MyArray = list.ListItems(RT_IRV_UPDATED, RT_ICV_USERTAG)<br />

'The returned array will contain the names and user tags of all<br />

updated items in list. '<br />

ItemName = MyArray(2, 0)<br />

ItemTag = MyArray(2, 1)<br />

'ItemName contains the value of the third element of the first<br />

column of the array; this is the third item’s name. '<br />

'ItemTag contains the value of the third element of the second<br />

column of the array; this is the third item’s user tag. '<br />

2.1.11. FieldListCount<br />

FieldListCount(ItemName, RView)<br />

This property supplies the number of fields described by the ListFields property for a particular<br />

item.<br />

Arguments<br />

ItemName<br />

RView<br />

The name of the required item as a string.<br />

One of the values from the RT_FieldRowView enumeration. This specifies<br />

how the counting should be performed: one row for each updated field, one<br />

row for each registered field, or one row for each field supplied by the<br />

identified item.<br />

Return Value<br />

The number of fields counted is supplied as an integer. This will be zero if an error occurs.<br />

Error Handling<br />

An error exception may be thrown in the following cases:<br />

If RView is set to RT_FRV_UPDATED and the property is queried outside of an event callback (i.e.<br />

one of OnImage, OnUpdate or On<strong>Time</strong>), the return value will be 0. In this case, an error exception<br />

will be thrown.<br />

15


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

If RView contains an invalid value, an error exception will be thrown.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim MyArray as Variant<br />

MyArray = list.ListFields("DEM=", RT_FRV_ALL, RT_FCV_VALUE)<br />

NumFields = list.FieldListCount("DEM=", RT_FRV_ALL)<br />

'NumFields holds the number of rows (fields) contained in<br />

MyArray. '<br />

2.1.12. ItemListCount<br />

ItemListCount(RView)<br />

This property supplies the number of items described by the ListItems property.<br />

Arguments<br />

RView<br />

One of the values from the RT_ItemRowView enumeration. This specifies<br />

how the counting should be performed: one row for each updated field, one<br />

row for each registered field, or one row for each field supplied by the<br />

identified item.<br />

Return Value<br />

The number of items counted is supplied as an integer. This will be zero if an error occurs.<br />

Error Handling<br />

An error exception may be thrown in the following cases:<br />

If RView is set to RT_IRV_UPDATED and the property is queried outside of an event callback (i.e.<br />

one of OnImage, OnUpdate or On<strong>Time</strong>), the return value will be 0. In this case, an error exception<br />

will be thrown.<br />

If RView contains an invalid value, an error exception will be thrown.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim MyArray as Variant<br />

MyArray = list.ListItems(RT_IRV_ALL, RT_ICV_USERTAG)<br />

ListCount = list.ItemListCount(RT_IRV_ALL)<br />

'ListCount holds the number of rows (items) contained in<br />

MyArray. '<br />

16


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

2.1.13. Value<br />

Value(ItemName, Field)<br />

This property returns a variant containing the current value of the field specified by ”FieldName”of the<br />

item specified by ”ItemName”.<br />

If the data is not available or one of the parameters is invalid an empty variant is returned.<br />

Arguments<br />

ItemName<br />

Field<br />

The name of the item as a string.<br />

Either the name of the field whose value to retrieve as a string or its numeric<br />

identifier.<br />

Return Value<br />

Returns the value of the identified field or an empty variant if the value is still unkown or invalid.<br />

Error handling<br />

If the item or the field has not been registered or the field is not in the field dictionary, an exception<br />

is thrown notifying the user that the argument is not valid.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim ItemList(0 To 1) as Variant<br />

ItemList(0) = "EUR="<br />

ItemList(1) = "JPY="<br />

Dim FieldList(0 To 1) as Variant<br />

FieldList(0) = "BID"<br />

FieldList(1) = "ASK"<br />

Dim Data As Variant<br />

'The returned value can be either a string or a numeric value. '<br />

list.RegisterItems ItemList, FieldList<br />

Data = list.Value("EUR=", "BID")<br />

'The latest value of the "BID" field of the item "EUR=" is stored<br />

in Data. '<br />

2.1.14. FieldStatus<br />

FieldStatus(ItemName, FieldName)<br />

This property returns a value from the RT_FieldStatus enumeration.<br />

Arguments<br />

ItemName<br />

FieldName<br />

The name of the item as a string.<br />

The name of the field as a string.<br />

17


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Return Value<br />

Returns the status of the field in the item.<br />

Error handling<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim ItemList(0 To 1) as Variant<br />

ItemList(0) = "EUR="<br />

ItemList(1) = "JPY="<br />

Dim FieldList(0 To 1) as Variant<br />

FieldList(0) = "BID"<br />

FieldList(1) = "ASK"<br />

list.RegisterItems ItemList, FieldList<br />

list.StartUpdates RT_MODE_IMAGE<br />

Data = list.value("EUR=", "BID")<br />

FStatus = list.FieldStatus("EUR=", "BID")<br />

'Sets FStatus to RT_FIELD_OK or RT_FIELD_UNKNOWN'<br />

2.1.15. ItemStatus<br />

ItemStatus(ItemName)<br />

This property returns a value from the RT_ItemStatus enumeration.<br />

Arguments<br />

ItemName<br />

The name of the item as a string.<br />

Return Value<br />

Returns the status of the item.<br />

Error handling<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

18


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim ItemList(0 To 1) as Variant<br />

ItemList(0) = "EUR="<br />

ItemList(1) = "JPY="<br />

Dim FieldList(0 To 1) as Variant<br />

FieldList(0) = "BID"<br />

FieldList(1) = "ASK"<br />

list.RegisterItems ItemList, FieldList<br />

IStatus = list.ItemStatus("EUR=", "BID")<br />

'Sets IStatus to the status of the item, such as RT_ITEM_OK<br />

or RT_ITEM_STALE'<br />

2.1.16. ListStatus<br />

ListStatus<br />

This property returns a value from the RT_ListStatus enumeration. This value reflects the status of<br />

the AdxRtList object itself.<br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

Returns the status of the list.<br />

Error handling<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Status = list.ListStatus<br />

'Sets Status to the status of the list object; this will be<br />

RT_LIST_INACTIVE if no items have been registered. '<br />

2.1.17. SourceStatus<br />

SourceStatus<br />

This property returns a value from the RT_SourceStatus enumeration. This value reflects the status<br />

of the source defined by the Source property of the AdxRtList object.<br />

19


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

Returns the status of the source of the list object.<br />

Error handling<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

list.Source = "IDN_SELECTFEED"<br />

Status = list.SourceStatus<br />

'Sets Status to the status of the "IDN_SELECTFEED" source;<br />

this might be RT_SOURCE_UP or RT_SOURCE_DOWN, for<br />

example'<br />

2.2. ADXRTLIST METHODS<br />

2.2.1. IsRegisteredField<br />

IsRegisteredField(ItemName, FieldName)<br />

This property returns a Boolean value which is True if the designated field is contained in the given<br />

item of the AdxRtList object. Otherwise it returns False.<br />

Arguments<br />

ItemName<br />

FieldName<br />

The name of the item as a string.<br />

The name of the field as a string.<br />

Return Value<br />

True if the field was found, False otherwise.<br />

20


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim ItemList(0 To 1) as Variant<br />

ItemList(0) = "EUR="<br />

ItemList(1) = "JPY="<br />

Dim FieldList(0 To 1) as Variant<br />

FieldList(0) = "BID"<br />

FieldList(1) = "ASK"<br />

list.RegisterItems ItemList, FieldList<br />

TestBid = list.IsRegisteredField("EUR=", "BID")<br />

'Sets TestBid to True'<br />

TestDName = list.IsRegisteredField("JPY=", "DISPLAY_NAME")<br />

'Sets TestDName to False'<br />

2.2.2. IsRegisteredItem<br />

IsRegisteredItem(ItemName)<br />

This property returns a Boolean value which is True if the designated item has been registered in the<br />

AdxRtList object. Otherwise it returns False.<br />

Arguments<br />

ItemName<br />

The name of the item as a string.<br />

Return Value<br />

True if the item was found, False otherwise.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim ItemList(0 To 1) as Variant<br />

ItemList(0) = "EUR="<br />

ItemList(1) = "JPY="<br />

list.RegisterItems ItemList, FieldList<br />

TestEUR = list.IsRegisteredItem("EUR=")<br />

'Sets TestEUR to True'<br />

TestCHF = list.IsRegisteredItem("CHF=")<br />

'Sets TestCHF to False'<br />

21


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

2.2.3. RegisterItems<br />

RegisterItems(ItemList, FieldList)<br />

This method adds a list of items with a corresponding list of associated fields to the AdxRtList<br />

object. Registering the items allows for retrieval of item data from the object’s data source (defined by<br />

the Source property).<br />

Arguments<br />

ItemList<br />

FieldList<br />

An array of variant of one or more item names.<br />

An array of variant of one or more field names. It is possible, by specifying<br />

the single value "*", to request all fields present in the items. (This<br />

functionality depends on the system used to provide access to the data<br />

sources.)<br />

Return Value<br />

If successful, this method returns RT_OK, otherwise it returns the error status RT_ERR. An error means<br />

that the FieldList is not correctly set and that at least one field is undefined (has a field status of<br />

RT_FIELD_UNDEFINED).<br />

Error handling<br />

Depends on the value of the DebugLevel general property, as follows:<br />

RT_DEBUG_NO<br />

If one of the items in the ItemList or one of the fields in the FieldList is already known<br />

to be invalid, an exception is thrown notifying the user about it.<br />

RT_DEBUG_IMMEDIATE<br />

On direct API platforms, for each item in the ItemList, an initial event callback is used to<br />

determine whether the item or any of the requested fields within it is invalid. If so, an<br />

exception is thrown accordingly. It is important to note that in this mode the registration<br />

process can be very slow.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim ItemList(0 To 1) as Variant<br />

ItemList(0) = "EUR="<br />

ItemList(1) = "JPY="<br />

Dim FieldList(0 To 1) as Variant<br />

FieldList(0) = "BID"<br />

FieldList(1) = "ASK"<br />

list.RegisterItems ItemList, FieldList<br />

'Adds the items "EUR=" and "JPY=" to the list list. For each<br />

of these items, the fields "BID" and "ASK" are required. '<br />

22


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

2.2.4. UnregisterItems<br />

UnregisterItems(ItemList)<br />

This method removes a list of items from the AdxRtList object which were previously registered with<br />

RegisterItems. If the object is receiving events (data have been requested using the<br />

StartUpdates method), no more information will be received by the object concerning these items.<br />

Arguments<br />

ItemList<br />

A list of one or more names as a variant, identifying the items to remove from<br />

the list.<br />

Error handling<br />

If one of the item names in ItemList has not previously been registered in the list object, an error<br />

exception is thrown.<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim ItemList as Variant<br />

ItemList = Array("EUR=", "JPY=")<br />

list.UnregisterItems ItemList<br />

'Removes the item "EUR=" from the list list. '<br />

2.2.5. UnregisterAllItems<br />

UnregisterItems()<br />

This method removes all items from the AdxRtList object which were previously registered with<br />

RegisterItems. If the object is receiving events (data have been requested using the<br />

StartUpdates method), no more information will be received by the object, as if the StopUpdates<br />

method were called.<br />

Arguments<br />

<strong>No</strong>ne<br />

Error handling<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

list.UnregisterAllItems 'Removes all registered items from the list list. '<br />

ItemCount = list.ItemListCount<br />

'This sets ItemCount to 0. '<br />

23


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

2.2.6. UnregisterFields<br />

UnregisterFields(ItemList, FieldList)<br />

This method removes the fields identified by FieldList from the items in ItemList, which should have<br />

been registered in the AdxRtList object earlier using RegisterItems. If by using this method all<br />

registered fields are removed for an item, this does not unregister the item itself.<br />

Arguments<br />

ItemList<br />

FieldList<br />

A list of one or more names as a variant, identifying the items whose fields<br />

should be removed.<br />

A list of one or more names as a variant, identifying the fields to remove.<br />

These must be fields which were named explicitly using the<br />

RegisterItems FieldList parameter.<br />

Error handling<br />

If one of the item names in ItemList or one of the field names in FieldList has not previously<br />

been registered in the list object, an error exception is thrown.<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

Dim ItemList as Variant<br />

ItemList = "EUR="<br />

Dim FieldList as Variant<br />

FieldList = "ASK"<br />

list.UnregisterFields ItemList, FieldList<br />

'Removes the "ASK" field from the item "EUR=" of the list<br />

list. '<br />

2.2.7. StartUpdates<br />

StartUpdates(Mode)<br />

This method starts the real time update of data for the items registered using RegisterItems in the<br />

AdxRtList object. It also establishes the update mode.<br />

Arguments<br />

Mode<br />

A value from the RT_RunMode enumeration.<br />

Error handling<br />

If Mode contains an invalid value, an error exception is thrown.<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

24


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

list.StartUpdates RT_MODE_IMAGE<br />

'Requests all items registered in the list list from its source.<br />

Once a data image has been received for each of the objects<br />

(or a time-out occurs), no more data will be received. This<br />

supplies a snapshot of the items. '<br />

2.2.8. StopUpdates<br />

StopUpdates()<br />

This method stops the delivery of all updates of items registered in the AdxRtList object to the<br />

program but without closing the underlying data stream unless the StartUpdates mode was<br />

RT_MODE_IMAGE or the AdxRtList object is in the RT_LIST_LINKS_CLOSED state. This allows<br />

updates to be stopped momentarily. To resume updates, the StartUpdates method should be called<br />

again.<br />

Arguments<br />

<strong>No</strong>ne<br />

Error handling<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

list.StopUpdates<br />

'Stop the delivery of data for all items registered in the list list.'<br />

2.2.9. CloseAllLinks<br />

CloseAllLinks()<br />

This method stops the delivery of all updates for items registered in the AdxRtList object to the<br />

program and closes down the underlying data stream by informing the data source as required that no<br />

more updates will be necessary for those items.<br />

Arguments<br />

<strong>No</strong>ne<br />

Error handling<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

25


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Example<br />

Public list as AdxRtList<br />

Set list = New AdxRtList<br />

list.CloseAllLinks<br />

'Stop the delivery of data for all items registered in the list list<br />

and tell the source that they are no longer required. '<br />

2.3. ADXRTLIST EVENTS<br />

2.3.1. OnUpdate<br />

OnUpdate(ItemName, <strong>User</strong>Tag, ItemStatus)<br />

When StartUpdates has been called with either the RT_MODE_ONUPDATE or<br />

RT_MODE_ONTIME_IF_UPDATED mode, events of this type will be sent to the user application when<br />

data updates from the source are received for any of the items registered by the object.<br />

An event is generated for each item whose data have been updated by the data source, either as soon<br />

as the change is received (when RT_MODE_ONUPDATE is used), or if the change occurred during the<br />

period between regular checks controlled by a timer (when RT_MODE_ONTIME_IF_UPDATED is used).<br />

<strong>User</strong> code should provide a callback function to handle these events. In this function, the ListFields<br />

method can be called to determine which fields in the item have changed, and what the new field<br />

values are.<br />

Arguments<br />

ItemName<br />

<strong>User</strong>Tag<br />

ItemStatus<br />

The name of one of the items registered in the list object. The update event<br />

is associated with this item.<br />

The user tag associated with the item, if one was supplied using the<br />

<strong>User</strong>Tag method. This parameter should be treated as constant: it must not<br />

be changed by the application code.<br />

The status of the item, a value from the RT_ItemStatus enumeration.<br />

2.3.2. OnImage<br />

OnImage(DataStatus)<br />

This event is delivered once a data image has been received for each of the registered items of the<br />

AdxRtList object which is receiving data following a call to StartUpdates using the<br />

RT_MODE_IMAGE mode. It is also called if a time-out occurred (set using the "TIMEOUT" attribute of<br />

the Mode property) before all data images could be received.<br />

<strong>User</strong> code should provide a callback function to handle these events. In this function, the ListItems<br />

method can be used to see which items have a data image associated with them; for each of these,<br />

ListFields method can be called to obtain the values of its fields.<br />

Arguments<br />

DataStatus<br />

The status of the registered items, a value from the RT_DataStatus<br />

enumeration. This will have the value RT_DS_FULL if data have been<br />

received from the source for all registered items, or RT_DS_PARTIAL if at<br />

least one of the items still has no associated data at the end of the time-out<br />

period.<br />

26


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

2.3.3. On<strong>Time</strong><br />

On<strong>Time</strong>()<br />

This event is generated regularly by a timer at a frequency determined by the "FRQ" attribute<br />

parameter (see the Mode property) on behalf of the AdxRtList object which is receiving data<br />

following a call to StartUpdates using the RT_MODE_ONTIME mode.<br />

<strong>User</strong> code should provide a callback function to handle these events. In this function, the ListItems<br />

method can be used to see which items have changed since the last On<strong>Time</strong> event; for each of these,<br />

ListFields method can be called to obtain the values of the updated fields.<br />

Arguments<br />

<strong>No</strong>ne<br />

2.3.4. OnStatusChange<br />

OnStatusChange(ListStatus, SourceStatus, RunMode)<br />

This event is generated every time a change occurs that affects the status of the AdxRtList object as<br />

a whole. Such events are:<br />

The Source property is changed.<br />

The RT_RunMode changes (through a call to the StartUpdates method).<br />

The real time data streams are stopped (through external events) or closed (through a call to the<br />

CloseAllLinks method).<br />

The AdxRtList object goes from empty to non-empty.<br />

<strong>User</strong> code should supply a callback function to handle these events within the program.<br />

Arguments<br />

ListStatus<br />

SourceStatus<br />

RunMode<br />

The current status of the AdxRtList object. This is a value from the<br />

RT_ListStatus enumeration.<br />

The current status of the data source (identified by the Source property).<br />

This is a value from the RT_SourceStatus enumeration.<br />

The current update mode, usually changed through the StartUpdates<br />

method. This is a value from the RT_RunMode enumeration.<br />

2.4. ADXRTLIST ILISTEVENTS INTERFACE<br />

A user application can use the IListEvents interface as an alternative to the standard event<br />

(connection point) interface associated with an object of type AdxRtList. To use this alternative<br />

interface, the user application must associate an object which implements the IListEvents interface<br />

with the AdxRtList object or objects. This is done using the AdxRtList object’s ListAdvise<br />

method. The association can be broken by calling the ListUnadvise method.<br />

Once an association of this type has been established, the various events delivered for the<br />

AdxRtList object will cause the corresponding methods of the IListEvents object to be called.<br />

Using this interface allows methods to be dispatched using a vtable mechanism. This is a much faster<br />

process than that of using the connection point mechanism, improving the user application’s<br />

performance.<br />

27


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Example<br />

A Visual Basic implementation of an object providing the IListEvents interface involves using a<br />

class module. This will look something like the following:<br />

Implements IListEvents<br />

Dim list as AdxRtList<br />

Set list = New AdxRtList<br />

list.ListAdvise Me<br />

'This declares that the object implemented by the class module<br />

contains a list object…'<br />

'… which is created here. '<br />

'This associates the object with the list item it knows about,<br />

list. In other words, list ‘s events will be sent to the object<br />

containing it. '<br />

list.StartUpdates RT_MODE_ONUPDATE<br />

'Ask for updates for items registered by the list. '<br />

'The following event callback for the interface can be created by the Visual Basic editor. '<br />

Sub IListEvents_OnUpdate(ByVal MyList as AdxRtxLibCtl.IAdxRtList, _<br />

ItemName as String, <strong>User</strong>Tag as Long, ItemStatus as RT_ItemStatus)<br />

Dim MyArray as Variant<br />

MyArray = MyList.ListItems(RT_IRV_UPDATED, RT_ICV_USERTAG)<br />

'The objects list (a property of the class module’s object) and<br />

MyList (received as a parameter to this function) are in fact the<br />

same. '<br />

End Sub<br />

2.4.1. ListAdvise<br />

ListAdvise(pListEvents)<br />

This method allows the user application to receive events for the AdxRtList object though an<br />

alternative interface. The event callback functions are methods of an object implementing the<br />

IListEvents interface.<br />

When the AdxRtList object’s StartUpdates method is called, the events will be delivered to the<br />

methods of the interface object.<br />

Arguments<br />

pListEvents<br />

A pointer to an object implementing the IListEvents interface. This object<br />

need not be unique for all AdxRtList objects.<br />

2.4.2. ListUnadvise<br />

ListUnadvise()<br />

This method detaches the AdxRtList object from an object implementing the IListEvents<br />

interface.<br />

Arguments<br />

<strong>No</strong>ne.<br />

28


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

2.4.3. OnUpdate<br />

OnUpdate(MyList, ItemName, <strong>User</strong>Tag, ItemStatus)<br />

The OnUpdate event causes a call to this method of the object providing the IListEvents interface<br />

for the AdxRtList object.<br />

The two objects were linked through a call to the AdxRtList object’s ListAdvise method.<br />

Arguments<br />

MyList<br />

ItemName<br />

<strong>User</strong>Tag<br />

ItemStatus<br />

A pointer to the IAdxRtList interface of the AdxRtList object for which<br />

the event was delivered.<br />

The name of one of the items registered in the list object identified by<br />

MyList. The update event is associated with this item. This parameter<br />

should be treated as constant: it must not be changed by the application<br />

code.<br />

The user tag associated with the item, if one was supplied using the<br />

<strong>User</strong>Tag method. This Variant value should be treated as constant.<br />

The status of the item, a value from the RT_ItemStatus enumeration.<br />

2.4.4. OnImage<br />

OnImage(MyList,DataStatus)<br />

The OnImage event causes a call to this method of the object providing the IListEvents interface<br />

for the AdxRtList object.<br />

The two objects were linked through a call to the AdxRtList object’s ListAdvise method.<br />

Arguments<br />

MyList<br />

DataStatus<br />

A pointer to the IAdxRtList interface of the AdxRtList object for which<br />

the event was delivered.<br />

The status of the registered items, a value from the RT_DataStatus<br />

enumeration. This will have the value RT_DS_FULL if data have been<br />

received from the source for all registered items, or RT_DS_PARTIAL if at<br />

least one of the items still has no associated data at the end of the time-out<br />

period.<br />

2.4.5. On<strong>Time</strong><br />

On<strong>Time</strong>(My List)<br />

The On<strong>Time</strong> event causes a call to this method of the object providing the IListEvents interface for<br />

the AdxRtList object.<br />

The two objects were linked through a call to the AdxRtList object’s ListAdvise method.<br />

Arguments<br />

MyList<br />

A pointer to the IAdxRtList interface of the AdxRtList object for which<br />

the event was delivered.<br />

29


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

2.4.6. OnStatusChange<br />

OnStatusChange(MyList,ListStatus, SourceStatus, RunMode)<br />

The OnStatusChange event causes a call to this method of the object providing the IListEvents<br />

interface for the AdxRtList object.<br />

The two objects were linked through a call to the AdxRtList object’s ListAdvise method.<br />

Arguments<br />

MyList<br />

ListStatus<br />

SourceStatus<br />

RunMode<br />

A pointer to the IAdxRtList interface of the AdxRtList object for which<br />

the event was delivered.<br />

The current status of the AdxRtList object. This is a value from the<br />

RT_ListStatus enumeration.<br />

The current status of the data source (identified by the Source property).<br />

This is a value from the RT_SourceStatus enumeration.<br />

The current update mode, usually changed through the StartUpdates<br />

method. This is a value from the RT_RunMode enumeration.<br />

30


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

3. ADXRTCONTRIBUTE<br />

3.1. ADXRTCONTRIBUTE PROPERTIES<br />

3.1.1. ErrorMode<br />

ErrorMode<br />

This property sets the error mode for the object. When an error is detected, this property is consulted<br />

to see what action should be taken by the object to inform the user of the application. It must be<br />

assigned a value from the AdxErrorMode enumeration.<br />

By default the error mode is set to EXCEPTION.<br />

Arguments<br />

<strong>No</strong>ne<br />

3.1.2. ErrorCode<br />

ErrorCode<br />

This property retrieves the error code of the latest error encountered by the object as an integer value.<br />

If the ErrorMode property of the object is set to NO_EXCEPTION, this value must be consulted by the<br />

client application to determine whether an error has occurred.<br />

Arguments<br />

<strong>No</strong>ne<br />

3.1.3. ErrorString<br />

ErrorString<br />

This property retrieves a string describing the latest error encountered by the object. If the ErrorMode<br />

property of the object is set to NO_EXCEPTION, this value can be consulted by the client application<br />

when the ErrorCode property indicates that an error has occurred.<br />

Arguments<br />

<strong>No</strong>ne<br />

3.1.4. Mode<br />

Mode<br />

This property describes various behavioural aspects of the AdxRtContribute object. In particular, it<br />

determines how the contribution object will deliver data update events to the client application. The<br />

allowed parameters are:<br />

FORMAT : The format applied to a numeric data contributed to a page.<br />

FORMAT:i: j set a format with a total field width of i characters and<br />

a decimal precision of j digits.<br />

31


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

FTC : The fields to contribute when several fields have been specified.<br />

FTC:ALL<br />

send all field values (the default).<br />

FTC:CHANGED send only those field values that have changed.<br />

FORMAT:i-j,k always send those fields in positions i to j and position<br />

k in the field list, along with any others in the list whose<br />

values have changed.<br />

LIFETIME : The period following local contribution during which values contributed are<br />

kept as current (in preference to updated values coming from the specified<br />

data source). At the end of this period, a contributed value will be dropped in<br />

favour of the data source’s value.<br />

LIFETIME:ALWAYS keep the contributed values indefinitely.<br />

LIFETIME: iH keep the contributed values for i hours.<br />

LIFETIME: iM keep the contributed values for i minutes.<br />

LIFETIME: iS keep the contributed values for i seconds.<br />

OPERATION : The type of operation required in the case of page-based contribution.<br />

OPERATION:CONTRIBUTION contributes to the page.<br />

OPERATION:DELETE deletes the page.<br />

OPERATION:LIVE for live page creation.<br />

OPERATION:STATIC for static page creation.<br />

POS : The position in a line at which the value should be written, for contribution to<br />

a page.<br />

POS:i<br />

the (formatted) field value will be pasted over the<br />

contents of the destination line starting at the i th<br />

character position.<br />

SCOPE : The scope for the contribution. Either the contribution is made only to the<br />

local cache, in which case only local applications sharing that cache will see<br />

the results of the contribution; or the contribution is sent directly to the<br />

selected source’s server.<br />

Arguments<br />

<strong>No</strong>ne<br />

SCOPE:L or SCOPE:LOCAL the contribution should be local.<br />

SCOPE:S or SCOPE:SERVER the contribution should be made to the<br />

source’s server.<br />

3.1.5. Attribute<br />

Attribute(AttrID)<br />

Allows the consultation of various settings applying to the object. These are the settings that can be<br />

changed for the object by assigning values to the Mode property.<br />

Arguments<br />

AttrID<br />

An identification of the attribute, passed as a Variant. This can be either an<br />

identifying code taken from the AdxAttrRtContribute enumeration or a<br />

string containing the keyword used to set the attribute using the Mode<br />

property.<br />

Return Value<br />

The value of the requested attribute of type variant.<br />

32


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

3.1.6. Source<br />

Source<br />

Name of the data source as a string to which the contribution request will be addressed.<br />

Arguments<br />

<strong>No</strong>ne<br />

3.1.7. ItemName<br />

ItemName<br />

This property provides the name of the item as a string which identifies the item to which to contribute.<br />

It must be set in order to be able to perform the contribution.<br />

Arguments<br />

<strong>No</strong>ne<br />

3.1.8. RunStatus<br />

RunStatus<br />

This property allows the application to know whether the object is currently performing contribution.<br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

This function returns a one of the values listed in the RT_RunStatus enumeration.<br />

3.2. ADXRTCONTRIBUTE METHODS<br />

3.2.1. Contribute<br />

Contribute(FieldNameArray, FieldValueArray)<br />

This method contributes multiple field values for the item given by the ItemName property.<br />

Arguments<br />

FieldNameArray<br />

FieldValueArray<br />

A variant, typically an array of field names as strings.<br />

A variant, typically an array of field values of type variant. There should be<br />

one field value for each field name given in FieldNameArray.<br />

Return Value<br />

Returns True if the contribution has been sent successfully, False otherwise.<br />

33


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Example<br />

Dim contrib as AdxRtContribute<br />

Set contrib = New AdxRtContribute<br />

contrib.Source = "DDS"<br />

contrib.ItemName = "EUR="<br />

ret = contrib.Contribute("BID", "<strong>1.0</strong>512")<br />

'Contribute a "BID" field value for the item "EUR=" directly. '<br />

Dim FieldNameArray(0 to 1) as Variant<br />

Dim FieldValueArray(0 to 1) as Variant<br />

contrib.ItemName = "FRF="<br />

FieldNameArray(0) = "BID"<br />

FieldNameArray(1) = "ASK"<br />

FieldValueArray(0) = 5.8910<br />

FieldValueArray(1) = 5.8950<br />

ret = RtObject.Contribute(FieldNameArray, FieldValueArray)<br />

'Contribute "BID" and "ASK" field values for the item "FRF="<br />

using arrays. '<br />

34


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

4. ADXRTCHAIN<br />

4.1. ADXRTCHAIN PROPERTIES<br />

4.1.1. Mode<br />

Mode<br />

This property describes how the Data property is to present its results. It is a string which should<br />

contain a sequence of parameter settings. The allowed parameters are:<br />

IGNE : The Ignore Empty parameter determines whether empty elements of the<br />

returned chain contents are removed.<br />

IGNE:YES<br />

remove empty entries from the array.<br />

IGNE:NO<br />

leave empty entries in the array.<br />

LAY : The Layout parameter determines how the elements will be arranged in the<br />

returned array.<br />

LAY:HOR or LAY:H returns items in a horizontal layout.<br />

LAY:VER or LAY:V returns items in a vertical layout.<br />

LIVE : The Live parameter determines whether the chain should continue to be<br />

supplied with updates once the initial chain data have been fully received.<br />

This allows an application to decide whether to track changes to the contents<br />

of the chain coming from the data source.<br />

LIVE:YES<br />

continue to receive updates once the chain has been<br />

received completely.<br />

LIVE:NO<br />

supply no more updates once the chain data are<br />

complete (the default).<br />

RET : The Return parameter allows the size of the returned array to be controlled.<br />

RET:An<br />

return the first n entries of the array as an array.<br />

RET:n<br />

return only the n th entry of the array (entries are<br />

numbered from 1).<br />

By default no return array size is defined.<br />

SKIP : The Skip parameter allows various entries in the chain to be skipped before<br />

returning a reduced array. Entries are numbered from 1.<br />

SKIP:n<br />

remove the n th entry from the array.<br />

SKIP:i-j<br />

remove all entries from the i th to the j th (inclusive) from<br />

SKIP:i-j,k<br />

the array.<br />

different entries or ranges to skip can be combined in<br />

a comma-separated list.<br />

By default no elements are skipped. Often the first few entries of a chain do<br />

not contain item names.<br />

UWC : The Update When Completed parameter determines whether update events<br />

will be signalled to the application through the OnUpdate event callback<br />

while the different constituent parts of the chain are being retrieved.<br />

Arguments<br />

<strong>No</strong>ne<br />

UWC:NO<br />

UWC:YES<br />

signal an update event for the retrieval of each part of<br />

the chain.<br />

wait until the chain has been retrieved completely<br />

before generating an update event.<br />

By default this parameter is active (UWC:YES).<br />

35


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

4.1.2. ErrorMode<br />

ErrorMode<br />

This property sets the error mode for the object. When an error is detected, this property is consulted<br />

to see what action should be taken by the object to inform the user of the application. It must be<br />

assigned a value from the AdxErrorMode enumeration.<br />

By default the error mode is set to EXCEPTION.<br />

Arguments<br />

<strong>No</strong>ne<br />

4.1.3. ErrorCode<br />

ErrorCode<br />

This property retrieves the error code of the latest error encountered by the object as an integer value.<br />

If the ErrorMode property of the object is set to NO_EXCEPTION, this value must be consulted by the<br />

client application to determine whether an error has occurred.<br />

Arguments<br />

<strong>No</strong>ne<br />

4.1.4. ErrorString<br />

ErrorString<br />

This property retrieves a string describing the latest error encountered by the object. If the ErrorMode<br />

property of the object is set to NO_EXCEPTION, this value can be consulted by the client application<br />

when the ErrorCode property indicates that an error has occurred.<br />

Arguments<br />

<strong>No</strong>ne<br />

4.1.5. Attribute<br />

Attribute(AttrID)<br />

Allows the consultation of various settings applying to the object. These are the settings that can be<br />

changed for the object by assigning values to the Mode property.<br />

Arguments<br />

AttrID<br />

An identification of the attribute, passed as a Variant. This can be either an<br />

identifying code taken from the AdxAttrRtChain enumeration or a string<br />

containing the keyword used to set the attribute using the Mode property.<br />

Return Value<br />

The value of the requested attribute of type variant.<br />

36


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

4.1.6. Source<br />

Source<br />

The name of the data source as a string. It must be set in order to be able to request the chain.<br />

Arguments<br />

<strong>No</strong>ne<br />

4.1.7. ItemName<br />

ItemName<br />

This property provides the name of the item as a string which identifies the chain. It must be set in<br />

order to be able to request the chain.<br />

Arguments<br />

<strong>No</strong>ne<br />

4.1.8. Data<br />

Data<br />

This property returns the contents of the chain, as a variant array.<br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

Returns a one-dimensional array of Variant. The elements contain the names of the items making up<br />

the chain as strings. The Mode property determines various presentational options.<br />

Example<br />

Dim chain as AdxRtChain<br />

Set chain = New AdxRtChain<br />

chain.Source = "IDN"<br />

chain.ItemName = ".FCHI"<br />

chain.Mode = "IGNE:YES"<br />

Chain.RequestChain<br />

ret = chain.Data<br />

'Set the chain item’s source.'<br />

'Set the chain item’s name.'<br />

'Remove empty entries.'<br />

'Retrieve the list of items in the ".FCHI" chain.'<br />

4.1.9. DataStatus<br />

DataStatus<br />

This property returns the status of the chain’s data received from the source.<br />

37


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

This property returns a value taken from the RT_DataStatus enumeration.<br />

4.1.10. RunStatus<br />

RunStatus<br />

This property allows the application to know whether the object is currently retrieving chain data.<br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

This function returns a one of the values listed in the RT_RunStatus enumeration.<br />

4.1.11. SourceStatus<br />

SourceStatus<br />

This property returns a value from the RT_SourceStatus enumeration. This value reflects the status<br />

of the source defined by the Source property of the AdxRtChain object.<br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

Returns the status of the source of the list object.<br />

Error handling<br />

If the Source has not been set (i.e. the source is in the state RT_SOURCE_NOT_SET) an error<br />

exception is thrown.<br />

Example<br />

Public chain as AdxRtChain<br />

Set chain = New AdxRtChain<br />

chain.Source = "IDN_SELECTFEED"<br />

Status = chain.SourceStatus<br />

'Sets Status to the status of the "IDN_SELECTFEED" source;<br />

this might be RT_SOURCE_UP or RT_SOURCE_DOWN, for<br />

example.'<br />

38


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

4.2. ADXRTCHAIN METHODS<br />

4.2.1. RequestChain<br />

RequestChain()<br />

This method fetches the data for the chain specified by the Source and ItemName parameters. This<br />

action occurs asynchronously; the arrival of chain data, or an indication of a request error, causes the<br />

OnUpdate event to occur.<br />

Arguments<br />

<strong>No</strong>ne<br />

Example<br />

Dim chain as AdxRtChain<br />

Set chain = New AdxRtChain<br />

chain.Source = "IDN"<br />

chain.ItemName = ".FCHI"<br />

chain.Mode = "IGNE:YES"<br />

chain.RequestChain<br />

'Set the chain item’s source.'<br />

'Set the chain item’s name.'<br />

'Remove empty entries.'<br />

'Ask for the chain data.'<br />

4.3. ADXRTCHAIN EVENTS<br />

4.3.1. OnUpdate<br />

OnUpdate(DataStatus)<br />

This callback handles updates to the requested data. If the Update When Completed attribute is in<br />

effect (see the "UWC" keyword of the Mode property), this will occur only once all chain data have been<br />

retrieved, or some request error occurs. Otherwise, the event may be called a number of times before<br />

all data have arrived.<br />

If the Live attribute is active (see the "LIVE" keyword of the Mode property), updates may continue to<br />

arrive following the completion of the chain’s data, as the source sends changes to the chain’s<br />

contents.<br />

Arguments<br />

DataStatus<br />

The status of the data retrieved by the request. This is a value taken from the<br />

RT_DataStatus enumeration.<br />

4.3.2. OnStatusChange<br />

OnStatusChange(SourceStatus)<br />

This callback is called every time a change occurs to the status of the data source specified by the<br />

Source property while there is an outstanding RequestChain request.<br />

39


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Arguments<br />

SourceStatus<br />

The current status of the data source (identified by the Source property).<br />

This is a value from the RT_SourceStatus enumeration.<br />

40


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

5. ADXRTHISTORY<br />

5.1. ADXRTHISTORY PROPERTIES<br />

5.1.1. Mode<br />

Mode<br />

This property describes how the Data property is to present its results. It is a string which should<br />

contain a sequence of parameter settings. It also allows the definition of the range of dates over which<br />

historical data is to be retrieved. The allowed parameters are:<br />

END : The End Date parameter fixes the last date for which historical data should<br />

be retrieved.<br />

END:ddmmmyy sets an end date of ddmmmyy.<br />

By default data will be retrieved up to the current date.<br />

HEADER : The Header attribute determines whether a “header” row of field names<br />

should be returned with the data.<br />

HEADER:YES include a header row.<br />

HEADER:NO do not include a header row (default).<br />

If the keyword HEADER is present on its own, it is treated as HEADER:YES.<br />

FRQ : The Frequency parameter establishes the predefined time-series to consult.<br />

FRQ:D<br />

Fetch daily data (default).<br />

FRQ:W<br />

Fetch weekly data.<br />

FRQ:M<br />

Fetch monthly data.<br />

FRQ:other<br />

Fetch data of the frequency specified by the letter<br />

other. This frequency must be supported by the<br />

source.<br />

LAY : The Layout attribute determines how the elements will be arranged in the<br />

returned array.<br />

LAY:HOR or LAY:H returns items in a horizontal layout.<br />

LAY:VER or LAY:V returns items in a vertical layout.<br />

NBEVENTS : The Number of Events parameter limits the number of historical events that<br />

will be retrieved.<br />

NBEVENTS:n return data for no more than n events.<br />

The default value depends on the frequency setting as follows:<br />

NBEVENTS:25 with a daily frequency (FRQ:D).<br />

NBEVENTS:52 with a weekly frequency (FRQ:W).<br />

NBEVENTS:12 with a monthly frequency (FRQ:M).<br />

NBEVENTS:25 with any other frequency (FRQ:other).<br />

EVENTS : Exact number of historical data retrieved {i with i as integer}<br />

EVENTS:i to retrieve i data points (see the NBEVENTS keyword and the<br />

<strong>No</strong>te section below.)<br />

NULL : The Null attribute dictates how empty entries should be handled.<br />

NULL:NA<br />

provide the string value "#N/A ND" instead of null<br />

values (default).<br />

NULL:REPEAT copy earlier valid values to this entry, if any.<br />

NULL:SKIP drop the entry in the returned array.<br />

RET : The Return parameter allows the size of the returned array to be controlled.<br />

RET:An<br />

return the first n entries of the array as an array.<br />

RET:n<br />

return only the n th entry of the array (entries are<br />

numbered from 1).<br />

By default no return array size is defined.<br />

41


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

SORT : The Sort attribute determines how the elements will be sorted in the returned<br />

array.<br />

SORT:ASC<br />

returns event data in ascending (chronological) order.<br />

SORT:DES<br />

returns event data in descending (reversechronological)<br />

order (default).<br />

START : The Start Date parameter fixes the first date for which historical data should<br />

be retrieved.<br />

START:ddmmmyy sets a start date of ddmmmyy.<br />

There is no default start date. If not constrained by other parameters, the<br />

whole history is retrieved.<br />

ZERO : The Zero attribute dictates how entries containing zero values should be<br />

handled.<br />

ZERO:NA<br />

provide the value 0 (zero) for zero values (default).<br />

ZERO:REPEAT copy earlier valid non-zero to this entry, if any.<br />

ZERO:SKIP drop the entry in the returned array.<br />

Arguments<br />

<strong>No</strong>ne<br />

<strong>No</strong>tes<br />

The NULL keyword defines the action taken only where date entries with null data are encountered.<br />

Dates before the start date or following the end date of the time series are always ignored.<br />

The application of the NBEVENTS limit involves counting date entries with null data when the<br />

NULL:NA or NULL:REPEAT condition is used; these entries are ignored if NULL:SKIP is used.<br />

5.1.2. ErrorMode<br />

ErrorMode<br />

This property sets the error mode for the object. When an error is detected, this property is consulted<br />

to see what action should be taken by the object to inform the user of the application. It must be<br />

assigned a value from the AdxErrorMode enumeration.<br />

By default the error mode is set to NO_EXCEPTION.<br />

Arguments<br />

<strong>No</strong>ne<br />

5.1.3. ErrorCode<br />

ErrorCode<br />

This property retrieves the error code of the latest error encountered by the object as an integer value.<br />

If the ErrorMode property of the object is set to NO_EXCEPTION, this value must be consulted by the<br />

client application to determine whether an error has occurred.<br />

Arguments<br />

<strong>No</strong>ne<br />

42


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

5.1.4. ErrorString<br />

ErrorString<br />

This property retrieves a string describing the latest error encountered by the object. If the ErrorMode<br />

property of the object is set to NO_EXCEPTION, this value can be consulted by the client application<br />

when the ErrorCode property indicates that an error has occurred.<br />

Arguments<br />

<strong>No</strong>ne<br />

5.1.5. Attribute<br />

Attribute(AttrID)<br />

Allows the consultation of various settings applying to the object. These are the settings that can be<br />

changed for the object by assigning values to the Mode property.<br />

Arguments<br />

AttrID<br />

An identification of the attribute, passed as a Variant. This can be either an<br />

identifying code taken from the AdxAttrRtHistory enumeration or a string<br />

containing the keyword used to set the attribute using the Mode property.<br />

Return Value<br />

The value of the requested attribute of type variant.<br />

5.1.6. Source<br />

Source<br />

The name of the data source as a string. It must be set in order to be able to request the time series<br />

information.<br />

Arguments<br />

<strong>No</strong>ne<br />

5.1.7. ItemName<br />

ItemName<br />

This property provides the name of the item for which the historical time series is to be retrieved.<br />

Arguments<br />

<strong>No</strong>ne<br />

5.1.8. Data<br />

Data<br />

This property returns the historical data, as a variant array.<br />

43


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

Returns a two-dimensional array of Variant. The elements contain values for the fields listed in<br />

ExistingFields for each date entry retrieved from the time series. The Mode property determines<br />

various presentational and selection filtering options.<br />

5.1.9. DataStatus<br />

DataStatus<br />

This property returns the status of the historical data received from the source.<br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

This property returns a value taken from the RT_DataStatus enumeration.<br />

5.1.10. RunStatus<br />

RunStatus<br />

This property allows the application to know whether the object is currently retrieving historical data.<br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

This function returns a one of the values listed in the RT_RunStatus enumeration.<br />

5.1.11. ExistingFields<br />

ExistingFields<br />

This property indicates which fields have been supplied in the returned historical data entries.<br />

Arguments<br />

<strong>No</strong>ne<br />

Return Value<br />

Returns a one-dimensional array of Variant. The elements contain the names of the fields contained in<br />

each date entry of the Data property, as returned by the time series data source.<br />

44


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

5.2. ADXRTHISTORY METHODS<br />

5.2.1. RequestHistory<br />

RequestHistory(FieldList)<br />

This method causes a request for time series data concerning the item identified by the ItemName<br />

property. Historical data is retrieved for the fields listed in the parameter FieldList, if possible (the<br />

actual list of fields retrieved will be stored in the ExistingFields property). This action occurs<br />

asynchronously; the arrival of history data, or an indication of a request error, causes the OnUpdate<br />

event to occur.<br />

Arguments<br />

FieldList<br />

An array of field names as strings, identifying the fields for which historical<br />

values should be retrieved. If empty, all fields available in the time series will<br />

be retrieved.<br />

5.2.2. FlushData<br />

FlushData()<br />

This method causes the history object to forget all data retrieved through a previous call to<br />

RequestHistory.<br />

Arguments<br />

<strong>No</strong>ne.<br />

5.3. ADXRTHISTORY EVENTS<br />

5.3.1. OnUpdate<br />

OnUpdate(DataStatus)<br />

This callback handles updates to the requested historical data, following a call to the<br />

RequestHistory method. It may be called a number of times as updates occur, filling the Data<br />

property with historical event information, before the retrieved time series is complete (according to the<br />

constraints applied using the Mode property).<br />

Arguments<br />

DataStatus<br />

The status of the data retrieved by the request. This is a value taken from the<br />

RT_DataStatus enumeration.<br />

45


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

6. ADXRTXLIB PARAMETERS AND CONSTANTS<br />

6.1. ADXRTXLIB ENUMERATED TYPES<br />

6.1.1. RT_ItemStatus<br />

RT_ItemStatus<br />

The property ItemStatus and the ItemStatus parameter to the OnUpdate event handler of the<br />

AdxRtList object use these values to indicate the status of an individual item retrieved from the<br />

source.<br />

Values<br />

RT_ITEM_OK : The item is valid.<br />

RT_ITEM_INVALID : The item is not available from the source or is not registered.<br />

RT_ITEM_UNKNOWN : The item is temporarily in an unknown state.<br />

RT_ITEM_STALE : The item is known by the source but is not available; data<br />

associated with it may be out of date.<br />

6.1.2. RT_FieldStatus<br />

RT_FieldStatus<br />

The property FieldStatus of the AdxRtList object uses one of these values to indicate the status<br />

of a field within an item retrieved from the source. Fields must be defined in the data dictionary file<br />

(global.mfl), otherwise they will not be recognised.<br />

Values<br />

RT_FIELD_OK : The field is present in the field list of its item.<br />

RT_FIELD_INVALID : The field is not present in the item.<br />

RT_FIELD_UNKNOWN : The field is temporarily in an unknown state.<br />

RT_FIELD_UNDEFINED : The field is not defined in the field dictionary of the source.<br />

6.1.3. RT_SourceStatus<br />

RT_SourceStatus<br />

The properties AdxRtList SourceStatus and AdxRtChain SourceStatus, as well as the<br />

SourceStatus parameter to the AdxRtList OnUpdate event handler, use these values to indicate<br />

the status of the source used to retrieve the requested information.<br />

Values<br />

RT_SOURCE_UP : The data source is available.<br />

RT_SOURCE_DOWN : The data source is unavailable.<br />

RT_SOURCE_INVALID : The data source is invalid on this system.<br />

RT_SOURCE_UNDEFINED : The data source has not yet been defined.<br />

RT_SOURCE_NOT_SET : The Source property of the object has not been assigned.<br />

46


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

6.1.4. RT_ListStatus<br />

RT_ListStatus<br />

The property ListStatus and the ListStatus parameter to the OnStatusChange event handler<br />

of the AdxRtList object use these values to indicate the status of the object itself.<br />

Values<br />

RT_LIST_INACTIVE : <strong>No</strong> real time data items are being requested at present.<br />

RT_LIST_RUNNING : <strong>Real</strong> time data items are receiving data images or updates.<br />

RT_LIST_UPDATES_STOPPED : Update events for real time data items have been<br />

temporarily stopped.<br />

RT_LIST_LINKS_CLOSED : Updates for the real time data items are no longer being<br />

supplied by the source.<br />

6.1.5. RT_ItemRowView<br />

RT_ItemRowView<br />

These values are used as parameters to the AdxRtList ListItems and ItemListCount<br />

properties to specify how items in the list should be selected.<br />

Values<br />

RT_IRV_UPDATED : The item array will contain rows only for those items in the<br />

list that have been updated.<br />

RT_IRV_ALL : The item array will contain rows for all items in the list.<br />

6.1.6. RT_FieldRowView<br />

RT_FieldRowView<br />

These values are used as parameters to the AdxRtList ListFields and FieldListCount<br />

properties to specify how fields in an item should be selected.<br />

Values<br />

RT_FRV_EXISTING : The field array will contain rows for all fields in the item.<br />

RT_FRV_UPDATED : The field array will contain rows only for those fields in the<br />

item that have been updated.<br />

RT_FRV_ALL : The field array will contain rows for all fields registered in the<br />

list for the item.<br />

6.1.7. RT_ItemColumnView<br />

RT_ItemColumnView<br />

These values are used as parameters to the AdxRtList ListItems property to specify which<br />

information relating to the items in the list should be selected.<br />

47


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

Values<br />

RT_ICV_USERTAG : The item array will contain a column for the item user tags<br />

set using the <strong>User</strong>Tag property.<br />

RT_ICV_STATUS : The item array will contain a column holding the status of<br />

each item as a value from the RT_ItemStatus<br />

enumeration.<br />

6.1.8. RT_FieldColumnView<br />

RT_FieldColumnView<br />

These values are used as parameters to the AdxRtList ListFields property to specify which<br />

information relating to the fields in the item should be selected.<br />

Values<br />

RT_FCV_USERTAG : The field array will contain a column for the field user tags<br />

set using the <strong>User</strong>Tag property.<br />

RT_FCV_STATUS : The field array will contain a column holding the status of<br />

each field as a value from the RT_FieldStatus<br />

enumeration.<br />

RT_FCV_VALUE : The field array will contain a column holding the value of<br />

each field as a variant.<br />

6.1.9. RT_RunMode<br />

RT_RunMode<br />

Values of this type are used by AdxRtList StartUpdates to specify how update signalling should<br />

be performed. They are also passed to the OnStatusChange event callback for information.<br />

Values<br />

RT_MODE_ONTIME_IF_UPDATED : At regular intervals, defined by the "FRQ" attribute of the<br />

Mode property, all registered items will be checked to see if<br />

any have been updated by the data source since the<br />

previous check. For each updated item an OnUpdate event<br />

will be generated.<br />

RT_MODE_ONTIME : On<strong>Time</strong> events will be generated at regular intervals, defined<br />

by the "FRQ" attribute of the Mode property, whether or not<br />

any data updates have been received for the items in the list.<br />

RT_MODE_ONUPDATE : OnUpdate events will be generated for each item in the list<br />

every time data updates are received for that item from the<br />

source.<br />

RT_MODE_IMAGE : An OnImage event will be generated once a single data<br />

image has been received for each of the items in the list, or<br />

after a time-out.<br />

RT_MODE_NOT_SET : <strong>No</strong> update run mode has been set using the StartUpdates<br />

method.<br />

48


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

6.1.10. RT_DataStatus<br />

RT_DataStatus<br />

This enumeration lists the different values used to describe the status of data retrieved by the objects.<br />

Values of this type are passed as parameters to the event callback functions AdxRtList OnImage,<br />

AdxRtHistory OnUpdate, and AdxRtChain OnUpdate. The values are also those used by the<br />

AdxRtHistory DataStatus and AdxRtChain DataStatus properties.<br />

Values<br />

RT_DS_FULL : This value indicates that all desired data have been retrieved<br />

and are available.<br />

RT_DS_PARTIAL : This value indicates that some of the requested data are<br />

available, but that the request has not yet been entirely<br />

satisfied.<br />

RT_DS_NULL_ERROR : This value indicates that an error has occurred and that,<br />

consequently, no data are available.<br />

RT_DS_NULL_EMPTY : This value indicates that the request returned no data.<br />

RT_DS_NULL_TIMEOUT : This value indicates that a timeout occurred before any data<br />

could be retrieved.<br />

6.1.11. RT_RunStatus<br />

RT_RunStatus<br />

This enumeration lists the different states of an object regarding its requests of the source. The<br />

properties AdxRtContribute RunStatus, AdxRtHistory RunStatus and AdxRtChain<br />

RunStatus return these values.<br />

Values<br />

RT_RS_READY : The object is ready to be used to make a request for data<br />

from a data source.<br />

RT_RS_BUSY : The object is currently awaiting a response from the server.<br />

For objects that accept multiple data updates from the<br />

source, this means that more update events can be<br />

expected.<br />

RT_RS_NOT_INIT : The object does not have enough information to be able to<br />

make a request.<br />

6.1.12. RT_DebugLevel<br />

RT_DebugLevel<br />

This enumeration lists the valid values for the DebugLevel property of the AdxRtList object.<br />

Values<br />

RT_DEBUG_NO : <strong>No</strong> debug messages will be sent. Exceptions indicate invalid<br />

parameters and object event interfaces are used to signal<br />

system errors.<br />

49


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

RT_DEBUG_IMMEDIATE : The validity of all parameters is checked before the client<br />

application’s actions are allowed to proceed. This may<br />

require waiting for responses from remote data sources.<br />

Debug messages will be generated immediately following the<br />

actions that provoked them.<br />

6.1.13. AdxErrorMode<br />

AdxErrorMode<br />

This enumeration lists the valid values for the ErrorMode property in each of the AdxRtxLib objects.<br />

Values<br />

NO_EXCEPTION : <strong>No</strong> action is taken when an error is detected. In this mode,<br />

the client application must consult the value of the<br />

ErrorCode property to know if an error has been<br />

encountered.<br />

DIALOGBOX : A dialog box is displayed when an error occurs.<br />

EXCEPTION : An exception is thrown an error occurs.<br />

6.1.14. AdxAttrRtList<br />

AdxAttrRtList<br />

This enumeration provides identifiers for the AdxRtList object’s attributes. These are changed<br />

indirectly by supplying a new string to the object’s Mode property.<br />

Values<br />

ATTR1L_RTLIST_FRQ : This value identifies the frequency of regular On<strong>Time</strong> events.<br />

In the Mode string, this is set using the "FRQ" keyword.<br />

ATTR1L_RTLIST_TIMEOUT : This value identifies the length of the timeout period after<br />

which requests for item data images will be abandoned. In<br />

the Mode string, this is set using the "TIMEOUT" keyword.<br />

6.1.15. AdxAttrRtContribute<br />

AdxAttrRtContribute<br />

This enumeration provides identifiers for the AdxRtContribute object’s attributes. These are<br />

changed indirectly by supplying a new string to the object’s Mode property.<br />

Values<br />

ATTR1E_RTCTRB_SCOPE : This value determines whether the contribution should be<br />

local (updating a value in the local cache) or should be sent<br />

to the server. In the Mode string, this is set using the<br />

"SCOPE" keyword.<br />

50


<strong>AdfinX</strong> <strong>Real</strong> <strong>Time</strong> <strong>1.0</strong> <strong>Library</strong> - <strong>User</strong>'s <strong>Guide</strong><br />

6.1.16. AdxAttrRtChain<br />

AdxAttrRtChain<br />

This enumeration provides identifiers for the AdxRtChain object’s attributes. These are changed<br />

indirectly by supplying a new string to the object’s Mode property.<br />

Values<br />

ATTR1E_RTCHAIN_IGNE : This value identifies the Ignore Empty attribute. In the Mode<br />

string, this is set using the "IGNE" keyword.<br />

ATTR1E_RTCHAIN_LAY : This value identifies the Layout mode. In the Mode string, this<br />

is set using the "LAY" keyword.<br />

ATTR1E_RTCHAIN_LIVE : This value identifies the Live attribute. In the Mode string, this<br />

is set using the "LIVE" keyword.<br />

ATTR1S_RTCHAIN_RET : This value identifies the Return attribute. In the Mode string,<br />

this is set using the "RET" keyword.<br />

ATTR1S_RTCHAIN_SKIP : This value identifies the Skip attribute. In the Mode string,<br />

this is set using the "SKIP" keyword.<br />

ATTR1E_RTCHAIN_UWC : This value identifies the Update When Completed attribute.<br />

In the Mode string, this is set using the "UWC" keyword.<br />

6.1.17. AdxAttrRtHistory<br />

AdxAttrRtHistory<br />

This enumeration provides identifiers for the AdxRtHistory object’s attributes. These are changed<br />

indirectly by supplying a new string to the object’s Mode property.<br />

Values<br />

ATTR1E_RTHIST_HEADER : This value identifies the Header attribute. In the Mode string,<br />

this is set using the "HEADER" keyword.<br />

ATTR1E_RTHIST_LAY : This value identifies the Layout attribute. In the Mode string,<br />

this is set using the "LAY" keyword.<br />

ATTR1E_RTHIST_NULL : This value identifies the Null attribute. In the Mode string, this<br />

is set using the "NULL" keyword.<br />

ATTR1S_RTHIST_RET : This value identifies the Return parameter. In the Mode<br />

string, this is set using the "RET" keyword.<br />

ATTR1E_RTHIST_ZERO : This value identifies the Zero attribute. In the Mode string,<br />

this is set using the "ZERO" keyword.<br />

ATTR1E_RTHIST_SORT : This value identifies the Sort attribute. In the Mode string, this<br />

is set using the "SORT" keyword.<br />

ATTR1D_RTHIST_END : This value identifies the End Date parameter. In the Mode<br />

string, this is set using the "END" keyword.<br />

ATTR1E_RTHIST_FRQ : This value identifies the Frequency parameter. In the Mode<br />

string, this is set using the "FRQ" keyword.<br />

ATTR1I_RTHIST_NBEVENTS : This value identifies the Number of Events parameter. In the<br />

Mode string, this is set using the "NBEVENTS" keyword.<br />

ATTR1D_RTHIST_START : This value identifies the Start Date parameter. In the Mode<br />

string, this is set using the "START" keyword.<br />

51

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!