public class Mode2LircDevice extends LircDevice implements IMode2
defaultBeginTimeout, defaultDeviceName
deviceName, libraryName, nativePointer
Constructor and Description |
---|
Mode2LircDevice() |
Mode2LircDevice(String deviceName) |
Mode2LircDevice(String deviceName,
int beginTimeout,
int captureSize,
int endTimeout) |
Modifier and Type | Method and Description |
---|---|
boolean |
canGetRecResolution() |
boolean |
canSetSendCarrier() |
int |
getRecResolution() |
static void |
main(String[] args) |
protected boolean |
openNative() |
int |
read() |
int[] |
receive()
Reads an IR signal as a sequence of durations.
|
void |
report() |
void |
send(int[] data)
Sends the provided data as a sequence of durations.
|
void |
send(int[] data,
int frequency)
Sends the provided data as a sequence of durations.
|
void |
setEndingTimeout(int timeout) |
void |
setMaxCaptureLength(int maxCaptureLength) |
void |
setSendCarrier(int frequency) |
String |
toString() |
canRec, canSend, canSetTransmitterMask, close, delete, finalize, getNumberTransmitters, getVersion, isValid, setBeginTimeout, setTransmitterMaskNative
isLibraryLoaded, loadLibrary, loadLibrary, open, setTransmitterMask
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
canRec, canSend, canSetTransmitterMask, getNumberTransmitters, getVersion, isValid, open, setTransmitterMask
public Mode2LircDevice(String deviceName, int beginTimeout, int captureSize, int endTimeout)
public Mode2LircDevice() throws LircDeviceException
LircDeviceException
public Mode2LircDevice(String deviceName) throws LircDeviceException
LircDeviceException
public static void main(String[] args)
protected boolean openNative()
openNative
in class LircHardware
public boolean canSetSendCarrier()
canSetSendCarrier
in interface IMode2
public boolean canGetRecResolution()
canGetRecResolution
in interface IMode2
public void send(int[] data) throws NotSupportedException
IMode2
send
in interface IMode2
data
- interger array of durations.NotSupportedException
- if the hardware does not support sending.public void send(int[] data, int frequency) throws NotSupportedException
IMode2
send
in interface IMode2
data
- interger array of durations.frequency
- Frequency in Hz.NotSupportedException
- if the hardware does not support sending,
or setting of the modulation frequency.public int getRecResolution() throws NotSupportedException
getRecResolution
in interface IMode2
NotSupportedException
public void setSendCarrier(int frequency) throws NotSupportedException
setSendCarrier
in interface IMode2
NotSupportedException
public int read() throws NotSupportedException
NotSupportedException
public int[] receive() throws NotSupportedException
IMode2
receive
in interface IMode2
NotSupportedException
- if the hardwared does not support receiving.public void report()
public final void setEndingTimeout(int timeout)
setEndingTimeout
in interface IMode2
public final void setMaxCaptureLength(int maxCaptureLength)
setMaxCaptureLength
in interface IMode2
public String toString()
toString
in interface IMode2
toString
in class LircDevice
Copyright © 2019. All rights reserved.