public final class LircMode2 extends Object implements IHarcHardware, ICapture, IReceive
defaultBeginTimeout, defaultCaptureMaxSize, defaultEndTimeout| Constructor and Description |
|---|
LircMode2(String cmd) |
LircMode2(String[] cmdArray,
boolean verbose) |
LircMode2(String[] cmdArray,
boolean verbose,
int beginTimeout,
int captureMaxSize,
int endTimeout) |
LircMode2(String cmd,
boolean verbose) |
LircMode2(String cmd,
boolean verbose,
int beginTimeout,
int captureMaxSize,
int endTimeout) |
| Modifier and Type | Method and Description |
|---|---|
ModulatedIrSequence |
capture()
Listens to the device and returns a sequence.
|
void |
close() |
String |
getVersion()
Returns the hardware version (not the version of the driver software).
|
boolean |
isAlive() |
boolean |
isValid()
Tries to identify instances that are not valid.
|
static void |
main(String[] args) |
void |
open()
Opens the device with previously set parameters.
|
IrSequence |
receive()
Listens to the device and returns a sequence.
|
void |
reset() |
void |
setBeginTimeout(int beginTimeout) |
void |
setCaptureMaxSize(int captureMaxSize) |
void |
setCommand(String command) |
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setEndTimeout(int endTimeout) |
void |
setTimeout(int timeout)
Set timeout in milliseconds.
|
void |
setVerbosity(boolean verbose)
Sets a verbosity flag, causing commands to be executed verbosely.
|
boolean |
stopCapture()
Signals the capturing device that it should stop capturing.
|
boolean |
stopReceive()
Signals the receiving device that it should stop receiving.
|
public LircMode2(String cmd, boolean verbose, int beginTimeout, int captureMaxSize, int endTimeout)
cmd - verbose - beginTimeout - captureMaxSize - endTimeout - public LircMode2(String cmd, boolean verbose)
cmd - verbose - public LircMode2(String cmd)
cmd - public LircMode2(String[] cmdArray, boolean verbose, int beginTimeout, int captureMaxSize, int endTimeout)
cmdArray - verbose - beginTimeout - captureMaxSize - endTimeout - public LircMode2(String[] cmdArray, boolean verbose)
cmdArray - verbose - public static void main(String[] args)
public String getVersion()
IHarcHardwaregetVersion in interface IHarcHardwarepublic void setVerbosity(boolean verbose)
IHarcHardwaresetVerbosity in interface IHarcHardwareverbose - on or offpublic void setDebug(int debug)
IHarcHardwaresetDebug in interface IHarcHardwarepublic void setCommand(String command)
public boolean isValid()
IHarcHardwareisValid in interface IHarcHardwarepublic void close()
close in interface Closeableclose in interface AutoCloseablepublic void open()
throws IOException
IHarcHardwareopen in interface IHarcHardwareIOExceptionpublic ModulatedIrSequence capture() throws HarcHardwareException, IOException, IrpMasterException
ICapturecapture in interface ICaptureHarcHardwareException - if the device is not in valid/open state.IOExceptionIrpMasterExceptionpublic boolean stopCapture()
ICapturestopCapture in interface ICapturepublic boolean isAlive()
public void setBeginTimeout(int beginTimeout)
setBeginTimeout in interface IIrReaderpublic void setCaptureMaxSize(int captureMaxSize)
setCaptureMaxSize in interface IIrReaderpublic void setEndTimeout(int endTimeout)
setEndTimeout in interface IIrReaderpublic void setTimeout(int timeout)
IHarcHardwaresetTimeout in interface IHarcHardwaretimeout - Timeout in milliseconds.public IrSequence receive() throws HarcHardwareException
IReceivereceive in interface IReceiveHarcHardwareException - if the device is not in valid/open state.public void reset()
public boolean stopReceive()
IReceivestopReceive in interface IReceiveCopyright © 2016. All rights reserved.