00001 /* @(#)09 1.14.1.5 src/include/pos/printer.h, apicode, ptux1.2.0, 20 4/28/03 14:40:09 */ 00002 00003 00004 /********************************************************************/ 00005 /* <printer.h> header file */ 00006 /* */ 00007 /* Licensed Materials - Property of IBM */ 00008 /* */ 00009 /* IBM Point of Sale Subsystem */ 00010 /* 73G0950 (C) Copyright IBM Corporation 1992, 1999 */ 00011 /* All rights reserved */ 00012 /* */ 00013 /* US Government Users Restricted Rights - */ 00014 /* Use, duplication, or disclosure restricted */ 00015 /* by GSA ADP Schedule Contract with IBM Corp. */ 00016 /* */ 00017 /********************************************************************/ 00018 00019 #ifndef _H_POS_PRINTER 00020 #define _H_POS_PRINTER 1 00021 00022 00023 /********************************************************************/ 00024 /* Values for the SUBTYPE field of ONLINE and OFFLINE messages. */ 00025 /********************************************************************/ 00026 00027 #define PosPRN_SUBTYPE_4689_1 0x01 00028 #define PosPRN_SUBTYPE_4689_2 0x02 00029 #define PosPRN_SUBTYPE_M4A 0x03 00030 #define PosPRN_SUBTYPE_4689_301 0x04 00031 00032 #define PosPRN_SUBTYPE_4610_TI1_TI2 0x00 00033 #define PosPRN_SUBTYPE_4610_TI3_TI4 0x01 00034 #define PosPRN_SUBTYPE_4610_TI5 0x02 00035 #define PosPRN_SUBTYPE_4610_SST 0x03 00036 #define PosPRN_SUBTYPE_4610_TI3_TI4_8MEG 0x04 00037 #define PosPRN_SUBTYPE_4610_SST_8MEG 0x05 00038 #define PosPRN_SUBTYPE_MACARENA 0x06 00039 #define PosPRN_SUBTYPE_4610_SST_2MEG 0x07 00040 #define PosPRN_SUBTYPE_4610_TI8 0x08 00041 00042 00043 00044 00045 /*****************************/ 00046 /* PosPrinter resource names */ 00047 /*****************************/ 00048 00049 #define PosNDIWidth "diWidth" 00050 #define PosNfeedDirection "feedDirection" 00051 #define PosNfiscalCountry "fiscalCountry" 00052 #define PosNfiscalNotify "fiscalNotify" 00053 #define PosNfiscalPLDStatus "fiscalPLDStatus" 00054 #define PosNfiscalVersion "fiscalVersion" 00055 #define PosNheadParkedPosition "headParkedPosition" 00056 #define PosNinterleaved "interleaved" 00057 #define PosNlineFeedCR "lineFeedCR" 00058 #define PosNlineFeedDI "lineFeedDI" 00059 #define PosNlineFeedSJ "lineFeedSJ" 00060 #define PosNprintMode "printMode" 00061 #define PosNprintStation "printStation" 00062 #define PosNprintStatus "printStatus" 00063 #define PosNprintStatus2 "printStatus2" 00064 #define PosNrawPrintStatus "rawPrintStatus" 00065 #define PosNresumeString "resumeString" 00066 #define PosNretryString "retryString" 00067 #define PosNprintFeatures "printFeatures" 00068 #define PosNdiOrientation "diOrientation" 00069 #define PosNleftMarginCR "leftMarginCR" 00070 #define PosNprintAlignment "printAlignment" 00071 #define PosNprintColorMode "printColorMode" 00072 #define PosNprintQualityMode "printQualityMode" 00073 #define PosNprintUpsideDown "printUpsideDown" 00074 #define PosNprintTabStops "printTabStops" 00075 #define PosNCRWidth "crWidth" 00076 #define PosNprintToneFrequency "printToneFrequency" 00077 #define PosNprintToneVolume "printToneVolume" 00078 #define PosNprintToneDuration "printToneDuration" 00079 #define PosNprintToneOctave "printToneOctave" 00080 #define PosNprintToneNote "printToneNote" 00081 #define PosNprintCRCharSet1 "printCRCharSet1" 00082 #define PosNprintCRCharSet2 "printCRCharSet2" 00083 #define PosNprintCRCharSet3 "printCRCharSet3" 00084 #define PosNprintCRCharSet4 "printCRCharSet4" 00085 #define PosNprintDICharSet1 "printDICharSet1" 00086 #define PosNprintDICharSet2 "printDICharSet2" 00087 #define PosNprintCDAttached "printCDAttached" 00088 #define PosNprintCDPulseWidth "printCDPulseWidth" 00089 #define PosNprintCDStatusLevel "printCDStatusLevel" 00090 #define PosNrecordLength "recordLength" 00091 #define PosNmaximumRecords "maximumRecords" 00092 #define PosNmemoryAvailable "memoryAvailable" 00093 00094 00095 /*******************************/ 00096 /* PosPrinter resource classes */ 00097 /*******************************/ 00098 00099 #define PosCDIWidth "DiWidth" 00100 #define PosCFeedDirection "FeedDirection" 00101 #define PosCFiscalCountry "FiscalCountry" 00102 #define PosCFiscalNotify "FiscalNotify" 00103 #define PosCFiscalPLDStatus "FiscalPLDStatus" 00104 #define PosCFiscalVersion "FiscalVersion" 00105 #define PosCHeadParkedPosition "HeadParkedPosition" 00106 #define PosCInterleaved "Interleaved" 00107 #define PosCLineFeedCR "LineFeedCR" 00108 #define PosCLineFeedDI "LineFeedDI" 00109 #define PosCLineFeedSJ "LineFeedSJ" 00110 #define PosCPrintMode "PrintMode" 00111 #define PosCPrintStation "PrintStation" 00112 #define PosCPrintStatus "PrintStatus" 00113 #define PosCPrintStatus2 "PrintStatus2" 00114 #define PosCRawPrintStatus "RawPrintStatus" 00115 #define PosCResumeString "ResumeString" 00116 #define PosCRetryString "RetryString" 00117 #define PosCPrintFeatures "PrintFeatures" 00118 #define PosCDiOrientation "DiOrientation" 00119 #define PosCLeftMarginCR "LeftMarginCR" 00120 #define PosCPrintAlignment "PrintAlignment" 00121 #define PosCPrintColorMode "PrintColorMode" 00122 #define PosCPrintQualityMode "PrintQualityMode" 00123 #define PosCPrintUpsideDown "PrintUpsideDown" 00124 #define PosCPrintTabStops "PrintTabStops" 00125 #define PosCCRWidth "CrWidth" 00126 #define PosCPrintToneFrequency "PrintToneFrequency" 00127 #define PosCPrintToneVolume "PrintToneVolume" 00128 #define PosCPrintToneDuration "PrintToneDuration" 00129 #define PosCPrintToneOctave "PrintToneOctave" 00130 #define PosCPrintToneNote "PrintToneNote" 00131 #define PosCPrintCRCharSet1 "printCRCharSet1" 00132 #define PosCPrintCRCharSet2 "printCRCharSet2" 00133 #define PosCPrintCRCharSet3 "printCRCharSet3" 00134 #define PosCPrintCRCharSet4 "printCRCharSet4" 00135 #define PosCPrintDICharSet1 "printDICharSet1" 00136 #define PosCPrintDICharSet2 "printDICharSet2" 00137 #define PosCPrintCDAttached "printCDAttached" 00138 #define PosCPrintCDPulseWidth "printCDPulseWidth" 00139 #define PosCPrintCDStatusLevel "printCDStatusLevel" 00140 #define PosCRecordLength "recordLength" 00141 #define PosCMaximumRecords "maximumRecords" 00142 #define PosCMemoryAvailable "memoryAvailable" 00143 00144 /********************************************/ 00145 /* PosNprintXXCharSet# resource flags */ 00146 /********************************************/ 00147 00148 #define PosPRINT_PROPORTIONAL 0x00 00149 #define PosPRINT_PARTIAL 0x01 00150 #define PosPRINT_FIXEDFONT 0x02 00151 #define PosPRINT_NONE 0x03 00152 00153 /***************************************/ 00154 /* PosNcrWidth resource flags */ 00155 /***************************************/ 00156 00157 #define PosCR_WIDE 0x00 00158 #define PosCR_NARROW 0x01 00159 00160 00161 /***************************************/ 00162 /* PosNprintToneOctave resource flags */ 00163 /***************************************/ 00164 00165 #define PosPRINT_OCTAVE1 0x00 00166 #define PosPRINT_OCTAVE2 0x01 00167 #define PosPRINT_OCTAVE3 0x02 00168 #define PosPRINT_OCTAVE4 0x03 00169 00170 /***************************************/ 00171 /* PosNprintToneNote resource flags */ 00172 /***************************************/ 00173 00174 #define PosPRINT_TONE_C 0x00 00175 #define PosPRINT_TONE_C_SHARP 0x01 00176 #define PosPRINT_TONE_D 0x02 00177 #define PosPRINT_TONE_D_SHARP 0x03 00178 #define PosPRINT_TONE_E 0x04 00179 #define PosPRINT_TONE_F 0x05 00180 #define PosPRINT_TONE_F_SHARP 0x06 00181 #define PosPRINT_TONE_G 0x07 00182 #define PosPRINT_TONE_G_SHARP 0x08 00183 #define PosPRINT_TONE_A 0x09 00184 #define PosPRINT_TONE_A_SHARP 0x0A 00185 #define PosPRINT_TONE_B 0x0B 00186 00187 00188 /*****************************************/ 00189 /* PosNprintToneFrequency resource flags */ 00190 /*****************************************/ 00191 00192 #define PosPRINT_TONE_MIN_FREQ 261 00193 #define PosPRINT_TONE_MED_FREQ 2093 00194 #define PosPRINT_TONE_MAX_FREQ 3953 00195 00196 00197 /***************************************/ 00198 /* PosNprintToneVolume resource flags */ 00199 /***************************************/ 00200 00201 #define PosPRINT_TONE_SOFT 0x00 00202 #define PosPRINT_TONE_LOUD 0x01 00203 00204 /***************************************/ 00205 /* PosNprintUpsideDown resource flags */ 00206 /***************************************/ 00207 00208 #define PosPRINT_RIGHT_SIDE_UP 0x00 00209 #define PosPRINT_UPSIDE_DOWN 0x01 00210 00211 /****************************************/ 00212 /* PosNprintQualityMode resource flags */ 00213 /****************************************/ 00214 00215 #define PosHIGH_QUALITY_OFF 0x00 00216 #define PosHIGH_QUALITY_ON 0x01 00217 00218 /*********************************/ 00219 /* PosNcolorMode resource flags */ 00220 /*********************************/ 00221 00222 #define PosPAPER_NORMAL 0x00 00223 #define PosPAPER_TWO_COLOR 0x01 00224 00225 /*******************************/ 00226 /* PosNdiWidth resource values */ 00227 /*******************************/ 00228 00229 #define PosDI_WIDE 0x0 00230 #define PosDI_NARROW 0x1 00231 00232 00233 /*************************************/ 00234 /* PosNfeedDirection resource values */ 00235 /*************************************/ 00236 00237 #define PosFEED_FORWARD 0x0 00238 #define PosFEED_REVERSE 0x1 00239 00240 00241 /************************************/ 00242 /* PosNfiscalNotify resource values */ 00243 /************************************/ 00244 00245 #define PosFISCAL_NOTIFY_OFF 0x0 00246 #define PosFISCAL_NOTIFY_ON 0x1 00247 00248 00249 /***************************************/ 00250 /* PosNfiscalPLDStatus resource values */ 00251 /***************************************/ 00252 00253 #define PosFISCAL_PLD_FALSE 0x0 00254 #define PosFISCAL_PLD_TRUE 0x1 00255 00256 00257 /*******************************************/ 00258 /* PosNheadParkedPosition resource values */ 00259 /* (specifies the desired parked position) */ 00260 /*******************************************/ 00261 00262 #define PosHOME_CENTER 0x0 00263 #define PosHOME_LEFT 0x1 00264 00265 00266 /***********************************/ 00267 /* PosNinterleaved resource values */ 00268 /***********************************/ 00269 00270 #define PosINTERLEAVED_FALSE 0x0 00271 #define PosINTERLEAVED_TRUE 0x1 00272 00273 00274 /*******************************************************************/ 00275 /* PosNlineFeedCR, PosNlineFeedSJ, PosNlineFeedDI resource values */ 00276 /*******************************************************************/ 00277 00278 #define PosLPI_6 4236 00279 #define PosLPI_8 3177 00280 00281 00282 /*********************************/ 00283 /* PosNprintMode resource values */ 00284 /*********************************/ 00285 00286 #ifndef PosMODE_DIRECT 00287 #define PosMODE_DIRECT 0x00 00288 #endif 00289 #define PosMODE_NORMAL 0x01 00290 #define PosMODE_LOGO 0x02 00291 #define PosMODE_FISCAL 0x04 00292 #define PosMODE_LOAD_MESSAGE 0x08 00293 #define PosMODE_LOAD_LOGO 0x10 00294 00295 00296 /************************************/ 00297 /* PosNprintStation resource values */ 00298 /************************************/ 00299 00300 #define PosPRINT_STATION_CR 0x0001 00301 #define PosPRINT_STATION_SJ 0x0002 00302 #define PosPRINT_STATION_DI 0x0004 00303 00304 /*************************************/ 00305 /* PosNdiOrientation resource values */ 00306 /*************************************/ 00307 00308 #define PosPRINT_PORTRAIT 0x0000 00309 #define PosPRINT_LANDSCAPE 0x0001 00310 00311 /************************************/ 00312 /* PosNleftMarginCR resource values */ 00313 /************************************/ 00314 00315 #define PosLEFT_MARGIN_NONE 0x0000 00316 #define PosLEFT_MARGIN_MODEL4 0x80000000 00317 00318 /**************************************/ 00319 /* PosNprintAlignment resource values */ 00320 /**************************************/ 00321 00322 #define PosPRINT_ALIGN_LEFT 0x0000 00323 #define PosPRINT_ALIGN_CENTER 0x0001 00324 #define PosPRINT_ALIGN_RIGHT 0x0002 00325 00326 /**********************************/ 00327 /* PosNprintStatus resource flags */ 00328 /**********************************/ 00329 00330 #define PosSTATUS_COVER_OPEN 0x0001 00331 #define PosSTATUS_TRANSPORT_ERROR 0x0002 00332 #define PosSTATUS_SJ_PAPER_ERROR 0x0004 00333 #define PosSTATUS_DOCUMENT_AT_FRONT 0x0008 00334 #define PosSTATUS_DOCUMENT_AT_TOP 0x0010 00335 #define PosSTATUS_DOCUMENT_READY 0x0020 00336 #define PosSTATUS_HEAD_PARKED 0x0040 00337 #define PosSTATUS_INSERTED_FORWARD 0x0080 00338 #define PosSTATUS_ERROR_PENDING 0x0100 00339 #define PosSTATUS_DI_FRONT_LOAD_ERROR 0x0200 00340 #define PosSTATUS_DI_TOP_LOAD_ERROR 0x0400 00341 #define PosSTATUS_DATA_AVAIL 0x0800 00342 #define PosSTATUS_PRINTER_ONLINE 0x1000 00343 #define PosSTATUS_MICR_INSTALLED 0x2000 00344 #define PosSTATUS_CR_PAPER_LOW 0x4000 00345 #define PosSTATUS_SJ_PAPER_LOW 0x8000 00346 00347 00348 /***********************************/ 00349 /* PosNprintStatus2 resource flags */ 00350 /***********************************/ 00351 00352 #define PosSTATUS2_PAPER_OUT 0x0001 00353 #define PosSTATUS2_OVERHEAT 0x0002 00354 #define PosSTATUS2_TEST_MODE 0x0004 00355 #define PosSTATUS2_CUTTER_ERROR 0x0008 00356 #define PosSTATUS2_CR_PRINT_HEAD_OPEN 0x0010 00357 #define PosSTATUS2_SJ_PRINT_HEAD_OPEN 0x0020 00358 #define PosSTATUS2_CD_OPEN 0x0040 00359 #define PosSTATUS2_CR_STATION 0x1000 00360 #define PosSTATUS2_DI_STATION 0x2000 00361 #define PosSTATUS2_SJ_STATION 0x4000 00362 #define PosSTATUS2_BUFFER_HELD 0x8000 00363 00364 00365 /************************************/ 00366 /* PosNprintFeatures resource flags */ 00367 /************************************/ 00368 00369 #define PosFEATURE_MICR_INSTALLED 0x0001 00370 #define PosFEATURE_FLIPPER_INSTALLED 0x0002 00371 #define PosFEATURE_58MM_PAPER 0x0004 00372 #define PosFEATURE_TI8_PRN 0x0008 00373 #define PosFEATURE_TI8_PRN_TI4_MODE 0x0010 00374 00375 /********************************************/ 00376 /* PosNprintCDAttached resource flags */ 00377 /********************************************/ 00378 #define PosCD_ATTACHED 0x0001 00379 #define PosCD_NOT_ATTACHED 0x0000 00380 00381 /********************************************/ 00382 /* PosNprintCDPulseWidth resource flags */ 00383 /********************************************/ 00384 #define PosCD_PULSE_WIDTH 0x0028 00385 00386 /********************************************/ 00387 /* PosNprintCDStatusPolarity resource flags */ 00388 /********************************************/ 00389 #define PosCD_NEGATIVE 0x0001 00390 #define PosCD_POSITIVE 0x0002 00391 00392 #define PosPRINTER_MP1(mp1) ((mp1) << 16) 00393 00394 /********************************/ 00395 /* POSM_PRN_STATUS_CHANGE flags */ 00396 /********************************/ 00397 00398 #define PosCHANGE_DOCUMENT_AT_TOP 0x0001 00399 #define PosCHANGE_DOCUMENT_AT_FRONT 0x0002 00400 #define PosCHANGE_DOCUMENT_REGISTER 0x0004 00401 #define PosCHANGE_COVER 0x0008 00402 #define PosCHANGE_CR_PAPER_LOW 0x0010 00403 #define PosCHANGE_CR_PAPER_OUT 0x0011 00404 #define PosCHANGE_CR_OVERHEAT 0x0012 00405 #define PosCHANGE_CR_PRINT_HEAD 0x0013 00406 #define PosCHANGE_SJ_PAPER_LOW 0x0020 00407 #define PosCHANGE_SJ_PAPER_OUT 0x0021 00408 #define PosCHANGE_SJ_OVERHEAT 0x0022 00409 #define PosCHANGE_SJ_PRINT_HEAD 0x0023 00410 #define PosCHANGE_CD_OPEN 0x0024 00411 #define PosCHANGE_CD_CLOSED 0x0025 00412 #define PosCHANGE_TEST_MODE 0x0040 00413 #define PosCHANGE_SJ_PAPER 0x0080 00414 00415 00416 /********************************/ 00417 /* POSM_PRN_PRINTER_ERROR flags */ 00418 /********************************/ 00419 00420 #define PosERROR_COVER_OPEN 0x0001 00421 #define PosERROR_TRANSPORT_ERROR 0x0002 00422 #define PosERROR_CR_PRINT_HEAD_OPEN 0x0003 00423 #define PosERROR_SJ_PAPER_ERROR 0x0004 00424 #define PosERROR_SJ_PRINT_HEAD_OPEN 0x0005 00425 #define PosERROR_DOCUMENT_INSERTED 0x0008 00426 #define PosERROR_DOCUMENT_NOT_INSERTED 0x0010 00427 #define PosERROR_DOCUMENT_NOT_READY 0x0020 00428 #define PosERROR_DOCUMENT_NOT_EJECTED 0x0040 00429 #define PosERROR_MICR_ERROR 0x0080 00430 #define PosERROR_CR_PAPER_ERROR 0x0100 00431 #define PosERROR_EEPROM_LOAD_ERROR 0x0200 00432 #define PosERROR_EEPROM_FULL 0x0400 00433 #define PosERROR_COMMUNICATION_ERROR 0x1000 00434 #define PosERROR_DI_FEED_ERROR 0x2000 00435 #define PosERROR_STARTUP_ERROR 0x4000 00436 #define PosERROR_UNRECOVERABLE_ERROR 0x4001 00437 #define PosERROR_COMMAND_REJECTED 0x8000 00438 00439 00440 /*********************************/ 00441 /* POSM_PRN_CHASE_COMPLETE flags */ 00442 /*********************************/ 00443 00444 #define PosCHASE_FROM_CR 0x0001 00445 #define PosCHASE_FROM_SJ 0x0002 00446 #define PosCHASE_FROM_DI 0x0004 00447 00448 00449 /*********************************/ 00450 /* POSM_PRN_DATA_AVAIL flags */ 00451 /*********************************/ 00452 00453 #define PosPRINT_DATA_AVAIL_FISCAL 0x0001 00454 #define PosPRINT_DATA_AVAIL_MICR 0x0002 00455 #define PosPRINT_DATA_AVAIL_FLASH 0x0003 00456 00457 00458 #endif /* _H_POS_PRINTER */