This section describes supplementary commands that greatly help the COM client developer when working with RTSHARE. 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.
The following tables provide an overview of the GET, SET and DO commands available for the RTW COM Interface when working with RTSHARE:
DW | Toggle RTW status window on/off |
Description | Gets a list of available record names on a particular server. |
Command | GA |
Argument | host_name |
Return Value | Returns record names in the form of rec1, rec2, rec3. May also return “(no connections)”, “(no response)” or “(no records)”, depending on the situation. |
Info=array("GA","localhost")
Description | Gets a list of available record names with information regarding owners and requests/inserts permissions on a particular server. |
Command | GAI |
Argument | host_name |
Return Value | Returns record names in the form of rec1, owner1, request perms1, insert perms1, rec2, owner2, request perms2, insert perms2, etc. May also return “(no connections)”, “(no response)” or “(no records)”, depending on the situation. |
Info=array("GAI","localhost")
Description | Gets the error log file name with information about its state. |
Command | GLE |
Argument | host_name |
Return Value | Returns error file name in the form of “filename, n”, whereby n is either 1 (toggled on) or 0 (toggled off). May also return “(no connections)”, “(no response)” or “(no filename found)”, depending on the situation. |
Info=array("GLE","localhost")
Description | Gets the trace log file name with information about its state. |
Command | GLT |
Argument | host_name |
Return Value | Returns log file name in the form of “filename, n”, whereby n is either 1 (toggled on) or 0 (toggled off). May also return “(no connections)”, “(no response)” or “(no filename found)”, depending on the situation. |
Info=array("GLT","localhost")
Description | Gets the port number that the rtshare server is using. |
Command | GP |
Argument | host_name |
Return Value | Returns the port number, for instance, the default would be returned as “5494” (default). May also return “(no connections)”, “(no response)” or “(no port number)”, depending on the situation. |
Info=array("GP","localhost")
Description | Gets whether the status window is up (i.e. visible). |
Command | GW |
Arguments | None |
Return Value | If the status window is visible “1” is returned. Otherwise “0” is returned. |
Info=array("GW")
The RTW COM Interface SET Commands allow setting options such as log files and permissions.
See also:
Tracing and Logging
Modifying Record Permissions
Description | Sets Error file for RTSHARE. True turns error file on using the specified error file. False turns error file off. |
Command | SE |
Arguments | host_name, true/false, path_name to file |
Info=array("SE,"localhost", "true", "c:/temp/rtshare_error")
Description | Sets Trace file for RTSHARE.True turns trace file on using the specified error file. False turns trace file off. |
Command | ST |
Arguments | host_name,True/False, path_name to file |
Info=array("ST,"localhost", "true", "c:/temp/rtshare_trace")
Description | Sets permissions for giving users subscribe access to a record. |
Command | SPSAS |
Arguments | host_name, record_name, users/hosts_name Note: An empty string opens the record to everyone. |
Info=array("SPSAS,"localhost", "rec1", "user1@PC1, user2, @PC2")
In this example, access to subscribe to record “rec1” is given to user1 on machine PC1, user2 on any machine and anybody on machine PC2
Description | Sets permissions for denying users subscribe access to a record. |
Command | SPSDS |
Arguments | host_name, record_name, users/hosts_name |
Info=array("SPSDS,"localhost", "rec1", "user1, user2")
In this example, access to subscribe to record “rec1” is denied to user1 and user2.
Description | Sets permissions for giving users insert access to a record |
Command | SPIAS |
Arguments | host_name, record_name, users/hosts_name Note: An empty string“” opens the record to everyone. |
Info=array("SPSAS,"localhost", "rec1", "user1@PC1, user2, @PC2")
In this example, access to insert to record “rec1” is given to user1 on machine PC1, user2 on any machine and anybody on machine PC2.
Description | Sets permissions for denying users insert access to a record. |
Command | SPIDS |
Arguments | host_name, record_name, users/hosts_name |
Info=array("SPIDS,"localhost", "rec1", "user1, user2")
In this example, access to insert to record “rec1” is denied to user1 and user2.
There is currently only one DO Command available for RTSHARE.
Description | This is a toggle. If the window is currently visible, then calling this hides it. If the window is currently hidden, then calling this shows it. |
Command | DW |
Arguments | None |
Info=array("DW")