public class DevLirc extends Object implements IRawIrSender, IReceive, ICapture, ITransmitter, IIrSenderStop
| Modifier and Type | Field and Description |
|---|---|
static String |
DEV |
static String |
DEVSLASHLIRC |
static String |
LIRCDEVPATTERN |
(package private) static Logger |
logger |
repeatMaxdefaultBeginTimeout, defaultCaptureMaxSize, defaultEndingTimeout| Constructor and Description |
|---|
DevLirc() |
DevLirc(String deviceName) |
DevLirc(String deviceName,
boolean verbose) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canReceive() |
boolean |
canSend() |
boolean |
canSetCarrier() |
boolean |
canSetTransmitter() |
org.harctoolbox.ircore.ModulatedIrSequence |
capture()
Listens to the device and returns a sequence.
|
void |
close() |
static File[] |
getCandidates() |
int |
getNumberTransmitters() |
Transmitter |
getTransmitter()
Returns a default Transmitter for the device.
|
LircTransmitter |
getTransmitter(int number) |
LircTransmitter |
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.
|
static void |
main(String[] args) |
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,
LircTransmitter transmitter) |
boolean |
sendIr(org.harctoolbox.ircore.IrSignal irSignal,
int count,
Transmitter transmitter) |
void |
setBeginTimeout(int timeout) |
void |
setCaptureMaxSize(int integer) |
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setEndingTimeout(int integer) |
void |
setTimeout(int timeout)
Deprecated.
|
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.
|
String |
toString() |
static final Logger logger
public static final String DEV
public static final String DEVSLASHLIRC
public static final String LIRCDEVPATTERN
public DevLirc(String deviceName, boolean verbose) throws org.harctoolbox.devslashlirc.LircDeviceException
org.harctoolbox.devslashlirc.LircDeviceExceptionpublic DevLirc(String deviceName) throws org.harctoolbox.devslashlirc.LircDeviceException
org.harctoolbox.devslashlirc.LircDeviceExceptionpublic DevLirc()
throws org.harctoolbox.devslashlirc.LircDeviceException
org.harctoolbox.devslashlirc.LircDeviceExceptionpublic static File[] getCandidates()
public static void main(String[] args)
public boolean canSend()
public boolean canReceive()
public int getNumberTransmitters()
public boolean canSetCarrier()
public boolean canSetTransmitter()
public boolean sendIr(org.harctoolbox.ircore.IrSignal irSignal,
int count,
Transmitter transmitter)
throws HarcHardwareException
sendIr in interface IRawIrSenderNoSuchTransmitterExceptionHarcHardwareExceptionpublic boolean sendIr(org.harctoolbox.ircore.IrSignal irSignal,
int count,
LircTransmitter transmitter)
throws HarcHardwareException
HarcHardwareExceptionpublic org.harctoolbox.ircore.IrSequence receive()
throws HarcHardwareException,
org.harctoolbox.ircore.OddSequenceLengthException
IReceivereceive in interface IReceiveHarcHardwareException - if the device is not in valid/open state.org.harctoolbox.ircore.OddSequenceLengthExceptionpublic boolean stopReceive()
IReceivestopReceive in interface IReceivepublic boolean stopIr(Transmitter transmitter)
IIrSenderStopstopIr in interface IIrSenderStoppublic 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 boolean isValid()
IHarcHardwareisValid in interface IHarcHardware@Deprecated public void setTimeout(int timeout) throws IOException
IHarcHardwaresetTimeout in interface IHarcHardwaretimeout - Timeout in milliseconds.IOExceptionpublic void setBeginTimeout(int timeout)
throws IOException
setBeginTimeout in interface IIrReaderIOExceptionpublic void setCaptureMaxSize(int integer)
setCaptureMaxSize in interface IIrReaderpublic void setEndingTimeout(int integer)
setEndingTimeout in interface IIrReaderpublic void open()
throws HarcHardwareException
IHarcHardwareopen in interface IHarcHardwareHarcHardwareExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic Transmitter getTransmitter()
IRawIrSendergetTransmitter in interface IRawIrSendergetTransmitter in interface ITransmitterpublic LircTransmitter getTransmitter(String connector) throws NoSuchTransmitterException
ITransmittergetTransmitter in interface ITransmitterconnector - String describing desired port. Syntax is dependent on the implementing class.NoSuchTransmitterExceptionpublic LircTransmitter getTransmitter(int number) throws NoSuchTransmitterException
NoSuchTransmitterExceptionpublic String[] getTransmitterNames()
ITransmittergetTransmitterNames in interface ITransmitterpublic org.harctoolbox.ircore.ModulatedIrSequence capture()
throws HarcHardwareException,
org.harctoolbox.ircore.OddSequenceLengthException
ICapturecapture in interface ICaptureHarcHardwareException - if the device is not in valid/open state.org.harctoolbox.ircore.OddSequenceLengthExceptionpublic boolean stopCapture()
ICapturestopCapture in interface ICaptureCopyright © 2020. All rights reserved.