public final class LircMode2 extends Object implements IHarcHardware, ICapture, IReceive
defaultBeginTimeout, defaultCaptureMaxSize, defaultEndingTimeout
Constructor and Description |
---|
LircMode2(boolean verbose,
int endingTimeout) |
LircMode2(InputStream inputStream,
boolean verbose,
int endingTimeout) |
LircMode2(Reader reader,
boolean verbose,
int endingTimeout) |
Modifier and Type | Method and Description |
---|---|
org.harctoolbox.ircore.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 |
isValid()
Tries to identify instances that are not valid.
|
void |
open()
Opens the device with previously set parameters.
|
org.harctoolbox.ircore.IrSequence |
receive()
Listens to the device and returns a sequence.
|
void |
setBeginTimeout(int integer) |
void |
setCaptureMaxSize(int integer) |
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setEndingTimeout(int timeout) |
void |
setTimeout(int timeout)
Set timeout in milliseconds.
|
void |
setVerbose(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(Reader reader, boolean verbose, int endingTimeout)
public LircMode2(InputStream inputStream, boolean verbose, int endingTimeout)
public LircMode2(boolean verbose, int endingTimeout)
public String getVersion()
IHarcHardware
getVersion
in interface IHarcHardware
public void setVerbose(boolean verbose)
IHarcHardware
setVerbose
in interface IHarcHardware
verbose
- on or offpublic void setDebug(int debug)
IHarcHardware
setDebug
in interface IHarcHardware
public boolean isValid()
IHarcHardware
isValid
in interface IHarcHardware
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
public void open() throws IOException
IHarcHardware
open
in interface IHarcHardware
IOException
public org.harctoolbox.ircore.ModulatedIrSequence capture() throws HarcHardwareException, IOException
ICapture
capture
in interface ICapture
HarcHardwareException
- if the device is not in valid/open state.IOException
public boolean stopCapture()
ICapture
stopCapture
in interface ICapture
public void setEndingTimeout(int timeout)
setEndingTimeout
in interface IIrReader
public org.harctoolbox.ircore.IrSequence receive() throws IOException, HarcHardwareException
IReceive
receive
in interface IReceive
IOException
HarcHardwareException
- if the device is not in valid/open state.public boolean stopReceive()
IReceive
stopReceive
in interface IReceive
public void setTimeout(int timeout) throws IOException
IHarcHardware
setTimeout
in interface IHarcHardware
timeout
- Timeout in milliseconds.IOException
public void setBeginTimeout(int integer) throws IOException
setBeginTimeout
in interface IIrReader
IOException
public void setCaptureMaxSize(int integer)
setCaptureMaxSize
in interface IIrReader
Copyright © 2019. All rights reserved.