Package elisa :: Package plugins :: Package good :: Package lirc_plugin :: Module lirc_input :: Class LircInput
[hide private]
[frames] | no frames]

Class LircInput

source code


This class implements LIRC remote control support

Nested Classes [hide private]

Inherited from core.component.Component: __metaclass__

Instance Methods [hide private]
 
__init__(self)
Lazily set name from class name styled with underscores (class ComponentBar -> name component_bar.
source code
 
initialize(self)
Initialize various variables internal to the Component.
source code
 
clean(self)
Perform some cleanups and save the Component config back to application's config.
source code
 
get_lirc_config(self) source code
elisa.core.input_event.InputEvent list
get_input_events(self)
Retrieve events from an input device and translate them in elisa.core.input_event.InputEvent objects understandable by the InputManager.
source code
 
create_input_event(self, data)
Translate external input data to an InputEvent object, understandable by the InputManager.
source code

Inherited from core.component.Component: load_config, save_config

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

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

Static Methods [hide private]

Inherited from core.component.Component: __classinit__

Class Variables [hide private]
dict config_doc = {'delay': 'how many keys to wait until triggering...
documentation for each option of the default configuration.
dict default_config = {'delay': '4', 'lirc_rc': 'streamzap.lirc', '...
used when nothing found in Application's config
  convert_table = {'activate_key': OK, 'close_key': EXIT, 'decre...
string name = 'lirc_input'
Component's name

Inherited from core.component.Component: checked, id, plugin

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]

Inherited from base_components.input_provider.InputProvider: origin, viewport

Inherited from core.component.Component: config, path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Lazily set name from class name styled with underscores (class ComponentBar -> name component_bar. Also set log category based on component name, with a 'comp_' prefix.
Overrides: core.component.Component.__init__
(inherited documentation)

initialize(self)

source code 

Initialize various variables internal to the Component.

This method is called by the plugin_registry after the component's config has been loaded.

Override this method if you need to perform some initializations that would normally go in Component's constructor but can't be done there because they require access to the component's config.
Overrides: core.component.Component.initialize
(inherited documentation)

clean(self)

source code 
Perform some cleanups and save the Component config back to application's config. This method should be called by the elisa.core.manager.Manager holding the component reference when it stops itself.
Overrides: core.component.Component.clean
(inherited documentation)

get_input_events(self)

source code 
Retrieve events from an input device and translate them in elisa.core.input_event.InputEvent objects understandable by the InputManager. The returned list can be built with the create_input_event() method, for each data retrieved from the input device.
Returns: elisa.core.input_event.InputEvent list
Input events from a user-input device
Overrides: base_components.input_provider.PollInputProvider.get_input_events
(inherited documentation)

create_input_event(self, data)

source code 
Translate external input data to an InputEvent object, understandable by the InputManager. This method has to be overriden by InputProvider implementations. This method is called by InputProvider implementations.
Returns:
elisa.core.input_event.InputEvent
Overrides: base_components.input_provider.InputProvider.create_input_event
(inherited documentation)

Class Variable Details [hide private]

config_doc

documentation for each option of the default configuration. Keys should be same as the ones in default_config and values should be strings
Type:
dict
Value:
{'delay': 'how many keys to wait until triggering a repeat',
 'lirc_rc': 'filename of the LIRC config map to use',
 'repeat': 'every which repeat should be used, zero means no repeating\
'}

default_config

used when nothing found in Application's config
Type:
dict
Value:
{'delay': '4', 'lirc_rc': 'streamzap.lirc', 'repeat': '1'}

convert_table

Value:
{'activate_key': OK,
 'close_key': EXIT,
 'decrement_playback_speed': DEC_PLAYBACK_SPEED,
 'decrement_volume_key': VOL_DOWN,
 'increment_playback_speed': INC_PLAYBACK_SPEED,
 'increment_volume_key': VOL_UP,
 'move_down_key': GO_DOWN,
 'move_left_key': GO_LEFT,
...