<< readserial serial writeserial >>

serial >> serial > serialstatus

serialstatus

get status of the serial port

Syntax

[queue, status] = serialstatus(h)

Parameters

h

string, Tcl handle to the serial port

queue

two-element vector: number of bytes in the input and in the output queue

status

string, status of the control lines of the serial port

Description

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.

Examples

h = openserial(1,"9600,n,8,1")
writeserial(h, "#02"+ascii(13))
[q, flags] = serialstatus(h)
readserial(h)
closeserial(h)

See Also

Contributors

Enrico SEGRE
Aditya SENGUPTA <apsengupta@iitb.ac.in>
Samuel GOUGEON

Bibliography


Report an issue
<< readserial serial writeserial >>