[in] String which should be automatically appended to device command strings.
SetTrailingForWrites
Specifies the string that should be automatically appended to strings sent to the instrument.
Syntax
Section titled “Syntax”virtual void SetTrailingForWrites(const CString& str) abstract;Parameters
Section titled “Parameters”str
Remarks
Section titled “Remarks”Many instruments require that command strings be terminated with a special character sequence. Rather than explicitly inserting these trailing characters into each command sent to the instrument, the SetTrailingForWrites function can be used to specify a set of characters that will automatically be appended to each command string sent to the device.
The default trailing string is the line feed character “\n”.
Example
Section titled “Example”The following example demonstrates use of the SetTrailingForWrites function.
HRESULT Acme4321::OnFinalInitialize(){ HRESULT hr = S_OK;
// Command strings will be automatically be appended with a CR/LF combination hr = io.SetTrailingForWrites(_T("\r\n"));
return hr;}