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

namespace  Nlc {

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

  internal ProfinetDCP(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(ProfinetDCP obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  ~ProfinetDCP() {
    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_ProfinetDCP(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
    }
  }

  public virtual uint getScanTimeout() {
    uint ret = NanolibPINVOKE.ProfinetDCP_getScanTimeout(swigCPtr);
    return ret;
  }

  public virtual void setScanTimeout(uint timeoutMsec) {
    NanolibPINVOKE.ProfinetDCP_setScanTimeout(swigCPtr, timeoutMsec);
  }

  public virtual uint getResponseTimeout() {
    uint ret = NanolibPINVOKE.ProfinetDCP_getResponseTimeout(swigCPtr);
    return ret;
  }

  public virtual void setResponseTimeout(uint timeoutMsec) {
    NanolibPINVOKE.ProfinetDCP_setResponseTimeout(swigCPtr, timeoutMsec);
  }

  public virtual ResultProfinetDevices scanProfinetDevices(BusHardwareId busHardwareId) {
    ResultProfinetDevices ret = new ResultProfinetDevices(NanolibPINVOKE.ProfinetDCP_scanProfinetDevices(swigCPtr, BusHardwareId.getCPtr(busHardwareId)), true);
    if (NanolibPINVOKE.SWIGPendingException.Pending) throw NanolibPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual ResultVoid setupProfinetDevice(BusHardwareId busHardwareId, ProfinetDevice profinetDevice, bool savePermanent) {
    ResultVoid ret = new ResultVoid(NanolibPINVOKE.ProfinetDCP_setupProfinetDevice(swigCPtr, BusHardwareId.getCPtr(busHardwareId), ProfinetDevice.getCPtr(profinetDevice), savePermanent), true);
    if (NanolibPINVOKE.SWIGPendingException.Pending) throw NanolibPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual ResultVoid resetProfinetDevice(BusHardwareId busHardwareId, ProfinetDevice profinetDevice) {
    ResultVoid ret = new ResultVoid(NanolibPINVOKE.ProfinetDCP_resetProfinetDevice(swigCPtr, BusHardwareId.getCPtr(busHardwareId), ProfinetDevice.getCPtr(profinetDevice)), true);
    if (NanolibPINVOKE.SWIGPendingException.Pending) throw NanolibPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public virtual ResultVoid blinkProfinetDevice(BusHardwareId busHardwareId, ProfinetDevice profinetDevice) {
    ResultVoid ret = new ResultVoid(NanolibPINVOKE.ProfinetDCP_blinkProfinetDevice(swigCPtr, BusHardwareId.getCPtr(busHardwareId), ProfinetDevice.getCPtr(profinetDevice)), true);
    if (NanolibPINVOKE.SWIGPendingException.Pending) throw NanolibPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
