private ScpiResult SetTimeout(int vi, int timeout) { var result = new ScpiResult(); int attr = VisaInteropAttribute.VI_ATTR_TMO_VALUE; int status = VisaInterop.viSetAttribute(vi, attr, timeout); if (VisaInteropUtil.Failed(status)) { result.Succeed = false; result.Message = VisaInteropUtil.GetStatusDescription(vi, status); } else { result.Succeed = true; } return(result); }
private static ScpiResult enableTermination(int vi) { var result = new ScpiResult(); // Enable termination character if required for this session type (serial and socket). if (IsTermCharTerminationRequired(vi)) { var status = VisaInterop.viSetAttribute(vi, VisaInteropAttribute.VI_ATTR_TERMCHAR_EN, 1); if (VisaInteropUtil.Failed(status)) { result.Succeed = false; result.Message = VisaInteropUtil.GetStatusDescription(vi, status); } else { result.Succeed = true; } } return(result); }