|
- Method resolution order:
- Serial
- serialutil.SerialBase
- serialutil.FileLike
- __builtin__.object
Methods defined here:
- close(self)
- Close port
- drainOutput(self)
- internal - not portable!
- flush(self)
- Flush of file like objects. In this case, wait until all data
is written.
- 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. 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.
Methods inherited from serialutil.SerialBase:
- __init__(self, port=None, baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=0, rtscts=0, writeTimeout=None)
- Initialize comm port object. If a port is given, then the port will be
opened immediately. Otherwise a Serial port object in closed state
is returned.
- __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. The value that was passed on init or using
setPort() is passed back. See also the attribute portstr which contains
the name of the port as a string.
- 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.
- getWriteTimeout(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. It raises a ValueError if the port is open and the
baudrate is not possible. If the port is closed, then tha value is
accepted and the exception is raised when the port is opened.
- setByteSize(self, bytesize)
- Change byte size.
- setParity(self, parity)
- Change parity setting.
- setPort(self, port)
- Change the port. The attribute portstr is set to a string that
contains the name of the port.
- setRtsCts(self, rtscts)
- Change RtsCts setting.
- setStopbits(self, stopbits)
- Change stopbits size.
- setTimeout(self, timeout)
- Change timeout setting.
- setWriteTimeout(self, timeout)
- Change timeout setting.
- setXonXoff(self, xonxoff)
- Change XonXoff setting.
Properties inherited from serialutil.SerialBase:
- baudrate
- get = getBaudrate(self)
- Get the current baudrate setting.
- set = setBaudrate(self, baudrate)
- Change baudrate. It raises a ValueError if the port is open and the
baudrate is not possible. If the port is closed, then tha value is
accepted and the exception is raised when the port is opened.
- delete = 'Baudrate setting'
- bytesize
- get = getByteSize(self)
- Get the current byte size setting.
- set = setByteSize(self, bytesize)
- Change byte size.
- delete = 'Byte size setting'
- parity
- get = getParity(self)
- Get the current parity setting.
- set = setParity(self, parity)
- Change parity setting.
- delete = 'Parity setting'
- port
- get = getPort(self)
- Get the current port setting. The value that was passed on init or using
setPort() is passed back. See also the attribute portstr which contains
the name of the port as a string.
- set = setPort(self, port)
- Change the port. The attribute portstr is set to a string that
contains the name of the port.
- delete = 'Port setting'
- rtscts
- get = getRtsCts(self)
- Get the current RtsCts setting.
- set = setRtsCts(self, rtscts)
- Change RtsCts setting.
- delete = 'RTS/CTS setting'
- stopbits
- get = getStopbits(self)
- Get the current stopbits setting.
- set = setStopbits(self, stopbits)
- Change stopbits size.
- delete = 'Stopbits setting'
- timeout
- get = getTimeout(self)
- Get the current timeout setting.
- set = setTimeout(self, timeout)
- Change timeout setting.
- delete = 'Timeout setting for read()'
- writeTimeout
- get = getWriteTimeout(self)
- Get the current timeout setting.
- set = setWriteTimeout(self, timeout)
- Change timeout setting.
- delete = 'Timeout setting for write()'
- xonxoff
- get = getXonXoff(self)
- Get the current XonXoff setting.
- set = setXonXoff(self, xonxoff)
- Change XonXoff setting.
- delete = 'Xon/Xoff setting'
Data and other attributes inherited from serialutil.SerialBase:
- BAUDRATES = (50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000, ...)
- BYTESIZES = (5, 6, 7, 8)
- PARITIES = ('N', 'E', 'O')
- STOPBITS = (1, 2)
Methods inherited from serialutil.FileLike:
- readline(self, size=None, eol='\n')
- read a line which is terminated with end-of-line (eol) character
('
' by default) or until timeout
- readlines(self, sizehint=None, eol='\n')
- read a list of lines, until timeout
sizehint is ignored
- writelines(self, sequence)
- xreadlines(self, sizehint=None)
- just call readlines - here for compatibility
Data and other attributes inherited from serialutil.FileLike:
- __dict__ = <dictproxy object>
- dictionary for instance variables (if defined)
- __weakref__ = <attribute '__weakref__' of 'FileLike' objects>
- list of weak references to the object (if defined)
|