14. Command Descriptions for Scanner Devices 14.1. Commands for Scanner Devices The commands for scanner devices shall be as shown in Table 14-1. Table 14-1: Commands for Scanner Devices ============================================================================== Operation Command Name Code Type Section ------------------------------------------------------------------------------ COMPARE 39h O 7.1.1 COPY 18h O 7.1.2 COPY AND VERIFY 3Ah O 7.1.3 DEFINE WINDOW PARAMETERS 24h M 14.1.1 GET DATA STATUS 34h O 14.1.2 GET WINDOW PARAMETERS 25h O 14.1.3 INQUIRY 12h M 7.1.4 MEDIUM POSITION 31h O 14.1.4 MODE SELECT 15h O 14.1.5 MODE SENSE 1Ah O 14.1.6 READ 28h M 14.1.7 READ BUFFER 3Ch O 7.1.5 RECEIVE DIAGNOSTIC RESULTS 1Ch O 7.1.6 RELEASE UNIT 17h M 14.1.8 REQUEST SENSE 03h M 7.1.7 RESERVE UNIT 16h M 14.1.8 SCAN 1Bh O 14.1.9 SEND 2Ah O 14.1.10 SEND DIAGNOSTIC 1Dh M 7.1.8 TEST UNIT READY 00h M 7.1.9 WRITE BUFFER 3Bh O 7.1.10 ============================================================================== Key: M = Command implementation is mandatory. O = Command implementation is optional. All other command codes are Reserved. [Editorial Note: This Automatic Media Changer command set is proposed for inclusion in SCSI-2. Most of the concepts and facilities required to address Automatic Medium Changers as SCSI devices are included here. Additional work is necessary before this is ready for publication as part of the SCSI-2 standard. However, the ad hoc changer group requested that this version be included in the working draft standard in order to faciliate wider review. [This section currently does not define any method for an initiator to determine or control the configuration of the changer system. This is viewed as an unavailable limitation of some otherwise valid Automatic Medium Changer implementations. The ad hoc changer group has an action item to define sufficient new functionality to provide initiators with information on the assignment of Data Transfer Element addresses to SCSI IDs and LUNs. [Throughout this section the changer is assumed to be an independent SCSI ID / LUN. The Data Transfer Elements served by the changer may be addressed through the same SCSI ID as the changer or through a different ID. The model which addresses the changer via the same ID / LUN as the data transfer device is not supported by this definition. This is the case because the device at a particular SCSI ID / LUN address must have a single peripheral device type. [Logical addressing of units of medium is a concept that has been proposed and may be added later. The command set definition here is not intended to preclude future standardization of commands which support this concept.] [Editorial Note: I believe these paragraphs were added unintentionally during a previous editing session.] 14.1.1. DEFINE WINDOW PARAMETERS Command Peripheral Device Type: Scanner Operation Code Type: Mandatory Table 14-2: DEFINE WINDOW PARAMETERS Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (24H) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- ---| 7 | Transfer Length | -----|--- ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control Byte | ============================================================================== The DEFINE WINDOW PARAMETERS command (Table 14-2) provides a means for the initiator to specify one or more regions within the medium which the target is to scan. The transfer length specifies the length in bytes of the window parameters data that shall be sent during the DATA OUT phase. A transfer length of zero indicates that no window parameters data shall be transferred. This condition shall not be considered as an error. If sent, the window parameters data shall consist of one or more window descriptor blocks. Each window descriptor block specifies the location of a rectangular region and the mode in which the region is to be scanned. The window paramters data format is defined in Table 14-3. Table 14-3: Window Parameters Data Format ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- Window Descriptor Block Length ---| 7 | (LSB) | ============================================================================== | Window Descriptor Block(s) | ============================================================================== 0 | Window Identifier | -----|-----------------------------------------------------------------------| 1 | Reserved | Auto | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- X Resolution ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | (MSB) | -----|--- Y Resolution ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- Upper Left X ---| 9 | (LSB) | -----|-----------------------------------------------------------------------| Ah | (MSB) | -----|--- Upper Left Y ---| Dh | (LSB) | -----|-----------------------------------------------------------------------| Eh | (MSB) | -----|--- Width ---| 11h | (LSB) | -----|-----------------------------------------------------------------------| Table 14-3: Window Parameters Data Format (continued) -----|-----------------------------------------------------------------------| 12h | (MSB) | -----|--- Length ---| 15h | (LSB) | -----|-----------------------------------------------------------------------| 16h | Brightness | -----|-----------------------------------------------------------------------| 17h | Threshold | -----|-----------------------------------------------------------------------| 18h | Contrast | -----|-----------------------------------------------------------------------| 19h | Image Composition | -----|-----------------------------------------------------------------------| 1Ah | Bits Per Pixel | -----|-----------------------------------------------------------------------| 1Bh | (MSB) | -----|--- Halftone Pattern ---| 1Ch | (LSB) | -----|-----------------------------------------------------------------------| 1Dh | RIF | Reserved | Padding Type | -----|-----------------------------------------------------------------------| 1Eh | (MSB) | -----|--- Bit Ordering ---| 1Fh | (LSB) | -----|-----------------------------------------------------------------------| 20h | Compression Type | -----|-----------------------------------------------------------------------| 21h | Compression Argument | -----|-----------------------------------------------------------------------| 22h- | Reserved | 27h | | ============================================================================== | Vendor Unique Parameters | ============================================================================== 28h- | Vendor Unique | n | Parameter Byte(s) | ============================================================================== [Editorial Note: The changes in the previous Data Format are that the Upper Left X, Upper Left Y, Width and Length fields are increased to four bytes each in size. This will alter the locations of the subsequent fields, including the Reserved field at the end of the block.] The window descriptor block length specifies the length in bytes of a single window descriptor block. Each block shall be of equal length having the first forty-eight bytes defined as given and the remaining bytes allowed for vendor unique applications. The window identifier shall be a number between zero and 255 which uniquely identifies the window defined by the block descriptor. Each window within an image shall be referenced by this identifier during data transfers and parameter updates. The auto bit allows for the automatic creation of sub-windows within the window being defined. A value of zero indicates that the window is to be processed as defined by the window descriptor. A value of one indicates that the window is to be divided into multiple windows according to definitions within the scanner device. The window identifiers assigned to these new windows shall not conflict with any previously specified windows. The paramters for the new windows may be retrieved using the GET WINDOW PARAMETERS Command. The X resolution field specifies the resolution along the scan line (i.e., horizontal direction) in picture elements (pixels) per inch. A zero value in this field indicates that the scanner is to use its default horizontal resolution. This condition shall not be considered to be an error. The Y resolution field specifies the resolution in the cross-scan (vertical) direction in scan lines per inch. A zero value in this field indicates that the scanner is to use its default vertical resolution. This condition shall not be considered as an error. The upper left X field specifies the X coordinate of the upper left corner of the rectangular scan region. This coordinate is measured in pixels from the left edge of the scan line using the resolution specified in the X resolution field. This coordinate is measured from the left edge of the scan line using the target's current measurement unit divisor (see Section 14.1.5.1). The upper left Y field specifies the Y coordinate of the upper left corner of the rectangular scan region. This coordinate is measured in scan lines from the logical start-of-medium using the resolution specified in the Y resolution field. This coordinate is measured from the logical start-of- medium using the target's current Measurement Unit Divisor (see Section 14.1.5.1). The width field specifies the size in pixels along the scan line of the rectangular scan region. The width field specifies the size of the rectangular scan region along the scan line. The width is measured using the target's current measurement unit divisor (see Section 14.1.5.1). The length field specifies the size in scan lines of the rectangular scan region. The length field specifies the size of the rectangular scan region in the cross scan direction. The length is measured using the target's current measurement unit divisor (see Section 14.1.5.1). The brightness field specifies the brightness at which the scanner is to acquire the image. A value of zero indicates that the scanner is to use either automatic brightness control or its default setting. Any other value indicates a relative brightness setting with 255 implying the highest setting, one implying the lowest setting, and 128 implying the nominal setting. The threshold field specifies the threshold value at which multi-level image data is to be converted to binary data. A value of zero indicates that the scanner is to use either automatic threshold control or its default setting. Any other value indicates a relative threshold setting with 255 implying the highest setting, one implying the lowest setting, and 128 implying the nominal setting. The contrast field specifies the contrast at which the scanner is to acquire the image. A value of zero indicates that the scanner is to use either automatic contrast control or its default setting. Any other value indicates a relative contrast setting with 255 implying the highest setting, one implying the lowest setting, and 128 implying the nominal setting. The halftone pattern field specifies the halftone process by which multi- level data is converted to binary data. This field shall be used in conjunction whith the image composition code specifed in byte 19h of this window identifier block. The image composition field specifies the type of image acquired and is defined as shown in Table 14-4. Table 14-4: Image Composition Codes ============================================================================== Code Description ------------------------------------------------------------------------------ 00h Bi-level black & white 01h Dithered/halftone black & white 02h Multi-level black & white (gray scale) 03h Bi-level RGB Color 04h Dithered/halftone RGB Color 05h Multi-level RGB Color 06h - FFh Reserved ============================================================================== For any one pixel, the number of bits used to specify the intensity of one color is specified by the bits per pixel field. The reverse image format (RIF) bit is applicable only for images represented by one bit per pixel. A RIF bit of zero indicates that white pixels are to be indicated by zeros and black pixels are to be indicated by ones. A RIF bit of one indicates that white pixels are to be indicated by ones and black pixels are to be indicated by zeros. The padding type field specifies what operation is to be done if the scanned data to be transmitted to the initiator is not an integral number of bytes. The padding type is defined in Table 14-5. Table 14-5: Padding Types ============================================================================== Code Description ------------------------------------------------------------------------------ 00h No padding 01h Pad with 0's to byte boundary 02h Pad with 1's to byte boundary 03h Truncate to byte boundary 04h - 07h Reserved ============================================================================== The bit ordering field defines the order in which data is transferred to the host from the window. Ordering will include direction of pixels in a scan line, direction of scan lines within a window and data packing within a byte. The compression type and compression argument fields specify the compression technique to be applied to the scanned data prior to transmission to the initiator and are defined in Table 14-6. Table 14-6: Compression Types and Arguments ============================================================================== Code Compression Type Compression Argument ------------------------------------------------------------------------------ 00h No compression Reserved 01h CCITT Group III, 1 dimensional Reserved 02h CCITT Group III, 2 dimensional K factor 03h CCITT Group IV, 2 dimensional Reserved 04h - 0Fh Reserved Reserved 10h Optical Character Recognition (OCR) Vendor Unique 11h - 7Fh Reserved Reserved 80h - FFh Vendor Unique Vendor Unique ============================================================================== 14.1.2. GET DATA STATUS Command Peripheral Device Type: Scanner Operation Code Type: Optional Table 14-7: GET DATA STATUS Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (3Ch) (34h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | Wait | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | (MSB) | -----|--- Allocation Length ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control Byte | ============================================================================== The GET DATA STATUS command (Table 14-7) provides a means for the initiator to inquire about scan data availability. Data availability will be reported only for those windows which have been activated by the SCAN command (see 14.1.9). The wait bit defines the response time expected by the target. A value of one indicates that the target is expected to wait for data to be available before responding with data in the DATA IN phase. A value of zero indicates that the target shall respond immediately with data in the DATA IN phase whether or not data is available. The allocation length specifies the number of bytes that the initiator has allocated for returned status data. An allocation length of zero indicates that no status data shall be transferred. This condition shall not be considered as an error. Any other value indicates the maximum number of bytes that shall be transferred. The target shall terminate the DATA IN phase when the allocation length bytes have been transferred or when all available status data has been transferred to the initiator, whichever is less. The data status format is shown in Table 14-8. Table 14-8: Data Status Format ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | (MSB) | -----|--- ---| 1 | Data Transfer Length | -----|--- ---| 2 | (LSB) | -----|-----------------------------------------------------------------------| 3 | Reserved | Block | ============================================================================== | Data Status Block(s) | ============================================================================== 0 | Window Identifier | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- ---| 3 | Buffer Space Available | -----|--- ---| 4 | (LSB) | -----|-----------------------------------------------------------------------| 5 | (MSB) | -----|--- ---| 6 | Scan Data Available | -----|--- ---| 7 | (LSB) | ============================================================================== The data transfer length specifies the length in bytes of the following status data that is available to be transferred during the DATA IN phase. The data transfer length does not include the data transfer length field of three bytes. The data transferred to the initiator will include multiple data status blocks as activated by the SCAN command. Each data status block will be associated with a window as defined by the window identifier. The block bit specifies the buffering capabilities of the scanner. A value of one indicates that all scan data available must be transferred to the initiator before more scan data will be processed. A value of zero indicates that scanner processing is not currently blocked due to lack of available buffer space. The window identifier defines the window for which data is currently being prepared. This value is defined as part of the region descriptor block for the DEFINE WINDOW PARAMETERS command (see 14.1.1). The buffer space available field indicates the amount of storage in bytes available for data transfers to the target. This field is valid only in scanners with the ability to accept data from an initiator for processing. The scan data available field indicates the amount of data in bytes available for transfer from the target. 14.1.3. GET WINDOW PARAMETERS Command Peripheral Device Type: Scanner Operation Code Type: Optional Table 14-9: GET WINDOW PARAMETERS Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (25h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | Single | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Window Identifier | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- ---| 7 | Transfer Length | -----|--- ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control Byte | ============================================================================== The GET WINDOW PARAMETERS Command (Table 14-9) provides a means for the initiator to receive information describing previously defined windows. The single bit defines the number of sense window descriptors to be returned. A value of one indicates that only the window specified by the window identifier field shall be transferred to the initiator during the DATA IN phase. A value of zero indicates that all previously defined windows shall be transferred to the initiator during the DATA IN phase. The allocation length specifies the number of bytes that the initiator has allocated for returned sense window descriptor data. An allocation length of zero indicates that no sense window descriptor data shall be transferred. This condition shall not be considered as an error. Any other value indicates the maximum number of bytes that shall be transferred. The target shall terminate the DATA IN phase when the allocation length bytes have been transferred or when all available sense window descriptor data has been transferred to the initiator, whichever is less. If transferred, the sense window parameters information shall consist of one or more sense window descriptor blocks. Each sense window descriptor block specifies the location of a rectangular region and the mode in which the region is to be scanned. The sense window parameters data format is defined in Table 14-10. [Editorial Note: The changes in the following Sense Window Parameters Data are that the Upper Left X, Upper Left Y, Width and Length fields are increased to four bytes each in size. This will alter the locations of the subsequent fields, including the Reserved field at the end of the block.] Table 14-10: Sense Window Parameters Data Format ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | (MSB) | -----|--- Data Transfer Length ---| 1 | (LSB) | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- Sense Window Descriptor Block Length ---| 7 | (LSB) | ============================================================================== | Sense Window Descriptor Block(s) | ============================================================================== 0 | Window Identifier | -----|-----------------------------------------------------------------------| 1 | Reserved | Auto | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- X Resolution ---| 3 | (LSB) | -----|-----------------------------------------------------------------------| 4 | (MSB) | -----|--- Y Resolution ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- Upper Left X ---| 9 | (LSB) | -----|-----------------------------------------------------------------------| Ah | (MSB) | -----|--- Upper Left Y ---| Dh | (LSB) | -----|-----------------------------------------------------------------------| Eh | (MSB) | -----|--- Width ---| 11h | (LSB) | -----|-----------------------------------------------------------------------| Table 14-10: Sense Window Parameters Data Format (continued) -----|-----------------------------------------------------------------------| 12h | (MSB) | -----|--- Length ---| 15h | (LSB) | -----|-----------------------------------------------------------------------| 16h | Brightness | -----|-----------------------------------------------------------------------| 17h | Threshold | -----|-----------------------------------------------------------------------| 18h | Contrast | -----|-----------------------------------------------------------------------| 19h | Image Composition | -----|-----------------------------------------------------------------------| 1Ah | Bits Per Pixel | -----|-----------------------------------------------------------------------| 1Bh | (MSB) | -----|--- Halftone Pattern ---| 1Ch | (LSB) | -----|-----------------------------------------------------------------------| 1Dh | RIF | Reserved | Padding Type | -----|-----------------------------------------------------------------------| 1Eh | (MSB) | -----|--- Bit Ordering ---| 1Fh | (LSB) | -----|-----------------------------------------------------------------------| 20h | Compression Type | -----|-----------------------------------------------------------------------| 21h | Compression Argument | -----|-----------------------------------------------------------------------| 22h- | Reserved | 27h | | ============================================================================== | Vendor Unique Parameters | ============================================================================== 28h- | Vendor Unique | n | Parameter Byte(s) | ============================================================================== The data transfer length specifies the length in bytes of the following sense window parameters data that is available to be transferred during the DATA IN phase. The data transfer Length does not include the data transfer length field of two bytes. The sense window descriptor block length specifies the length in bytes of a single sense window descriptor block. Each block shall be of equal length having the first forty-eight bytes defined as given and the remaining bytes allowed for vendor unique applications. The window identifier shall be a number between zero and 255 which uniquely identifies the window defined by the block descriptor. Each window within an image shall be referenced by this identifier during data transfers and parameter updates. The auto bit identifies the means by which the window was originally defined. A value of zero indicates that the window was defined directly by the DEFINE WINDOW PARAMETERS command. A value of one indicates that the window was automatically created by the scanner. This window is a fractional region within a larger window originally defined as part of the DEFINE WINDOW PARAMETERS command. Descriptions of the remaining fields in the window description block are located in the DEFINE WINDOW PARAMETERS command (see 14.1.1). 14.1.4. MEDIUM POSITION Command Peripheral Device Type: Scanner Operation Code Type: Optional Table 14-11: MEDIUM POSITION Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (31h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | Position Type | -----|-----------------------------------------------------------------------| 2 | (MSB) | -----|--- ---| 3 | Count | -----|--- ---| 4 | (LSB) | -----|-----------------------------------------------------------------------| 5 | Reserved | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | -----|-----------------------------------------------------------------------| 8 | Reserved | -----|-----------------------------------------------------------------------| 9 | Control Byte | ============================================================================== The MEDIUM POSITION command (Table 14-11) provides a variety of media positioning functions. Absolute as well as relative positioning of the medium is provided, although some SCSI devices may only support a subset of this command. Such SCSI devices shall return a CHECK CONDITION status and set the sense key to ILLEGAL REQUEST in response to any attempt to invoke a function that is not supported. The position type field shall determine the type of positioning function to be effected. The possible positioning types are as follows: DB(2) DB(1) DB(0) Position Type ----- ----- ----- ------------- 0 0 0 Unload Medium 0 0 1 Load Medium 0 1 0 Absolute Positioning 0 1 1 Relative Positioning 1 0 0 Rotate Medium 1 0 1 Reserved 1 1 0 Reserved 1 1 1 Reserved Unload Medium. This position type indicates that the medium on the logical unit shall be positioned for removal from the peripheral device. If upon receipt of this command there is no medium loaded on the logical unit, the target shall return a GOOD status. This condition shall not be considered as an error. If the target is unable to unload the medium (i.e., paper jam or misfeed condition), the target shall return a CHECK CONDITION status to the initiator and shall set the sense key in extended sense to MEDIUM ERROR. Load Medium. This position type indicates that the medium on the logical unit shall be loaded and positioned to the beginning-of-medium or load-point as determined by the peripheral device. If upon receipt of this command there is a medium already loaded on the logical unit, the target shall return a GOOD status. This condition shall not be considered as an error. If the target is unable to load a medium, the target shall return a CHECK CONDITION status to the initiator and shall set the end-of-medium (EOM) bit in extended sense to one. The sense key shall be set to MEDIUM ERROR. Absolute Positioning. This position type indicates that the medium is to be positioned at the scan line specified by the count field. A zero value in the count field shall cause the target to position the medium at beginning-of- medium. A nonzero value N in the count field shall cause the target to position the medium N scan lines forward (toward end-of-medium) of beginning- of-medium ending on the beginning-of-medium side of the specified scan line. If upon receipt of this command there is no medium loaded on the logical unit, or if the specified scan line does not exist on the medium, the target shall return a CHECK CONDITION status to the initiator and shall set the end-of- medium (EOM) bit in extended sense to one. The sense key shall be set to MEDIUM ERROR. Relative Positioning. This position type indicates that the medium is to be positioned relative to the current scan line. The count field specifies the number of scan lines to be skipped over. A positive value N in the count field shall cause forward movement over N scan lines ending on the beginning- of-medium side of the last scan line. A zero value in the count field shall cause no medium movement. A negative value -N (2's complement notation) in the count field shall cause reverse movement over N scan lines ending on the beginning-of-medium side of the last scan line. If the physical end-of-medium is encountered while positioning forward, the target shall return a CHECK CONDITION status to the initiator and shall set the end-of-medium (EOM) and illegal length indicator (ILI) bits in extended sense to one. The sense key shall be set to MEDIUM ERROR. The target shall set the valid bit to one and the information bytes to the difference (residue) between the requested count and the actual number of scan lines skipped over. If beginning-of-medium is encountered while skipping over scan lines in the reverse direction, the target shall position the medium at beginning-of-medium, shall return a CHECK CONDITION status to the initiator, and shall set the illegal length indicator (ILI) bit in extended sense to one. The sense key shall be set to MEDIUM ERROR. The target shall set the valid bit to one and the information bytes to the difference (residue) between the requested count and the actual number of scan lines skipped over. Rotate Medium. This position type indicates that the medium is to be rotated in a counter-clockwise direction in increments of one one-thousandth of a degree. 14.1.5. MODE SELECT Command Peripheral Device Type: Scanner Operation Code Type: Optional Table 14-12: MODE SELECT Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (15h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | PF | Reserved | SP | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Parameter List Length | -----|-----------------------------------------------------------------------| 5 | Control Byte | ============================================================================== [Editorial Note: This command was completely redesigned to accomodate the page format common to the MODE SELECT command specified for other devices. Changes were, therefore, not marked.] The MODE SELECT command (Table 14-12) provides a means for the initiator to specify medium, logical unit, or peripheral device parameters to the target. Targets that implement the MODE SELECT command should also inplement the MODE SENSE command. A page format (PF) bit of zero indicates that the MODE SELECT parameters are as specified in ANSI X3.131-1986 (i.e., all parameters after the block descriptors are vendor unique). A PF bit of one indicates that the MODE SELECT parameters are structured as pages of related parameters and are as specified in this standard. A save parameters (SP) bit of zero indicates the target shall not save the saveable pages sent during the DATA OUT phase to nonvolatile memory. An SP bit of one indicates that the target shall save the saveable pages (if any) sent during the DATA OUT phase to nonvolatile memory. (Saveable pages are identified by the PS bit that is returned in the page header by the MODE SENSE command.) The parameter list length specifies the length in bytes of the MODE SELECT parameter list that shall be transferred from the initiator to the target during the DATA OUT phase. A parameter list length of zero indicates that no data shall be transferred. This condition shall not be considered as an error. Certain combinations of parameters and pages must be defined to a particular boundary. Truncation of such a parameter list by an incorrect length shall be considered an error. The sense key is set to INVALID REQUEST and the Additional Sense Code is set to Invalid Field in Parameter List. The MODE SELECT parameter list (Table 14-13) contains a four-byte header, zero or more eight-byte block descriptors, followed by either vendor unique parameters (if the PF bit is zero and any parameters exist) or zero or more mode pages (if the PF bit is one). Table 14-13: MODE SELECT Parameter List ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Block Descriptor Length | ============================================================================== | Block Descriptor(s) | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | (MSB) | -----|--- ---| 6 | Block Length | -----|--- ---| 7 | (LSB) | ============================================================================== | Page Descriptor(s) or Vendor Unique Parameters | ============================================================================== 0 |Reserved|Reserved| Page Code | -----|-----------------------------------------------------------------------| 1 | Page-Specific Parameter Length | -----|-----------------------------------------------------------------------| 2 | | -----|--- Page-Specific Parameters ---| n | | ============================================================================== | or | ============================================================================== 0 | | -----|--- Vendor Unique Parameter Byte(s) ---| n | | ============================================================================== The block descriptor length specifies the length in bytes of all the block descriptors. It is equal to the number of block descriptors time eight and does not include the length of any pages or any vendor unique parameters, if any, that may follow the last block descriptor. A block descriptor length of zero indicates that no block descriptors shall be included in the parameter list. This condition shall not be considered as an error. The length specifies the length in bytes of each logical block described by the block descriptor. Each page descriptor specifies parameters for the target to use for subsequent operations on the specified logical unit. The format of each page descriptor depends on the peripheral device type but is always a multiple of four bytes. The page codes for scanner devices are given in Tabel 14-14. The page specific parameter length specifies the length in bytes of the parameters that follow for the specified page. The initiator should set this value to the value that is returned in the parameter length field for the same page by the MODE SENSE command. If this condition is not met, the target may return CHECK CONDITION status and set the sense key to ILLEGAL REQUEST. (Note that the parameter length value returned by the MODE SENSE command may be less than the full page.) Table 14-14: MODE SELECT Page Codes for Scanner Devices ============================================================================== Page Code Description Section --------- -------------------------------------------- ------- 00h Vendor Unique (does not require page format) 01h Reserved 02h Disconnect/Reconnect Control Parameters 8.1.4._ 03h Scanning Measurement Parameters 14.1.5.1 04h - 1Fh Reserved 20h - 3Eh Vendor Unique 3Fh Return all pages ============================================================================== 14.1.5.1. Scanning Measurement Parameters Table 14-15: Scanning Measurement Parameters ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 |Reserved|Reserved| Page Code (03h) | -----|-----------------------------------------------------------------------| 1 | Parameter Length (06h) | -----|-----------------------------------------------------------------------| 2 | Basic Measurement Unit | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | (MSB) | -----|--- Measurement Unit Divisor ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | Reserved | -----|-----------------------------------------------------------------------| 7 | Reserved | ============================================================================== The scanning measurement parameters page (Table 14-15) is used to specify the units of measurement by which the coordinates delineating a rectangualar window can be specified. This page is provided so that coordinates can be specified using a unit of measurement that is independent of the current horizontal and vertical scanning resolutions. Targets which do not implement this page shall use one twelve-hundredths (1/1200) of an inch as its current unit of measure. The basic measurement unit field is defined in Table 14-16. Table 14-16: Basic Measurement Units ============================================================================== Code Description --------- ---------------------------------------------------------------- 00h Inch 01h Millimeter 02h Point 03h - FFh Reserved ============================================================================== The measurement unit divisor specifies the number of units of measurement needed to equal one basic measurement unit. A value of zero in this field shall be considered an error. Targets receiving a zero in this field shall return a CHECK CONDITION status and set the sense key to ILLEGAL REQUEST. 14.1.6. MODE SENSE Command Peripheral Device Type: Scanner Operation Code Type: Optional Table 14-17: MODE SENSE Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (1Ah) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | PF | Reserved | -----|-----------------------------------------------------------------------| 2 | PC | Page Code | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Allocation Length | -----|-----------------------------------------------------------------------| 5 | Control Byte | ============================================================================== [Editorial Note: This command was completely redesigned to accomodate the page format common to the MODE SENSE command specified for other devices. Changes were, therefore, not marked.] The MODE SENSE command (Table 14-17) provides a means for a target to report its medium, logical unit, or peripheral device parameters to the initiator. It is a complementary command to the MODE SELECT command (see 14.1.5) for support of devices that may contain different medium scanning capabilities. If the MODE SELECT command is implemented, the MODE SENSE command shall be implented. A page format (PF) bit of zero indicates that the MODE SENSE data format is as specified in ANSI X3.131-1986. A PF bit of one indicates that the MODE SENSE parameters are structured as pages of related parameters and are as specified in this standard. The page control (PC) field defines the type of parameter values to be returned as shown below. DB(7) DB(6) Type of Parameter Values Section ----- ----- ------------------------ -------- 0 0 Current Values 14.1.6.1 0 1 Changeable Values 14.1.6.2 1 0 Default Values 14.1.6.3 1 1 Saved Values 14.1.6.4 The page code specifies which page or pages shall be returned. The page codes are defined in Table 14-18. If the page code is 3Fh, all implemented pages of the type specified by the PC field are to be returned by the target. (Implementors note: Page code 0h is vendor unique and may be returned as the last page if it is to be returned at all during a page code 3Fh request. Normally the pages are returned in ascending order.) Table 14-18: MODE SENSE Page Codes for Scanner Devices ============================================================================== Page Code Description Section --------- --------------------------------------------- -------- 00h Vendor Unique (does not require page format) 01h Reserved 02h Disconnect/Reconnect Control Parameters 8.1.4._ 03h Scanning Measurement Parameters 14.1.5.1 04h - 1Fh Reserved 20h - 3Eh Vendor Unique 3Fh Return all pages ============================================================================== The allocation length specifies the number of bytes that the initiator has allocated for returned MODE SENSE data. An allocation length of zero indicates that no MODE SENSE data shall be transferred. This condition shall not be considered as an error. Any other value indicates the maximum number of bytes that shall be transferred. The target shall terminate the DATA IN phase when allocation length bytes have been transferred or when all available MODE SENSE data have been transferred to the initiator, whichever is less. 14.1.6.1. Current Values The PF bit set to one and a PC field value of 0h requests the target return the current values for the page code specified. The current values returned are: 1) The parameters set in the last successful MODE SELECT command. 2) The saved values if a MODE SELECT command has not been executed. 3) The default values if saved values are not available or not supported. Parameters not supported by the target shall be set to zero. The parameter length of each page indicates the length of the parameters that are supported. (Implementors note: Some targets may not support an entire page as defined in this document.) 14.1.6.2. Changeable Values The PF bit set to one and a PC field value of 1h requests the target return the changeable values for the page code specified. The page requested shall be returned with the bits that are allowed to be changed set to one. Parameters that are not changeable shall be set to zero. If any part of a field is changeable all bits in that field are set to one. If none of parameters are changeable within a page, the target may or may not return bytes 0 and 1 of the page. If the target returns these two bytes, the page length value shall be set to zero by the target. 14.1.6.3. Default Values The PF bit set to one and a PC field value of 2h requests the target return the default values for the page code specified. The page requested shall be returned with the default parameters set. Parameters not supported by the target shall be set to zero. (Implementors note: The value of the parameters returned is intended to avoid confusion over whether the value of zero is the default or the unsupported value.) 14.1.6.4. Saved Values The PF bit set to one and a PC field value of 3h requests the target return the saved values for the page code specified. The page requested shall be returned with the saved parameters set. Parameters not supported by the target shall be set to zero. (Implementors note: The value of the parameters returned is intended to avoid confusion over whether the value of zero is the default or the unsupported value.) If saved values are not available or not supported a CHECK CONDITION status shall be returned with the sense key set to ILLEGAL REQUEST and the Additional Sense Code set to Save Parameters Not Supported. (Implementors note: The method of saving parameters is vendor unique. The parameters must be preserved in such a manner that they are retained when the target is powered down. Pages can be considered saved when the MODE SELECT command with the Save Parameters bit set has returned a status of GOOD.) The MODE SENSE data (Table 14-19) contains a four-byte header, zero or more eight-byte block descriptors, followed by either vendor unique parameters (if the PF bit is zero and any parameters exist) or zero or more mode pages (if the PF bit is one). Table 14-19: MODE SENSE Data ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Sense Data Length | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Block Descriptor Length | ============================================================================== | Block Descriptor(s) | ============================================================================== 0 | Reserved | -----|-----------------------------------------------------------------------| 1 | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | (MSB) | -----|--- ---| 6 | Block Length | -----|--- ---| 7 | (LSB) | ============================================================================== | Page Descriptor(s) or Vendor Unique Parameters | ============================================================================== 0 | PS |Reserved| Page Code | -----|-----------------------------------------------------------------------| 1 | Page-Specific Parameter Length | -----|-----------------------------------------------------------------------| 2 | | -----|--- Page-Specific Parameters ---| n | | ============================================================================== | or | ============================================================================== 0 | | -----|--- Vendor Unique Parameter Byte(s) ---| n | | ============================================================================== The sense data length specifies the length in bytes of the following MODE SENSE data that is available to be transferred during the DATA IN phase. The sense data length does not include itself. The block descriptor length specifies the length in bytes of all the block descriptors. It is equal to the number of block descriptors times eight and does not include the length of any pages or any vendor unique parameters, if any, that may follow the last block descriptor. A block descriptor length of zero indicates that no block descriptors shall be included in the parameter list. This condition shall not be considered as an error. The block length specifies the length in bytes of each logical block described by the block descriptor. Each page descriptor specifies parameters the target is using for subsequent operations on the specified logical unit. The first two bytes of each page descriptor define the page code, the page length, and whether or not the page contains saveable parameters. The parameters saveable (PS) bit of one indicates that the parameters reported can be saved by the target. A PS bit of zero indicates that the supported parameters cannot be saved by the target. The page code identifies the meaning of the following bytes on the page. The page codes for scanner devices are given in Table 14-14. The page specific parameter length indicates the length in bytes of the parameters that follow for the specified page. The parameter length value of each defined page shall not include the parameter length byte. The target may return in the pages of the MODE SENSE command as many consecutive bytes that it supports, for each page that it supports, without splitting fields of multiple bytes. The page length shall be set in the pages of the MODE SELECT command to the value returned by the target in the MODE SENSE page length bytes. Otherwise, the target shall create CHECK CONDITION status with the sense key set to ILLEGAL REQUEST. (Implementors Note: The initiator shall issue a MODE SENSE command requesting the target to return all Changeable values (PCF field configuration 0 1 and Page Code 3Fh in byte 2 of the MODE SENSE CDB) prior to issuing any MODE SELECT commands, in order to find out which Pages are implemented by the target and the length of each page for that particular LUN.) 14.1.7. READ Command Peripheral Device Type: Scanner Operation Code Type: Mandatory Table 14-20: READ Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (28h) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | RelAdr | -----|-----------------------------------------------------------------------| 2 | Transfer Data Type | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | (MSB) | -----|--- Transfer Identification ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- ---| 7 | Transfer Length | -----|--- ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control Byte | ============================================================================== The READ command (Table 14-20) requests that the target transfer data to the initiator. The transfer data type distinguishes between the different types of data which may be transferred between the initiator and the target. The types of transfers are specified in Table 14-21. Table 14-21: Transfer Type Codes ============================================================================== Code Description ------------------------------------------------------------------------------ 00h Image Data 01h Scanner Controller Software/Firmware Code 02h Halftone Mask Data 03h Gamma Function 04h - 7Fh Reserved 80h - FFh Vendor Unique ============================================================================== The transfer identification field shall be used to differentiate between the different transfers of data within the same transfer type. Uses of this field shall include identifying unique halftone masks stored within the scanner device and separating software routines resident within the scanner device. The transfer length specifies the maximum number of blocks the initiator has allocated for the returned data. If the actual transfer length is different from the specified transfer length, a CHECK CONDITION status shall be sent to the initiator and the incorrect length indicator (ILI) bit and valid bit in extended sense shall be set to one. The information bytes in extended sense shall be set to the difference (residue) between the requested transfer length and the actual transfer length. Targets that do not support negative residues shall set the ILI bit to one and the residue to zero when the actual transfer length is larger than the specified transfer length. In any case, no more than transfer length blocks shall be transferred to the initiator sent during the DATA IN phase. When the transfer length is zero, no data shall be transferred. This condition shall not be considered as an error. This command shall be terminated with a status of RESERVATION CONFLICT if any reservation access conflict (see 14.1.8.1) exists and no data shall be transferred. [Editorial Note: The RelAdr bit for this CBD is not currently defined for scanner devices. If this bit is required then some definition is necessary.] 14.1.8. RESERVE UNIT and RELEASE UNIT Commands Peripheral Device Type: Scanner Operation Code Type: Mandatory Table 14-22: RESERVE UNIT and RELEASE UNIT Commands ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (16h or 17h, respectively) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | 3rdPty | Third Party Device ID |Reserved| -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Reserved | -----|-----------------------------------------------------------------------| 5 | Control Byte | ============================================================================== The RESERVE UNIT and RELEASE UNIT commands both use the command descriptor block shown in Table 14-22. 14.1.8.1. RESERVE UNIT Command. The RESERVE UNIT command (Table 14-22, operation code 16h) shall reserve the specified logical unit for the exclusive use by the requesting initiator or, if third-party reservation option is implemented, to another specified SCSI device. The reservation shall remain in effect until superseded by another RESERVE UNIT command from the initiator that made the reservation or until released by a RELEASE UNIT command from the same initiator, or a BUS DEVICE RESET message from any initiator, or a "hard" RESET condition. The occurrence of the last two conditions is indicated by a sense key of UNIT ATTENTION on the next command following the condition. It is not an error to issue this command to a logical unit that is currently reserved to the requesting initiator. If the logical unit is previously reserved by another initiator, then the target shall return a RESERVATION CONFLICT status. If, after honoring the reservation, any other initiator then subsequently attempts to perform any command on the reserved logical unit other than a RESERVE UNIT command or a RELEASE UNIT command, which shall be ignored, then the command shall be rejected with a RESERVATION CONFLICT status. The third-party reservation option for the RESERVE UNIT command allows an initiator to reserve a logical unit for another SCSI device. This option is intended for use in multiple-initiator systems that use the COPY command. Any target that implements the third-party reservation option shall also implement the third-party release option (see 14.1.8.2). If the third-party (3rdPty) bit is zero, then the third-party reservation option is not requested. If the 3rdPty bit is one and the third-party reservation option is implemented, then the RESERVE UNIT command shall reserve the specified logical unit for the SCSI device specified in the third-party device ID field. The target shall preserve the reservation until superseded by another RESERVE UNIT command from the initiator that made the reservation or until released by the same initiator, by a BUS DEVICE RESET message from any initiator, or by a "hard" RESET condition. The target shall ignore (i.e., return GOOD status) any attempt made by any other initiator to release the reservation. If the 3rdPty bit is one and the third-party reservation option is not implemented, then the target shall reject the RESERVE UNIT command with a CHECK CONDITION status and a sense key of ILLEGAL REQUEST. An initiator that holds a current reservation may modify that reservation (e.g., switch third-parties) by issuing another RESERVE UNIT command to the same logical unit. The superseding RESERVE UNIT command shall release the previous reservation state only when the new reservation is granted. A superseding reservation takes priority over any previously queued reservation request. 14.1.8.2. RELEASE UNIT Command. The RELEASE UNIT command (Table 14-22, operation code 17h) shall release the logical unit if it is currently reserved by the requesting initiator. It is not an error to attempt to release a logical unit that is not currently reserved to the requesting initiator. However, it shall not be released if it is reserved by another initiator. The third-party release option for the RELEASE UNIT command allows an initiator to release a logical unit that was previously reserved using the third-party reservation option (see 14.1.8.1). This option shall be implemented if the third-party reservation option is implemented. This option is intended for use in multiple-initiator systems that use the COPY command. If the third-party (3rdPty) bit is zero, then the third-party release option is not requested. If the third-party bit is one and the target implements the third-party release option, then the target shall release the specified logical unit, but only if the reservation was made using the third-party reservation option by the initiator that is requesting the release and for the same SCSI device as specified in the third-party device ID field. If the 3rdPty bit is one and the target does not implement the third-party release option, then the target shall terminate the command with a CHECK CONDITION status and the sense key shall be set to ILLEGAL REQUEST. 14.1.9. SCAN Command Peripheral Device Type: Scanner Operation Code Type: Optional Table 14-23: SCAN Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (1Bh) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | -----|-----------------------------------------------------------------------| 2 | Reserved | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | Transfer Length | -----|-----------------------------------------------------------------------| 5 | Control Byte | ============================================================================== The SCAN command (Table 14-23) instructs the target to begin a scanner operation for the specified logical unit. The transfer length specifies the length in bytes of the window list that shall be sent during the DATA OUT phase. A transfer length of zero indicates that no region description information shall be transferred. This condition shall not be considered as an error. If sent, the window list shall consist of one or more window identifiers which define a region description to be activated during the scan operation. These window identifiers correspond to the window identifiers defined in the window parameters data format (Table 14-3) of the DEFINE WINDOW PARAMETERS command (see 14.1.1). 14.1.10. SEND Command Peripheral Device Type: Scanner Operation Code Type: Optional Table 14-24: SEND Command ============================================================================== Bit| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Byte | | | | | | | | | ============================================================================== 0 | Operation Code (2Ah) | -----|-----------------------------------------------------------------------| 1 | Logical Unit Number | Reserved | RelAdr | -----|-----------------------------------------------------------------------| 2 | Transfer Data Type | -----|-----------------------------------------------------------------------| 3 | Reserved | -----|-----------------------------------------------------------------------| 4 | (MSB) | -----|--- Transfer Identification ---| 5 | (LSB) | -----|-----------------------------------------------------------------------| 6 | (MSB) | -----|--- ---| 7 | Transfer Length | -----|--- ---| 8 | (LSB) | -----|-----------------------------------------------------------------------| 9 | Control Byte | ============================================================================== The SEND command (Table 14-24) transfers data from the initiator to the target. The transfer data type distinguishes between the different types of data which may be transferred between the initiator and the target. The types of transfers are specified in Table 14-25. Table 14-25: Transfer Type Codes ============================================================================== Code Description ------------------------------------------------------------------------------ 00h Image Data 01h Scanner Controller Software/Firmware Code 02h Halftone Mask Data 03h Gamma Function 04h - 7Fh Reserved 80h - FFh Vendor Unique ============================================================================== The transfer identification field shall be used to differentiate between the different transfers of data within the same transfer type. Uses of this field shall include identifying unique halftone masks to be stored within the scanner device and separating software routines resident within the scanner device. The transfer length specifies the length in blocks of data that shall be sent during the DATA OUT phase. A transfer length of zero indicates that no data shall be sent. This condition shall not be considered as an error. This command shall be terminated with a status of RESERVATION CONFLICT if any reservation access conflict (see 14.1.8.1) exists and no data shall be transferred. [Editorial Note: The RelAdr bit for this CBD is not currently defined for scanner devices. If this bit is required then some definition is necessary.] 14.2. Additional Sense Codes for Scanner Devices The additional sense code (byte 12 of sense data) provides additional device- specific error information. If the target supports additional sense codes (byte 12), the reported error conditions it supports shall be reported with the codes listed in the table below. Table 14-26: Extended Sense -- Additional Sense Code Definition [Editorial Note: The following section is new to this part of the document.] Sense Key NO SENSE (0h) ============================================================================= Byte # 12 13 Description -- -- ------------------------------------------------------------ 00 00 No additional sense information 00 02 End of medium detected 00 03 End of data detected 00 04 Start of medium detected 0A 00 Error log overflow Sense Key RECOVERED ERROR (1h) ============================================================================= Byte # 12 13 Description -- -- ------------------------------------------------------------ 17 00 Recovered read error 17 01 Recovered read data with read retries 18 00 Recovered write error 18 01 Recovered write data with retries Sense Key NOT READY (2h) ============================================================================= Byte # 12 13 Description -- -- ------------------------------------------------------------ 04 00 Device not ready 05 00 Device not selected Sense Key MEDIUM ERROR (3h) ============================================================================= Byte # 12 13 Description -- -- ------------------------------------------------------------ 11 00 Unrecovered read error 11 01 Read retries exhausted 11 02 Error too long to correct 11 03 Multiple read errors 12 00 Unrecovered write error 12 01 Write retries exhausted 13 00 Error during Medium Position Command 14 00 Misfeed/Paper Jam Sense Key HARDWARE ERROR (4h) ============================================================================= Byte # 12 13 Description -- -- ------------------------------------------------------------ 03 00 Write Fault 07 00 Multiple devices selected 08 00 Logical unit communication failure 0B 00 Time-out error 0B 01 Read time-out error 0B 02 Device communication time-out 1B 00 Synchronous transfer error 40 00 Diagnostic failure 40 01 Power on failure 40 02 RAM failure 40 04 Checksum error 44 00 Internal controller error 45 00 Select/Reselect failure 46 00 Unsuccessful soft RESET 55 00 Device reported error 60 00 Lamp failure 61 00 Video acquisition failure 61 01 Unable to acquire video 61 02 Out of focus 62 00 Scan head positioning error Sense Key ILLEGAL REQUEST (5h) ============================================================================= Byte # 12 13 Description -- -- ------------------------------------------------------------ 1A 00 Parameter overrun 20 00 Invalid command operation code 20 01 Illegal function for device type 20 02 Unsupported function 20 03 Non-zero bit/field set 20 04 Reserved bit/field used 21 00 Window parameters invalid for medium 23 00 Length of CDB is incorrect 23 01 CDB length error - overrun 23 02 CDB length error - underrun 24 00 Illegal field in CDB 25 00 Invalid LUN 26 00 Invalid field in Parameter List 26 03 Requested resolution not available 26 06 Diagnostic self test not supported 2C 00 Command sequence error 2C 01 Too many windows specified 2C 02 Invalid combination of windows 43 00 Message reject error 2E 00 Medium motion error 2E 01 Read past end of medium 2E 02 Read past beginning of medium 2E 03 Position past end of medium 2E 04 Position past beginning of medium Sense Key UNIT ATTENTION (6h) ============================================================================= Byte # 12 13 Description -- -- ------------------------------------------------------------ 28 00 Medium changed 29 00 Power on, reset or BUS DEVICE RESET occurred 2A 00 Mode select parameters changed Sense Key COPY ABORTED (0Ah) ============================================================================= Byte # 12 13 Description -- -- ------------------------------------------------------------ 60 00 Status error from target on COPY command 61 00 Copy cannot execute since host cannot disconnect Sense Key ABORTED COMMAND (0Bh) ============================================================================= Byte # 12 13 Description -- -- ------------------------------------------------------------ 47 00 Parity error 48 00 Initiator detected error 49 00 Message Out error 49 01 Inappropriate message 49 02 Illegal message 4A 00 Command phase error 4B 00 Data Out error 4C 00 MESSAGE REJECT message retry failure 4D 00 INITIATOR DETECTED ERROR retry failure