public abstract class LircHardware extends Object implements Closeable
Modifier and Type | Field and Description |
---|---|
protected String |
deviceName |
static String |
libraryName |
protected long |
nativePointer |
Modifier | Constructor and Description |
---|---|
protected |
LircHardware(String deviceName,
long nativePointer) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
canRec() |
abstract boolean |
canSend() |
abstract boolean |
canSetTransmitterMask() |
abstract int |
getNumberTransmitters() |
abstract String |
getVersion()
Returns the version string of the underlying C++ code, not the version of the hardware or the
device driver.
|
static boolean |
isLibraryLoaded()
Returns true if the native library has been successfully loaded.
|
abstract boolean |
isValid()
Returns true if the device is opened and working.
|
static void |
loadLibrary()
Loads the native library from a system directory.
|
static void |
loadLibrary(File path)
Loads the native library given as argument (preferred),
or, if the argument is null, from a system directory.
|
void |
open()
Opens the device using the device name used in the constructor.
|
protected abstract boolean |
openNative() |
abstract void |
setBeginTimeout(int timeout) |
void |
setTransmitterMask(int mask) |
protected abstract boolean |
setTransmitterMaskNative(int mask) |
abstract String |
toString() |
public static final String libraryName
protected long nativePointer
protected String deviceName
protected LircHardware(String deviceName, long nativePointer)
public static void loadLibrary() throws UnsatisfiedLinkError
UnsatisfiedLinkError
- If loading failspublic static void loadLibrary(File path) throws UnsatisfiedLinkError
path
- Either the path name of the library, or the path name of the containing
directory. If null, use system directory.UnsatisfiedLinkError
- If loading failspublic static boolean isLibraryLoaded()
public void open() throws LircDeviceException
LircDeviceException
- Failure to open.public final void setTransmitterMask(int mask) throws NotSupportedException, NonExistentTransmitterException, LircDeviceException
public abstract int getNumberTransmitters()
protected abstract boolean setTransmitterMaskNative(int mask)
protected abstract boolean openNative()
public abstract String getVersion()
public abstract boolean canSend()
public abstract boolean canSetTransmitterMask()
public abstract boolean canRec()
public abstract void setBeginTimeout(int timeout)
public abstract boolean isValid()
Copyright © 2019. All rights reserved.