[ Previous | Next | Contents | Glossary | Home | Search ]
The Personal graPHIGS Programming Interface: Customization and Problem Diagnosis

Chapter 3. Customizing the graPHIGS API

Customizing for Optional Environments

The graPHIGS API is contained within four separate packages: PEX_PHIGS.dev, PEX_PHIGS.graPHIGS.rte, PEX_PHIGS.graPHIGS.adt, and PEX_PHIGS.info[.lang].

The device-dependent software is contained in the PEX_PHIGS.dev package. The graPHIGS run-time environment is contained in the PEX_PHIGS.graPHIGS.rte package. The graPHIGS application development toolkit is contained in the PEX_PHIGS.graPHIGS.adt package. The graPHIGS Info Explorer documentation is contained in the PEX_PHIGS.graPHIGS.info[.lang]. The packages may contain optionally installable subsystems.

You select the options you want to install during the smit installation process. A list of the environments will be displayed. You can choose from this list the ones you want to install:

PEX_PHIGS.dev

  1. PEX_PHIGS.dev.mca.8fbc - PEX_PHIGS GXT1000 device dependent software
  2. PEX_PHIGS.dev.mca.8ffd - PEX_PHIGS GTO device dependent software
  3. PEX_PHIGS.dev.mca.8ee3 - PEX_PHIGS GT4 device dependent software
  4. PEX_PHIGS.dev.buc.00004002 - PEX_PHIGS GXT500 device dependent software

PEX_PHIGS.graPHIGS.rte

  1. PEX_PHIGS.graPHIGS.rte.base - graPHIGS base run time environment (includes C and Pascal header files)

  2. PEX_PHIGS.graPHIGS.rte.6098 - graPHIGS 6098 support files

  3. PEX_PHIGS.graPHIGS.rte.softgP - graPHIGS soft run time environment

  4. PEX_PHIGS.graPHIGS.rte.rnuc - graPHIGS remote nucleus support file

  5. PEX_PHIGS.graPHIGS.rte.plot - graPHIGS IBM/CALCOMP/VERSATEC/Hewlett Packard plotter support files

  6. PEX_PHIGS.graPHIGS.rte.fnt.uni - graPHIGS Unicode fonts

  7. PEX_PHIGS.graPHIGS.rte.fnt.TW - graPHIGS Traditional Chinese fonts

  8. PEX_PHIGS.graPHIGS.rte.fnt.KR - graPHIGS Hangul (Korean) fonts

  9. PEX_PHIGS.graPHIGS.rte.fnt.JP - graPHIGS Kanji (Japanese) fonts

  10. PEX_PHIGS.graPHIGS.rte.fnt.SC_EUC - graPHIGS Simplified Chinese fonts
  11. PEX_PHIGS.graPHIGS.adt

    1. PEX_PHIGS.graPHIGS.adt.include - graPHIGS application development Include files

    2. PEX_PHIGS.graPHIGS.adt.gks - graPHIGS application development GKS library

    3. PEX_PHIGS.graPHIGS.adt.samples - graPHIGS application development samples

    4. PEX_PHIGS.graPHIGS.adt.tutor - graPHIGS application development tutorial

    5. PEX_PHIGS.graPHIGS.adt.clients - graPHIGS application development clients
    6. PEX_PHIGS.info[.lang]

      When installation is complete, the system displays this message:

      The installation of
      n completed successfully
      where n is the environment option you chose.

      Customizing for File Format Conversion

      When you select PEX_PHIGS.graPHIGS.rte.plot, the cvtgdf utility is installed in the /usr/bin directory. This utility converts a file that is in GDF format (that is, a file generated by a GDF workstation on the RISC System/6000) to ADMGDF format (the format produced by a GDF workstation running under VM or MVS) For more information on using this utility, see Appendix C in The graPHIGS Programming Interface: Technical Reference

      Customizing for a Remote graPHIGS API Nucleus

      When you select the X11_3d.graPHIGS.rnuc.obj option, the files necessary for remote graPHIGS API nucleus support are installed. The files gPinit, gPterm, gPhost and gPq are installed and linked to the /usr/lpp/graPHIGS/bin directory. In addition, the four corresponding script files are installed and linked to the /usr/bin directory. gPterm is used to terminate the remote graPHIGS API nucleus. gPhost is used to add or delete host names permitted access to the remote graPHIGS API nucleus. gPq is used to inquire the status of remote graPHIGS API nuclei.

      The /etc/services file contains the base port number to be used by remote graPHIGS API nuclei. The default base port number is 8000. If this port number is already reserved for another purpose in the /etc/services file, a warning is issued. The /etc/services file is not automatically modified to reserve port 8000. However, the default base port number remains 8000 until you modify it in the /etc/services file.

      To change the base port number, change the following line in the etc/services file:

      graPHIGS        8000/tcp
      where 8000 is the default base port number. To change the base port number to, for example, 9000, change the above line as follows:
      graPHIGS        9000/tcp

      Note:

      For remote graPHIGS API nucleus support to work over a network, the base port number must be the same for all IBM RISC System/6000 workstations that are using remote graPHIGS nuclei.

      See The graPHIGS Programming Interface: Technical Reference for more information on remote graPHIGS API nuclei.

      Customizing for Plotters

      The graPHIGS API provides support for IBM, Hewlett Packard, CalComp, and Versatec plotters when X11_3d.graPHIGS.plot.obj is installed.

      Customizing for IBM Plotters

      Follow the steps below to enable output to an IBM plotter attached to an IBM RS/6000.

      1. Define and enable the port to which the plotter is attached.

        Issue the smit command to set up a port for the plotter. See AIX Commands Reference for IBM RISC System/6000 for more information on the smit command.

        Set up the plotter as a TTY device.

        Example: smit
                   Devices
                   TTY
                   Add a TTY
                     - choose TTY type RS-232
                     - select the appropriate adapter (e.g., sa0, sa1)
                     - set the following values:
                         PORT number                             [s1]  (or s2, etc.)
                         Enable Login                            disable
                         BITS per Character                      8
                         Number of STOP BITS                     1
                         XON-XOFF Handshaking                    no
                         RUN Shell Activity Manager              no
                         STATE to be configured at boot time     [available]
                     - set BAUD rate and PARITY fields to the
                       appropriate values for the plotter

        The smit command returns a message indicating what TTY device name you have defined (e.g., tty0). This name will be used in later steps.

      2. If you will be using the AIX queuing system to schedule plots, you need to define a print queue for the plotting backend programs. If queuing will not be used, this step can ignored. Refer to The graPHIGS Programming Interface: Technical Reference for details on executing the plotting programs both with and without AIX queuing.

        Issue the smit command to define a print queue and backend program to be used be the AIX qdaemon queue manager.

        Example:smit
                   Spooler
                   Manage Local Printers, Queues, and Queue Devices
                   Manage Local Printer Subsystem
                   Local Printer Queues
                   Add a Local Queue
                     - set the following values:
                         NAME of queue to be added          [gdf]
                         NAME of device to be added         [gdfplt]
                         BACKEND PROGRAM pathname           [/usr/lpd/cpsI1 -tty0]
                     - the queue and device names may be set to whatever
                       you choose. The backend program may be one of
                       the three provided by graPHIGS (cpsI1, cpsC1,
                       or cpsV1) or one of your own (see the section
                       below on customizing the system for non-IBM
                       plotters).
                     - any options which will always be passed to the
                       backend may be added following the backend
                       program pathname (eg., tty0 in the above
                       example).
      3. For information on using the plotter run time environment, refer to Appendix C in The graPHIGS Programming Interface: Technical Reference

        IBM Plotters Supported

        Category Model  Description  
        Pen Plotters 6180 6182 6184 6186-1 6186-2 7371 7372 7374 7375-1 7375-2  8 pen, A size 8 pen, A & B size, auto-feed 8 pen, C & D size 8 pen, A-E size 8 pen, A-E size, roll-feed 2 pen, A size 6 pen, A & B size 8 pen, A-D size 8 pen, A-E size 8 pen, A-E size, roll-feed  

        Customizing for Calcomp and Versatec Plotters

        When X11_3d.graPHIGS.plot.obj is installed, CalComp and Versatec plotting backend programs are installed on your system. Refer to CalComp and Versatec intructions for information on how to set up and run these backend programs. CalComp instructions are found in the file /usr/lpd/README.ccp, and Versatec instructions are in the file /usr/lpd/README.VERSA Refer to The graPHIGS Programming Interface: Technical Reference for additional information.

        CalComp Plotters Supported

        Category Model  Description  
        Pen Plotters 1023 1025 1026 1043 DM 1044 1076C 1077  8 pen, 'D' cut sheet 30/42 ips 8 pen, 'E' cut sheet 30/42 ips 8 pen, 'E' cut sheet/roll 30/42 ips 8 pen, 'E' cut sheet/roll 24 ips 8 pen, 'E' cut sheet/roll 24 ips 4 pen, 'E' cut sheet 50/70 ips 4 pen, 'E' cut sheet/roll 50/70 ips  
        Electrostatic Raster Plotters 57424 57436 57444 58424 58436 58444  24-inch wide, 400 dpi -- monochrome 36-inch wide, 400 dpi -- monochrome 44-inch wide, 400 dpi -- monochrome 24-inch wide, 400 dpi -- color 36-inch wide, 400 dpi -- color 44-inch wide, 400 dpi -- color  
        Thermal Raster Monochrome (2-Color) Plotters 52224 52236  DrawingMaster 24-inch wide, 200 dpi DrawingMaster 36-inch wide, 200 dpi  
        Thermal Raster Color Plotters 5902A 5902AE 5912 5913  PlotMaster 'A', 200 dpi PlotMaster 'A4', 200 dpi Colorview 'B'/'A3', 200 dpi Colorview 'B'/'A3', 300 dpi  

        Versatec Plotters Supported


        Category Model  Description  
        Electrostatic Plotters V80 7222 7422 7224 7424 7236 7244 7444 C2552 C2562 C2558 CE3224 CE3424 CE3225 CE3425 CE3236 CE3436 CE3244 CE4444 ECP42 8924 8936 8944  11-inch -- monochrome 22-inch -- monochrome 22-inch -- monochrome 24-inch -- monochrome 24-inch -- monochrome 36-inch -- monochrome 44-inch -- monochrome 44-inch -- monochrome 11-inch -- color 11-inch -- color 11-inch -- color 24-inch -- color 24-inch -- color 24-inch(A1) -- color 24-inch(A1) -- color 36-inch -- color 36-inch -- color 44-inch -- color 44-inch -- color 42-inch -- color 24-inch 36-inch 44-inch  
        Thermal Plotters C2756-vv C2766-vv C2726 C2736 C2756 C2766  11-inch 11-inch A size A4 size B size A size  
        Laser Plotters 8836  36-inch  

        Customizing for Plotters with HP GL2 support

        Many new plotters include support for HP GL2** language and by default set XOFF/XON on. If you are configuring your plotter queue for cpsI1, you need to disable XOFF/XON support at the plotter. If you are configuring your plotter queue for HP GL2 support (using the cgm2hp2 backend), you need to set XON/XOFF on in the TTY port definition.

        Follow the steps below to enable output to a plotter supporting HP GL2 that is attached to an IBM RISC System/6000.

        1. Define and enable the port to which the plotter is attached.

          Issue the smit command to set up a port for the plotter. See AIX Commands Reference for IBM RISC System/6000 for more information on the smit command.

          Set up the plotter as a TTY device.

          Example: smit
                     Devices
                     TTY
                     Add a TTY
                       - choose TTY type RS-232
                       - select the appropriate adapter (e.g., sa0, sa1)
                       - set the following values:
                           PORT number                             [s1]  (or s2, etc.)
                           Enable Login                            disable
                           BITS per Character                      8
                           Number of STOP BITS                     1
                           XON-XOFF Handshaking                    yes
                           RUN Shell Activity Manager              no
                           STATE to be configured at boot time     [available]
                       - set BAUD rate and PARITY fields to the
                         appropriate values for the plotter

          The smit command returns a message indicating what TTY device name you have defined (e.g., tty0). This name will be used in later steps.

        2. If you will be using the AIX queuing system to schedule plots, you need to define a print queue for the plotting backend programs. If queuing will not be used, this step can ignored. Refer to The graPHIGS Programming Interface: Technical Reference for details on executing the plotting programs both with and without AIX queuing.

          Issue the smit command to define a print queue and backend program to be used be the AIX qdaemon queue manager.

          Example:smit
                  Spooler
                  Manage Local Printers, Queues, and Queue Devices
                  Manage Local Printer Subsystem
                  Local Printer Queues
                  Add a Local Queue
                    - set the following values:
                        NAME of queue to be added          [plot]
                        NAME of device to be added         [cgm]
                        BACKEND PROGRAM pathname           [/usr/lpd/cgm2hp2 -f /dev/tty0]
                    - the queue and device names may be set to whatever
                      you choose.
                    - any options which will always be passed to the
                      backend may be added following the backend
                      program pathname (eg., tty0 in the above
                      example).
          For information on using the plotter run time environment, refer to Appendix C in The graPHIGS Programming Interface: Technical Reference

        3. Industry Standard Plotting Interface (ISPI)

          The graPHIGS API plotting routines can make Industry Standard Plotting Interface (ISPI) calls, instead of generating IBM, CalComp, or Versatec plotting data. This function is invoked by passing -ispi as an option to your backend program.

          If you have an ISPI package, you can link-edit this with the graPHIGS API plotting object code to produce your own backend program. Your ISPI package must include the following industry standard subroutines:

          PLOTS
          initializes software

          NEWPEN
          changes current pen

          SYMBOL
          draws text

          PLOT
          draws lines, moves pen, terminates software

          The following FORTRAN unit numbers are used by the graPHIGS plotting routines:

          unit 6
          log file

          unit 8
          input GDF file

          unit 10
          pentbl.fil (if -pens is specified)

          The graPHIGS API plotting routines that can be link-edited with your ISPI package are contained in the following files:

          /usr/lpd/gpimain.o /usr/lpd/gpifo.a /usr/lpd/gpico.a

          All three files must be linked with your ISPI package. Information on link-edit procedures can be found in the documentation for your compiler or run time environment, or in the AIX Commands Reference for IBM RISC System/6000 under the ld command.

          Example:

               xlf /usr/lpd/gpimain.o /usr/lpd/gpifo.a /usr/lpd/gpico.a  \
                   /example/ispilib.o -lm -lqb -o
          filename

          where /example/ispilib.o is the name of your ISPI library object file, and filename is the name of the executable file you are creating. Filename can then be run directly, or used as a backend program for a print queue.

          See Appendix C in The graPHIGS Programming Interface: Technical Reference for more information on plotting using the ISPI interface.


          [ Previous | Next | Contents | Glossary | Home | Search ]