Class CommandFusion

java.lang.Object
org.harctoolbox.harchardware.ir.IrSerial<LocalSerialPortRaw>
org.harctoolbox.harchardware.ir.CommandFusion
All Implemented Interfaces:
Closeable, AutoCloseable, IHarcHardware, ICapture, IIrReader, IRawIrSender

public class CommandFusion extends IrSerial<LocalSerialPortRaw> implements IRawIrSender, ICapture
This class implements capturing and sending support for the CommandFusion Learner. see IR learner, IR Module, and USB Communication Protocol. This device does not support settable timeouts, due to limitations in the hardware. beginTimeout is effectively 20 seconds, captureLength 2 seconds, endingTimeout: not applicable.
  • Field Details

  • Constructor Details

  • Method Details

    • setDebug

      public void setDebug(int debug)
      Dummy without function.
      Specified by:
      setDebug in interface IHarcHardware
      Parameters:
      debug -
    • open

      public void open() throws HarcHardwareException, IOException
      Description copied from interface: IHarcHardware
      Opens the device with previously set parameters.
      Specified by:
      open in interface IHarcHardware
      Overrides:
      open in class IrSerial<LocalSerialPortRaw>
      Throws:
      HarcHardwareException
      IOException
    • sendIr

      public boolean sendIr(int deviceType, int codeset, int key) throws IOException
      Sends an IR signal from the built-in, proprietary data base. Not tested.
      Parameters:
      deviceType -
      codeset -
      key - function code
      Returns:
      success of operation
      Throws:
      IOException
    • sendIr

      public boolean sendIr(org.harctoolbox.ircore.IrSignal irSignal, int count, Transmitter transmitter) throws IOException
      Specified by:
      sendIr in interface IRawIrSender
      Parameters:
      irSignal -
      count -
      transmitter - Not used
      Returns:
      Success of operation.
      Throws:
      IOException
    • capture

      public org.harctoolbox.ircore.ModulatedIrSequence capture() throws IOException, org.harctoolbox.ircore.InvalidArgumentException
      Description copied from interface: ICapture
      Listens to the device and returns a sequence. Requires the device to be previously opened. Should itself neither open or close the device.
      Specified by:
      capture in interface ICapture
      Returns:
      Captured sequence, or null by timeout.
      Throws:
      IOException
      org.harctoolbox.ircore.OddSequenceLengthException
      org.harctoolbox.ircore.InvalidArgumentException
    • stopCapture

      public boolean stopCapture()
      Description copied from interface: ICapture
      Signals the capturing device that it should stop capturing. May not be implemented in all hardware.
      Specified by:
      stopCapture in interface ICapture
      Returns:
      status
    • getVersion

      public String getVersion()
      Description copied from interface: IHarcHardware
      Returns the hardware version (not the version of the driver software). May be null if no relevant information available.
      Specified by:
      getVersion in interface IHarcHardware
      Overrides:
      getVersion in class IrSerial<LocalSerialPortRaw>
      Returns:
      Version string. Semantics can vary.
    • setBeginTimeout

      public void setBeginTimeout(int integer)
      Dummy without function.
      Specified by:
      setBeginTimeout in interface IIrReader
      Parameters:
      integer -
    • setCaptureMaxSize

      public void setCaptureMaxSize(int integer)
      Dummy without function.
      Specified by:
      setCaptureMaxSize in interface IIrReader
      Parameters:
      integer -
    • setEndingTimeout

      public void setEndingTimeout(int integer)
      Dummy without function.
      Specified by:
      setEndingTimeout in interface IIrReader
      Parameters:
      integer -