Generating Interface Objects or PDAs from IDL Files

#### Search Results

Search

# Generating Interface Objects or PDAs from IDL Files

An IDL (Interface Definition Language) file contains definitions of the interface between client and server.

The Interface Object Generation from IDL function provides the option to generate interface objects and/or parameter data areas (PDAs) from EntireX IDL files.

You can generate interface objects from IDL files by using either the Interface Object Generation from IDL function or the command `SYSRPC SGIDL`.

The following section provides instructions for using the Interface Object Generation from IDL function.

To generate interface objects or PDAs from an IDL file

1. In the SYSRPC - Remote Procedure Call window, from the Tools menu, choose Interface Object Generation from IDL.

   Or:
   In the SYSRPC - Remote Procedure Call window, press CTRL+F7.

   Or:
   In the Command line, enter `SYSRPC SGIDL`.

   The Input for Interface Object Generation from IDL File dialog box appears.

2. In the Path or file name text box, enter the complete path to the folder or the file that contains the IDL definitions or choose Browse to select a file from a folder.

   If required, in the Library text box, enter the name of the library into which you want to generate the interface object. The text box is preset to the name of the current library.

   DBID, FNR is a non-modifiable text box that displays the database ID (DBID), the file number (FNR) and the type of Natural file (`FNAT` = system, `FUSER` = user) for the specified library.

3. Choose OK.

   The Generate Interface Objects from IDL window similar to the example below appears for the specified library:

   All definitions contained in the selected IDL file are displayed in a tree view where the Library node indicates an EntireX RPC IDL library and each set of IDL definitions is contained in a Program node. The Comments node contains commentary text such as a description of the definitions contained in an IDL file.

4. Select the node(s) that contain the sets of IDL definitions from which you want to generate the interface object(s) or PDA(s):

   - For interface objects:
     Select the check box of a Library node to generate interface objects from all Program nodes contained in that Library node.

     Or:
     Select the check boxes of individual Program nodes to generate interface objects from the specified Program nodes only.

     You can change the name of an interface object by using a selection list as described in Building a Selection List. Otherwise, the interface object will be named after the corresponding Program node.

   - For PDAs:
     Select the Library node(s) or the required Program node(s) and choose Mark for parameter data area from the context menu.

     A list appears that displays the set(s) of IDL definitions for each node selected as shown in the example of a selection list below. The check boxes of all IDL definitions are selected for PDA generation. You can deselect a PDA by clearing the check box next to it in either the tree view or the selection list as described in Building a Selection List.

     You can change the name of a PDA as described in Building a Selection List. Otherwise, the PDA will be named after the corresponding Program node where the following conversion rules apply:

     - For a node name of 7 characters, an `A` is added to the PDA name. For example, node name `PDATEST1` is converted to PDA name `PDATESTA`.

     - For a node name of 6 characters or less, an `A` is added to the PDA name in the 8th position and each empty position between node name and `A` is filled with a dash (-). For example, node name `TEST1` is converted to PDA name `TEST1--A`.

5. Choose OK.

   For each item selected, a message box appears confirming successful generation of the interface object or the PDA.

## Building a Selection List

You can use a selection list to change the name of an interface object or a PDA, or deselect or select the nodes from which to generate an interface object and/or a PDA.

To build a selection list

1. In the Generate Interface Objects from IDL window, select the check box of a Library node or the check box(es) of Program node(s) and choose Build selection list to rename or mark object types from the context menu.

   A selection list appears that displays the selected Program nodes as shown in the example below:

   The selection list displays all nodes selected in the tree view where the IDL Library (Alias) column corresponds to the Library node and the IDL Name column corresponds to the Program node. In the example above, the Program nodes `CALC` and `POWER` are selected for interface object generation and the Program node `HELLO` is selected for PDA generation.

2. In the Subprogram and/or PDA columns, select the check boxes of the sets of IDL definitions from which you want to generate interface objects and/or PDAs.

   You can deselect an item by clearing a check box.

3. If you want to change the name of an interface object or a PDA, select the required table cell and replace the current entry.

4. If you want to remove one or more table rows, select the required rows and choose Clear Row(s) from the context menu.

5. If you want to close the selection list, choose Close Table from the context menu.