03 Mar 2005 17:55:37 UTC
- Distribution: RCU
- Module version: 0.021
- Source (raw)
- Browse (raw)
- How to Contribute
- Testers (209 / 1 / 0)
- KwaliteeBus factor: 1
- 8.89% Coverage
- License: unknown
- Activity24 month
- Download (18.12KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionMLEHMANN Marc A. Lehmann
- THE RCU CLASS
- THE RCU::Key CLASS
- THE RCU::Interface CLASS
- SEE ALSO
RCU - Remote Control Unit Interface
This module provides a generic interface to remote control units (only receivers at the moment, as I cannot test more). It only provides an abstract management interface, other modules are required for the hardware access (RCU::Irman and RCU::Lirc are included, however).
Please read RCU::Receipts to get some idea on how to proceed after you installed the module (testing & standard techniques).
The RCU class provides a general interface to anything you might want to do to, it represents your application.
- $rcu = new RCU "interface-spec"
Creates a new RCU application.
interfacemust be an interface specification similar to DBI's DSN:
Examples: low-level interface (without
RCU::prefix) or an arrayref containing name and constructor arguments. If the interface name has a
::prefix it will be used as-is (without that prefix, of course).
For a much better interface, see RCU::Event.
Return the RCU::Interface object used by this RCU object.
- ($keycode, $repeat) = $rcu->get
- ($keycode, $repeat) = $rcu->poll
Simplified interface to the RCU (See also RCU::Event), return a cooked keycode and a repeat count (initial keypress = 0, increasing while the key is pressed). If
getis called in scalar context it only returns unrepeated keycodes.
This interface is problematic: no key-up events are generated, and the repeat events occur pseudo-randomly and have no time relation between each other, so better use the event-based interface provided by RCU::Event.
This class collects information about rcu keys.
RCU::Interfaceprovides the base class for all rcu interfaces, it is rarely used directly.
Return a unix filehandle that can be polled, or -1 if this is not possible.
- ($time, $raw, $cooked) = $if->get
- ($time, $raw, $cooked) = $if->poll
Wait until a RCU event happens and return it. If the device can translate raw keys events (e.g. hex key codes) into meaningful names ("cooked" keys) it will return the cooked name as second value, otherwise both return values are identical.
getalways returns an event, waiting if neccessary, while
pollonly checks for an event: If one is pending it is returned, otherwise
This perl extension was written by Marc Lehmann <firstname.lastname@example.org>.
No send interface.