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()
IHarcHardware
getVersion
in interface IHarcHardware
public void setVerbosity(boolean verbose)
IHarcHardware
setVerbosity
in interface IHarcHardware
verbose
- on or offpublic void setDebug(int debug)
IHarcHardware
setDebug
in interface IHarcHardware
public void setCommand(String command)
public boolean isValid()
IHarcHardware
isValid
in interface IHarcHardware
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void open() throws IOException
IHarcHardware
open
in interface IHarcHardware
IOException
public ModulatedIrSequence capture() throws HarcHardwareException, IOException, IrpMasterException
ICapture
capture
in interface ICapture
HarcHardwareException
- if the device is not in valid/open state.IOException
IrpMasterException
public boolean stopCapture()
ICapture
stopCapture
in interface ICapture
public boolean isAlive()
public void setBeginTimeout(int beginTimeout)
setBeginTimeout
in interface IIrReader
public void setCaptureMaxSize(int captureMaxSize)
setCaptureMaxSize
in interface IIrReader
public void setEndTimeout(int endTimeout)
setEndTimeout
in interface IIrReader
public void setTimeout(int timeout)
IHarcHardware
setTimeout
in interface IHarcHardware
timeout
- Timeout in milliseconds.public IrSequence receive() throws HarcHardwareException
IReceive
receive
in interface IReceive
HarcHardwareException
- if the device is not in valid/open state.public void reset()
public boolean stopReceive()
IReceive
stopReceive
in interface IReceive
Copyright © 2016. All rights reserved.