//------------------------------------------------------------------------------
// <auto-generated />
//
// 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.
//------------------------------------------------------------------------------

namespace  Nlc {

public class SamplerConfiguration : global::System.IDisposable {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal SamplerConfiguration(global::System.IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SamplerConfiguration obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  internal static global::System.Runtime.InteropServices.HandleRef swigRelease(SamplerConfiguration obj) {
    if (obj != null) {
      if (!obj.swigCMemOwn)
        throw new global::System.ApplicationException("Cannot release ownership as memory is not owned");
      global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
      obj.swigCMemOwn = false;
      obj.Dispose();
      return ptr;
    } else {
      return new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
    }
  }

  ~SamplerConfiguration() {
    Dispose(false);
  }

  public void Dispose() {
    Dispose(true);
    global::System.GC.SuppressFinalize(this);
  }

  protected virtual void Dispose(bool disposing) {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          NanolibPINVOKE.delete_SamplerConfiguration(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
    }
  }

  public uint version {
    set {
      NanolibPINVOKE.SamplerConfiguration_version_set(swigCPtr, value);
    } 
    get {
      uint ret = NanolibPINVOKE.SamplerConfiguration_version_get(swigCPtr);
      return ret;
    } 
  }

  public SamplerMode mode {
    set {
      NanolibPINVOKE.SamplerConfiguration_mode_set(swigCPtr, (int)value);
    } 
    get {
      SamplerMode ret = (SamplerMode)NanolibPINVOKE.SamplerConfiguration_mode_get(swigCPtr);
      return ret;
    } 
  }

  public bool usingSoftwareImplementation {
    set {
      NanolibPINVOKE.SamplerConfiguration_usingSoftwareImplementation_set(swigCPtr, value);
    } 
    get {
      bool ret = NanolibPINVOKE.SamplerConfiguration_usingSoftwareImplementation_get(swigCPtr);
      return ret;
    } 
  }

  public bool usingNewFWSamplerImplementation {
    set {
      NanolibPINVOKE.SamplerConfiguration_usingNewFWSamplerImplementation_set(swigCPtr, value);
    } 
    get {
      bool ret = NanolibPINVOKE.SamplerConfiguration_usingNewFWSamplerImplementation_get(swigCPtr);
      return ret;
    } 
  }

  public ushort periodMilliseconds {
    set {
      NanolibPINVOKE.SamplerConfiguration_periodMilliseconds_set(swigCPtr, value);
    } 
    get {
      ushort ret = NanolibPINVOKE.SamplerConfiguration_periodMilliseconds_get(swigCPtr);
      return ret;
    } 
  }

  public uint durationMilliseconds {
    set {
      NanolibPINVOKE.SamplerConfiguration_durationMilliseconds_set(swigCPtr, value);
    } 
    get {
      uint ret = NanolibPINVOKE.SamplerConfiguration_durationMilliseconds_get(swigCPtr);
      return ret;
    } 
  }

  public ushort preTriggerNumberOfSamples {
    set {
      NanolibPINVOKE.SamplerConfiguration_preTriggerNumberOfSamples_set(swigCPtr, value);
    } 
    get {
      ushort ret = NanolibPINVOKE.SamplerConfiguration_preTriggerNumberOfSamples_get(swigCPtr);
      return ret;
    } 
  }

  public SamplerTrigger startTrigger {
    set {
      NanolibPINVOKE.SamplerConfiguration_startTrigger_set(swigCPtr, SamplerTrigger.getCPtr(value));
    } 
    get {
      global::System.IntPtr cPtr = NanolibPINVOKE.SamplerConfiguration_startTrigger_get(swigCPtr);
      SamplerTrigger ret = (cPtr == global::System.IntPtr.Zero) ? null : new SamplerTrigger(cPtr, false);
      return ret;
    } 
  }

  public SamplerTrigger stopTrigger {
    set {
      NanolibPINVOKE.SamplerConfiguration_stopTrigger_set(swigCPtr, SamplerTrigger.getCPtr(value));
    } 
    get {
      global::System.IntPtr cPtr = NanolibPINVOKE.SamplerConfiguration_stopTrigger_get(swigCPtr);
      SamplerTrigger ret = (cPtr == global::System.IntPtr.Zero) ? null : new SamplerTrigger(cPtr, false);
      return ret;
    } 
  }

  public OdIndexVector trackedAddresses {
    set {
      NanolibPINVOKE.SamplerConfiguration_trackedAddresses_set(swigCPtr, OdIndexVector.getCPtr(value));
    } 
    get {
      global::System.IntPtr cPtr = NanolibPINVOKE.SamplerConfiguration_trackedAddresses_get(swigCPtr);
      OdIndexVector ret = (cPtr == global::System.IntPtr.Zero) ? null : new OdIndexVector(cPtr, false);
      return ret;
    } 
  }

  public SamplerConfiguration() : this(NanolibPINVOKE.new_SamplerConfiguration(), true) {
  }

  public static readonly uint SAMPLER_CONFIGURATION_VERSION = NanolibPINVOKE.SamplerConfiguration_SAMPLER_CONFIGURATION_VERSION_get();
  public static readonly uint MAX_TRACKED_ADDRESSES = NanolibPINVOKE.SamplerConfiguration_MAX_TRACKED_ADDRESSES_get();
}

}
