/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.4
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.apogee.driver;

public class Ascent extends CamGen2Base {
  private long swigCPtr;

  public Ascent(long cPtr, boolean cMemoryOwn) {
    super(jlibapogeeJNI.Ascent_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(Ascent obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        jlibapogeeJNI.delete_Ascent(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public Ascent() {
    this(jlibapogeeJNI.new_Ascent(), true);
  }

  public void OpenConnection(String ioType, String DeviceAddr, int FirmwareRev, int Id) {
    jlibapogeeJNI.Ascent_OpenConnection(swigCPtr, this, ioType, DeviceAddr, FirmwareRev, Id);
  }

  public void CloseConnection() {
    jlibapogeeJNI.Ascent_CloseConnection(swigCPtr, this);
  }

  public void FilterWheelOpen(Ascent.FilterWheelType type) {
    jlibapogeeJNI.Ascent_FilterWheelOpen(swigCPtr, this, type.swigValue());
  }

  public void FilterWheelClose() {
    jlibapogeeJNI.Ascent_FilterWheelClose(swigCPtr, this);
  }

  public void SetFilterWheelPos(int pos) {
    jlibapogeeJNI.Ascent_SetFilterWheelPos(swigCPtr, this, pos);
  }

  public int GetFilterWheelPos() {
    return jlibapogeeJNI.Ascent_GetFilterWheelPos(swigCPtr, this);
  }

  public ApogeeFilterWheel.Status GetFilterWheelStatus() {
    return ApogeeFilterWheel.Status.swigToEnum(jlibapogeeJNI.Ascent_GetFilterWheelStatus(swigCPtr, this));
  }

  public Ascent.FilterWheelType GetFilterWheelType() {
    return Ascent.FilterWheelType.swigToEnum(jlibapogeeJNI.Ascent_GetFilterWheelType(swigCPtr, this));
  }

  public String GetFilterWheelName() {
    return jlibapogeeJNI.Ascent_GetFilterWheelName(swigCPtr, this);
  }

  public int GetFilterWheelMaxPositions() {
    return jlibapogeeJNI.Ascent_GetFilterWheelMaxPositions(swigCPtr, this);
  }

  public void StartExposure(double Duration, boolean IsLight) {
    jlibapogeeJNI.Ascent_StartExposure(swigCPtr, this, Duration, IsLight);
  }

  public int GetNumAdChannels() {
    return jlibapogeeJNI.Ascent_GetNumAdChannels(swigCPtr, this);
  }

  public void Init() {
    jlibapogeeJNI.Ascent_Init(swigCPtr, this);
  }

  public boolean IsDualReadoutSupported() {
    return jlibapogeeJNI.Ascent_IsDualReadoutSupported(swigCPtr, this);
  }

  public void SetDualReadout(boolean TurnOn) {
    jlibapogeeJNI.Ascent_SetDualReadout(swigCPtr, this, TurnOn);
  }

  public boolean GetDualReadout() {
    return jlibapogeeJNI.Ascent_GetDualReadout(swigCPtr, this);
  }

  public FanMode GetFanMode() {
    return FanMode.swigToEnum(jlibapogeeJNI.Ascent_GetFanMode(swigCPtr, this));
  }

  public void SetFanMode(FanMode mode, boolean PreCondCheck) {
    jlibapogeeJNI.Ascent_SetFanMode__SWIG_0(swigCPtr, this, mode.swigValue(), PreCondCheck);
  }

  public void SetFanMode(FanMode mode) {
    jlibapogeeJNI.Ascent_SetFanMode__SWIG_1(swigCPtr, this, mode.swigValue());
  }

  public final static class FilterWheelType {
    public final static Ascent.FilterWheelType FW_UNKNOWN_TYPE = new Ascent.FilterWheelType("FW_UNKNOWN_TYPE", jlibapogeeJNI.Ascent_FW_UNKNOWN_TYPE_get());
    public final static Ascent.FilterWheelType CFW25_6R = new Ascent.FilterWheelType("CFW25_6R", jlibapogeeJNI.Ascent_CFW25_6R_get());
    public final static Ascent.FilterWheelType CFW31_8R = new Ascent.FilterWheelType("CFW31_8R", jlibapogeeJNI.Ascent_CFW31_8R_get());

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static FilterWheelType swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + FilterWheelType.class + " with value " + swigValue);
    }

    private FilterWheelType(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private FilterWheelType(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private FilterWheelType(String swigName, FilterWheelType swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static FilterWheelType[] swigValues = { FW_UNKNOWN_TYPE, CFW25_6R, CFW31_8R };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
