Package sparked :: Package hardware :: Module hal :: Class HardwareMonitor
[hide private]
[frames] | no frames]

Class HardwareMonitor

source code

twisted.application.service.Service --+
                                      |
                                     HardwareMonitor
Known Subclasses:

A generic hardware monitor class based on HAL. Listens for device add/remove filtered on a specific subsystem.

Instance Methods [hide private]
 
_getHalInterface(self, udi, interface='org.freedesktop.Hal.Device') source code
 
_halDeviceAdded(self, udi) source code
 
_halDeviceRemoved(self, udi) source code
 
deviceAdded(self, info)
This method will be called when a device has been added.
source code
 
deviceRemoved(self, info)
This method will be called when a device has been removed.
source code
 
startService(self) source code
 
stopService(self) source code

Inherited from twisted.application.service.Service: __getstate__, __providedBy__, disownServiceParent, privilegedStartService, setName, setServiceParent

Class Variables [hide private]

Inherited from twisted.application.service.Service: __implemented__, __provides__, name, parent, running

Instance Variables [hide private]
  deviceInfo = None
dict which will be filled with device information.
  events = None
If set, point to a sparked.events.EventDispatcher to dispatch <subsystem>-{added,removed} events to.
  subsystem = None
The HAL subsystem type to monitor.
  uniquePath = None
If set, point to a directory where the symlinks to the unique devices will be made, e.g.
Method Details [hide private]

deviceAdded(self, info)

source code 

This method will be called when a device has been added. If you subclass this class, this method can be overruled to do application-specific stuff.

deviceRemoved(self, info)

source code 

This method will be called when a device has been removed. If you subclass this class, this method can be overruled to do application-specific stuff.

startService(self)

source code 
Overrides: twisted.application.service.Service.startService

stopService(self)

source code 
Overrides: twisted.application.service.Service.stopService

Instance Variable Details [hide private]

deviceInfo

dict which will be filled with device information. Key is the HAL UDI (Unique Device Identifier).
Value:
None

subsystem

The HAL subsystem type to monitor. E.g. serial, video4linux, ...
Value:
None

uniquePath

If set, point to a directory where the symlinks to the unique devices will be made, e.g. /dev/serial/by-id/
Value:
None