[in] String which should be automatically removed from the device response.
SetTrailingForReads
Specifies the string that should be automatically stripped from the device response.
Syntax
Section titled “Syntax”virtual void SetTrailingForReads(const CString& str) abstract;Parameters
Section titled “Parameters”str
Remarks
Section titled “Remarks”Many instruments return trailing characters, such as “\n”, in their response strings. This function is used to automatically have these trailing characters removed from device response strings. The trailing characters specified can be a single character or an entire string. If more than one character is specified in the str parameter, then the device response must be terminated with the entire string in order for it to be removed. No error is generated if a device response does not end in the specified trailing string.
The default trailing string is the line feed character “\n”.
Example
Section titled “Example”The following example demonstrates use of the SetTrailingForReads function.
HRESULT Acme4321::OnFinalInitialize(){ HRESULT hr = S_OK;
// Response strings will be stripped of CR/LF combination, if present hr = io.SetTrailingForReads(_T("\r\n"));
return hr;}