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

package com.nanotec.nanolib;

public class SamplerConfiguration {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected SamplerConfiguration(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

  protected static long swigRelease(SamplerConfiguration obj) {
    long ptr = 0;
    if (obj != null) {
      if (!obj.swigCMemOwn)
        throw new RuntimeException("Cannot release ownership as memory is not owned");
      ptr = obj.swigCPtr;
      obj.swigCMemOwn = false;
      obj.delete();
    }
    return ptr;
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        NanolibJNI.delete_SamplerConfiguration(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setVersion(long value) {
    NanolibJNI.SamplerConfiguration_version_set(swigCPtr, this, value);
  }

  public long getVersion() {
    return NanolibJNI.SamplerConfiguration_version_get(swigCPtr, this);
  }

  public void setMode(SamplerMode value) {
    NanolibJNI.SamplerConfiguration_mode_set(swigCPtr, this, value.swigValue());
  }

  public SamplerMode getMode() {
    return SamplerMode.swigToEnum(NanolibJNI.SamplerConfiguration_mode_get(swigCPtr, this));
  }

  public void setUsingSoftwareImplementation(boolean value) {
    NanolibJNI.SamplerConfiguration_usingSoftwareImplementation_set(swigCPtr, this, value);
  }

  public boolean getUsingSoftwareImplementation() {
    return NanolibJNI.SamplerConfiguration_usingSoftwareImplementation_get(swigCPtr, this);
  }

  public void setUsingNewFWSamplerImplementation(boolean value) {
    NanolibJNI.SamplerConfiguration_usingNewFWSamplerImplementation_set(swigCPtr, this, value);
  }

  public boolean getUsingNewFWSamplerImplementation() {
    return NanolibJNI.SamplerConfiguration_usingNewFWSamplerImplementation_get(swigCPtr, this);
  }

  public void setPeriodMilliseconds(int value) {
    NanolibJNI.SamplerConfiguration_periodMilliseconds_set(swigCPtr, this, value);
  }

  public int getPeriodMilliseconds() {
    return NanolibJNI.SamplerConfiguration_periodMilliseconds_get(swigCPtr, this);
  }

  public void setDurationMilliseconds(long value) {
    NanolibJNI.SamplerConfiguration_durationMilliseconds_set(swigCPtr, this, value);
  }

  public long getDurationMilliseconds() {
    return NanolibJNI.SamplerConfiguration_durationMilliseconds_get(swigCPtr, this);
  }

  public void setPreTriggerNumberOfSamples(int value) {
    NanolibJNI.SamplerConfiguration_preTriggerNumberOfSamples_set(swigCPtr, this, value);
  }

  public int getPreTriggerNumberOfSamples() {
    return NanolibJNI.SamplerConfiguration_preTriggerNumberOfSamples_get(swigCPtr, this);
  }

  public void setStartTrigger(SamplerTrigger value) {
    NanolibJNI.SamplerConfiguration_startTrigger_set(swigCPtr, this, SamplerTrigger.getCPtr(value), value);
  }

  public SamplerTrigger getStartTrigger() {
    long cPtr = NanolibJNI.SamplerConfiguration_startTrigger_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SamplerTrigger(cPtr, false);
  }

  public void setStopTrigger(SamplerTrigger value) {
    NanolibJNI.SamplerConfiguration_stopTrigger_set(swigCPtr, this, SamplerTrigger.getCPtr(value), value);
  }

  public SamplerTrigger getStopTrigger() {
    long cPtr = NanolibJNI.SamplerConfiguration_stopTrigger_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SamplerTrigger(cPtr, false);
  }

  public void setTrackedAddresses(OdIndexVector value) {
    NanolibJNI.SamplerConfiguration_trackedAddresses_set(swigCPtr, this, OdIndexVector.getCPtr(value), value);
  }

  public OdIndexVector getTrackedAddresses() {
    long cPtr = NanolibJNI.SamplerConfiguration_trackedAddresses_get(swigCPtr, this);
    return (cPtr == 0) ? null : new OdIndexVector(cPtr, false);
  }

  public SamplerConfiguration() {
    this(NanolibJNI.new_SamplerConfiguration(), true);
  }

  public final static long SAMPLER_CONFIGURATION_VERSION = NanolibJNI.SamplerConfiguration_SAMPLER_CONFIGURATION_VERSION_get();
  public final static long MAX_TRACKED_ADDRESSES = NanolibJNI.SamplerConfiguration_MAX_TRACKED_ADDRESSES_get();
}
