public void DpnupHandleControllerData(int hand, ref DpnnControllerStateRecordOriginal src, ref DpnnControllerStateRecord dest) { if (_device != IntPtr.Zero) { DpnpUnity.DpnupHandleControllerData(_device, hand, ref src, ref dest); } }
public void DpnupBootPair(bool value) { if (_device != IntPtr.Zero) { DpnpUnity.DpnupBootPair(_device, value); } }
public void DpnupRegisterRererencePositionFunction(int index, IntPtr callback, IntPtr userData) { if (_device != IntPtr.Zero) { DpnpUnity.DpnupRegisterRererencePositionFunction(_device, index, callback, userData); } }
public void DpnupPause() { if (_device != IntPtr.Zero) { DpnpUnity.DpnupPause(_device); } }
public void DpnupSetUnbindDevice() { if (_device != IntPtr.Zero) { DpnpUnity.DpnupSetUnbindDevice(_device); } }
public void DpnupRegisterEventNotificationFunction(DpnpUnity.DpnpHandleEventFunc callback, int event_mask, IntPtr userData) { if (_device != IntPtr.Zero) { DpnpUnity.DpnupRegisterEventNotificationFunction(_device, callback, event_mask, userData); } }
public void DpnupWriteDeviceFeedback(int index, float value) { if (_device != IntPtr.Zero) { DpnpUnity.DpnupWriteDeviceFeedback(_device, index, value); } }
public int DpnupReadDeviceButton(int index) { if (_device != IntPtr.Zero) { return(DpnpUnity.DpnupReadDeviceButton(_device, index)); } return(0); }
public int DpnupSetDeviceAttribute(int index, IntPtr buffer, int buffer_length) { if (_device != IntPtr.Zero) { return(DpnpUnity.DpnupSetDeviceAttribute(_device, index, buffer, buffer_length)); } return(0); }
public double DpnupReadDeviceTime(int index) { if (_device != IntPtr.Zero) { return(DpnpUnity.DpnupReadDeviceTime(_device, index)); } return(0); }
public string DpnupReadDeviceId() { if (_device != IntPtr.Zero) { return(Marshal.PtrToStringAnsi(DpnpUnity.DpnupReadDeviceId(_device))); } return(""); }
public int DpnupGetDeviceFeedbackCount() { if (_device != IntPtr.Zero) { return(DpnpUnity.DpnupGetDeviceFeedbackCount(_device)); } return(0); }
public int DpnupGetDeviceAttributeCount() { if (_device != IntPtr.Zero) { return(DpnpUnity.DpnupGetDeviceAttributeCount(_device)); } return(0); }
public int DpnupGetDeviceQuaternionCount() { if (_device != IntPtr.Zero) { return(DpnpUnity.DpnupGetDeviceQuaternionCount(_device)); } return(0); }
public void DpnupCloseDevice() { if (_device != IntPtr.Zero) { DpnpUnity.DpnupCloseDevice(_device); _device = IntPtr.Zero; } }
public float DpnupReadDeviceAxis(int index) { if (_device != IntPtr.Zero) { return(DpnpUnity.DpnupReadDeviceAxis(_device, index)); } return(0.0f); }
public string DpnupGetAssociatedDevice(DPNP_DEVICE_TYPE type) { if (_device != IntPtr.Zero) { return(Marshal.PtrToStringAnsi(DpnpUnity.DpnupGetAssociatedDevice(_device, type))); } return(""); }
public string DpnupGetBondDeviceName() { if (_device != IntPtr.Zero) { byte[] name = new byte[1024]; DpnpUnity.DpnupGetBondDeviceName(_device, ref name[0]); return(System.Text.Encoding.Default.GetString(name, 0, name.Length)); } return(""); }
public void DpnupResetDevicePosition(int index, float[] position) { if (position.Length < DpnpUnity.DPNP_VALUE_TYPE_SIZE_POSITION) { return; } if (_device != IntPtr.Zero) { DpnpUnity.DpnupResetDevicePosition(_device, index, position); } }
public bool DpnupReadDevicePosition(int index, float[] position) { if (position.Length < DpnpUnity.DPNP_VALUE_TYPE_SIZE_POSITION) { return(false); } if (_device != IntPtr.Zero) { return(DpnpUnity.DpnupReadDevicePosition(_device, index, position)); } return(false); }
public bool DpnupReadDeviceQuaternion(int index, float[] quaternion) { if (quaternion.Length < DpnpUnity.DPNP_VALUE_TYPE_SIZE_QUATERNION) { return(false); } if (_device != IntPtr.Zero) { return(DpnpUnity.DpnupReadDeviceQuaternion(_device, index, quaternion)); } return(false); }
public bool DpnupReadDeviceVector(int index, float[] vector) { if (vector.Length < DpnpUnity.DPNP_VALUE_TYPE_SIZE_VECTOR) { return(false); } if (_device != IntPtr.Zero) { return(DpnpUnity.DpnupReadDeviceVector(_device, index, vector)); } return(false); }
public static DpnPeripheral DpnupOpenDevice(string deviceId) { IntPtr device = IntPtr.Zero; if (deviceId == null) { return(null); } if (deviceId != string.Empty) { device = DpnpUnity.DpnupOpenDevice(Marshal.StringToHGlobalAnsi(deviceId)); return(device != IntPtr.Zero ? new DpnPeripheral(device, deviceId) : null); } else { return(new DpnPeripheral(device, deviceId)); } }
public static string DpnupGetDeviceId(DPNP_DEVICE_TYPE type, int index) { return(Marshal.PtrToStringAnsi(DpnpUnity.DpnupGetDeviceId(type, index))); }
public static int DpnupQueryDeviceCount(DPNP_DEVICE_TYPE type) { return(DpnpUnity.DpnupQueryDeviceCount(type)); }