[Pipet Devel] Idl

jarl van katwijk jarl at casema.net
Sat Mar 25 08:05:04 EST 2000


Hi,

I've been adding some to the idl brad created,
i'll work more on it tonight\tomorrow, but this is what I came up with.

bye,
jarl
-------------- next part --------------
// gui2dp.idl
//
// IDL for dealing with communication between the GUI (buffered by a small
// middle) and the data processing engine.
//
// Changelog:
//		23 Mar 2000		: Brad, creation 
//		25 Mar 2000		: Jarl, added gms naming

/**
 * Organization of modules.
 * vsh: The overall module (the name can change when we decide on a formal
 *      name).
 * gui2dp: idl for communication between the GUI (interpeter?) and the 
 *      data processing engine.
 * ADM: Automatic Definition Maker, a GUI or script that defines structures.
 * DFB: DataFlow Broker, layer that does the distribution\authentication\etc
 * DFP: DataFlow Procesor, layer that does the 'real' dataflow work.
 * 
 */

module vsh {
  module ADM2DFB {
    // ##### exceptions
    /**
     * Requested Id is already being used for another gui.
     */
    exception IdInUse {};
                            
    /**
     * Id number used for requested operation was not found in the list of
     * current gui ids being served by the data processor.
     */
    exception IdNotFound{};
                
    /**
     * The information for a node is not yet available because the process
     * has not completed.
     */
    exception InfoNotAvailable{};
                            
    // ##### structs and typedefs
    /**
     * A sequence/list of strings. Useful for returning info like a list of
     * program ids for available programs.
     */
    typedef sequence <string> stringList;
                            
    // ##### interfaces                 
                            
    /**
     * Functions for dealing with a front to middle connection.
     * TODO: define 'front' and 'middle' ??
     */
    //interface Connection {
	interface ADMRegister {
        /**
         * Initialize a connection from the gui to the data processing engine.
         * @parm gui_id - An unique id to represent the gui connection
         * @parm password - The password associated with this id.
         * @returns A boolean indicating the success of the initialization
         * @raises IdInUse - The passed gui_id is already in use by another gui.
         */
        boolean init(in string adm_id, in string password)
            raises (IdInUse);
        /**
         * Close the connection between the gui and data processing engine.
         * Used when closing down a GUI.
         * @parm dfb_id - An unique id to represent the gui connection
         * @parm password - The password associated with this id.
         * @returns A boolean indicating the success of the initialization
         * @raises IdNotFound - The passed id was not found in the list of
         *                      ids registerd with the data processing engine.
         */
        boolean release(in string adm_id, in string password)
            raises (IdNotFound);
    };
    /**
     * Functions for passing XML information to the data processing engine.
     */
    interface XML {
        /** 
         * Send a string of XML to the data processing engine to be dealt with.
         * @parm xml_to_process: A big string of xml describing the nodes/loci
         *       to be processed and the relationship between them.
         * @returns An id to be used for getting information about the
         *          process sent.
         */
        // XML defines
        string xml_structure(in string xml_document);                     
     }

     /**
      * Functions for dealing with 'subnets' (brokering\gms nodes)
      */
     interface SUBNET {
		uri_t new(in string dname, in string ddescription, in string datadescription, in string allowedfilter);
        boolean destruct(in uri_t uri);
		boolean init(in uri_t uri);
        boolean activate(in uri_t uri);
        uri_t duplicate(in uri_t uri);
            // set details
            boolean SETdname(in uri_t uri, in string displayedname);
            boolean SETstatus(in uri_t uri, in status_t status);
			boolean SETdataDescription(in uri_t uri, in string datadescription);
            boolean SETdDescription(in uri_t uri, in string displayeddescription);
            boolean SETallowedFilter(in uri_t uri, in string allowedfilter);
            boolean SETconfiguration(in uri_t uri, in string configruntime);
            // get details
            string GETdname(in uri_t uri);
            status_t GETstatus(in uri_t uri);
            string GETdataDescription(in uri_t uri);
            string GETdDescription(in uri_t uri);
            string GETallowedFilter(in uri_t uri);
            string GETconfiguration(in uri_t uri);
            MDO_t GEThistoricdata(in uri_t uri, in long history);
      }

      /**
       * Functions for single node access (cq overflow nodes)
       */
      interface NODE {
        // TODO: add more.. 
        uri_t new(in dfp_nodetype_t dfp_nodetype, in dfp_nodeparam_t dfp_nodeparameter);
        boolean destruct(in uri_t uri);
            // set single dfp nodes details
            boolean SETstatus(in uri_t uri, in status_t status); // TODO: can overflow handle 'nodes status' ??
            boolean SETparameter(in uri_t uri, in string parameters);
            boolean ADDparameter(in uri_t uri, in string parameter);
            // get details
            status_t GETstatus(in uri_t uri);
            string GETparameters(in uri_t uri);
    };
        
    /**
     * Functions dealing with a process that has been sent to the middle.
     */
    interface ProcessInformation {
     // TODO: move to ADM, SUBNET and NODE interface?
        /**
         * Request information the status of the overall process.
         * @parm process_id - the unique id associated with a process.
         * @returns A double representing the progress towards completion.
         *          1 indicates completion, 0 indicates the process has not
         *          started, numbers between 0 and 1 represent the percent
         *          completion, and -1 indicates an error in the process
         * @raises IdNotFound - If the passed process_id is not found.
         */
        double query_process(in string process_id) raises (IdNotFound);
        
        /**
         * Request information about a particular node/locus in a process.
         * @parm process_id - the unique id associated with a process.
         * @parm node_id - the unique id associated with a node.
         * @returns A double representing the progress towards completion.
         *          1 indicates completion, 0 indicates the process has not
         *          started, numbers between 0 and 1 represent the percent
         *          completion, and -1 indicates an error in the process.
         * @raises IdNotFound - if either the process or node id were not
         *         found.
         */
        double query_process_node(in string process_id, in string node_id)
            raises (IdNotFound);
                
        /**
         * Get the information for a node so that is can be displayed in the
         * GUI.
         * @parm process_id - the unique id associated with a process.
         * @parm node_id - the unique id associated with a node.
         * @returns A string with the info from the node.
         *          TODO: Need a structured and generalized way to return info
         *          and pass it to a visual so it can be seen in the GUI
         *          Strings aren't going to cut it for everything, 
         *          I don't think.
         * @raises InfoNotAvailable - If the node currently doesn't have any
         *         information to send (ie. process is not complete.
         */
        string get_node_info(in string process_id, in string node_id)
            raises (InfoNotAvailable);  
        
    };
    /**
     * Functions for getting information about programs and libraries registered
     * with the processing engine.
     */
    interface ProgramInformation {
        /**
         * Get a list of all the program ids of programs registered functional
         * (ie. loaded) with the processing engine.
         * @returns A sequence of strings (list) with the node_ids of availeble
         *          nodes.  
         */
        stringList get_program_ids();
        
        /**
         * Query a specific node to see if it is available.
         * @parm node_id - the unique id of a node (program/function).
         * @returns 1 if the program is loaded, 0 if it is not.
         */ 
        boolean is_available(in string node_id);
        
    };
    
  };
};


More information about the Pipet-Devel mailing list