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


HRESULT IAgilent34945A_get_Channel(Agilent34945A* pT, IAgilent34945AChannel** val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945A"), _T("get_Channel"));
	NTL_METHOD_START(IAgilent34945A, get_Channel);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Channel"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34945A"), _T("get_Channel"), OUT_PARAM(val), NULL);

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

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

	return hr;
}
HRESULT IAgilent34945A_get_Module(Agilent34945A* pT, IAgilent34945AModule** val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945A"), _T("get_Module"));
	NTL_METHOD_START(IAgilent34945A, get_Module);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_Module"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34945A"), _T("get_Module"), OUT_PARAM(val), NULL);

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

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

	return hr;
}
HRESULT IAgilent34945A_get_System(Agilent34945A* pT, IAgilent34945ASystem** val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945A"), _T("get_System"));
	NTL_METHOD_START(IAgilent34945A, get_System);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_System"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34945A"), _T("get_System"), OUT_PARAM(val), NULL);

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

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

	return hr;
}
HRESULT IAgilent34945AChannel_Configure(Agilent34945A* pT, BSTR ChannelList, VARIANT_BOOL Paired, VARIANT_BOOL PulseMode, double PulseWidth, double RecoveryTime, double SettleTime)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("Configure"));
	NTL_METHOD_START(IAgilent34945AChannel, Configure);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("Configure"), IN_PARAM(ChannelList), IN_PARAM(Paired), IN_PARAM(PulseMode), IN_PARAM(PulseWidth), IN_PARAM(RecoveryTime), IN_PARAM(SettleTime), NULL);

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

	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_Configure(ChannelList, Paired, PulseMode, PulseWidth, RecoveryTime, SettleTime);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_Close(Agilent34945A* pT, BSTR ChannelList)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("Close"));
	NTL_METHOD_START(IAgilent34945AChannel, Close);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("Close"), IN_PARAM(ChannelList), NULL);

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

	strCmd.Format(_T(":ROUT:CLOS (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_Close(ChannelList);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_Open(Agilent34945A* pT, BSTR ChannelList)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("Open"));
	NTL_METHOD_START(IAgilent34945AChannel, Open);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("Open"), IN_PARAM(ChannelList), NULL);

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

	strCmd.Format(_T(":ROUT:OPEN (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_Open(ChannelList);
	pT->PopInstrCommand();

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

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

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

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

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:PAIR? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_get_PairedMode(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_put_PairedMode(Agilent34945A* pT, BSTR ChannelList, VARIANT_BOOL val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("put_PairedMode"));
	NTL_METHOD_START(IAgilent34945AChannel, put_PairedMode);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("put_PairedMode"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:PAIR %s, (@%s)"), val == VARIANT_FALSE ? "0" : "1", LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_put_PairedMode(ChannelList, val);
	pT->PopInstrCommand();

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

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:PULS? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_get_PulseMode(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_put_PulseMode(Agilent34945A* pT, BSTR ChannelList, VARIANT_BOOL val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("put_PulseMode"));
	NTL_METHOD_START(IAgilent34945AChannel, put_PulseMode);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("put_PulseMode"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:PULS %s, (@%s)"), val == VARIANT_FALSE ? "0" : "1", LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_put_PulseMode(ChannelList, val);
	pT->PopInstrCommand();

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

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:PULS:WIDT? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_get_PulseWidth(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_put_PulseWidth(Agilent34945A* pT, BSTR ChannelList, double val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("put_PulseWidth"));
	NTL_METHOD_START(IAgilent34945AChannel, put_PulseWidth);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("put_PulseWidth"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:PULS:WIDT %.15g, (@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_put_PulseWidth(ChannelList, val);
	pT->PopInstrCommand();

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

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:TIME:REC? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_get_RecoveryTime(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_put_RecoveryTime(Agilent34945A* pT, BSTR ChannelList, double val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("put_RecoveryTime"));
	NTL_METHOD_START(IAgilent34945AChannel, put_RecoveryTime);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("put_RecoveryTime"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:TIME:REC %.15g, (@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_put_RecoveryTime(ChannelList, val);
	pT->PopInstrCommand();

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

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:TIME:SETT? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_get_SettleTime(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_put_SettleTime(Agilent34945A* pT, BSTR ChannelList, double val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("put_SettleTime"));
	NTL_METHOD_START(IAgilent34945AChannel, put_SettleTime);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("put_SettleTime"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:TIME:SETT %.15g, (@%s)"), val, LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_put_SettleTime(ChannelList, val);
	pT->PopInstrCommand();

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

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

	strCmd.Format(_T("ROUT:CHAN:VER? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_get_VerificationEnable(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_put_VerificationEnable(Agilent34945A* pT, BSTR ChannelList, VARIANT_BOOL val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("put_VerificationEnable"));
	NTL_METHOD_START(IAgilent34945AChannel, put_VerificationEnable);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("put_VerificationEnable"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

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

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

	return hr;
}
HRESULT IAgilent34945AChannel_get_VerificationPolarity(Agilent34945A* pT, BSTR ChannelList, Agilent34945APolarityEnum* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("get_VerificationPolarity"));
	NTL_METHOD_START(IAgilent34945AChannel, get_VerificationPolarity);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_VerificationPolarity"), _T("val"));
		*val = Agilent34945APolarityNormal;
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("get_VerificationPolarity"), IN_PARAM(ChannelList), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:CHAN:VER:POL? (@%s)"), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_get_VerificationPolarity(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_put_VerificationPolarity(Agilent34945A* pT, BSTR ChannelList, Agilent34945APolarityEnum val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("put_VerificationPolarity"));
	NTL_METHOD_START(IAgilent34945AChannel, put_VerificationPolarity);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("put_VerificationPolarity"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:CHAN:VER:POL %s, (@%s)"), pT->EnumToString<Agilent34945APolarityEnum>(val), LPCTSTR(COLE2T(ChannelList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_put_VerificationPolarity(ChannelList, val);
	pT->PopInstrCommand();

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

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:CLOS:DEF?"));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_get_StateAtReset(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_put_StateAtReset(Agilent34945A* pT, BSTR ChannelList, VARIANT_BOOL val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("put_StateAtReset"));
	NTL_METHOD_START(IAgilent34945AChannel, put_StateAtReset);
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("put_StateAtReset"), IN_PARAM(ChannelList), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:CHAN:DRIV:CLOS:DEF (@%s)"), val == VARIANT_FALSE ? "0" : "1");
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_put_StateAtReset(ChannelList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AChannel_get_IsClosed(Agilent34945A* pT, BSTR Channel, VARIANT_BOOL* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AChannel"), _T("get_IsClosed"));
	NTL_METHOD_START(IAgilent34945AChannel, get_IsClosed);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_IsClosed"), _T("val"));
		*val = VARIANT_TRUE;
	CMethodTrace mt(pT, _T("IAgilent34945AChannel"), _T("get_IsClosed"), IN_PARAM(Channel), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T("ROUT:CLOSE? (@%s)"), LPCTSTR(COLE2T(Channel)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AChannel_get_IsClosed(Channel, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_BankPreset(Agilent34945A* pT, BSTR RemoteModuleList, long Bank)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("BankPreset"));
	NTL_METHOD_START(IAgilent34945AModule, BankPreset);
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("BankPreset"), IN_PARAM(RemoteModuleList), IN_PARAM(Bank), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:BANK:PRES %d,(@%s)"), Bank, LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_BankPreset(RemoteModuleList, Bank);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_get_BankDriveType(Agilent34945A* pT, BSTR RemoteModuleList, long Bank, Agilent34945ADriveTypeEnum* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("get_BankDriveType"));
	NTL_METHOD_START(IAgilent34945AModule, get_BankDriveType);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_BankDriveType"), _T("val"));
		*val = Agilent34945ADriveTypeOpenCollector;
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("get_BankDriveType"), IN_PARAM(RemoteModuleList), IN_PARAM(Bank), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:BANK:DRIV? %d, (@%s)"), Bank, LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_get_BankDriveType(RemoteModuleList, Bank, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_put_BankDriveType(Agilent34945A* pT, BSTR RemoteModuleList, long Bank, Agilent34945ADriveTypeEnum val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("put_BankDriveType"));
	NTL_METHOD_START(IAgilent34945AModule, put_BankDriveType);
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("put_BankDriveType"), IN_PARAM(RemoteModuleList), IN_PARAM(Bank), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:BANK:DRIV %s,%d, (@%s)"), pT->EnumToString<Agilent34945ADriveTypeEnum>(val), Bank, LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_put_BankDriveType(RemoteModuleList, Bank, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_get_BankLEDEnable(Agilent34945A* pT, BSTR RemoteModuleList, long Bank, VARIANT_BOOL* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("get_BankLEDEnable"));
	NTL_METHOD_START(IAgilent34945AModule, get_BankLEDEnable);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_BankLEDEnable"), _T("val"));
		*val = VARIANT_TRUE;
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("get_BankLEDEnable"), IN_PARAM(RemoteModuleList), IN_PARAM(Bank), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:BANK:LED:DRIV:ENAB? %d,(@%s)"), Bank, LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_get_BankLEDEnable(RemoteModuleList, Bank, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_put_BankLEDEnable(Agilent34945A* pT, BSTR RemoteModuleList, long Bank, VARIANT_BOOL val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("put_BankLEDEnable"));
	NTL_METHOD_START(IAgilent34945AModule, put_BankLEDEnable);
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("put_BankLEDEnable"), IN_PARAM(RemoteModuleList), IN_PARAM(Bank), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:BANK:LED:DRIV:ENAB %s,%d,(@%s)"), val == VARIANT_FALSE ? "0" : "1", Bank, LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_put_BankLEDEnable(RemoteModuleList, Bank, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_get_BankLEDDriveLevel(Agilent34945A* pT, BSTR RemoteModuleList, long Bank, double* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("get_BankLEDDriveLevel"));
	NTL_METHOD_START(IAgilent34945AModule, get_BankLEDDriveLevel);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_BankLEDDriveLevel"), _T("val"));
		*val = 0.0;
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("get_BankLEDDriveLevel"), IN_PARAM(RemoteModuleList), IN_PARAM(Bank), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:BANK:LED:DRIV:LEV? %d,(@%s)"), Bank, LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_get_BankLEDDriveLevel(RemoteModuleList, Bank, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_put_BankLEDDriveLevel(Agilent34945A* pT, BSTR RemoteModuleList, long Bank, double val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("put_BankLEDDriveLevel"));
	NTL_METHOD_START(IAgilent34945AModule, put_BankLEDDriveLevel);
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("put_BankLEDDriveLevel"), IN_PARAM(RemoteModuleList), IN_PARAM(Bank), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:BANK:LED:DRIV:LEV %.15g,%d,(@%s)"), val, Bank, LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_put_BankLEDDriveLevel(RemoteModuleList, Bank, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_get_DriveChannelLimit(Agilent34945A* pT, BSTR RemoteModuleList, long* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("get_DriveChannelLimit"));
	NTL_METHOD_START(IAgilent34945AModule, get_DriveChannelLimit);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_DriveChannelLimit"), _T("val"));
		*val = 0;
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("get_DriveChannelLimit"), IN_PARAM(RemoteModuleList), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:DRIV:LIM? (@%s)"), LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_get_DriveChannelLimit(RemoteModuleList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_put_DriveChannelLimit(Agilent34945A* pT, BSTR RemoteModuleList, long val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("put_DriveChannelLimit"));
	NTL_METHOD_START(IAgilent34945AModule, put_DriveChannelLimit);
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("put_DriveChannelLimit"), IN_PARAM(RemoteModuleList), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:DRIV:LIM %d,(@%s)"), val, LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_put_DriveChannelLimit(RemoteModuleList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_get_DriveSource(Agilent34945A* pT, BSTR RemoteModuleList, Agilent34945ADriveSourceEnum* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("get_DriveSource"));
	NTL_METHOD_START(IAgilent34945AModule, get_DriveSource);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_DriveSource"), _T("val"));
		*val = Agilent34945ADriveSourceInternal;
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("get_DriveSource"), IN_PARAM(RemoteModuleList), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:DRIVE:SOUR? (@%s)"), LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_get_DriveSource(RemoteModuleList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_put_DriveSource(Agilent34945A* pT, BSTR RemoteModuleList, Agilent34945ADriveSourceEnum val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("put_DriveSource"));
	NTL_METHOD_START(IAgilent34945AModule, put_DriveSource);
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("put_DriveSource"), IN_PARAM(RemoteModuleList), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:DRIVE:SOUR %s, (@%s)"), pT->EnumToString<Agilent34945ADriveSourceEnum>(val), LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_put_DriveSource(RemoteModuleList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_get_DriveSourceBootState(Agilent34945A* pT, BSTR RemoteModuleList, Agilent34945ADriveSourceEnum* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("get_DriveSourceBootState"));
	NTL_METHOD_START(IAgilent34945AModule, get_DriveSourceBootState);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_DriveSourceBootState"), _T("val"));
		*val = Agilent34945ADriveSourceInternal;
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("get_DriveSourceBootState"), IN_PARAM(RemoteModuleList), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:DRIV:SOUR:BOOT? (@%s)"), LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_get_DriveSourceBootState(RemoteModuleList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945AModule_put_DriveSourceBootState(Agilent34945A* pT, BSTR RemoteModuleList, Agilent34945ADriveSourceEnum val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945AModule"), _T("put_DriveSourceBootState"));
	NTL_METHOD_START(IAgilent34945AModule, put_DriveSourceBootState);
	CMethodTrace mt(pT, _T("IAgilent34945AModule"), _T("put_DriveSourceBootState"), IN_PARAM(RemoteModuleList), IN_PARAM(val), NULL);

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

	strCmd.Format(_T(":ROUT:RMOD:DRIV:SOUR:BOOT %s, (@%s)"), pT->EnumToString<Agilent34945ADriveSourceEnum>(val), LPCTSTR(COLE2T(RemoteModuleList)));
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945AModule_put_DriveSourceBootState(RemoteModuleList, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945ASystem_RemoteModuleReset(Agilent34945A* pT, long Slot)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945ASystem"), _T("RemoteModuleReset"));
	NTL_METHOD_START(IAgilent34945ASystem, RemoteModuleReset);
	CMethodTrace mt(pT, _T("IAgilent34945ASystem"), _T("RemoteModuleReset"), IN_PARAM(Slot), NULL);

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

	strCmd.Format(_T(":SYST:RMOD:RES %d"), Slot);
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945ASystem_RemoteModuleReset(Slot);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945ASystem_get_RemoteModuleDescription(Agilent34945A* pT, BSTR RemoteModule, long Bank, BSTR* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945ASystem"), _T("get_RemoteModuleDescription"));
	NTL_METHOD_START(IAgilent34945ASystem, get_RemoteModuleDescription);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_RemoteModuleDescription"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34945ASystem"), _T("get_RemoteModuleDescription"), IN_PARAM(RemoteModule), IN_PARAM(Bank), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T("SYST:CDES:RMOD? (@%s), DIST%d"), LPCTSTR(COLE2T(RemoteModule)), Bank);
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945ASystem_get_RemoteModuleDescription(RemoteModule, Bank, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945ASystem_get_RemoteModuleType(Agilent34945A* pT, BSTR RemoteModule, long Bank, BSTR* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945ASystem"), _T("get_RemoteModuleType"));
	NTL_METHOD_START(IAgilent34945ASystem, get_RemoteModuleType);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_RemoteModuleType"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34945ASystem"), _T("get_RemoteModuleType"), IN_PARAM(RemoteModule), IN_PARAM(Bank), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T("SYST:CTYP:RMOD? (@%s), DIST%d"), LPCTSTR(COLE2T(RemoteModule)), Bank);
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945ASystem_get_RemoteModuleType(RemoteModule, Bank, val);
	pT->PopInstrCommand();

	return hr;
}
HRESULT IAgilent34945ASystem_get_RemoteModuleStatus(Agilent34945A* pT, long Slot, BSTR* val)
{
	Agilent34945A::ObjectLock lock(pT);
	CCallContext context(pT, _T("Agilent34945A"), _T("IAgilent34945ASystem"), _T("get_RemoteModuleStatus"));
	NTL_METHOD_START(IAgilent34945ASystem, get_RemoteModuleStatus);
	if (val == NULL) return pT->ReportError(IDS_E_IVI_NULL_POINTER, _T("get_RemoteModuleStatus"), _T("val"));
		*val = NULL;
	CMethodTrace mt(pT, _T("IAgilent34945ASystem"), _T("get_RemoteModuleStatus"), IN_PARAM(Slot), OUT_PARAM(val), NULL);

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

	strCmd.Format(_T("SYST:RMOD:STAT? %d"), Slot);
	HRESULT hr = S_OK;
	pT->PushInstrCommand(strCmd);
	hr = pT->IAgilent34945ASystem_get_RemoteModuleStatus(Slot, val);
	pT->PopInstrCommand();

	return hr;
}

