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 |
repeatMax
defaultBeginTimeout, defaultCaptureMaxSize, defaultEndTimeout
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() |
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.
|
IrSequence |
receive()
Listens to the device and returns a sequence.
|
boolean |
sendIr(IrSignal irSignal,
int count,
LircTransmitter transmitter) |
boolean |
sendIr(IrSignal irSignal,
int count,
Transmitter transmitter) |
void |
setBeginTimeout(int timeout) |
void |
setCaptureMaxSize(int integer) |
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setEndTimeout(int integer) |
void |
setTimeout(int timeout)
Deprecated.
|
void |
setVerbosity(boolean verbosity)
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() |
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.LircDeviceException
public DevLirc(String deviceName) throws org.harctoolbox.devslashlirc.LircDeviceException
org.harctoolbox.devslashlirc.LircDeviceException
public DevLirc() throws org.harctoolbox.devslashlirc.LircDeviceException
org.harctoolbox.devslashlirc.LircDeviceException
public 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(IrSignal irSignal, int count, Transmitter transmitter) throws HarcHardwareException
sendIr
in interface IRawIrSender
NoSuchTransmitterException
HarcHardwareException
public boolean sendIr(IrSignal irSignal, int count, LircTransmitter transmitter) throws HarcHardwareException
HarcHardwareException
public IrSequence receive() throws HarcHardwareException, IncompatibleArgumentException
IReceive
receive
in interface IReceive
HarcHardwareException
- if the device is not in valid/open state.IncompatibleArgumentException
public boolean stopReceive()
IReceive
stopReceive
in interface IReceive
public boolean stopIr(Transmitter transmitter)
IIrSenderStop
stopIr
in interface IIrSenderStop
public String getVersion() throws IOException
IHarcHardware
getVersion
in interface IHarcHardware
IOException
public void setVerbosity(boolean verbosity)
IHarcHardware
setVerbosity
in interface IHarcHardware
verbosity
- on or offpublic void setDebug(int debug)
IHarcHardware
setDebug
in interface IHarcHardware
public boolean isValid()
IHarcHardware
isValid
in interface IHarcHardware
@Deprecated public void setTimeout(int timeout) throws IOException
IHarcHardware
setTimeout
in interface IHarcHardware
timeout
- Timeout in milliseconds.IOException
public void setBeginTimeout(int timeout) throws IOException
setBeginTimeout
in interface IIrReader
IOException
public void setCaptureMaxSize(int integer)
setCaptureMaxSize
in interface IIrReader
public void setEndTimeout(int integer)
setEndTimeout
in interface IIrReader
public void open() throws HarcHardwareException
IHarcHardware
open
in interface IHarcHardware
HarcHardwareException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public Transmitter getTransmitter()
IRawIrSender
getTransmitter
in interface IRawIrSender
getTransmitter
in interface ITransmitter
public LircTransmitter getTransmitter(String connector) throws NoSuchTransmitterException
ITransmitter
getTransmitter
in interface ITransmitter
connector
- String describing desired port. Syntax is dependent on the implementing class.NoSuchTransmitterException
public LircTransmitter getTransmitter(int number) throws NoSuchTransmitterException
NoSuchTransmitterException
public String[] getTransmitterNames()
ITransmitter
getTransmitterNames
in interface ITransmitter
public ModulatedIrSequence capture() throws HarcHardwareException, IncompatibleArgumentException
ICapture
capture
in interface ICapture
HarcHardwareException
- if the device is not in valid/open state.IncompatibleArgumentException
public boolean stopCapture()
ICapture
stopCapture
in interface ICapture
Copyright © 2016. All rights reserved.