[comp.sys.mac] 4th Dimension - SEND PACKET

wbrown@beva.bev.lbl.gov (Bill Brown) (12/13/89)

I'm doing an application in 4D that need to send data to a serial printer.

I'm attempting to do this via the SET CHANNEL and SEND PACKET commands.

It turns out that SEND PACKET (according to the ACIUS help line people)
uses a system call with a buffer that is only 64 bytes long.  They have
promised to send me an "external" that will make the buffer larger, but
I think that the buffer size is only part of the problem.

It appears that on serial port output they are doing non-blocking i/o -
it's possible to clobber the output by making a second call before the
data sent with a preceeding call is fully processed.  I can find nothing
in the 4D documentation that addresses this issue.  One kludgey way out
is to put a delay loop after every SEND PACKET call; I can't believe that
this is a reasonable thing to do since there are many cases where it
won't really work (like printer not ready).

Anybody have any ideas how to get around this?  I'm gonna call ACIUS
again and perhaps they will have an answer, but in view of my other 
contacts I'm not optimistic.

Thanks for your help.
						-bill
						wlbrown@lbl.gov

Disclaimer:  These opinions are my own and have nothing to do with the
    official policy or management of L.B.L, who probably couldn't care 
    less about employees who play with trains.