| Home | Trees | Index | Help |
|
|---|
| Package pyrobot :: Package system :: Package serial :: Module serialposix :: Class Serial |
|
object--+ |FileLike--+ |SerialBase--+ | Serial
Serial port class POSIX implementation. Serial port configuration is done with termios and fcntl. Runs on Linux and many other Un*x like systems.
| Method Summary | |
|---|---|
Close port... | |
internal - not portable!... | |
Clear input buffer, discarding all that is in the buffer. | |
Clear output buffer, aborting the current output and discarding all that is in the buffer. | |
Read terminal status line: Carrier Detect... | |
Read terminal status line: Clear To Send... | |
Read terminal status line: Data Set Ready... | |
Read terminal status line: Ring Indicator... | |
Return the number of characters currently in the input buffer. | |
makeDeviceName(self,
port)
| |
internal - not portable!... | |
Open port with current settings. | |
Read size bytes from the serial port. | |
Send break condition. | |
Set terminal status line: Data Terminal Ready... | |
Set terminal status line: Request To Send... | |
Output the given string over the serial port. | |
| Inherited from SerialBase | |
Initialize comm port object. | |
String representation of the current port settings and its state. | |
Get the current baudrate setting. | |
Get the current byte size setting. | |
Get the current parity setting. | |
get the current port setting. | |
Get the current RtsCts setting. | |
Get the current stopbits setting. | |
| |
| |
| |
| |
Get the current timeout setting. | |
Get the current XonXoff setting. | |
Check if the port is opened. | |
Change baudrate. | |
Change byte size. | |
Change parity setting. | |
Change the port. | |
Change RtsCts setting. | |
Change stopbits size. | |
Change timeout setting. | |
Change XonXoff setting. | |
| Inherited from FileLike | |
flush of file like objects... | |
read a line which is terminated with end-of-line (eol) character... | |
read a list of lines, until timeout... | |
| |
| |
just call readlines - here for compatibility... | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name... | |
x.__getattribute__('name') <==> x.name... | |
x.__hash__() <==> hash(x)... | |
T.__new__(S, ...) -> a new object with type S, a subtype of T... | |
helper for pickle... | |
helper for pickle... | |
x.__setattr__('name', value) <==> x.name = value... | |
x.__str__() <==> str(x)... | |
| Property Summary | |
|---|---|
| Inherited from SerialBase | |
baudrate | |
bytesize | |
parity | |
port | |
rtscts | |
stopbits | |
timeout | |
xonxoff | |
| Class Variable Summary | |
|---|---|
| Inherited from SerialBase | |
tuple |
BAUDRATES = (50, 75, 110, 134, 150, 200, 300, 600, 1200,...
|
tuple |
BYTESIZES = (5, 6, 7, 8)
|
tuple |
PARITIES = ('N', 'E', 'O')
|
tuple |
STOPBITS = (1, 2)
|
| Method Details |
|---|
close(self)Close port |
drainOutput(self)internal - not portable! |
flushInput(self)Clear input buffer, discarding all that is in the buffer. |
flushOutput(self)Clear output buffer, aborting the current output and discarding all that is in the buffer. |
getCD(self)Read terminal status line: Carrier Detect |
getCTS(self)Read terminal status line: Clear To Send |
getDSR(self)Read terminal status line: Data Set Ready |
getRI(self)Read terminal status line: Ring Indicator |
inWaiting(self)Return the number of characters currently in the input buffer. |
nonblocking(self)internal - not portable! |
open(self)Open port with current settings. This may throw a SerialException if the port cannot be opened. |
read(self, size=1)Read size bytes from the serial port. If a timeout is set it may return less characters as requested. With no timeout it will block until the requested number of bytes is read. |
sendBreak(self)Send break condition. |
setDTR(self, on=1)Set terminal status line: Data Terminal Ready |
setRTS(self, on=1)Set terminal status line: Request To Send |
write(self, data)Output the given string over the serial port. |
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Mon Jul 25 01:39:26 2005 | http://epydoc.sf.net |