Package org.harctoolbox.harchardware.ir
Class IRrecvDumpV2
java.lang.Object
org.harctoolbox.harchardware.ir.IRrecvDumpV2
- All Implemented Interfaces:
Closeable,AutoCloseable,IHarcHardware,IIrReader,IReceive
-
Field Summary
Fields inherited from interface org.harctoolbox.harchardware.ir.IIrReader
DEFAULT_BEGIN_TIMEOUT, DEFAULT_CAPTURE_MAXSIZE, DEFAULT_ENDING_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionIRrecvDumpV2(String portName, boolean verbose, Integer timeout) IRrecvDumpV2(String portName, boolean verbose, Integer timeout, Integer baud) IRrecvDumpV2(LocalSerialPortBuffered hardware) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Returns the hardware version (not the version of the driver software).booleanisValid()Checks validity of an instance.voidopen()Opens the device with previously set parameters.org.harctoolbox.ircore.IrSequencereceive()Listens to the device and returns a sequence.voidreset()voidsetBeginTimeout(int beginTimeout) voidsetCaptureMaxSize(int integer) voidsetDebug(int debug) Sets a debug parameter.voidsetEndingTimeout(int endingTimeout) voidsetTimeout(int timeout) Set timeout in milliseconds.voidsetVerbose(boolean verbose) Sets a verbosity flag, causing commands to be executed verbosely.booleanSignals the receiving device that it should stop receiving.
-
Constructor Details
-
IRrecvDumpV2
- Throws:
HarcHardwareExceptionIOException
-
IRrecvDumpV2
public IRrecvDumpV2(String portName, boolean verbose, Integer timeout, Integer baud) throws IOException, HarcHardwareException - Throws:
IOExceptionHarcHardwareException
-
IRrecvDumpV2
public IRrecvDumpV2(String portName, boolean verbose, Integer timeout) throws IOException, HarcHardwareException - Throws:
IOExceptionHarcHardwareException
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getVersion
Description copied from interface:IHarcHardwareReturns the hardware version (not the version of the driver software). May be null if no relevant information available.- Specified by:
getVersionin interfaceIHarcHardware- Returns:
- Version string. Semantics can vary.
- Throws:
IOException
-
setVerbose
public void setVerbose(boolean verbose) Description copied from interface:IHarcHardwareSets a verbosity flag, causing commands to be executed verbosely. Exact semantic depends on the implementation. Typically, all communication with the device is echoed to stderr.- Specified by:
setVerbosein interfaceIHarcHardware- Parameters:
verbose- on or off
-
setBeginTimeout
- Specified by:
setBeginTimeoutin interfaceIIrReader- Throws:
IOException
-
isValid
public boolean isValid()Description copied from interface:IHarcHardwareChecks validity of an instance. Exact meaning can vary.- Specified by:
isValidin interfaceIHarcHardware- Returns:
- validity of the instance.
-
open
Description copied from interface:IHarcHardwareOpens the device with previously set parameters.- Specified by:
openin interfaceIHarcHardware- Throws:
IOExceptionHarcHardwareException
-
receive
public org.harctoolbox.ircore.IrSequence receive() throws HarcHardwareException, IOException, org.harctoolbox.ircore.OddSequenceLengthExceptionDescription copied from interface:IReceiveListens to the device and returns a sequence. Requires the device to be previously opened. Should itself neither open or close the device.- Specified by:
receivein interfaceIReceive- Returns:
- Captured sequence, or null by timeout.
- Throws:
HarcHardwareException- if the device is not in valid/open state.IOExceptionorg.harctoolbox.ircore.OddSequenceLengthException
-
stopReceive
public boolean stopReceive()Description copied from interface:IReceiveSignals the receiving device that it should stop receiving. May not be implemented in all hardware.- Specified by:
stopReceivein interfaceIReceive- Returns:
- status
-
reset
- Throws:
IOExceptionHarcHardwareException
-
setDebug
public void setDebug(int debug) Description copied from interface:IHarcHardwareSets a debug parameter. Exact semantic depends on the implementation.- Specified by:
setDebugin interfaceIHarcHardware
-
setTimeout
Description copied from interface:IHarcHardwareSet timeout in milliseconds. Exact semantics may be dependent on the hardware.- Specified by:
setTimeoutin interfaceIHarcHardware- Parameters:
timeout- Timeout in milliseconds.- Throws:
IOException
-
setCaptureMaxSize
public void setCaptureMaxSize(int integer) - Specified by:
setCaptureMaxSizein interfaceIIrReader
-
setEndingTimeout
public void setEndingTimeout(int endingTimeout) - Specified by:
setEndingTimeoutin interfaceIIrReader
-