RTSHARE COM Interface commands 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: GET Commands GA , Get available records GAI , Get available records with Info GLE , Get log error file name and state GLT , Get log trace file name and state GP , Get Port number GW , Get status window visibility SET Commands SE , Set error log file name and state ST , Set trace log file name and state SPSAS , Set permissions for allowing subscribe SPSDS , Set permissions for denying subscribe SPIAS , Set permissions for allowing insert SPIDS , Set permissions for denying insert DO Command DW , Toggle RTW status window on/off 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. ” -------- Available records 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. Example Info=array("GA","localhost") The COM Interface returns the record info in one string. If the string exceeds 32767 characters, the command returns “ (parts)N ” and additional steps are required. See Handling Large Strings for more details. -------- Available records and info 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. Example Info=array("GAI","localhost") The COM Interface returns the record info in one string. If the string exceeds 32767 characters, the command returns “ (parts)N ” and additional steps are required. See Handling Large Strings for more details. -------- Error log file name and state 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. Example Info=array("GLE","localhost") -------- Trace log file name and state 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. Example Info=array("GLT","localhost") -------- Port number 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. Example Info=array("GP","localhost") -------- Status window visibility 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. Example Info=array("GW") SET Commands The RTW COM Interface SET Commands allow setting options such as log files and permissions. See also: Tracing and Logging Modifying Record Permissions -------- Error log file name and state 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 Example Info=array("SE,"localhost", "true", "c:/temp/rtshare_error") -------- Trace log file name and state 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 Example Info=array("ST,"localhost", "true", "c:/temp/rtshare_trace") -------- Allow subscribe 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. Example 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 -------- Deny subscribe Description , Sets permissions for denying users subscribe access to a record. Command, SPSDS Arguments , host_name, record_name, users/hosts_name Example Info=array("SPSDS,"localhost", "rec1", "user1, user2") In this example, access to subscribe to record “rec1” is denied to user1 and user2. -------- Allow insert 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. Example 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. -------- Deny insert Description , Sets permissions for denying users insert access to a record. Command, SPIDS Arguments , host_name, record_name, users/hosts_name Example Info=array("SPIDS,"localhost", "rec1", "user1, user2") In this example, access to insert to record “rec1” is denied to user1 and user2. DO Command There is currently only one DO Command available for RTSHARE. Status window visibility 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 Example Info=array("DW") --------