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, setTransmitterMask
public 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 LircHardware
public void close()
public String getVersion()
LircHardware
getVersion
in class LircHardware
public int getNumberTransmitters()
getNumberTransmitters
in class LircHardware
public boolean canSend()
canSend
in class LircHardware
public boolean canSetTransmitterMask()
canSetTransmitterMask
in class LircHardware
public boolean canRec()
canRec
in class LircHardware
public boolean isValid()
LircHardware
isValid
in class LircHardware
public final void setBeginTimeout(int timeout)
setBeginTimeout
in class LircHardware
public String toString()
toString
in class LircHardware
public void delete()
Copyright © 2019. All rights reserved.