Package sparked :: Package hardware :: Module inputevent :: Class InputEventDevice
[hide private]
[frames] | no frames]

Class InputEventDevice

source code

           twisted.python.log.Logger --+    
                                       |    
  twisted.persisted.styles.Ephemeral --+    
                                       |    
                              object --+    
                                       |    
twisted.internet.abstract.FileDescriptor --+
                                           |
                                          InputEventDevice

A select()able, read-only input device from /dev/input/*

Instance Methods [hide private]
 
__init__(self, protocol, deviceName, reactor=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
fileno(self)
File Descriptor number for select().
source code
 
writeSomeData(self, data)
Write some data to the device.
source code
 
doRead(self)
Some data's readable from serial device.
source code
 
connectionLost(self, reason)
The connection was lost.
source code

Inherited from twisted.internet.abstract.FileDescriptor: doWrite, loseConnection, loseWriteConnection, pauseProducing, readConnectionLost, registerProducer, resumeProducing, startReading, startWriting, stopConsuming, stopProducing, stopReading, stopWriting, unregisterProducer, write, writeConnectionLost, writeSequence

Inherited from twisted.internet.abstract.FileDescriptor (private): _closeWriteConnection, _postLoseConnection

Inherited from twisted.python.log.Logger: __providedBy__, logPrefix

Inherited from twisted.persisted.styles.Ephemeral: __getstate__, __setstate__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  connected = 1

Inherited from twisted.internet.abstract.FileDescriptor: SEND_LIMIT, __implemented__, __provides__, bufferSize, dataBuffer, disconnected, disconnecting, offset, producer, producerPaused, streamingProducer

Inherited from twisted.internet.abstract.FileDescriptor (private): _writeDisconnected, _writeDisconnecting

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, protocol, deviceName, reactor=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

fileno(self)

source code 

File Descriptor number for select().

This method must be overridden or assigned in subclasses to indicate a valid file descriptor for the operating system.

Overrides: twisted.internet.abstract.FileDescriptor.fileno
(inherited documentation)

writeSomeData(self, data)

source code 

Write some data to the device.

Overrides: twisted.internet.abstract.FileDescriptor.writeSomeData

doRead(self)

source code 

Some data's readable from serial device.

Overrides: twisted.internet.abstract.FileDescriptor.doRead

connectionLost(self, reason)

source code 

The connection was lost.

This is called when the connection on a selectable object has been lost. It will be called whether the connection was closed explicitly, an exception occurred in an event handler, or the other end of the connection closed it first.

Clean up state here, but make sure to call back up to FileDescriptor.

Overrides: twisted.internet.abstract.FileDescriptor.connectionLost
(inherited documentation)