Sample Code; Npcp Error Codes - Intermec 730 User Manual

700 series color mobile computer
Hide thumbs Also See for 730:
Table of Contents

Advertisement

Chapter
5
Printer Support

Sample Code

NPCP Error Codes

// Definition of NPCP communications Errors and Printer Errors
#define PNRDY (BYTE)102 // link not ready error
#define RXTMO (BYTE)104 // link no receive error
#define TXTMO (BYTE)106 // link no transmit error
#define BADADR (BYTE)111 // frame address error
#define GAPERR (BYTE)112 // link gap error (timeout) in receive data
#define LSRPE (BYTE)113 // frame parity error on length field
#define IFTS (BYTE)120 // session layer - invalid frame this state
#define NS_NE_VR (BYTE)121 // session layer sequence error
#define NR_NE_VS (BYTE)122 // session layer sequence error
#define MAC_CRCERR (BYTE)124 // MAC CRC error
#define RLENERR (BYTE)123 // MAC too much data received
#define FRMERR (BYTE)200 // Frame Reject
#define FRMERR_IF (BYTE)201 // Frame Reject - Invalid Frame
#define FRMERR_NR (BYTE)202 // Frame Reject - NR Mismatch
#define FRMERR_NS (BYTE)203 // Frame Reject - NS Mismatch
#define NDMERR (BYTE)204 // Normal Disconnect mode error
#define BINDERR (BYTE)210 // bind error
#define IPLDUR (BYTE)221 // invalid presentation layer response
#define HEADJAM (BYTE)222 // printer head jam
#define PAPEROUT (BYTE)223 // printer paper out
#define LOWVOLTS (BYTE)224 // printer low voltage
#define HIVOLTS (BYTE)225 // printer over voltage
#define LOWBAT (BYTE)226 // printer low battery
#define COVEROFF (BYTE)227 // printer cover off error
#define HEADFAULT (BYTE)228 // printer head short or driver short error
#define PFFAULT (BYTE)229 // paper feed motor fault.
#define FRAME_NOT_ACKED 0x8000 // frame was not received by printer and need
to be resent.
166
3 Use IOCTL_NPCP_FLUSH to poll the printer to free up printer buff-
er resources. Use IOCTL_NPCP_FLUSH to poll the printer's status. If
an error is reported by the IOCTL, then use IOCTL_NPCP_ERROR
to get the error and determine the correct recovery procedure.
4 Use WriteFile(); to write data to the printer. Check for errors and that
all data were written. Use IOCTL_NPCP_ERROR to get the extended
error. If the error is critical in nature, use IOCTL_NPCP_CLOSE, fol-
lowed by CloseFile(), to end the communications session. Start a new
session, beginning with step 1 to ensure proper printing. For noncritical
errors display the error and retry the operation.
5 After all data is sent to the printer, ensure that the printer continues to
print the report properly by polling the printer's status. Use
IOCTL_NPCP_FLUSH to poll the printer's status. If an error is re-
ported by the IOCTL, then use IOCTL_NPCP_ERROR to get the
error and determine the correct recovery procedure.
See sample code in the "\700C Dev Tools\Installable Drivers\Port
Drivers\Npcp\NPCPPrint\" directory for more details on printing, printer
communications and error code handling.
Call the IOCTL_NPCP_ERROR I/O control to receive PL/N compatible
error codes. Applications must decide how to act on the data returned.
700 Series Color Mobile Computer User's Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

750740741760761751 ... Show all

Table of Contents