public class IrDummy extends Object implements IHarcHardware, IRawIrSender, IIrSenderStop, ITransmitter, ICapture, IReceive, IRemoteCommandIrSender
| Modifier and Type | Field and Description |
|---|---|
static String |
defaultVersion |
repeatMaxdefaultBeginTimeout, defaultCaptureMaxSize, defaultEndingTimeoutrepeatMax| Modifier and Type | Method and Description |
|---|---|
org.harctoolbox.ircore.ModulatedIrSequence |
capture()
Listens to the device and returns a sequence.
|
void |
close() |
String[] |
getCommands(String remote)
Returns an array of command names for the remote given in the argument.
|
String[] |
getRemotes()
Returns an array of "remote" names.
|
Transmitter |
getTransmitter()
Returns a default Transmitter for the device.
|
Transmitter |
getTransmitter(String connector)
Parses the String argument, and returns a transmitter accordingly.
|
String[] |
getTransmitterNames()
Return possible name of transmitters, that are guaranteed to work with the getTransmitter(String).
|
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.
|
boolean |
sendIr(org.harctoolbox.ircore.IrSignal irSignal,
int count,
Transmitter transmitter) |
boolean |
sendIrCommand(String remote,
String command,
int count,
Transmitter transmitter)
Sends the command to the hardware, to be sent count number of times.
|
boolean |
sendIrCommandRepeat(String remote,
String command,
Transmitter transmitter)
Like sendIr, but sends the IR signal until stopped by stopIr.
|
void |
setBeginTimeout(int integer) |
void |
setCaptureMaxSize(int integer) |
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setEndingTimeout(int integer) |
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 |
stopIr(Transmitter transmitter)
Stops ongoing IR transmission.
|
boolean |
stopReceive()
Signals the receiving device that it should stop receiving.
|
public static final String defaultVersion
public IrDummy(String version)
public IrDummy()
public String getVersion() throws IOException
IHarcHardwaregetVersion in interface IHarcHardwareIOExceptionpublic void setVerbose(boolean verbose)
IHarcHardwaresetVerbose in interface IHarcHardwareverbose - on or offpublic void setDebug(int debug)
IHarcHardwaresetDebug in interface IHarcHardwarepublic void setTimeout(int timeout)
throws IOException
IHarcHardwaresetTimeout in interface IHarcHardwaretimeout - Timeout in milliseconds.IOExceptionpublic boolean isValid()
IHarcHardwareisValid in interface IHarcHardwarepublic void open()
throws HarcHardwareException,
IOException
IHarcHardwareopen in interface IHarcHardwareHarcHardwareExceptionIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean sendIr(org.harctoolbox.ircore.IrSignal irSignal,
int count,
Transmitter transmitter)
throws HarcHardwareException,
NoSuchTransmitterException,
IOException
sendIr in interface IRawIrSenderNoSuchTransmitterExceptionIOExceptionHarcHardwareExceptionpublic Transmitter getTransmitter()
IRawIrSendergetTransmitter in interface IRawIrSendergetTransmitter in interface IRemoteCommandIrSendergetTransmitter in interface ITransmitterpublic boolean stopIr(Transmitter transmitter) throws NoSuchTransmitterException, IOException
IIrSenderStopstopIr in interface IIrSenderStopNoSuchTransmitterExceptionIOExceptionpublic Transmitter getTransmitter(String connector) throws NoSuchTransmitterException
ITransmittergetTransmitter in interface ITransmitterconnector - String describing desired port. Syntax is dependent on the implementing class.NoSuchTransmitterExceptionpublic String[] getTransmitterNames()
ITransmittergetTransmitterNames in interface ITransmitterpublic org.harctoolbox.ircore.ModulatedIrSequence capture()
throws HarcHardwareException,
IOException
ICapturecapture in interface ICaptureHarcHardwareException - if the device is not in valid/open state.IOExceptionpublic boolean stopCapture()
ICapturestopCapture in interface ICapturepublic void setBeginTimeout(int integer)
throws IOException
setBeginTimeout in interface IIrReaderIOExceptionpublic void setCaptureMaxSize(int integer)
setCaptureMaxSize in interface IIrReaderpublic void setEndingTimeout(int integer)
setEndingTimeout in interface IIrReaderpublic String[] getRemotes() throws IOException
IRemoteCommandIrSendergetRemotes in interface IRemoteCommandIrSenderIOExceptionpublic String[] getCommands(String remote) throws IOException
IRemoteCommandIrSendergetCommands in interface IRemoteCommandIrSenderremote - The "remote" to search inIOExceptionpublic boolean sendIrCommand(String remote, String command, int count, Transmitter transmitter) throws IOException, NoSuchTransmitterException
IRemoteCommandIrSendersendIrCommand in interface IRemoteCommandIrSendercount - Number of times to repeat the commandIOExceptionNoSuchTransmitterExceptionpublic boolean sendIrCommandRepeat(String remote, String command, Transmitter transmitter) throws IOException, NoSuchTransmitterException
IRemoteCommandIrSendersendIrCommandRepeat in interface IRemoteCommandIrSenderIOExceptionNoSuchTransmitterExceptionpublic org.harctoolbox.ircore.IrSequence receive()
throws HarcHardwareException,
IOException
IReceivereceive in interface IReceiveHarcHardwareException - if the device is not in valid/open state.IOExceptionpublic boolean stopReceive()
IReceivestopReceive in interface IReceiveCopyright © 2020. All rights reserved.