Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!homxb!mtuxo!mtune!rutgers!psuvax1!vu-vlsi!cbmvax!carolyn From: carolyn@cbmvax.UUCP Newsgroups: comp.sys.amiga Subject: Re: Programming Question Message-ID: <2664@cbmvax.UUCP> Date: Fri, 30-Oct-87 10:16:48 EST Article-I.D.: cbmvax.2664 Posted: Fri Oct 30 10:16:48 1987 Date-Received: Sun, 1-Nov-87 09:12:16 EST References: <1989@gryphon.CTS.COM> Reply-To: carolyn@cbmvax.UUCP (Carolyn Scheppner CATS) Organization: Commodore Technology, West Chester, PA Lines: 38 In article <1989@gryphon.CTS.COM> mrandall@pnet02.CTS.COM (Mark Randall) writes: >[] > ... To the point... The users of this software are >equivelent in computer literacy to somewhat dim chimpanzees. We need to able >to detect if the printer is online and the paper out condition through the >printer device. I know how to do it through the parallel device but is there >a way to do it through the printer device? > >We need to intercept these error conditions before intuition jumps n with the >requester since we are not shipping the program with a mouse ( I know, I know >but I only work here. THAT decision is the fault of our boys upstairs). > Printer device (1.2) unfortunately does not support Query, but you could GetPrefs() to find out if it's a serial or parallel printer, then open serial.device or parallel.device and do a Query command (see serial.doc and parallel.doc in RKM). This would be good for checking the printer before opening the printer device. For intercepting problems which occur while you have the printer open, first save your process's old pr_WindowPtr (find your process with FindTask(NULL), and put a -1 in pr_WindowPtr. That will cause most requesters to not occur and instead cause an error result to be returned to you. When you are done, be sure to put the old pr_WindowPtr value back. >Along the same lines... We also must modem this financial data back to HQ >automatically. I'd like to be able to check the Carrier Detect status. I see >here in the book how to find DSR & CTS in the io_Error flag. Must I do >naughty things like accessing the register directly or is there another way? All that and more is returned by the serial.device SDCMD_QUERY. Read your serial.doc in RKM. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Carolyn Scheppner -- CATS >>Commodore Amiga Technical Support<< UUCP ...{allegra,ihnp4,rutgers}!cbmvax!carolyn PHONE 215-431-9180 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=