/******************************************************************************
 *                                                                         
 *               Nimbus auto-generated file
 *               !!! WARNING !!! -- DO NOT DIRECTLY EDIT THE CONTENTS OF THIS FILE.
 *				 Changes will be OVERWRITTEN by NIMBUS.
 *
 *****************************************************************************/
#include "StdAfx.h"
#include "CoAgilent34951A.h"


HRESULT IAgilent34951A_get_Source(Agilent34951A* pT, IAgilent34951ASource** val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951A"), _T("get_Source"));
	NTL_METHOD_START(IAgilent34951A, get_Source);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Source"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34951A"), _T("get_Source"), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951A_get_Source(val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951A_get_Trace(Agilent34951A* pT, IAgilent34951ATrace** val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951A"), _T("get_Trace"));
	NTL_METHOD_START(IAgilent34951A, get_Trace);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Trace"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34951A"), _T("get_Trace"), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951A_get_Trace(val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951A_get_Trigger(Agilent34951A* pT, IAgilent34951ATrigger** val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951A"), _T("get_Trigger"));
	NTL_METHOD_START(IAgilent34951A, get_Trigger);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Trigger"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34951A"), _T("get_Trigger"), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951A_get_Trigger(val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951A_get_Output(Agilent34951A* pT, IAgilent34951AOutput** val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951A"), _T("get_Output"));
	NTL_METHOD_START(IAgilent34951A, get_Output);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Output"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34951A"), _T("get_Output"), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951A_get_Output(val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ACurrent_Configure(Agilent34951A* pT, BSTR ChannelList, double Level)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ACurrent"), _T("Configure"));
	NTL_METHOD_START(IAgilent34951ACurrent, Configure);
	CMethodTrace mt(pT, _T("IAgilent34951ACurrent"), _T("Configure"), IN_PARAM(ChannelList), IN_PARAM(Level), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:CURR %.15g, (@%s);"), Level, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ACurrent_Configure(ChannelList, Level);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ACurrent_get_Level(Agilent34951A* pT, BSTR ChannelList, double* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ACurrent"), _T("get_Level"));
	NTL_METHOD_START(IAgilent34951ACurrent, get_Level);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Level"), _T("val"));
		*val = 0.0;
	CMethodTrace mt(pT, _T("IAgilent34951ACurrent"), _T("get_Level"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:CURR? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ACurrent_get_Level(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ACurrent_put_Level(Agilent34951A* pT, BSTR ChannelList, double val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ACurrent"), _T("put_Level"));
	NTL_METHOD_START(IAgilent34951ACurrent, put_Level);
	CMethodTrace mt(pT, _T("IAgilent34951ACurrent"), _T("put_Level"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:CURR %.15g, (@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ACurrent_put_Level(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ACurrent_get_Gain(Agilent34951A* pT, BSTR ChannelList, double* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ACurrent"), _T("get_Gain"));
	NTL_METHOD_START(IAgilent34951ACurrent, get_Gain);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Gain"), _T("val"));
		*val = 0.0;
	CMethodTrace mt(pT, _T("IAgilent34951ACurrent"), _T("get_Gain"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:CURR:GAIN? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ACurrent_get_Gain(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ACurrent_put_Gain(Agilent34951A* pT, BSTR ChannelList, double val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ACurrent"), _T("put_Gain"));
	NTL_METHOD_START(IAgilent34951ACurrent, put_Gain);
	CMethodTrace mt(pT, _T("IAgilent34951ACurrent"), _T("put_Gain"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:CURR:GAIN %.15g,(@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ACurrent_put_Gain(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ACurrent_get_Offset(Agilent34951A* pT, BSTR ChannelList, double* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ACurrent"), _T("get_Offset"));
	NTL_METHOD_START(IAgilent34951ACurrent, get_Offset);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Offset"), _T("val"));
		*val = 0.0;
	CMethodTrace mt(pT, _T("IAgilent34951ACurrent"), _T("get_Offset"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:CURR:OFFS? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ACurrent_get_Offset(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ACurrent_put_Offset(Agilent34951A* pT, BSTR ChannelList, double val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ACurrent"), _T("put_Offset"));
	NTL_METHOD_START(IAgilent34951ACurrent, put_Offset);
	CMethodTrace mt(pT, _T("IAgilent34951ACurrent"), _T("put_Offset"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:CURR:OFFS %.15g, (@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ACurrent_put_Offset(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951AOutput_get_State(Agilent34951A* pT, BSTR ChannelList, VARIANT_BOOL* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951AOutput"), _T("get_State"));
	NTL_METHOD_START(IAgilent34951AOutput, get_State);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_State"), _T("val"));
		*val = VARIANT_TRUE;
	CMethodTrace mt(pT, _T("IAgilent34951AOutput"), _T("get_State"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":OUTP:STAT? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951AOutput_get_State(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951AOutput_put_State(Agilent34951A* pT, BSTR ChannelList, VARIANT_BOOL val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951AOutput"), _T("put_State"));
	NTL_METHOD_START(IAgilent34951AOutput, put_State);
	CMethodTrace mt(pT, _T("IAgilent34951AOutput"), _T("put_State"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":OUTP:STAT %s, (@%s)"), val == VARIANT_FALSE ? "0" : "1", LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951AOutput_put_State(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_ApplyLevel(Agilent34951A* pT, BSTR ChannelList, Agilent34951AFunctionTypeEnum Function, double Level)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("ApplyLevel"));
	NTL_METHOD_START(IAgilent34951ASource, ApplyLevel);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("ApplyLevel"), IN_PARAM(ChannelList), IN_PARAM(Function), IN_PARAM(Level), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:MODE %s, (@%s); :SOUR:FUNC:ENAB OFF, (@%s); :SOUR:%s %.15g, (@%s); :OUTP:STAT ON, (@%s)"), pT->EnumToString<Agilent34951AFunctionTypeEnum>(Function), LPCTSTR(COLE2T(ChannelList)), LPCTSTR(COLE2T(ChannelList)), pT->EnumToString<Agilent34951AFunctionTypeEnum>(Function), Level, LPCTSTR(COLE2T(ChannelList)), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_ApplyLevel(ChannelList, Function, Level);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_ApplyTrace(Agilent34951A* pT, BSTR ChannelList, BSTR TraceName, Agilent34951AFunctionTypeEnum Function, double Gain, double Offset, double Frequency)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("ApplyTrace"));
	NTL_METHOD_START(IAgilent34951ASource, ApplyTrace);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("ApplyTrace"), IN_PARAM(ChannelList), IN_PARAM(TraceName), IN_PARAM(Function), IN_PARAM(Gain), IN_PARAM(Offset), IN_PARAM(Frequency), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_ApplyTrace(ChannelList, TraceName, Function, Gain, Offset, Frequency);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_ConfigureTrace(Agilent34951A* pT, BSTR ChannelList, Agilent34951AFunctionTypeEnum Function, BSTR TraceName, double Gain, double Offset)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("ConfigureTrace"));
	NTL_METHOD_START(IAgilent34951ASource, ConfigureTrace);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("ConfigureTrace"), IN_PARAM(ChannelList), IN_PARAM(Function), IN_PARAM(TraceName), IN_PARAM(Gain), IN_PARAM(Offset), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_ConfigureTrace(ChannelList, Function, TraceName, Gain, Offset);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_StartTrace(Agilent34951A* pT, BSTR ChannelList, long NumCycles, long StartIndex)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("StartTrace"));
	NTL_METHOD_START(IAgilent34951ASource, StartTrace);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("StartTrace"), IN_PARAM(ChannelList), IN_PARAM(NumCycles), IN_PARAM(StartIndex), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_StartTrace(ChannelList, NumCycles, StartIndex);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_HaltTrace(Agilent34951A* pT, BSTR ChannelList)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("HaltTrace"));
	NTL_METHOD_START(IAgilent34951ASource, HaltTrace);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("HaltTrace"), IN_PARAM(ChannelList), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T("SOUR:FUNC:HALT (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_HaltTrace(ChannelList);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_get_OperationMode(Agilent34951A* pT, BSTR ChannelList, VARIANT_BOOL* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("get_OperationMode"));
	NTL_METHOD_START(IAgilent34951ASource, get_OperationMode);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_OperationMode"), _T("val"));
		*val = VARIANT_TRUE;
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("get_OperationMode"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:ENAB? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_get_OperationMode(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_put_OperationMode(Agilent34951A* pT, BSTR ChannelList, VARIANT_BOOL val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("put_OperationMode"));
	NTL_METHOD_START(IAgilent34951ASource, put_OperationMode);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("put_OperationMode"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:ENAB %s, (@%s)"), val == VARIANT_FALSE ? "0" : "1", LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_put_OperationMode(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_get_FunctionType(Agilent34951A* pT, BSTR ChannelList, Agilent34951AFunctionTypeEnum* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("get_FunctionType"));
	NTL_METHOD_START(IAgilent34951ASource, get_FunctionType);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_FunctionType"), _T("val"));
		*val = Agilent34951AFunctionTypeCurrent;
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("get_FunctionType"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:MODE? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_get_FunctionType(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_put_FunctionType(Agilent34951A* pT, BSTR ChannelList, Agilent34951AFunctionTypeEnum val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("put_FunctionType"));
	NTL_METHOD_START(IAgilent34951ASource, put_FunctionType);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("put_FunctionType"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:MODE %s,(@%s)"), pT->EnumToString<Agilent34951AFunctionTypeEnum>(val), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_put_FunctionType(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_get_NumCycles(Agilent34951A* pT, BSTR ChannelList, long* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("get_NumCycles"));
	NTL_METHOD_START(IAgilent34951ASource, get_NumCycles);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_NumCycles"), _T("val"));
		*val = 0;
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("get_NumCycles"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRAC:NCYC? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_get_NumCycles(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_put_NumCycles(Agilent34951A* pT, BSTR ChannelList, long val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("put_NumCycles"));
	NTL_METHOD_START(IAgilent34951ASource, put_NumCycles);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("put_NumCycles"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRAC:NCYC %d, (@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_put_NumCycles(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_get_StartIndex(Agilent34951A* pT, BSTR ChannelLast, long* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("get_StartIndex"));
	NTL_METHOD_START(IAgilent34951ASource, get_StartIndex);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_StartIndex"), _T("val"));
		*val = 0;
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("get_StartIndex"), IN_PARAM(ChannelLast), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRAC:SIND? (@%s)"), LPCTSTR(COLE2T(ChannelLast)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_get_StartIndex(ChannelLast, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_put_StartIndex(Agilent34951A* pT, BSTR ChannelLast, long val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("put_StartIndex"));
	NTL_METHOD_START(IAgilent34951ASource, put_StartIndex);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("put_StartIndex"), IN_PARAM(ChannelLast), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRAC:SIND %d, (@%s)"), val, LPCTSTR(COLE2T(ChannelLast)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_put_StartIndex(ChannelLast, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_get_TraceName(Agilent34951A* pT, BSTR ChannelList, BSTR* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("get_TraceName"));
	NTL_METHOD_START(IAgilent34951ASource, get_TraceName);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_TraceName"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("get_TraceName"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRAC? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_get_TraceName(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_put_TraceName(Agilent34951A* pT, BSTR ChannelList, BSTR val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("put_TraceName"));
	NTL_METHOD_START(IAgilent34951ASource, put_TraceName);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("put_TraceName"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRAC %s, (@%s)"), LPCTSTR(COLE2T(val)), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_put_TraceName(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_get_Frequency(Agilent34951A* pT, BSTR ChannelList, double* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("get_Frequency"));
	NTL_METHOD_START(IAgilent34951ASource, get_Frequency);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Frequency"), _T("val"));
		*val = 0.0;
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("get_Frequency"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:FREQ? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_get_Frequency(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_put_Frequency(Agilent34951A* pT, BSTR ChannelList, double val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("put_Frequency"));
	NTL_METHOD_START(IAgilent34951ASource, put_Frequency);
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("put_Frequency"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:FREQ %.15g, (@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_put_Frequency(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_get_Current(Agilent34951A* pT, IAgilent34951ACurrent** val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("get_Current"));
	NTL_METHOD_START(IAgilent34951ASource, get_Current);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Current"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("get_Current"), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_get_Current(val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ASource_get_Voltage(Agilent34951A* pT, IAgilent34951AVoltage** val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ASource"), _T("get_Voltage"));
	NTL_METHOD_START(IAgilent34951ASource, get_Voltage);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Voltage"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34951ASource"), _T("get_Voltage"), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ASource_get_Voltage(val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrace_CreateCustomInteger(Agilent34951A* pT, long SlotNumber, BSTR Name, long Points, SAFEARRAY** DataArray)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrace"), _T("CreateCustomInteger"));
	NTL_METHOD_START(IAgilent34951ATrace, CreateCustomInteger);
	CMethodTrace mt(pT, _T("IAgilent34951ATrace"), _T("CreateCustomInteger"), IN_PARAM(SlotNumber), IN_PARAM(Name), IN_PARAM(Points), IN_PARAM(*DataArray), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":TRAC %d,%s,(%d | %d)"), SlotNumber, LPCTSTR(COLE2T(Name)), Points, Points);
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrace_CreateCustomInteger(SlotNumber, Name, Points, DataArray);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrace_CreateCustomFloat(Agilent34951A* pT, long SlotNumber, BSTR Name, long NumPoints, SAFEARRAY** DataArray)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrace"), _T("CreateCustomFloat"));
	NTL_METHOD_START(IAgilent34951ATrace, CreateCustomFloat);
	CMethodTrace mt(pT, _T("IAgilent34951ATrace"), _T("CreateCustomFloat"), IN_PARAM(SlotNumber), IN_PARAM(Name), IN_PARAM(NumPoints), IN_PARAM(*DataArray), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":TRAC %d,%s,(%d | %d"), SlotNumber, LPCTSTR(COLE2T(Name)), NumPoints, NumPoints);
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrace_CreateCustomFloat(SlotNumber, Name, NumPoints, DataArray);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrace_CreateStandard(Agilent34951A* pT, long SlotNumber, BSTR Name, long Points, Agilent34951ATraceWaveformEnum Type)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrace"), _T("CreateStandard"));
	NTL_METHOD_START(IAgilent34951ATrace, CreateStandard);
	CMethodTrace mt(pT, _T("IAgilent34951ATrace"), _T("CreateStandard"), IN_PARAM(SlotNumber), IN_PARAM(Name), IN_PARAM(Points), IN_PARAM(Type), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":TRAC:FUNC %d, %s, %s, %d"), SlotNumber, pT->EnumToString<Agilent34951ATraceWaveformEnum>(Type), LPCTSTR(COLE2T(Name)), Points);
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrace_CreateStandard(SlotNumber, Name, Points, Type);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrace_Delete(Agilent34951A* pT, long SlotNumber, BSTR TraceName)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrace"), _T("Delete"));
	NTL_METHOD_START(IAgilent34951ATrace, Delete);
	CMethodTrace mt(pT, _T("IAgilent34951ATrace"), _T("Delete"), IN_PARAM(SlotNumber), IN_PARAM(TraceName), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":TRAC:DEL:NAME %d,%s"), SlotNumber, LPCTSTR(COLE2T(TraceName)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrace_Delete(SlotNumber, TraceName);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrace_DeleteAll(Agilent34951A* pT, long SlotNumber)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrace"), _T("DeleteAll"));
	NTL_METHOD_START(IAgilent34951ATrace, DeleteAll);
	CMethodTrace mt(pT, _T("IAgilent34951ATrace"), _T("DeleteAll"), IN_PARAM(SlotNumber), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":TRAC:DEL:ALL %d"), SlotNumber);
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrace_DeleteAll(SlotNumber);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrace_CreateCustomFromFile(Agilent34951A* pT, long SlotNumber, BSTR Name, BSTR SourceFile)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrace"), _T("CreateCustomFromFile"));
	NTL_METHOD_START(IAgilent34951ATrace, CreateCustomFromFile);
	CMethodTrace mt(pT, _T("IAgilent34951ATrace"), _T("CreateCustomFromFile"), IN_PARAM(SlotNumber), IN_PARAM(Name), IN_PARAM(SourceFile), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrace_CreateCustomFromFile(SlotNumber, Name, SourceFile);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrace_get_Points(Agilent34951A* pT, long SlotNumber, BSTR Name, long* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrace"), _T("get_Points"));
	NTL_METHOD_START(IAgilent34951ATrace, get_Points);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Points"), _T("val"));
		*val = 0;
	CMethodTrace mt(pT, _T("IAgilent34951ATrace"), _T("get_Points"), IN_PARAM(SlotNumber), IN_PARAM(Name), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":TRAC:POIN? %d,%s"), SlotNumber, LPCTSTR(COLE2T(Name)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrace_get_Points(SlotNumber, Name, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrace_get_MemoryFree(Agilent34951A* pT, long SlotNumber, long* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrace"), _T("get_MemoryFree"));
	NTL_METHOD_START(IAgilent34951ATrace, get_MemoryFree);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_MemoryFree"), _T("val"));
		*val = 0;
	CMethodTrace mt(pT, _T("IAgilent34951ATrace"), _T("get_MemoryFree"), IN_PARAM(SlotNumber), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":TRAC:FREE? %d"), SlotNumber);
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrace_get_MemoryFree(SlotNumber, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrace_get_Catalog(Agilent34951A* pT, long SlotNumber, BSTR* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrace"), _T("get_Catalog"));
	NTL_METHOD_START(IAgilent34951ATrace, get_Catalog);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Catalog"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34951ATrace"), _T("get_Catalog"), IN_PARAM(SlotNumber), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":TRAC:CAT? %d"), SlotNumber);
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrace_get_Catalog(SlotNumber, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrigger_ConfigureInternalPacing(Agilent34951A* pT, BSTR ChannelList, Agilent34951ATraceTriggerSourceEnum TriggerSource, double Period)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrigger"), _T("ConfigureInternalPacing"));
	NTL_METHOD_START(IAgilent34951ATrigger, ConfigureInternalPacing);
	CMethodTrace mt(pT, _T("IAgilent34951ATrigger"), _T("ConfigureInternalPacing"), IN_PARAM(ChannelList), IN_PARAM(TriggerSource), IN_PARAM(Period), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRIG:SOUR %s, (@%s); :SOUR:FUNC:CLOC:SOUR INT, (@%s); :SOUR:FUNC:SAMP:PER %.15g, (@%s)"), pT->EnumToString<Agilent34951ATraceTriggerSourceEnum>(TriggerSource), LPCTSTR(COLE2T(ChannelList)), LPCTSTR(COLE2T(ChannelList)), Period, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrigger_ConfigureInternalPacing(ChannelList, TriggerSource, Period);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrigger_ConfigureExternalPacing(Agilent34951A* pT, BSTR ChannelList, Agilent34951ATraceTriggerSourceEnum TriggerSource, long Divisor)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrigger"), _T("ConfigureExternalPacing"));
	NTL_METHOD_START(IAgilent34951ATrigger, ConfigureExternalPacing);
	CMethodTrace mt(pT, _T("IAgilent34951ATrigger"), _T("ConfigureExternalPacing"), IN_PARAM(ChannelList), IN_PARAM(TriggerSource), IN_PARAM(Divisor), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRIG:SOUR %s,(@%s); :SOUR:FUNC:CLOC:SOUR EXT,(@%s); :SOUR:FUNC:CLOC:EXT:DIV %d,(@%s)"), pT->EnumToString<Agilent34951ATraceTriggerSourceEnum>(TriggerSource), LPCTSTR(COLE2T(ChannelList)), LPCTSTR(COLE2T(ChannelList)), Divisor, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrigger_ConfigureExternalPacing(ChannelList, TriggerSource, Divisor);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrigger_TriggerImmediate(Agilent34951A* pT, BSTR ChannelList)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrigger"), _T("TriggerImmediate"));
	NTL_METHOD_START(IAgilent34951ATrigger, TriggerImmediate);
	CMethodTrace mt(pT, _T("IAgilent34951ATrigger"), _T("TriggerImmediate"), IN_PARAM(ChannelList), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRIG:IMM (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrigger_TriggerImmediate(ChannelList);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrigger_get_Source(Agilent34951A* pT, BSTR ChannelList, Agilent34951ATraceTriggerSourceEnum* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrigger"), _T("get_Source"));
	NTL_METHOD_START(IAgilent34951ATrigger, get_Source);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Source"), _T("val"));
		*val = Agilent34951ATraceTriggerSourceManual;
	CMethodTrace mt(pT, _T("IAgilent34951ATrigger"), _T("get_Source"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRIG:SOUR? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrigger_get_Source(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrigger_put_Source(Agilent34951A* pT, BSTR ChannelList, Agilent34951ATraceTriggerSourceEnum val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrigger"), _T("put_Source"));
	NTL_METHOD_START(IAgilent34951ATrigger, put_Source);
	CMethodTrace mt(pT, _T("IAgilent34951ATrigger"), _T("put_Source"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:TRIG:SOUR %s, (@%s)"), pT->EnumToString<Agilent34951ATraceTriggerSourceEnum>(val), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrigger_put_Source(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrigger_get_ClockSource(Agilent34951A* pT, BSTR ChannelList, Agilent34951AClockSourceEnum* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrigger"), _T("get_ClockSource"));
	NTL_METHOD_START(IAgilent34951ATrigger, get_ClockSource);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_ClockSource"), _T("val"));
		*val = Agilent34951AClockSourceInternal;
	CMethodTrace mt(pT, _T("IAgilent34951ATrigger"), _T("get_ClockSource"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:CLOC:SOUR? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrigger_get_ClockSource(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrigger_put_ClockSource(Agilent34951A* pT, BSTR ChannelList, Agilent34951AClockSourceEnum val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrigger"), _T("put_ClockSource"));
	NTL_METHOD_START(IAgilent34951ATrigger, put_ClockSource);
	CMethodTrace mt(pT, _T("IAgilent34951ATrigger"), _T("put_ClockSource"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:CLOC:SOUR %s, (@%s)"), pT->EnumToString<Agilent34951AClockSourceEnum>(val), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrigger_put_ClockSource(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrigger_get_ClockPeriod(Agilent34951A* pT, BSTR ChannelList, double* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrigger"), _T("get_ClockPeriod"));
	NTL_METHOD_START(IAgilent34951ATrigger, get_ClockPeriod);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_ClockPeriod"), _T("val"));
		*val = 0.0;
	CMethodTrace mt(pT, _T("IAgilent34951ATrigger"), _T("get_ClockPeriod"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:SAMP:PER? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrigger_get_ClockPeriod(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951ATrigger_put_ClockPeriod(Agilent34951A* pT, BSTR ChannelList, double val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951ATrigger"), _T("put_ClockPeriod"));
	NTL_METHOD_START(IAgilent34951ATrigger, put_ClockPeriod);
	CMethodTrace mt(pT, _T("IAgilent34951ATrigger"), _T("put_ClockPeriod"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:SAMP:PER %.15g, (@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951ATrigger_put_ClockPeriod(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951AVoltage_Configure(Agilent34951A* pT, BSTR ChannelList, double Level)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951AVoltage"), _T("Configure"));
	NTL_METHOD_START(IAgilent34951AVoltage, Configure);
	CMethodTrace mt(pT, _T("IAgilent34951AVoltage"), _T("Configure"), IN_PARAM(ChannelList), IN_PARAM(Level), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:VOLT %.15g, (@%s);"), Level, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951AVoltage_Configure(ChannelList, Level);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951AVoltage_get_Gain(Agilent34951A* pT, BSTR ChannelList, double* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951AVoltage"), _T("get_Gain"));
	NTL_METHOD_START(IAgilent34951AVoltage, get_Gain);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Gain"), _T("val"));
		*val = 0.0;
	CMethodTrace mt(pT, _T("IAgilent34951AVoltage"), _T("get_Gain"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:VOLT:GAIN? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951AVoltage_get_Gain(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951AVoltage_put_Gain(Agilent34951A* pT, BSTR ChannelList, double val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951AVoltage"), _T("put_Gain"));
	NTL_METHOD_START(IAgilent34951AVoltage, put_Gain);
	CMethodTrace mt(pT, _T("IAgilent34951AVoltage"), _T("put_Gain"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:VOLT:GAIN %.15g, (@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951AVoltage_put_Gain(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951AVoltage_get_Level(Agilent34951A* pT, BSTR ChannelList, double* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951AVoltage"), _T("get_Level"));
	NTL_METHOD_START(IAgilent34951AVoltage, get_Level);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Level"), _T("val"));
		*val = 0.0;
	CMethodTrace mt(pT, _T("IAgilent34951AVoltage"), _T("get_Level"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:VOLT? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951AVoltage_get_Level(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951AVoltage_put_Level(Agilent34951A* pT, BSTR ChannelList, double val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951AVoltage"), _T("put_Level"));
	NTL_METHOD_START(IAgilent34951AVoltage, put_Level);
	CMethodTrace mt(pT, _T("IAgilent34951AVoltage"), _T("put_Level"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:VOLT %.15g, (@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951AVoltage_put_Level(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951AVoltage_get_Offset(Agilent34951A* pT, BSTR ChannelList, double* val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951AVoltage"), _T("get_Offset"));
	NTL_METHOD_START(IAgilent34951AVoltage, get_Offset);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Offset"), _T("val"));
		*val = 0.0;
	CMethodTrace mt(pT, _T("IAgilent34951AVoltage"), _T("get_Offset"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:VOLT:OFFS? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951AVoltage_get_Offset(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34951AVoltage_put_Offset(Agilent34951A* pT, BSTR ChannelList, double val)
{
	Agilent34951A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34951A"), _T("IAgilent34951AVoltage"), _T("put_Offset"));
	NTL_METHOD_START(IAgilent34951AVoltage, put_Offset);
	CMethodTrace mt(pT, _T("IAgilent34951AVoltage"), _T("put_Offset"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

	CString strCmd;
	CString strModel = pT->GetModel();

	strCmd.Format(_T(":SOUR:FUNC:VOLT:OFFS %.15g,(@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34951AVoltage_put_Offset(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}

