public class IrTrans extends Object implements IHarcHardware, IRawIrSender, ITransmitter, IWeb
| Modifier and Type | Class and Description |
|---|---|
static class |
IrTrans.Interface
Interface that can be used to command an IrTrans unit
|
static class |
IrTrans.IrTransTransmitter |
static class |
IrTrans.Led
IR LEDs on the IrTrans
|
| Modifier and Type | Field and Description |
|---|---|
static String |
defaultIrTransIP |
protected static int |
defaultTimeout |
protected static int |
dummyDelay |
protected InetAddress |
inetAddress |
protected IrTrans.Interface |
interfaze |
protected String |
irTransIP |
static int |
portNumber
port number, not possible to change.
|
protected int |
timeout |
protected boolean |
verbose |
repeatMax| Constructor and Description |
|---|
IrTrans(String hostname) |
IrTrans(String hostname,
boolean verbose) |
IrTrans(String hostname,
boolean verbose,
int timeout) |
IrTrans(String hostname,
boolean verbose,
int timeout,
IrTrans.Interface interfaze) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
IrTrans.IrTransTransmitter |
getTransmitter()
Returns a default Transmitter for the device.
|
IrTrans.IrTransTransmitter |
getTransmitter(String port)
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).
|
URI |
getUri(String user,
String password)
Returns an URI to be used for browsing the device, possibly containing user and password information.
|
protected boolean |
getUrl(String url) |
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) |
IrTrans.IrTransTransmitter |
newTransmitter(IrTrans.Led led) |
void |
open()
Opens the device with previously set parameters.
|
boolean |
sendCcf(String ccf,
int count,
IrTrans.Led led) |
boolean |
sendCcf(String ccf,
int count,
Transmitter transmitter) |
boolean |
sendCcfRepeat(String ccf,
Transmitter transmitter) |
protected String |
sendCommand(String cmd) |
protected boolean |
sendCommandUdp(String cmd) |
boolean |
sendIr(org.harctoolbox.ircore.IrSignal code,
int count,
IrTrans.Led led) |
boolean |
sendIr(org.harctoolbox.ircore.IrSignal code,
int count,
Transmitter transmitter) |
void |
setDebug(int debug)
Sets a debug parameter.
|
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 defaultIrTransIP
protected static final int dummyDelay
protected static final int defaultTimeout
public static final int portNumber
protected int timeout
protected String irTransIP
protected InetAddress inetAddress
protected boolean verbose
protected IrTrans.Interface interfaze
public IrTrans(String hostname, boolean verbose, int timeout, IrTrans.Interface interfaze) throws UnknownHostException
hostname - verbose - timeout - interfaze - UnknownHostExceptionpublic IrTrans(String hostname, boolean verbose, int timeout) throws UnknownHostException
UnknownHostExceptionpublic IrTrans(String hostname, boolean verbose) throws UnknownHostException
UnknownHostExceptionpublic IrTrans(String hostname) throws UnknownHostException
UnknownHostExceptionpublic static void main(String[] args)
public void close()
close in interface Closeableclose in interface AutoCloseablepublic URI getUri(String user, String password)
IWebpublic void open()
IHarcHardwareopen in interface IHarcHardwarepublic void setDebug(int debug)
IHarcHardwaresetDebug in interface IHarcHardwarepublic IrTrans.IrTransTransmitter getTransmitter()
IRawIrSendergetTransmitter in interface IRawIrSendergetTransmitter in interface ITransmitterpublic IrTrans.IrTransTransmitter newTransmitter(IrTrans.Led led)
public IrTrans.IrTransTransmitter getTransmitter(String port) throws NoSuchTransmitterException
ITransmittergetTransmitter in interface ITransmitterport - String describing desired port. Syntax is dependent on the implementing class.NoSuchTransmitterExceptionpublic String[] getTransmitterNames()
ITransmittergetTransmitterNames in interface ITransmitterpublic boolean isValid()
IHarcHardwareisValid in interface IHarcHardwarepublic void setVerbose(boolean verbose)
IHarcHardwaresetVerbose in interface IHarcHardwareverbose - on or offpublic void setTimeout(int timeout)
IHarcHardwaresetTimeout in interface IHarcHardwaretimeout - Timeout in milliseconds.protected String sendCommand(String cmd) throws IOException
IOExceptionpublic String getVersion() throws IOException
IHarcHardwaregetVersion in interface IHarcHardwareIOExceptionprotected boolean getUrl(String url) throws MalformedURLException, IOException
MalformedURLExceptionIOExceptionprotected boolean sendCommandUdp(String cmd) throws IOException
IOExceptionpublic boolean sendCcf(String ccf, int count, IrTrans.Led led) throws IOException
IOExceptionpublic boolean sendCcf(String ccf, int count, Transmitter transmitter) throws IOException, NoSuchTransmitterException
public boolean sendCcfRepeat(String ccf, Transmitter transmitter) throws IOException, NoSuchTransmitterException
public boolean sendIr(org.harctoolbox.ircore.IrSignal code,
int count,
IrTrans.Led led)
throws IOException
IOExceptionpublic boolean sendIr(org.harctoolbox.ircore.IrSignal code,
int count,
Transmitter transmitter)
throws IOException,
NoSuchTransmitterException
sendIr in interface IRawIrSenderIOExceptionNoSuchTransmitterExceptionCopyright © 2020. All rights reserved.