Package pyrobot :: Package system :: Package serial :: Module serialposix :: Class Serial
[frames | no frames]

Type 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(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.
  makeDeviceName(self, port)
  nonblocking(self)
internal - not portable!...
  open(self)
Open port with current settings.
  read(self, size)
Read size bytes from the serial port.
  sendBreak(self)
Send break condition.
  setDTR(self, on)
Set terminal status line: Data Terminal Ready...
  setRTS(self, on)
Set terminal status line: Request To Send...
  write(self, data)
Output the given string over the serial port.
    Inherited from SerialBase
  __init__(self, port, baudrate, bytesize, parity, stopbits, timeout, xonxoff, rtscts)
Initialize comm port object.
  __repr__(self)
String representation of the current port settings and its state.
  getBaudrate(self)
Get the current baudrate setting.
  getByteSize(self)
Get the current byte size setting.
  getParity(self)
Get the current parity setting.
  getPort(self)
get the current port setting.
  getRtsCts(self)
Get the current RtsCts setting.
  getStopbits(self)
Get the current stopbits setting.
  getSupportedBaudrates(self)
  getSupportedByteSizes(self)
  getSupportedParities(self)
  getSupportedStopbits(self)
  getTimeout(self)
Get the current timeout setting.
  getXonXoff(self)
Get the current XonXoff setting.
  isOpen(self)
Check if the port is opened.
  setBaudrate(self, baudrate)
Change baudrate.
  setByteSize(self, bytesize)
Change byte size.
  setParity(self, parity)
Change parity setting.
  setPort(self, port)
Change the port.
  setRtsCts(self, rtscts)
Change RtsCts setting.
  setStopbits(self, stopbits)
Change stopbits size.
  setTimeout(self, timeout)
Change timeout setting.
  setXonXoff(self, xonxoff)
Change XonXoff setting.
    Inherited from FileLike
  flush(self)
flush of file like objects...
  readline(self, size, eol)
read a line which is terminated with end-of-line (eol) character...
  readlines(self, sizehint, eol)
read a list of lines, until timeout...
  writeline(self, message, eol)
  writelines(self, sequence)
  xreadlines(self, sizehint)
just call readlines - here for compatibility...
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
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.
Overrides:
pyrobot.system.serial.serialutil.FileLike.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.
Overrides:
pyrobot.system.serial.serialutil.FileLike.write

Generated by Epydoc 2.1 on Mon Jul 25 01:39:26 2005 http://epydoc.sf.net