class Tira extends Object implements IHarcHardware, IRawIrSender
Modifier and Type | Field and Description |
---|---|
static String |
defaultPortName |
repeatMax
Modifier and Type | Method and Description |
---|---|
void |
bootloaderMode() |
void |
close() |
String |
getPortName() |
Transmitter |
getTransmitter()
Returns a default Transmitter for the device.
|
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.
|
void |
reset() |
String |
selftest() |
boolean |
sendCcf(String ccf,
int count,
Transmitter transmitter) |
boolean |
sendCcfRepeat(String ccf,
Transmitter transmitter)
Not supported due to hardware restrictions.
|
boolean |
sendIr(org.harctoolbox.ircore.IrSignal code,
int count,
Transmitter transmitter) |
void |
setDebug(int debug)
Sets a debug parameter.
|
void |
setLed(boolean status) |
void |
setLedMute(boolean status) |
void |
setTimeout(int timeout)
Set timeout in milliseconds.
|
void |
setVerbose(boolean verbose)
Sets a verbosity flag, causing commands to be executed verbosely.
|
public static final String defaultPortName
Tira() throws gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException, IOException, InterruptedException
gnu.io.NoSuchPortException
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
IOException
InterruptedException
Tira(String portName) throws gnu.io.NoSuchPortException, gnu.io.PortInUseException, gnu.io.UnsupportedCommOperationException, IOException, InterruptedException
gnu.io.NoSuchPortException
gnu.io.PortInUseException
gnu.io.UnsupportedCommOperationException
IOException
InterruptedException
public static void main(String[] args)
args
- the command line argumentspublic final void reset() throws IOException, InterruptedException
IOException
InterruptedException
public String selftest() throws IOException, InterruptedException
IOException
InterruptedException
public void bootloaderMode() throws IOException, InterruptedException
IOException
InterruptedException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public String getPortName()
public void setLedMute(boolean status) throws IOException
IOException
public void setLed(boolean status) throws IOException
IOException
public String getVersion()
IHarcHardware
getVersion
in interface IHarcHardware
public void setVerbose(boolean verbose)
IHarcHardware
setVerbose
in interface IHarcHardware
verbose
- on or offpublic void setDebug(int debug)
IHarcHardware
setDebug
in interface IHarcHardware
public void setTimeout(int timeout)
IHarcHardware
setTimeout
in interface IHarcHardware
timeout
- Timeout in milliseconds.public boolean isValid()
IHarcHardware
isValid
in interface IHarcHardware
public boolean sendIr(org.harctoolbox.ircore.IrSignal code, int count, Transmitter transmitter) throws IOException
sendIr
in interface IRawIrSender
IOException
public boolean sendCcf(String ccf, int count, Transmitter transmitter) throws IOException, org.harctoolbox.ircore.Pronto.NonProntoFormatException, org.harctoolbox.ircore.InvalidArgumentException
IOException
org.harctoolbox.ircore.Pronto.NonProntoFormatException
org.harctoolbox.ircore.InvalidArgumentException
public boolean sendCcfRepeat(String ccf, Transmitter transmitter)
ccf
- transmitter
- public Transmitter getTransmitter()
IRawIrSender
getTransmitter
in interface IRawIrSender
public void open()
IHarcHardware
open
in interface IHarcHardware
Copyright © 2019. All rights reserved.