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)

master272.com
from master272.com More from this publisher
26.10.2014 Views

AdfinX Real Time 1.0 Library - User's Guide Example Public list as AdxRtList Set list = New AdxRtList list.CloseAllLinks 'Stop the delivery of data for all items registered in the list list and tell the source that they are no longer required. ' 2.3. ADXRTLIST EVENTS 2.3.1. OnUpdate OnUpdate(ItemName, UserTag, ItemStatus) When StartUpdates has been called with either the RT_MODE_ONUPDATE or RT_MODE_ONTIME_IF_UPDATED mode, events of this type will be sent to the user application when data updates from the source are received for any of the items registered by the object. An event is generated for each item whose data have been updated by the data source, either as soon as the change is received (when RT_MODE_ONUPDATE is used), or if the change occurred during the period between regular checks controlled by a timer (when RT_MODE_ONTIME_IF_UPDATED is used). User code should provide a callback function to handle these events. In this function, the ListFields method can be called to determine which fields in the item have changed, and what the new field values are. Arguments ItemName UserTag ItemStatus The name of one of the items registered in the list object. The update event is associated with this item. The user tag associated with the item, if one was supplied using the UserTag method. This parameter should be treated as constant: it must not be changed by the application code. The status of the item, a value from the RT_ItemStatus enumeration. 2.3.2. OnImage OnImage(DataStatus) This event is delivered once a data image has been received for each of the registered items of the AdxRtList object which is receiving data following a call to StartUpdates using the RT_MODE_IMAGE mode. It is also called if a time-out occurred (set using the "TIMEOUT" attribute of the Mode property) before all data images could be received. User code should provide a callback function to handle these events. In this function, the ListItems method can be used to see which items have a data image associated with them; for each of these, ListFields method can be called to obtain the values of its fields. Arguments DataStatus The status of the registered items, a value from the RT_DataStatus enumeration. This will have the value RT_DS_FULL if data have been received from the source for all registered items, or RT_DS_PARTIAL if at least one of the items still has no associated data at the end of the time-out period. 26

AdfinX Real Time 1.0 Library - User's Guide 2.3.3. OnTime OnTime() This event is generated regularly by a timer at a frequency determined by the "FRQ" attribute parameter (see the Mode property) on behalf of the AdxRtList object which is receiving data following a call to StartUpdates using the RT_MODE_ONTIME mode. User code should provide a callback function to handle these events. In this function, the ListItems method can be used to see which items have changed since the last OnTime event; for each of these, ListFields method can be called to obtain the values of the updated fields. Arguments None 2.3.4. OnStatusChange OnStatusChange(ListStatus, SourceStatus, RunMode) This event is generated every time a change occurs that affects the status of the AdxRtList object as a whole. Such events are: The Source property is changed. The RT_RunMode changes (through a call to the StartUpdates method). The real time data streams are stopped (through external events) or closed (through a call to the CloseAllLinks method). The AdxRtList object goes from empty to non-empty. User code should supply a callback function to handle these events within the program. Arguments ListStatus SourceStatus RunMode The current status of the AdxRtList object. This is a value from the RT_ListStatus enumeration. The current status of the data source (identified by the Source property). This is a value from the RT_SourceStatus enumeration. The current update mode, usually changed through the StartUpdates method. This is a value from the RT_RunMode enumeration. 2.4. ADXRTLIST ILISTEVENTS INTERFACE A user application can use the IListEvents interface as an alternative to the standard event (connection point) interface associated with an object of type AdxRtList. To use this alternative interface, the user application must associate an object which implements the IListEvents interface with the AdxRtList object or objects. This is done using the AdxRtList object’s ListAdvise method. The association can be broken by calling the ListUnadvise method. Once an association of this type has been established, the various events delivered for the AdxRtList object will cause the corresponding methods of the IListEvents object to be called. Using this interface allows methods to be dispatched using a vtable mechanism. This is a much faster process than that of using the connection point mechanism, improving the user application’s performance. 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 />

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

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!