IntroductionMTB StatementsFile SystemCompilerApplicationsReference GuideIndex

Fax Driver

Comet includes a fax driver that allows an MTB program to send a fax via a "CAS-compatible" fax modem.

The Comet Fax Driver includes the following features:

Comet communicates with the fax modem via a TSR program usually supplied with the fax modem itself. This program, which is based on the based on the "Communicating Application Specification (CAS)" standard developed by Intel and DCA, is hereinafter referred to as the "CAS Manager."

The original implementations of the CAS standard were for the Intel SatisFAXtion and NetSatisFAXtion fax modems. As additional CAS-compatible modems and software become known to Signature Systems, we will inform you of these products.

Here are the basic steps for configuring the Comet Fax Driver:

  1. Load Comet.

  2. Configure a fax device in QCFIG. The fax device is configured as a "printer" and is named the same as Comet printers (e.g., LP1, LP2, LP3), however the configuration program contains a field indicating that the "printer" is actually a fax device.

  3. Exit Comet.

Here are the basic steps for using the Comet Fax Driver:

  1. Prior to running Comet, load the CAS Manager (i.e., the TSR program). For example, on Signature's in-house test system (an Intel SatisFAXtion 400e fax modem), the program is called CASMODEM.

    For a Comet system within a network, where the fax board is contained in a "fax server," use the network fax CAS Manager (e.g., the TSR program included with NetSatisFAXtion).

  2. Load Comet.

  3. Write or run an MTB program that communicates with the fax device, as follows:

    1. OPEN the fax device

      For example:

                     OPEN (1) "LP3",EXCP=9999 ! open fax device
      

      Notes:

      1. If the CAS Manager (TSR program) has not been loaded, this instruction will produce an E30 exception.
      2. The fax device is a "virtual" device, which means it can be opened by more than one user at a time. In effect, the fax device works very much like a print spooler.
      3. The DSTAT function includes fields that identify fax devices, as follows:

      Position Description
      1-3 Last partition to open fax device
      4 F = fax device
      5 1 = Intel CAS-compatible fax board

    2. WRITE information and/or commands to the fax device

      The Comet Fax Driver provides mnemonics that let you specify the phone number, the TO and FROM information, text and/or graphics for the cover page, text and or graphics for the fax itself, and other parameters for the fax (headers, resolution, sending time/date, deletion options, etc.).

      The minimum information needed by the fax driver is:

      • phone number
      • text for the fax

      For example, to specify the fax phone number, use either of the following instructions:

                     PRINT (1) (FAX Phone="1-707-874-1369")
      
                     or
      
                     PRINT (1) (FAX Phone=PHONE$)
      

      In this case, the mnemonic is named (FAX Phone) and it includes one argument, a string containing the fax phone number. This argument may be a constant (first example) or a variable (second example).

      Write the "body" of the fax as follows:

                     PRINT (1) "This is the first line."
                     PRINT (1) "This is the second line."
                     PRINT (1) "This is the third line."
                     PRINT (1) "This is the fourth line."
                     PRINT (1) "This is the fifth line."
      

      Additional information can be specified using other fax mnemonics (see below), but none of these additional items is required by the fax driver.

    3. When all of the information has been written, submit the fax job to the CAS Manager using the (FAX Submit Job) mnemonic. This action signals the CAS Manager to queue the job and begin sending the fax (unless you have specified a future date/time).

      For example:

                     PRINT (1) (FAX Submit Job)    ! submit fax job
      

      Once the job is submitted, additional mnemonics may be used to inquire about the status of the fax job and/or delete the fax job. See below for more information on these mnemonics.

    4. When the fax process is complete, CLOSE the fax device as follows:

      Example:

                     CLOSE (1)                ! close fax device
      

      Note: If you haven't written a FAX PHONE instruction to the fax device, your program will generate an exception upon closing the fax device. Therefore, we suggest that you include an ERRORTO statement in your program to handle this potential exception.

    5. Additional fax mnemonics

      As mentioned above, the fax driver provides mnemonics to control all aspects of the fax board. Here are a few short examples of how these mnemonics can be used.

      For a complete list, see Fax mnemonics.

      • To specify the name of the fax sender, use the following instruction:

                            PRINT (1) (FAX From=FROM$)
        

        where FROM$ is a user-defined string

      • To specify the name of the fax recipient, use the following instruction:

                           PRINT (1) (FAX To=TO$)
        

        where TO$ is a user-defined string

      • To send a fax in fine resolution (196 lines per inch), use the following instruction:

                            PRINT (1) (FAX Fine Resolution)
        

      • To include a cover page, include the following instruction:

                            PRINT (1) (FAX Cover Page)
        

      • To print text on the cover page, include the following:

                            PRINT (1) (FAX Cover Text="Line 1...")
                            PRINT (1) (FAX Cover Text="Line 2...")
                            PRINT (1) (FAX Cover Text="Line 3...")
                            PRINT (1) (FAX Cover Text="Line 4...")
        

      • To include a PCX graphic on the cover page of the fax, use the following instruction:

                            PRINT (1) (FAX Logo File=LOGOFILE$)
        

        where LOGOFILE$ is a user-defined variable that contains the full path name/file name of a PCX graphics file (e.g., c:\graphics\logo.pcx).

      • Once a fax job has been submitted to the CAS Manager, the job's "event handle" may be obtained as follows:

                            PRINT (1) (FAX Submit Job)    ! submit fax job
                            INPUT (1) EVHANDLE$      ! get event handle
        

        where EVHANDLE$ is a user-defined variable (2 bytes) containing a hex value associated with the fax job that has just been submitted (in essence, a "fax job identification number").

        The event handle may be used to inquire about the queued fax job as follows:

                            PRINT (1) (FAX Job Status=EVHANDLE$)
        

        This instruction returns the complete CAS Control File structure in a subsequent READ. This control structure is described in the CAS Control File documentation.

        The event handle may also be used to delete a queued fax job as follows (assuming that the fax has not been transmitted):

                            PRINT (1) (FAX Delete Job=EVHANDLE$)
        

        The event handle is a useful feature for managing faxes in the CAS Manager's queue. Ideally, your programs should obtain and save (in a data file) the event handle for each fax sent. You could then write a simple fax management "utility" program to inquire on the status of your pending fax jobs.

    6. Also see the Fax demo program.

    7. Summary

      The minimum instructions needed to send a fax are:

      • OPEN the fax device
      • WRITE the (FAX Phone=PHONE$) mnemonic
      • WRITE text lines to the fax device
      • Submit the fax job to the CAS Manager
      • CLOSE the fax device

      The following default values are assumed for the fax device:

      • normal resolution (98 lines per inch)
      • include page headers
      • delete fax files after the fax is sent
      • don't include a cover page
      • the fax send time/date is the current time/date (i.e., queue for "immediate" transmission)

List of References: