Reference &
User Manual
    RTXPS  On-line Reference Manual

      Release Level 2.0
      Release Date 2012 06
      Revision Level 1.0
    Last modified on:   Sunday, 12-Aug-12 09:11 CEST


    The consequence, THEN or ACTION part of an RTXPS RULE triggers a one of the built-in Iand/or user defined) FUNCTION.

    The built-in generic FUNCTIONs include triggers for simulation models, the backward chaining expert system, or external communication tasks such as data acquisition from monitoring systems or tasks such as automatic dialing for phone connections, or sending automatically generated eMail, fax or SMS messages.

    Other ACTION functions trigger special interactive editors to obtain information on more complex risk objects (such as trains, plants, etc.) which require specific dialogue windows for consistent editing of the attributes of the the risk objects and provide additional functionality such as links to on-line databases.

    From an implementation perspective there are two groups of functions:

    • generic, pre-defined and available in all applications;

    • application specific FUNCTIONs only implemented for a specific application such as CourseWare.

    General and communication functions

      set_descriptor_value(descriptor_name, value)
        Sets a DESCRIPTORdescriptor_name to values, where value must be a legal string for the DESCRIPTOR as defined in the DESCRIPTOR editor, depending on the TYPE of the DESCRIPTOR.


        Sends the text in file to the address or a a mailing list) by SMTP.


        Sends the text in file to the phone number phone# as SMS.

    Control functions

      They relate to two main concepts:
      1. TIMERS that make it possible to manipulate TIME, real, absolute, simulated as part of the scenario control and the HTML display;
      2. SAVEPOINTS that make the repeated use of ACTION groups possibel, i.e., to repeatdly run through a given sequence based on a test or model scenario result;

      For more details on the manipulation of time in RTXPS, see: timers.


        Sets the value of descriptor to current time; OThe timer descriptor is of type variable and represented by a string with the fomat hh:mm:ss


        Elapsed time since course was started
        Elapsed_time(descriptor) sets the specified descriptor to relative time or time elapsed since the last init() was called. Value of that descriptor can be diplayed or used in time computation.


        Function add_time(time1,time2,time3) implements operation: time1 = time2 + time3. Variables time1, time2, and time3 are of type timer (hh:mm:ss).


        Function subst_time(time1,time2,time3) implements operation: time1 = time2 - time3. Variables time1, time2, and time3 are of type timer (hh:mm:ss).


        Defines a fixed point or label in the dynamic knowledge base.
        Creates a copy of descriptor values and action states which is course and user specific, or a label in the dynamic knowledge base corresponding to the state of the system at that point in time (and rule sequence). It can be restored with read_savepoint(savepoint_name), in the manner of a GOTO statement of procedural programming languages.

        Implementation details:
        Both descriptor and action values are saved in a database table called savepoints. The structure of that table is the same as the one of rdescriptors and raction - extended by type being D (descriptor), A (action) and svpname - name of that save point.


        Restores a savepoint. The forward chaining sequence will resume at the savepoint, i.e., at the state of the system at the point when the safepoint was defined. ALl subsequent ACTIONS will be discarded. This cycle can be repeated any number of times.


        Will pause the forward chaining loop for N seconds.

    Generic model and RTU interface


        Reads the current value for parameter PID from the remote terminal unit RTUID; the access information, protocol and communication format for the RTU are define with the OBJECT definition of the RTU (equivaluent to a bi-directional monitoring station/sensor, the parameter is defined as a DESCRIPTOR IN the Knoweldge Base.
        The parameter value is the return value of the function; and optional code returns an (integer) status code for the unit.


        Sets the value of parameter PID at the remote terminal unit RTUID to value. Function returns 1 if the value was set successfuly, 0 or an error code defined with the RTU declaration otherwise.


        Rtxps runs specified executable (using system call) on the foreground (it waits for its termination). It passes input file name and output file name to the executable as parameters (argv[1] and argv[2]). Executable which can be run by rtxps are located in /var/www/cgi-bin/RTXPS_APPLICATION

    Display functions


        Displays an html page in a new browser window (pop-up).
        The source of that page is a file in the local file system, referenced as above for html_display().
        The pop-up will stay displayed until acknowledged by the user to make sure the content was seen.


        Displays an html page in target (HTMLS window or iframe)
        The source of that page is a file in the local file system, referenced as above for html_display().

    CourseWare specific functions

      init(header, footer, document_root)

        Initialises a course, must be called as the first function.
        Resets all real-time data related to the current course and current user. Optionally overloads default page header, page footer, and the path which is used for loading documents (from local file system).


        Tells to the rtxps system that this is the last action of the current course and it modifies the submit button of the current page in such a way that it leads the user back to the installation main page or to the page specified by the course designer (if end_url is defined),

      run_test(test_id, score, header,footer)

        Starts the embedded TEST tool.
        Passes control to test generator. Input parameter test_id uniquely identifies required test. Test generator sets descriptor of score (second parameter) to the number of points which were achived by the user. Optional parameters header and footer overload default document header and footer by those defined by the course designer.


© Copyright 1995-2016 by:   ESS   Environmental Software and Services GmbH AUSTRIA | print page