get status of the serial port
[queue,status] = serialstatus(h)
string, Tcl handle to the serial port
two-element vector: number of bytes in the input and in the output queue
string, status of the control lines of the serial port
Get some information about the number of characters present in the input and output buffers of the eerial port, and about the status lines (DTS, CTS, ecc.). Something else could be added?
The translation
setting of openserial
can come
in the way. If the input stream contains CR
or LF
characters which are filtered out, openserial counts them but
readserial does not see them.
h=openserial(1,"9600,n,8,1") writeserial(h,"#02"+ascii(13)) [q,flags]=serialstatus(h) readserial(h) closeserial(h)