[in] Instrument model.
ModelInFamily
Indicates if the specified model is a member of the specified family.
Syntax
Section titled “Syntax”bool ModelInFamily(const CString& strModel, const CString& strFamily) const;Parameters
Section titled “Parameters”strModel
strFamily
[in] Instrument family.
Return value
Section titled “Return value”Returns true if the specified model is in the specified family.
Example
Section titled “Example”The following example demonstrates use of the ModelInFamily function.
HRESULT Acme4321::Configure(double Frequency, double Gain){ HRESULT hr = S_OK;
// There are three families of instruments: "Acme432X", "Acme433X", "Acme434X".
// Get the current model CString strModel = GetModel();
// The SCPI command is slightly different for the models in the "Acme433X" family CString strCmdFmt; if (ModelInFamily(strModel, _T("Acme433X"))) { strCmdFmt = _T("FREQ %.15g;GAIN %.15g"); } else { strCmdFmt = _T("FREQX %.15g;GAINX %.15g"); }
hr = io.Printf(strCmdFmt, Frequency, Gain);
return hr;}