Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

scanner.h

00001 /* @(#)07       1.1  src/include/pos/scanner.h, apicode, ptux1.2.0, 20 1/13/00 18:45:17 */
00002 
00003 /********************************************************************/
00004 /*  <scanner.h> header file                                         */
00005 /*                                                                  */
00006 /*  Licensed Materials - Property of IBM                            */
00007 /*                                                                  */
00008 /*  IBM Point of Sale Subsystem                                     */
00009 /*  73G0950 (C) Copyright IBM Corporation 1992, 1995                */
00010 /*  All rights reserved                                             */
00011 /*                                                                  */
00012 /*  US Government Users Restricted Rights -                         */
00013 /*  Use, duplication, or disclosure restricted                      */
00014 /*  by GSA ADP Schedule Contract with IBM Corp.                     */
00015 /*                                                                  */
00016 /********************************************************************/
00017 
00018 #ifndef _H_POS_SCANNER
00019 #define _H_POS_SCANNER 1
00020 
00021 /****************************************************************/
00022 /* Values for the SUBTYPE field of ONLINE and OFFLINE messages. */
00023 /****************************************************************/
00024 
00025                                      /* Portable (Mobile) Scanners */
00026 #define PosSCAN_SUBTYPE_4612            1  /* 4612 SurePoint Mobile*/
00027 
00028                                      /* Hand-held Bar Code Readers */
00029 #define PosSCAN_SUBTYPE_HHBCR_1         1            /* Model 1    */
00030 #define PosSCAN_SUBTYPE_HHBCR_2         2            /* Model 2    */
00031 #define PosSCAN_SUBTYPE_1520_A02        3            /* 1520-A02   */
00032 
00033                                      /* Flatbed Scanners */
00034 #define PosSCAN_SUBTYPE_4687            1     /* 4687 Models 1 & 2 */
00035 #define PosSCAN_SUBTYPE_4686_1_2        2     /* 4686 Models 1 & 2 */
00036 #define PosSCAN_SUBTYPE_4686_3_4        3     /* 4686 Models 3 & 4 */
00037 #define PosSCAN_SUBTYPE_4696            4     /* 4696              */
00038 #define PosSCAN_SUBTYPE_4697            5     /* 4697              */
00039 #define PosSCAN_SUBTYPE_4698            6     /* 4698              */
00040 
00041 #define PosSCAN_SUBTYPE_USB_OEM         7     /* USB               */
00042 
00043 
00044 /*****************************/
00045 /* PosScanner resource names */
00046 /*****************************/
00047 
00048 #define PosNbarCodes1                   "barCodes1"
00049 #define PosNbarCodes2                   "barCodes2"
00050 #define PosNbarCodes3                   "barCodes3"
00051 #define PosNbarCodes4                   "barCodes4"
00052 #define PosNbarCodeProgramming          "barCodeProgramming"
00053 #define PosNbeepFreq                    "beepFreq"
00054 #define PosNbeepLength                  "beepLength"
00055 #define PosNbeepState                   "beepState"
00056 #define PosNbeepVolume                  "beepVolume"
00057 #define PosNblinkLength                 "blinkLength"
00058 #define PosNblock1Type                  "block1Type"
00059 #define PosNblock2Type                  "block2Type"
00060 #define PosNblock3Type                  "block3Type"
00061 #define PosNblockReadMode               "blockReadMode"
00062 #define PosNbVolSwitchState             "bVolSwitchState"
00063 #define PosNcheckModulo                 "checkModulo"
00064 #define PosNcode128ScansPerRead         "code128ScansPerRead"
00065 #define PosNcode39ScansPerRead          "code39ScansPerRead"
00066 #define PosNdReadTimeout                "dReadTimeout"
00067 #define PosNdecodeAlgorithm             "decodeAlgorithm"
00068 #define PosNdTouchMode                  "dTouchMode"
00069 #define PosNiTFLength1                  "iTFLength1"
00070 #define PosNiTFLength2                  "iTFLength2"
00071 #define PosNiTFLengthType               "iTFLengthType"
00072 #define PosNiTFScansPerRead             "iTFScansPerRead"
00073 #define PosNjANTwoLabelDecode           "jANTwoLabelDecode"
00074 #define PosNlabelsQueued                "labelsQueued"
00075 #define PosNlaserTimeout                "laserTimeout"
00076 #define PosNmotorTimeout                "motorTimeout"
00077 #define PosNlaserSwitchState            "laserSwitchState"
00078 #define PosNqueueAllLabels              "queueAllLabels"
00079 #define PosNscansPerRead                "scansPerRead"
00080 #define PosNeAN13ScansPerRead           "eAN13ScansPerRead"
00081 #define PosNeAN8ScansPerRead            "eAN8ScansPerRead"
00082 #define PosNuPCAScansPerRead            "uPCAScansPerRead"
00083 #define PosNuPCDScansPerRead            "uPCDScansPerRead"
00084 #define PosNuPCEScansPerRead            "uPCEScansPerRead"
00085 #define PosNstoreScansPerRead           "storeScansPerRead"
00086 #define PosNsupplementals               "supplementals"
00087 #define PosNtransmitCheckDigit          "transmitCheckDigit"
00088 #define PosNtwoLabelFlagPair1           "twoLabelFlagPair1"
00089 #define PosNtwoLabelFlagPair2           "twoLabelFlagPair2"
00090 #define PosNtwoLabelFlagPair3           "twoLabelFlagPair3"
00091 #define PosNtwoLabelFlagPair4           "twoLabelFlagPair4"
00092 #define PosNuPCExpansion                "uPCExpansion"
00093 #define PosNverifyPriceChk              "verifyPriceChk"
00094 
00095 
00096 /****************************/
00097 /* Scanner resource classes */
00098 /****************************/
00099 
00100 #define PosCBarCodes1                   "BarCodes1"
00101 #define PosCBarCodes2                   "BarCodes2"
00102 #define PosCBarCodes3                   "BarCodes3"
00103 #define PosCBarCodes4                   "BarCodes4"
00104 #define PosCBarCodeProgramming          "BarCodeProgramming"
00105 #define PosCBeepFreq                    "BeepFreq"
00106 #define PosCBeepLength                  "BeepLength"
00107 #define PosCBeepState                   "BeepState"
00108 #define PosCBeepVolume                  "BeepVolume"
00109 #define PosCBlinkLength                 "BlinkLength"
00110 #define PosCBlock1Type                  "Block1Type"
00111 #define PosCBlock2Type                  "Block2Type"
00112 #define PosCBlock3Type                  "Block3Type"
00113 #define PosCBlockReadMode               "BlockReadMode"
00114 #define PosCBVolSwitchState             "BVolSwitchState"
00115 #define PosCCheckModulo                 "CheckModulo"
00116 #define PosCCode128ScansPerRead         "Code128ScansPerRead"
00117 #define PosCCode39ScansPerRead          "Code39ScansPerRead"
00118 #define PosCDecodeAlgorithm             "DecodeAlgorithm"
00119 #define PosCDReadTimeout                "DReadTimeout"
00120 #define PosCDTouchMode                  "DTouchMode"
00121 #define PosCITFLength1                  "ITFLength1"
00122 #define PosCITFLength2                  "ITFLength2"
00123 #define PosCITFLengthType               "ITFLengthType"
00124 #define PosCITFScansPerRead             "ITFScansPerRead"
00125 #define PosCJANTwoLabelDecode           "JANTwoLabelDecode"
00126 #define PosCLabelsQueued                "LabelsQueued"
00127 #define PosCLaserTimeout                "LaserTimeout"
00128 #define PosCMotorTimeout                "MotorTimeout"
00129 #define PosCLaserSwitchState            "LaserSwitchState"
00130 #define PosCQueueAllLabels              "QueueAllLabels"
00131 #define PosCScansPerRead                "ScansPerRead"
00132 #define PosCEAN13ScansPerRead           "EAN13ScansPerRead"
00133 #define PosCEAN8ScansPerRead            "EAN8ScansPerRead"
00134 #define PosCUPCAScansPerRead            "UPCAScansPerRead"
00135 #define PosCUPCDScansPerRead            "UPCDScansPerRead"
00136 #define PosCUPCEScansPerRead            "UPCEScansPerRead"
00137 #define PosCStoreScansPerRead           "StoreScansPerRead"
00138 #define PosCSupplementals               "Supplementals"
00139 #define PosCTransmitCheckDigit          "TransmitCheckDigit"
00140 #define PosCTwoLabelFlagPair1           "TwoLabelFlagPair1"
00141 #define PosCTwoLabelFlagPair2           "TwoLabelFlagPair2"
00142 #define PosCTwoLabelFlagPair3           "TwoLabelFlagPair3"
00143 #define PosCTwoLabelFlagPair4           "TwoLabelFlagPair4"
00144 #define PosCUPCExpansion                "UPCExpansion"
00145 #define PosCVerifyPriceChk              "VerifyPriceChk"
00146 
00147 
00148 
00149 /*********************************************************************/
00150 /*                                                                   */
00151 /* This block comment describes how the constants for the bar code   */
00152 /* types and groups are built.  Each distinct bar code type is       */
00153 /* assigned a bit position (or two) within a 32 bit word.  When a    */
00154 /* bar code of that type is read, the appropriate field in the data  */
00155 /* buffer is filled with a value that has that bit set.  When a      */
00156 /* scanner is being configured to read a group of bar codes, the     */
00157 /* bit(s) corresponding to the bar code(s) read in that mode are     */
00158 /* set.  There is also an "odd mode" bit that is used when the mode  */
00159 /* or bar code does not fit the normal set of rules.                 */
00160 /*                                                                   */
00161 /* In the figure, the 1's indicate a set bit while the periods       */
00162 /* indicate a clear bit.  The bit positions were chosen like this    */
00163 /* so it would be a little easier to remember the bit positions      */
00164 /* while debugging.                                                  */
00165 /*                                                                   */
00166 /*********************************************************************/
00167 /*                                                                   */
00168 /*                          Bit 31                            Bit 0  */
00169 /*        Label Type        |             Bit(s) set              |  */
00170 /*  ---------------------   ---------------------------------------  */
00171 /*  (Unknown)               .... .... .... .... .... .... .... ....  */
00172 /*                                                                   */
00173 /*  UCC/EAN 128             .... .... ...1 .... .... .... .... ....  */
00174 /*                                                                   */
00175 /*  Codabar                 .... .... .... 1... .... .... .... ....  */
00176 /*  Code 39                 .... .... .... .1.. .... .... .... ....  */
00177 /*  Code 93                 .... .... .... ..1. .... .... .... ....  */
00178 /*  Code 128                .... .... .... ...1 .... .... .... ....  */
00179 /*                                                                   */
00180 /*  UPC-A                   .... .... .... .... 1... .... .... ....  */
00181 /*  UPC-E                   .... .... .... .... .1.. .... .... ....  */
00182 /*  EAN-8                   .... .... .... .... ..1. .... .... ....  */
00183 /*  EAN-13                  .... .... .... .... ...1 .... .... ....  */
00184 /*                                                                   */
00185 /*  UPC-D1                  .... .... .... .... .... 1... .... ....  */
00186 /*  UPC-D2                  .... .... .... .... .... .1.. .... ....  */
00187 /*  UPC-D3                  .... .... .... .... .... ..1. .... ....  */
00188 /*  UPC-D4                  .... .... .... .... .... ...1 .... ....  */
00189 /*  UPC-D5                  .... .... .... .... .... .... 1... ....  */
00190 /*                                                                   */
00191 /*  Interleaved 2 of 5      .... .... .... .... .... .... .... 1...  */
00192 /*  Standard 2 of 5         .... .... .... .... .... .... .... .1..  */
00193 /*                                                                   */
00194 /*  Plus 2 (flag)           .... .... .... .... .... .... .... ..1.  */
00195 /*  Plus 5 (flag)           .... .... .... .... .... .... .... ...1  */
00196 /*  Plus 128 (flag)         .... .... .... .... .... .... ...1 ....  */
00197 /*                                                                   */
00198 /*  "Odd" modes             1... .... .... .... .... .... .... ....  */
00199 /*                                                                   */
00200 /*  (Reserved)              .111 1111 111. .... .... .... .11. ....  */
00201 /*                                                                   */
00202 /*  Labels with multiple bits set:                                   */
00203 /*                                                                   */
00204 /*  UPC-A+2                 .... .... .... .... 1... .... .... ..1.  */
00205 /*  UPC-A+5                 .... .... .... .... 1... .... .... ...1  */
00206 /*  UPC-A+Code 128          .... .... .... .... 1... .... ...1 ....  */
00207 /*  UPC-E+2                 .... .... .... .... .1.. .... .... ..1.  */
00208 /*  UPC-E+5                 .... .... .... .... .1.. .... .... ...1  */
00209 /*  UPC-E+Code 128          .... .... .... .... .1.. .... ...1 ....  */
00210 /*  EAN-8+2                 .... .... .... .... ..1. .... .... ..1.  */
00211 /*  EAN-8+5                 .... .... .... .... ..1. .... .... ...1  */
00212 /*  EAN-8+Code 128          .... .... .... .... ..1. .... ...1 ....  */
00213 /*  EAN-13+2                .... .... .... .... ...1 .... .... ..1.  */
00214 /*  EAN-13+5                .... .... .... .... ...1 .... .... ...1  */
00215 /*  EAN-13+Code 128         .... .... .... .... ...1 .... ...1 ....  */
00216 /*                                                                   */
00217 /*********************************************************************/
00218 
00219 
00220 /***************************************************/
00221 /* PosNbarCodes1-4 resource values                 */
00222 /***************************************************/
00223 
00224 #define PosLGROUP_UCC_EAN_128           0x00100000L
00225 #define PosLGROUP_CODABAR               0x00080000L
00226 #define PosLGROUP_CODE_39               0x00040000L
00227 #define PosLGROUP_CODE_93               0x00020000L
00228 #define PosLGROUP_CODE_128              0x00010000L
00229 #define PosLGROUP_INT_2_OF_5            0x00000008L
00230 #define PosLGROUP_NONE                  0x00000000L
00231 #define PosLGROUP_PLUS_2_5_ONLY         0x8000F003L
00232 #define PosLGROUP_STD_2_OF_5            0x00000004L
00233 #define PosLGROUP_UPC_D1_TO_D5          0x00000F80L
00234 #define PosLGROUP_UPC_EAN               0x0000F000L
00235 
00236 #define PosLGROUP_UPC_EAN_CODABAR       0x0008F000L
00237 #define PosLGROUP_UPC_EAN_CODE_39       0x0004F000L
00238 #define PosLGROUP_UPC_EAN_CODE_93       0x0002F000L
00239 #define PosLGROUP_UPC_EAN_CODE_128      0x0001F000L
00240 #define PosLGROUP_UPC_EAN_D1_TO_D5      0x0000FF80L
00241 #define PosLGROUP_UPC_EAN_D3            0x0000F200L
00242 #define PosLGROUP_UPC_EAN_ITF           0x0000F008L
00243 
00244 #define PosLGROUP_UPC_EAN_PLUS_2        0x0000F002L
00245 #define PosLGROUP_UPC_EAN_PLUS_5        0x0000F001L
00246 #define PosLGROUP_UPC_EAN_PLUS_2_5      0x0000F003L
00247 #define PosLGROUP_UPC_EAN_2_5_CODABAR   0x0008F003L
00248 
00249 #define PosLGROUP_UCC_EAN_128_CODABAR   0x00180000L
00250 #define PosLGROUP_UCC_EAN_128_CODE_39   0x00140000L
00251 #define PosLGROUP_UCC_EAN_128_CODE_93   0x00120000L
00252 #define PosLGROUP_UCC_EAN_128_CODE_128  0x00110000L
00253 #define PosLGROUP_UCC_EAN_128_ITF       0x00100008L
00254 #define PosLGROUP_CODABAR_CODE_39       0x000C0000L
00255 #define PosLGROUP_CODABAR_CODE_93       0x000A0000L
00256 #define PosLGROUP_CODABAR_CODE_128      0x00090000L
00257 #define PosLGROUP_CODABAR_ITF           0x00080008L
00258 #define PosLGROUP_CODE_39_CODE_93       0x00060000L
00259 #define PosLGROUP_CODE_39_CODE_128      0x00050000L
00260 #define PosLGROUP_CODE_39_ITF           0x00040008L
00261 #define PosLGROUP_CODE_93_CODE_128      0x00030000L
00262 #define PosLGROUP_CODE_93_ITF           0x00020008L
00263 #define PosLGROUP_CODE_128_ITF          0x00010008L
00264 #define PosLGROUP_ALL                   0x001FFF88L
00265 
00266 
00267 /****************************************************************/
00268 /* PosNblock1Type, PosNblock2Type, and PosNblock3Type resource  */
00269 /* values, as well as the constants used to indicate label type */
00270 /****************************************************************/
00271 
00272 #define PosLABEL_UCC_EAN_128            0x00100000L
00273 #define PosLABEL_CODABAR                0x00080000L
00274 #define PosLABEL_CODE_39                0x00040000L
00275 #define PosLABEL_CODE_93                0x00020000L
00276 #define PosLABEL_CODE_128               0x00010000L
00277 #define PosLABEL_EAN_8                  0x00002000L
00278 #define PosLABEL_EAN_8_PLUS_2           0x00002002L
00279 #define PosLABEL_EAN_8_PLUS_5           0x00002001L
00280 #define PosLABEL_EAN_8_PLUS_CODE128     0x00002010L
00281 #define PosLABEL_EAN_13                 0x00001000L
00282 #define PosLABEL_EAN_13_PLUS_2          0x00001002L
00283 #define PosLABEL_EAN_13_PLUS_5          0x00001001L
00284 #define PosLABEL_EAN_13_PLUS_CODE128    0x00001010L
00285 #define PosLABEL_INT_2_OF_5             0x00000008L
00286 #define PosLABEL_NO_CHECK               0x00000000L
00287 #define PosLABEL_STD_2_OF_5             0x00000004L
00288 #define PosLABEL_UNKNOWN                0x00000000L
00289 #define PosLABEL_UPC_A                  0x00008000L
00290 #define PosLABEL_UPC_A_PLUS_2           0x00008002L
00291 #define PosLABEL_UPC_A_PLUS_5           0x00008001L
00292 #define PosLABEL_UPC_A_PLUS_CODE128     0x00008010L
00293 #define PosLABEL_UPC_D1                 0x00000800L
00294 #define PosLABEL_UPC_D2                 0x00000400L
00295 #define PosLABEL_UPC_D3                 0x00000200L
00296 #define PosLABEL_UPC_D4                 0x00000100L
00297 #define PosLABEL_UPC_D5                 0x00000080L
00298 #define PosLABEL_UPC_E                  0x00004000L
00299 #define PosLABEL_UPC_E_PLUS_2           0x00004002L
00300 #define PosLABEL_UPC_E_PLUS_5           0x00004001L
00301 #define PosLABEL_UPC_E_PLUS_CODE128     0x00004010L
00302 
00303 #define PosLABEL_PLUS_2_FLAG            0x00000002L
00304 #define PosLABEL_PLUS_5_FLAG            0x00000001L
00305 #define PosLABEL_PLUS_CODE128_FLAG      0x00000010L
00306 
00307 /*****************************************************/
00308 /* Resource values used by scanner devices for       */
00309 /* PosNblinkLength, PosNbeepLength, PosNdReadTimeout */
00310 /*****************************************************/
00311 
00312 #define PosSHORT                        0x00
00313 #define PosMEDLONG                      0x01
00314 #define PosLONG                         0x02
00315 #define PosLONGEST                      0x03
00316 
00317 
00318 /*****************************************************/
00319 /* Resource values used by scanner devices for       */
00320 /* PosNuPCExpansion.                                 */
00321 /*****************************************************/
00322 
00323 #define PosNO_EXPANSION                 0x00
00324 #define PosUPCA_TO_EAN13                0x01
00325 #define PosUPCE_TO_EAN13                0x02
00326 #define PosUPCA_UPCE_TO_EAN13           0x03
00327 #define PosUPCE_TO_UPCA                 0x04
00328 #define PosUPCE_TO_UPCA_TO_EAN13        0x05
00329 
00330 
00331 /*****************************************************/
00332 /* Resource values used by scanner devices for       */
00333 /* PosNverifyPriceChk.                               */
00334 /*****************************************************/
00335 
00336 #define PosNO_VERIFY                    0x00
00337 #define PosVERIFY_4DIGIT                0x01
00338 #define PosVERIFY_5DIGIT                0x02
00339 
00340 
00341 /*****************************************************/
00342 /* Resource values used by scanner devices for       */
00343 /* PosNcheckModulo. Note that scanners use PosENABLE */
00344 /* to enable all check digits and PosDISABLE to      */
00345 /* disable all check digits.  These only apply to    */
00346 /* USB scanners.                                     */
00347 /*****************************************************/
00348 
00349 #define PosNO_CHECK_DIGITS                   0x00
00350 #define PosUPCA_CHECK_DIGIT                  0x02
00351 #define PosUPCE_CHECK_DIGIT                  0x04
00352 #define PosUPCE_UPCA_CHECK_DIGIT             0x06
00353 #define PosCODE39_CHECK_DIGIT                0x08
00354 #define PosCODE39_UPCA_CHECK_DIGIT           0x0A
00355 #define PosCODE39_UPCE_CHECK_DIGIT           0x0C
00356 #define PosCODE39_UPCE_UPCA_CHECK_DIGIT      0x0E
00357 #define PosITF_CHECK_DIGIT                   0x10
00358 #define PosITF_UPCA_CHECK_DIGIT              0x12
00359 #define PosITF_UPCE_CHECK_DIGIT              0x14
00360 #define PosITF_UPCE_UPCA_CHECK_DIGIT         0x16
00361 #define PosITF_CODE39_CHECK_DIGIT            0x18
00362 #define PosITF_CODE39_UPCA_CHECK_DIGIT       0x1A
00363 #define PosITF_CODE39_UPCE_CHECK_DIGIT       0x1C
00364 #define PosALL_CHECK_DIGITS                  0x01  // For USB compatibilty with HHBCR
00365 
00366 
00367 /*****************************************************/
00368 /* Resource values used by scanner devices for       */
00369 /* PosNsupplementals.                                */
00370 /*****************************************************/
00371 
00372 #define PosNO_SUPPLEMENTALS                  0x00
00373 #define PosPLUS_2_SUPPLEMENTALS              0x01
00374 #define PosPLUS_5_SUPPLEMENTALS              0x02
00375 #define PosPLUS_2_5_SUPPLEMENTALS            0x03
00376 #define PosPLUS_CODE128_SUPPLEMENTALS        0x04
00377 #define PosPLUS_2_CODE128_SUPPLEMENTALS      0x05
00378 #define PosPLUS_5_CODE128_SUPPLEMENTALS      0x06
00379 #define PosALL_SUPPLEMENTALS                 0x07
00380 
00381 
00382 /*****************************************************/
00383 /* Resource values used by scanner devices for       */
00384 /* PosNiTFLengthType                                 */
00385 /*****************************************************/
00386 
00387 #define PosDISCRETE                     0x00
00388 #define PosRANGE                        0x01
00389 
00390 /***************************************************************/
00391 /* Constants used in the Flags field of the scanner data block */
00392 /***************************************************************/
00393 
00394 #define POS_SCAN_LAST_BLOCK              0x0001
00395 #define POS_SCAN_UNEXPECTED_DATA         0x0002
00396 #define POS_SCAN_PARTIAL_LABEL           0x0004
00397 #define POS_SCAN_LABEL_READ_ERROR        0x0008
00398 #define POS_SCAN_DIRECT_IO_RESPONSE      0x0010
00399 #define POS_SCAN_DIRECT_IO_ERROR         0x0020
00400 #define POS_SCAN_UNEXPECTED_LENGTH       0x0040
00401 
00402 
00403 /****************************************************************/
00404 /* PosScannerDataHdr structure -- Scanner label data header     */
00405 /****************************************************************/
00406 
00407 typedef struct
00408   {
00409     unsigned long  LblType;             /* Label Type   */
00410     unsigned short Flags;               /* Flags        */
00411     unsigned short LblLen;              /* Label Length */
00412   } PosScannerDataHdr;
00413 
00414 
00415 #endif   /* _H_POS_SCANNER */

 

L.A.B. Project © 2001-2004 LAB Project & DJ Anubis