public abstract class LircDevice extends LircHardware
As opposed to standard C/Lirc, where a device is opened, and it "turns out" that it is "mode2" or "lirccode", here the user has to decide if he wants a mode2 or lirccode device, and open it with the appropriate class. This will fail if the connected hardware does not have the expected properties.
This class (and its derived classes) can be instantiated several times, but of course only one can open a particular device file.
| Modifier and Type | Field and Description |
|---|---|
static int |
defaultBeginTimeout |
static String |
defaultDeviceName |
deviceName, libraryName, nativePointer| Constructor and Description |
|---|
LircDevice(String deviceName,
int beginTimeout,
long nativePointer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRec() |
boolean |
canSend() |
boolean |
canSetTransmitterMask() |
void |
close() |
void |
delete()
Invoke the destructor from Java.
|
protected void |
finalize() |
int |
getNumberTransmitters() |
String |
getVersion()
Returns the version string of the underlying C++ code, not the version of the hardware or the
device driver.
|
boolean |
isValid()
Returns true if the device is opened and working.
|
void |
setBeginTimeout(int timeout) |
protected boolean |
setTransmitterMaskNative(int mask) |
String |
toString() |
isLibraryLoaded, loadLibrary, loadLibrary, open, openNative, setTransmitterMaskpublic static final String defaultDeviceName
public static final int defaultBeginTimeout
public LircDevice(String deviceName, int beginTimeout, long nativePointer)
protected boolean setTransmitterMaskNative(int mask)
setTransmitterMaskNative in class LircHardwarepublic void close()
public String getVersion()
LircHardwaregetVersion in class LircHardwarepublic int getNumberTransmitters()
getNumberTransmitters in class LircHardwarepublic boolean canSend()
canSend in class LircHardwarepublic boolean canSetTransmitterMask()
canSetTransmitterMask in class LircHardwarepublic boolean canRec()
canRec in class LircHardwarepublic boolean isValid()
LircHardwareisValid in class LircHardwarepublic final void setBeginTimeout(int timeout)
setBeginTimeout in class LircHardwarepublic String toString()
toString in class LircHardwarepublic void delete()
Copyright © 2019. All rights reserved.