// to disconnect public static int DisconnectCS200() { StringBuilder returnString = new StringBuilder(250); string cMeasure = "RMT,0\r\n"; int length = cMeasure.Length; int r = CaptureEngine.write64_usb(0, cMeasure, 1, length); r = CaptureEngine.read64_usb(0, returnString, 1, 250); int i = CaptureEngine.end_usb(0); return(i); }
/// <summary> /// function to connect cs200 /// </summary> /// <returns>1 if connected sucessfully ,0 if not</returns> public static int ConnectToCS200() { int i = CaptureEngine.end_usb(0); StringBuilder returnString = new StringBuilder(250); int numOfDevices = CaptureEngine.get_num(); //to check if the device is connected if (numOfDevices > 0) { int returnvar = CaptureEngine.int_usb(0); string cRemote = "RMT,1\r\n"; int length = cRemote.Length; int r = CaptureEngine.write64_usb(0, cRemote, 1, length); r = CaptureEngine.read64_usb(0, returnString, 1, 250); return(returnvar); } else { return(1); } }