public class IrWidget extends Object implements IHarcHardware, ICapture
http://www.compendiumarcana.com/irwidget/| Modifier and Type | Field and Description |
|---|---|
static int |
defaultEndTimeout |
static String |
defaultPortName |
static int |
defaultRunTimeout |
static int |
defaultStartTimeout |
static int |
msPerTick
Number of micro seconds in a count msPerTick.
|
| Constructor and Description |
|---|
IrWidget()
Constructs new IrWidget with default port name and timeouts.
|
IrWidget(String portName,
boolean verbose,
int debug)
Constructs new IrWidget with default timeouts.
|
IrWidget(String portName,
int startTimeout,
int runTimeout,
int endTimeout,
boolean verbose)
Constructs new IrWidget.
|
| Modifier and Type | Method and Description |
|---|---|
ModulatedIrSequence |
capture()
Captures a signal using the given timeout values, and returns it as a ModulatedIrSequence.
|
void |
close() |
String |
getVersion()
The IrWidget does not support versions.
|
boolean |
isValid()
Tries to identify instances that are not valid.
|
static void |
main(String[] args)
For testing purposes only.
|
void |
open()
Opens the device with previously set parameters.
|
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setTimeout(int timeout)
Deprecated.
Use three argument version instead.
|
void |
setTimeout(int startTimeout,
int runTimeout,
int endTimeout) |
void |
setVerbosity(boolean verbose)
Sets a verbosity flag, causing commands to be executed verbosely.
|
boolean |
stopCapture()
Stops ongoing capture.
|
public static final int msPerTick
public static final String defaultPortName
public static final int defaultStartTimeout
public static final int defaultRunTimeout
public static final int defaultEndTimeout
public IrWidget()
public IrWidget(String portName, boolean verbose, int debug)
portName - Name of serial port to use. Typically something like COM7: (Windows) or /dev/ttyUSB0.verbose - debug - debug codepublic IrWidget(String portName, int startTimeout, int runTimeout, int endTimeout, boolean verbose)
portName - Name of serial port to use. Typically something like COM7: (Windows) or /dev/ttyUSB0.verbose - startTimeout - runTimeout - endTimeout - public void setDebug(int debug)
IHarcHardwaresetDebug in interface IHarcHardwarepublic void open()
throws HarcHardwareException,
IOException
IHarcHardwareopen in interface IHarcHardwareHarcHardwareExceptionIOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic void setTimeout(int startTimeout,
int runTimeout,
int endTimeout)
setTimeout in interface ICapturepublic void setTimeout(int timeout)
IHarcHardwaresetTimeout in interface IHarcHardwaretimeout - public ModulatedIrSequence capture() throws IOException
capture in interface ICaptureIOExceptionpublic String getVersion()
getVersion in interface IHarcHardwarepublic void setVerbosity(boolean verbose)
IHarcHardwaresetVerbosity in interface IHarcHardwareverbose - on or offpublic boolean isValid()
IHarcHardwareisValid in interface IHarcHardwarepublic boolean stopCapture()
stopCapture in interface ICapturepublic static void main(String[] args)
args - the command line argumentsCopyright © 2015. All rights reserved.