Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)



  sc(7)                               CLIX                               sc(7)



  NAME

    sc - Optronics ESCAN 200 scanner driver

  DESCRIPTION

    The sc driver is the Optronics ESCAN 200 scanner driver.  Scanned data is
    read through the read() function.  Since scanners are sequential-access
    devices, sc always starts the read of the next scan line during a user's
    current read.  This double buffering allows greater scanner throughput.
    The maximum size read is SC_DATA_SIZE bytes.

    The ioctl(fildes, request, arg) function can be used to configure the
    scanner and to retrieve scanner information.  The arg parameter points to
    an scio structure with the following members:

    unsigned char arg1;    /* first argument of ioctl */
    unsigned char arg2;    /* second argument of ioctl */
    unsigned char arg3;    /* third argument of ioctl */
    unsigned char arg4;    /* fourth argument of ioctl */
    unsigned char buf[18]; /* results buffer */

    The sc driver updates the array buf with the results of the ESCAN
    operation.  This structure is required when using the following requests:

    REQ_STAT
           Get scanner status information.  The arg* members are not used.

    REQ_REGS
           Get scanner internal register values.  The arg* members are not
           used.

    SET_DATA_GRAY
           Force scanner to return gray scale data during its scanning phase.
           The arg* members are not used.

    SET_DATA_BIN
           Force scanner to return binary data during its scanning phase.  The
           arg* members are not used.

    PEJECT Abort the scan in progress and eject the paper from the scanner.
           The arg* members are not used.

    RET_VERS
           Get the scanner's EPROM revision level.  The arg* members are not
           used.

    SET_200DPI
           Set the scanner's resolution to 200 dots per inch.  The arg*
           members are not used.




  2/94 - Intergraph Corporation                                              1






  sc(7)                               CLIX                               sc(7)



    SET_400DPI
           Set the scanner's resolution to 400 dots per inch.  The arg*
           members are not used.

    SET_THRSH
           Set the scanner's threshold value.  The arg1 member contains the
           threshold value.  Other arg* members are not used.

    SET_GAIN_1
           Set the gain for camera 1 in the scanner.  The arg1 member contains
           the gain value.  Other arg* members are not used.

    SET_GAIN_2
           Set the gain for camera 2 in the scanner.  The arg1 member contains
           the gain value.  Other arg* members are not used.

    SET_GAIN_3
           Set the gain for camera 3 in the scanner.  The arg1 member contains
           the gain value.  Other arg* members are not used.

    SET_GAIN_4
           Set the gain for camera 4 in the scanner.  The arg1 member contains
           the gain value.  Other arg* members are not used.

    SET_OVLP_1
           Set the overlap for camera 1 in the scanner.  The arg1 member
           contains the overlap value.  Other arg* members are not used.

    SET_OVLP_2
           Set the overlap for camera 2 in the scanner.  The arg1 member
           contains the overlap value.  Other arg* members are not used.

    SET_OVLP_3
           Set the overlap for camera 3 in the scanner.  The arg1 member
           contains the overlap value.  Other arg* members are not used.

    SET_OVLP_4
           Set the overlap for camera 4 in the scanner.  The arg1 member
           contains the overlap value.  Other arg* members are not used.

    SET_SCAN_T
           Set the scanner's integration time.  The arg1 member contains the
           integration time value.  Other arg* members are not used.

    SET_RMRG_BIN
           Set the right margin for binary data scanning.  The arg1 member
           contains the least significant byte of the margin value and arg2
           contains the most significant byte of the margin value.  Other arg*
           members are not used.

    SET_RMRG_GRAY



  2                                              Intergraph Corporation - 2/94






  sc(7)                               CLIX                               sc(7)



           Set the right margin for gray scale data scanning.  The arg1 member
           contains the least significant byte of the margin value, and arg2
           contains the most significant byte of the margin value.  Other arg*
           members are not used.

           Scanner control operations require a different control structure
           than the scio structure described above.  When initiating one of
           these ioctl() operations, arg points to an sciocomp structure with
           the following members.

           unsigned char *buf; /* pointer to compensation buffer */
           unsigned int  cnt;  /* size of compensation buffer */

           The requests which require the sciocomp structure are listed below:

    SET_COMP200
           Set the scanner's stepper motor compensation table for 200 dots per
           inch scanning.

    SET_COMP400
           Set the scanner's stepper motor compensation table for 400 dots per
           inch scanning.

    On failure, errno is set to one of the following values.

    [EBUSY]    The scanner is busy scanning.

    [EFAULT]   The arg member points to an invalid location.

    [EINVAL]   The request is not one of the listed requests.

    [EIO]      An error occurred when the command was transferred to the
               scanner.

  FILES

    /dev/escan

  RELATED INFORMATION

    Functions:  ioctl(2)













  2/94 - Intergraph Corporation                                              3




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026