User Tools

  • Vistasource Document Library

RTW COM Interface Commands

This section describes supplementary commands that greatly help the COM client developer. They can be used by replacing the Command argument of the COM Server’s ConnectData method (see RTW COM Interface), which is normally “rt”” or “rtinsert””, with other command strings that are detailed below. These command strings are also valid for the RTD function itself.

For information about RTSHARE-specific commands, see RTSHARE COM Interface Commands.

For example, to obtain the services the mktdemo engine is using in the VB demo code above, the info() string would be set like this:

Info=array("GS","mktdemo")

The following tables provide an overview of the GET and DO commands available for the RTW COM Interface:

GET Commands

GE Get running engines
GD Get running engine with data requests
GS Get services
GR Get records
GI Get record info
GF Get fields and values
GC Get cached field value
GW Get status window visibility

DO Command

DS Stop/Start the engine
DU Unsubscribe a field
DW Toggles RTW status window on/off
DL Login (Netfeed engine only)

GET Commands

When using a GET command, the COM server immediately performs the command and returns the value that is asked for. However, the GET command gets the value only once, it does not update in “real-time.”

Example
Info=array("GC","vsRMDS","IDN","MSFT.O","ASK") 

Engines Running

Description Gets list of currently running engines.
CommandGE
Arguments None
Return Value If there are no engines running, the string “(no running engines)” is returned.
Otherwise the engine name is returned, or an Excel-style string of a list of engines (e.g.“{mktdemo,vsRMDS2}”).
Example
Info=array("GE") 

Engine Running with Data

Description Gets whether there is a connection to an engine with valid data requests.
CommandGD
Arguments engine_name
Return Value If there are no running engines with data requests “0” is returned. Otherwise “1” is returned.
Example
info = Array ("GD","vsRMDS")

Services

Description Gets list of services that the engine is using.
CommandGS
Arguments engine_name
Return Value If there are no services in use, the string “(no services)” is returned. Otherwise the service name is returned, or an Excel-style string of a list of services (e.g.“{IDN,RDF}”).
Example
Info=array("GS","mktdemo") 

Records

Description Gets list of records that engine is subscribed to for a particular service.
CommandGR
Arguments engine_name, service_name
Return Value If there are no records in use, the string “(no records)” is returned. Otherwise the record name is returned, or an Excel-style string of a list of records (e.g. “{MSFT,AAPL}”).
Example
Info=array("GR", "vsRMDS","IDN")

Record Info

Description Gets the record info (all fields and values) for a particular record in a particular service.
CommandGI
Arguments engine_name, service_name, record_name
Return Value An Excel-style string of the number of fields followed by a list of field ids, field names and field values (e.g.“{2,25,ASK,35.6,22,BID,36.3}”).
The field id is the field identifier as provided by the data service. If the engine fails to find any fields the string “0,,,” is returned.
Example
Info=array("GI","vsRMDS","IDN","MSFT.O") 

Fields and Values

Description Gets list of fields (and their values) that the engine is subscribed to for a particular record in a particular service.
CommandGF
Arguments engine_name, service_name, record_name
Return Value If there are no fields in use the string “(no fields)” is returned. Otherwise an Excel-style string of field names, field values, and field ids is returned (e.g.“{ASK,35.6,1,BID,36.3,2}”).
The field id is simply an internal identifier and not a field identifier as provided by the data service.
Example Info=array(“GF”,“vsRMDS”,“IDN”,“MSFT.O”)

Cached Field Value

Description Gets the value of a particular field for a particular record in a particular service.
CommandGC
Arguments engine_name, service_name, record_name, field_name
Return Value If no match for the field was found, the string “nomatch” is returned.
Otherwise the field value is returned e.g. “36.5”

Status Window Visibility

Description Gets whether the status window is up (i.e. visible).
CommandGW
Arguments None
Return Value If the status window is visible “1” is returned. Otherwise “0” is returned.
Example
Info=array("GW")

DO Commands

The RTW COM Interface DO Commands are executing tasks.

Stop/Start an Engine

DescriptionToggle: Stops a running engine or starts a stopped engine.
CommandDS
Arguments Engine_name
Example
Info=array("DS","vsRMDS") 

Unsubscribe Field

Description Unsubscribes from a field.
CommandDU
Arguments field_id
This command takes an id string that must be obtained from a call to
Get Fields, which returns a list of field names with their values and an id. It is not a data service fid, but an internal id used to keep track of usage.
Example
Info=array("DU", "1") 

Status Window Visibility

Description If the window is currently visible, then calling this hides it.
If the window is currently hidden, then calling this shows it.
CommandDW
Arguments None
Example
Info=array("DW") 

Login

Applies to the Netfeed engine only

Description Performs a login in the Netfeed engine.
CommandDL
Arguments Engine_name, username, password
Example
Info=array("DL", "vsnf", "jsmith",  "abc123")