[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Connections.lisp & CMWrite
- To: info-mcl@cambridge.apple.com
- Subject: Connections.lisp & CMWrite
- From: Bela Ban <ban@ifi.unizh.ch>
- Date: Mon, 20 Jan 1992 14:07:40 +0100
- Conversion: Prohibited
- X400-content-type: P2-1984 (2)
- X400-mts-identifier: [/PRMD=SWITCH/ADMD=ARCOM/C=CH/;920120140740]
- X400-originator: ban@ifi.unizh.ch
- X400-received: by mta chx400.switch.ch in /PRMD=switch/ADMD=arcom/C=CH/; Relayed; Mon, 20 Jan 1992 14:16:58 +0100
- X400-received: by /PRMD=SWITCH/ADMD=ARCOM/C=CH/; Relayed; Mon, 20 Jan 1992 14:07:40 +0100
Has anyone ever tried out _cmwrite / _cmread in the above file ?
I'm having problems sending my data onto the serial stream. It seems that
the data is *not* written... If anyone has ever done this, could you
contact me (e-mail) ? A code fragment follows:
(defmethod CMWrite ((ob serial-connection) str &optional (timeout 1) )
(%stack-block ((buffer (+ (length str) 1)) ;; include space for
null-terminator
(toWrite 4)
(flags 2))
(%put-cstring buffer str)
(%put-long toWrite (length str))
(%put-word flags 0)
(let ((result (traps::_cmwrite (hconn ob)
buffer
toWrite
$cmData
nil
(%int-to-ptr 0)
timeout
flags))
(bytesWritten (%get-long toWrite))
(buf (%get-cstring buffer)))
(format T "~&Buffer: ~s~&Bytes written: ~d~&Result Code: ~d"
buf bytesWritten result))))
Many thanks !!!
(Replies please to my reader...)
Bela Ban