public final class LircMode2 extends Object implements IHarcHardware, ICapture, IReceive
Constructor and Description |
---|
LircMode2(String[] cmdArray,
boolean verbose,
int beginTimeout,
int maxLearnLength,
int endTimeout) |
LircMode2(String cmd,
boolean verbose,
int beginTimeout,
int maxLearnLength,
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 |
setCommand(String command) |
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setTimeout(int timeout)
Set timeout in milliseconds.
|
void |
setTimeout(int beginTimeout,
int maxLearnedLength,
int endTimeout) |
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 maxLearnLength, int endTimeout)
cmd
- verbose
- beginTimeout
- maxLearnLength
- endTimeout
- public LircMode2(String[] cmdArray, boolean verbose, int beginTimeout, int maxLearnLength, int endTimeout)
cmdArray
- verbose
- beginTimeout
- maxLearnLength
- endTimeout
- 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 setTimeout(int beginTimeout, int maxLearnedLength, int endTimeout)
setTimeout
in interface ICapture
public void setTimeout(int timeout)
IHarcHardware
setTimeout
in interface IHarcHardware
setTimeout
in interface IReceive
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
public static void main(String[] args)
Copyright © 2015. All rights reserved.