Package pyneo :: Package interfaces :: Module powered :: Class Powered
[frames] | no frames]

Class Powered


Interface that is implemted by objects that may be switched on and off. Depending on the underlaying object devices apear on the bus after switching on. The dbus-names of these devices can be retrieved by shortname or all together. The dbus-object can have a status which can retrieved also.
Instance Methods
 
Fake(self)
Demohook - method to be called to test this device or to trigger a demo
 
GetDevice(self, purpose)
If a powerd object is switched on devices may apear, retrieve a device by key
 
GetDevices(self)
If a powerd object is switched on devices may apear, retrieve all devices
 
GetPower(self, purpose)
Retrieve the current power status
 
GetStatus(self, ok_cb, error_cb)
Get the status of the object, content of the map is object dependent
 
Power(self, *args, **keywords)
Signal that is fired if the power state changes
 
SetPower(self, purpose, on, ok_cb, error_cb)
Set the current power status to switch the object on or of
 
Status(self, *args, **keywords)
Signal this is fired if the status of the object changes, content of the map is object dependent

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

Properties

Inherited from object: __class__

Method Details

Fake(self)

 
Demohook - method to be called to test this device or to trigger a demo
Decorators:
  • @method(DIN_POWERED, '', '',)

GetDevice(self, purpose)

 
If a powerd object is switched on devices may apear, retrieve a device by key
Decorators:
  • @method(DIN_POWERED, 's', 's')

GetDevices(self)

 
If a powerd object is switched on devices may apear, retrieve all devices
Decorators:
  • @method(DIN_POWERED, '', 'a{sv}')

GetPower(self, purpose)

 
Retrieve the current power status
Decorators:
  • @method(DIN_POWERED, 's', 'b')

GetStatus(self, ok_cb, error_cb)

 
Get the status of the object, content of the map is object dependent
Decorators:
  • @method(DIN_POWERED, '', 'a{sv}', async_callbacks= ('ok_cb', 'error_cb'))

Power(self, *args, **keywords)

 
Signal that is fired if the power state changes
Decorators:
  • @notify(DIN_POWERED, 'b')

SetPower(self, purpose, on, ok_cb, error_cb)

 
Set the current power status to switch the object on or of
Decorators:
  • @method(DIN_POWERED, 'sb', 'b', async_callbacks= ('ok_cb', 'error_cb'))

Status(self, *args, **keywords)

 
Signal this is fired if the status of the object changes, content of the map is object dependent
Decorators:
  • @notify(DIN_POWERED, 'a{sv}')