Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/internet/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/internet/_posixserialport.pyc

ó
¹7¬Nc@sÊdZddlZddlZddlZddlmZmZmZddlmZmZddlm	Z	m
Z
mZmZddl
mZddlmZmZmZdeejfd	„ƒYZdS(
s
Serial Port Protocol
iÿÿÿÿN(tPARITY_NONEtPARITY_EVENt
PARITY_ODD(tSTOPBITS_ONEtSTOPBITS_TWO(tFIVEBITStSIXBITSt	SEVENBITSt	EIGHTBITS(tBaseSerialPort(tabstracttfdesctmaint
SerialPortcBsVeZdZdZdeeedddd„Zd„Zd„Z	d„Z
d„ZRS(	s>
    A select()able serial device, acting as a transport.
    ii€%icCs“tjj||ƒ|j|d|d|d|d|d|d|	d|
ƒ|_||_|jƒ|jƒ||_|jj	|ƒ|j
ƒdS(Ntbaudratetbytesizetparitytstopbitsttimeouttxonxofftrtscts(R
tFileDescriptort__init__t_serialFactoryt_serialtreactort
flushInputtflushOutputtprotocoltmakeConnectiontstartReading(tselfRtdeviceNameOrPortNumberRRRRRRRR((sE/usr/lib/python2.7/dist-packages/twisted/internet/_posixserialport.pyRs	

	cCs
|jjS(N(Rtfd(R((sE/usr/lib/python2.7/dist-packages/twisted/internet/_posixserialport.pytfileno/scCstj|jƒ|ƒS(s7
        Write some data to the serial device.
        (Rt	writeToFDR"(Rtdata((sE/usr/lib/python2.7/dist-packages/twisted/internet/_posixserialport.pyt
writeSomeData3scCstj|jƒ|jjƒS(s:
        Some data's readable from serial device.
        (Rt
readFromFDR"RtdataReceived(R((sE/usr/lib/python2.7/dist-packages/twisted/internet/_posixserialport.pytdoRead:scCs4tjj||ƒ|jjƒ|jj|ƒdS(s™
        Called when the serial port disconnects.

        Will call C{connectionLost} on the protocol that is handling the
        serial data.
        N(R
RtconnectionLostRtcloseR(Rtreason((sE/usr/lib/python2.7/dist-packages/twisted/internet/_posixserialport.pyR)As
(t__name__t
__module__t__doc__t	connectedRRRRR"R%R(R)(((sE/usr/lib/python2.7/dist-packages/twisted/internet/_posixserialport.pyR
s				(R.tosterrnotserialRRRRRRRRRt
serialportR	ttwisted.internetR
RRRR
(((sE/usr/lib/python2.7/dist-packages/twisted/internet/_posixserialport.pyt<module>s"