/* ----------------------------------------------------------------------------
 * 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 Alta extends ApogeeCam {
  private long swigCPtr;

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

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

  protected void finalize() {
    delete();
  }

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

  public Alta() {
    this(jlibapogeeJNI.new_Alta(), true);
  }

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

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

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

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

  public CameraStatusRegs GetStatus() {
    return new CameraStatusRegs(jlibapogeeJNI.Alta_GetStatus(swigCPtr, this), true);
  }

  public Status GetImagingStatus() {
    return Status.swigToEnum(jlibapogeeJNI.Alta_GetImagingStatus(swigCPtr, this));
  }

  public void GetImage(Uint16Vector out) {
    jlibapogeeJNI.Alta_GetImage(swigCPtr, this, Uint16Vector.getCPtr(out), out);
  }

  public void StopExposure(boolean Digitize) {
    jlibapogeeJNI.Alta_StopExposure(swigCPtr, this, Digitize);
  }

  public long GetAvailableMemory() {
    return jlibapogeeJNI.Alta_GetAvailableMemory(swigCPtr, this);
  }

  public void SetCcdAdc12BitGain(int gain) {
    jlibapogeeJNI.Alta_SetCcdAdc12BitGain(swigCPtr, this, gain);
  }

  public void SetCcdAdc12BitOffset(int offset) {
    jlibapogeeJNI.Alta_SetCcdAdc12BitOffset(swigCPtr, this, offset);
  }

  public int GetCcdAdc12BitGain() {
    return jlibapogeeJNI.Alta_GetCcdAdc12BitGain(swigCPtr, this);
  }

  public int GetCcdAdc12BitOffset() {
    return jlibapogeeJNI.Alta_GetCcdAdc12BitOffset(swigCPtr, this);
  }

  public double GetCcdAdc16BitGain() {
    return jlibapogeeJNI.Alta_GetCcdAdc16BitGain(swigCPtr, this);
  }

  public int GetNumAds() {
    return jlibapogeeJNI.Alta_GetNumAds(swigCPtr, this);
  }

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

  public double GetCoolerDrive() {
    return jlibapogeeJNI.Alta_GetCoolerDrive(swigCPtr, this);
  }

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

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

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

  public double GetTempHeatsink() {
    return jlibapogeeJNI.Alta_GetTempHeatsink(swigCPtr, this);
  }

  public String GetMacAddress() {
    return jlibapogeeJNI.Alta_GetMacAddress(swigCPtr, this);
  }

  public void OpenSerial(int PortId) {
    jlibapogeeJNI.Alta_OpenSerial(swigCPtr, this, PortId);
  }

  public void CloseSerial(int PortId) {
    jlibapogeeJNI.Alta_CloseSerial(swigCPtr, this, PortId);
  }

  public void SetSerialBaudRate(int PortId, long BaudRate) {
    jlibapogeeJNI.Alta_SetSerialBaudRate(swigCPtr, this, PortId, BaudRate);
  }

  public long GetSerialBaudRate(int PortId) {
    return jlibapogeeJNI.Alta_GetSerialBaudRate(swigCPtr, this, PortId);
  }

  public SerialFC GetSerialFlowControl(int PortId) {
    return SerialFC.swigToEnum(jlibapogeeJNI.Alta_GetSerialFlowControl(swigCPtr, this, PortId));
  }

  public void SetSerialFlowControl(int PortId, SerialFC FlowControl) {
    jlibapogeeJNI.Alta_SetSerialFlowControl(swigCPtr, this, PortId, FlowControl.swigValue());
  }

  public SerialParity GetSerialParity(int PortId) {
    return SerialParity.swigToEnum(jlibapogeeJNI.Alta_GetSerialParity(swigCPtr, this, PortId));
  }

  public void SetSerialParity(int PortId, SerialParity Parity) {
    jlibapogeeJNI.Alta_SetSerialParity(swigCPtr, this, PortId, Parity.swigValue());
  }

  public String ReadSerial(int PortId) {
    return jlibapogeeJNI.Alta_ReadSerial(swigCPtr, this, PortId);
  }

  public void WriteSerial(int PortId, String buffer) {
    jlibapogeeJNI.Alta_WriteSerial(swigCPtr, this, PortId, buffer);
  }

}
