Package org.harctoolbox.harchardware
Interface IHarcHardware
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Subinterfaces:
ICapture,ICommandExecutor,ICommandLineDevice,IIrReader,IReceive
- All Known Implementing Classes:
BufferedExecutor,CommandFusion,DevLirc,EzControlT10,GirsClient,GlobalCache,GlobalCache.SerialPort,IrAudioDevice,IrGenericSerial,IRrecvDumpV2,IrSerial,IrToy,IrTrans,IrTransIRDB,IrWidget,LircCcfClient,LircClient,LircMode2,LocalSerialPort,LocalSerialPortBuffered,LocalSerialPortRaw,TcpSocketChannel,TcpSocketPort,UdpSocketPort,UrlPort
Some standard functions that all hardware interfaces should implement.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the hardware version (not the version of the driver software).booleanisValid()Checks validity of an instance.voidopen()Opens the device with previously set parameters.voidsetDebug(int debug) Sets a debug parameter.voidsetTimeout(int timeout) Set timeout in milliseconds.voidsetVerbose(boolean verbose) Sets a verbosity flag, causing commands to be executed verbosely.
-
Method Details
-
getVersion
Returns the hardware version (not the version of the driver software). May be null if no relevant information available.- Returns:
- Version string. Semantics can vary.
- Throws:
IOException
-
setVerbose
void setVerbose(boolean verbose) Sets a verbosity flag, causing commands to be executed verbosely. Exact semantic depends on the implementation. Typically, all communication with the device is echoed to stderr.- Parameters:
verbose- on or off
-
setDebug
void setDebug(int debug) Sets a debug parameter. Exact semantic depends on the implementation.- Parameters:
debug-
-
setTimeout
Set timeout in milliseconds. Exact semantics may be dependent on the hardware.- Parameters:
timeout- Timeout in milliseconds.- Throws:
IOExceptionHarcHardwareException
-
isValid
boolean isValid()Checks validity of an instance. Exact meaning can vary.- Returns:
- validity of the instance.
-
open
Opens the device with previously set parameters.- Throws:
HarcHardwareExceptionIOException
-