Package org.harctoolbox.harchardware.ir
Class IrGenericSerial
java.lang.Object
org.harctoolbox.harchardware.ir.IrSerial<LocalSerialPortBuffered>
org.harctoolbox.harchardware.ir.IrGenericSerial
- All Implemented Interfaces:
 Closeable,AutoCloseable,IHarcHardware,IRawIrSender
This class models a serial device that takes text commands from a serial port, like the Arduino.
- 
Field Summary
Fields inherited from class org.harctoolbox.harchardware.ir.IrSerial
serialPort, verboseFields inherited from interface org.harctoolbox.harchardware.ir.IRawIrSender
repeatMax - 
Constructor Summary
ConstructorsConstructorDescriptionIrGenericSerial(String portName, boolean verbose, Integer timeout, Integer baudRate, Integer dataSize, LocalSerialPort.StopBits stopBits, LocalSerialPort.Parity parity, LocalSerialPort.FlowControl flowControl)  - 
Method Summary
Modifier and TypeMethodDescriptionbooleansendIr(org.harctoolbox.ircore.IrSignal irSignal, int count, Transmitter transmitter) voidsetCommand(String command) voidsetDebug(int debug) Sets a debug parameter.voidsetLineEnding(String lineEnding) voidsetRaw(boolean raw) voidsetSeparator(String separator) voidsetUseSigns(boolean useSigns) Methods inherited from class org.harctoolbox.harchardware.ir.IrSerial
close, getTransmitter, getVersion, isValid, open, setBaudRate, setDataSize, setFlowControl, setParity, setPortName, setStopBits, setTimeout, setVerboseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.harctoolbox.harchardware.ir.IRawIrSender
getTransmitter 
- 
Constructor Details
- 
IrGenericSerial
public IrGenericSerial(String portName, boolean verbose, Integer timeout, Integer baudRate, Integer dataSize, LocalSerialPort.StopBits stopBits, LocalSerialPort.Parity parity, LocalSerialPort.FlowControl flowControl) throws IOException - Throws:
 IOException
 
 - 
 - 
Method Details
- 
setCommand
- Parameters:
 command- the command to set
 - 
setUseSigns
public void setUseSigns(boolean useSigns) - Parameters:
 useSigns- the useSigns to set
 - 
setSeparator
- Parameters:
 separator- the separator to set
 - 
setLineEnding
- Parameters:
 lineEnding- the lineEnding to set
 - 
setRaw
public void setRaw(boolean raw) - Parameters:
 raw- the raw to set
 - 
sendIr
public boolean sendIr(org.harctoolbox.ircore.IrSignal irSignal, int count, Transmitter transmitter) throws NoSuchTransmitterException, IOException - Specified by:
 sendIrin interfaceIRawIrSender- Returns:
 - if false, command failed.
 - Throws:
 NoSuchTransmitterExceptionIOException
 - 
setDebug
public void setDebug(int debug) Description copied from interface:IHarcHardwareSets a debug parameter. Exact semantic depends on the implementation.- Specified by:
 setDebugin interfaceIHarcHardware
 
 -