Path: utzoo!attcan!uunet!tektronix!tekig5!brianr From: brianr@tekig5.PEN.TEK.COM (Brian Rhodefer) Newsgroups: comp.sys.amiga.tech Subject: OpenDevice question Keywords: IORequest Message-ID: <3638@tekig5.PEN.TEK.COM> Date: 4 Jan 89 01:02:57 GMT Organization: Tektronix Inc., Beaverton, Or. Lines: 59 I'm writing an Amiga application which, in response to Intuition gadget input, controls a network of external devices via the Amiga's serial output, and I've come up with a couple of questions about the use of Device I/O that the printed manuals for the laity aren't too clear on. Could some generous initiate offer some advice/insight? Background: I want to use the serial port for output only. Because I don't need to obtain any input, and am willing to believe that the serial device will always send every byte of the messages I pass it, I've decided to try to use an IOExtSerReq (OrWhatEverTheBleepItzCalled) whose ReplyPort field is NULL. A Vertical Blank server routine will peek at the Node type field, and signal a subtask every 50mS (3 vertical blanks) iff the Node is NOT of type NT_MESSAGE. The subtask will be able to assume, whenever it awakens, that the serial transmitter (and IOExtSerReq block) is idle, and SendIO any applicable precomputed new data, then compute a data buffer for next time. Two buffers are used for transmit data, but only one IOExtSerReq structure, whose appropriate io.Data field is pointed at the two buffers alternately. This is out of concern for Matt Dillon's claim that the serial device is unable to cope with multiple posted transmit requests. (Aside: What's so hard about serial I/O that keeps computer makers from getting it quiiite right, anyway?) Question(s): 1) Will SendIO result in the IORequest's Message's Node type getting set to "NT_Message"? Will the serial Device do a ReplyMsg, causing the Node type to be set to "NT_ReplyMsg"? 2) So far, so good? Or do I go to the State Home for the Naive? Is it kosher to watch the node type this way? I hate to waste time with obvious questions like this, but I just read a posting by Randell Jesup in which he says: " DO NOT assume that a signal on the reply port for something that has been SendIO()ed or BeginIO()ed means the message has come back. <...deleted...> Welcome to the wonderful world of IO! ", and it kinda shook my faith in `the obvious'. Please understand this as a respectful question and not sarcasm: Whatever is `PA_SIGNAL' message port signalling FOR, then? 3) As I said, I'd like to use an IORequest whose ReplyPort field is NULL. Can this IORequest block be used for the OpenDevice() call to open the serial device, and, later, for a DoIO() call to modify the baud rate? Enlightenment earnestly appreciated, Brian Rhodefer ....!tektronix!tekig5!brianr