/******************************************************************************
 *                                                                         
 *               Copyright 2004-2006 Agilent Technologies
 *               All rights reserved.
 *
 *****************************************************************************/

#pragma once
#include "resource.h"       // main symbols

#include "ErrorMessages.nimbus.h"
#include "ntlres.h"

#include "Interfaces.nimbus.h"
#include "Catids.nimbus.h"
#include "ForwardingShims.nimbus.h"

#include "SwitchUtils.h"

class Agilent34980AChannel;

#define RETURN_IF_FAIL(x) {hr = x; if( FAILED(hr) ) return hr;}


[	
	// COM component categories
	implements_category("CATID_IVI_COM_DRIVER_PERSONALITY_HOST"),
	implements_category("CATID_IviDriver"),
	implements_category("CATID_IviDmm"),
	implements_category("CATID_IviSwtch"),

	// Implemented interfaces (external typelibs)
	implements(interfaces=IIviDmmAC,dispinterfaces=IIviDmmAC),
	implements(interfaces=IIviDmmAdvanced,dispinterfaces=IIviDmmAdvanced),
	implements(interfaces=IIviDmmFrequency,dispinterfaces=IIviDmmFrequency),
	implements(interfaces=IIviDmmMeasurement,dispinterfaces=IIviDmmMeasurement),
	implements(interfaces=IIviDmmRTD,dispinterfaces=IIviDmmRTD),
	implements(interfaces=IIviDmmThermocouple,dispinterfaces=IIviDmmThermocouple),
	implements(interfaces=IIviDmmThermistor,dispinterfaces=IIviDmmThermistor),
	implements(interfaces=IIviDmmTemperature,dispinterfaces=IIviDmmTemperature),
	implements(interfaces=IIviDmmMultiPoint,dispinterfaces=IIviDmmMultiPoint),
	implements(interfaces=IIviDmmTrigger,dispinterfaces=IIviDmmTrigger),
	implements(interfaces=IIviDmm,dispinterfaces=IIviDmm),
	implements(interfaces=IIviDriver,dispinterfaces=IIviDriver),
	implements(interfaces=IIviDriverOperation,dispinterfaces=IIviDriverOperation),
	implements(interfaces=IIviDriverIdentity,dispinterfaces=IIviDriverIdentity),
	implements(interfaces=IIviComponentIdentity,dispinterfaces=IIviComponentIdentity),
	implements(interfaces=IIviDriverUtility,dispinterfaces=IIviDriverUtility),
	implements(interfaces=IIviSwtch,dispinterfaces=IIviSwtch),
	implements(interfaces=IIviSwtchChannels,dispinterfaces=IIviSwtchChannels),
	implements(interfaces=IIviSwtchPath,dispinterfaces=IIviSwtchPath),
	implements(interfaces=IIviSwtchScan,dispinterfaces=IIviSwtchScan),

	// General attributes
	coclass,
	threading(both),
	vi_progid("Agilent34980A.Agilent34980A"),
	progid("Agilent34980A.Agilent34980A.1"),
	uuid("02fdcba6-7437-4a46-8f58-9a33e7fbe63c"),
	helpstring("Agilent34980A Class"),
	default(IAgilent34980A2)
]
class ATL_NO_VTABLE Agilent34980A : 
	public CPersonalityHost<Agilent34980A, CVisaComIOProvider>,
	public ISupportErrorInfo,
//	public _IAgilent34980A,						Removed to address VS2005 PIA compatibility issue
	public _IAgilent34980APersonality,
	public _IIviDmmAC,
	public _IIviDmmAdvanced,
	public _IIviDmmFrequency,
	public _IIviDmmMeasurement,
	public _IIviDmmRTD,
	public _IIviDmmThermocouple,
	public _IIviDmmThermistor,
	public _IIviDmmTemperature,
	public _IIviDmmMultiPoint,
	public _IIviDmmTrigger,
	public _IIviDmm,
	public _IIviDriver,
	public _IIviDriverOperation,
	public _IIviDriverIdentity,
	public _IIviComponentIdentity,
	public _IIviDriverUtility,
//	public _IAgilent34980AAlarm,				Removed to address VS2005 PIA compatibility issue
	public _IAgilent34980AACVoltage,
	public _IAgilent34980AACCurrent,
	public _IAgilent34980ACalibration,
	public _IAgilent34980ACurrent,
	public _IAgilent34980ADCCurrent,
	public _IAgilent34980ADCVoltage,
	public _IAgilent34980ADiagnostic,
	public _IAgilent34980ADisplay,
	public _IAgilent34980AFrequency,
	public _IAgilent34980AFResistance,
	public _IAgilent34980AMeasurement,
	public _IAgilent34980AMemory,
	public _IAgilent34980APeriod,
	public _IAgilent34980AResistance,
	public _IAgilent34980AScale,
//	public _IAgilent34980ARoute,				Removed to address VS2005 PIA compatibility issue
	public _IAgilent34980AScan,
	public _IAgilent34980AStatistics,
//	public _IAgilent34980AStatus,				Removed to address VS2005 PIA compatibility issue
	public _IAgilent34980ASystem,
	public _IAgilent34980ATemperature,
	public _IAgilent34980AVoltage,
	public _IAgilent34980AFRTD,
	public _IAgilent34980ADataFormat,
	public _IAgilent34980ARTD,
	public _IAgilent34980AThermistor,
	public _IAgilent34980AThermocouple,
	public _IAgilent34980ATrigger,
	public _IIviSwtch,
	public _IIviSwtchChannels,
	public _IIviSwtchPath,
	public _IIviSwtchScan,
	public SwitchUtils::CSwitchBase,
	public SwitchUtils::CComDriverSRQ<Agilent34980A>,
	public _IAgilent34980ADMM,
	public _IAgilent34980ADAC,
	public _IAgilent34980AAlarm2,		
	public _IAgilent34980A2,
	public _IAgilent34980ARoute2,
	public _IAgilent34980AStatus2,
	public IProvideClassInfo2Impl<&__uuidof(Agilent34980A), NULL, &CAtlModule::m_libid, 1, 3>
{
	friend class Agilent34980AChannel;
	virtual CString TVN( const CString& strVirtualName ) { return TranslateVirtualName(strVirtualName);};
	virtual CString TPN( const CString& strPhysicalName ) {return TranslatePhysicalName(strPhysicalName);};
	HRESULT GetDynamicRepCapNames(const CString& repCapClassName, CAtlArray<CString>& rgRepCapNames);
	HRESULT _GetInstrFunction( CString &s, BSTR *channel=NULL );

	CString CorrectChannelList( BSTR ChannelList, bool bSetter=true );

public:
	HRESULT FinalConstruct();
	void FinalRelease();

	// ISupportsErrorInfo
	STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);

	HRESULT FinalInitialize(BSTR bstrResourceDescriptor, VARIANT_BOOL bIdQuery, VARIANT_BOOL bReset, BSTR bstrOptionString);
	HRESULT FinalClose();

	DECLARE_PROTECT_FINAL_CONSTRUCT()
	DECLARE_NIMBUS_CLASS(Agilent34980A)

public:
	// Adjust timeouts as necessary to suit your instrument
	virtual long GetDisableTimeout() { return 30000; }
	virtual long GetResetTimeout() { return 30000; }
	virtual long GetSelfTestTimeout() { return 30000; }

public:
	// IAgilent34980APersonality
	STDMETHOD(IAgilent34980APersonality_Select)(BSTR personalityName, IUnknown** Val);
	STDMETHOD(IAgilent34980APersonality_GetPersonalityNames)(SAFEARRAY** val);

	// IIviDmmAC
	STDMETHOD(IIviDmmAC_ConfigureBandwidth)(double MinFreq, double MaxFreq);
	STDMETHOD(IIviDmmAC_get_FrequencyMax)(double* Val);
	STDMETHOD(IIviDmmAC_put_FrequencyMax)(double Val);
	STDMETHOD(IIviDmmAC_get_FrequencyMin)(double* Val);
	STDMETHOD(IIviDmmAC_put_FrequencyMin)(double Val);

	// IIviDmmAdvanced
	STDMETHOD(IIviDmmAdvanced_get_ActualRange)(double* Val);
	STDMETHOD(IIviDmmAdvanced_get_ApertureTime)(double* Val);
	STDMETHOD(IIviDmmAdvanced_get_ApertureTimeUnits)(IviDmmApertureTimeUnitsEnum* Val);
	STDMETHOD(IIviDmmAdvanced_get_AutoZero)(IviDmmAutoZeroEnum* Val);
	STDMETHOD(IIviDmmAdvanced_put_AutoZero)(IviDmmAutoZeroEnum Val);
	STDMETHOD(IIviDmmAdvanced_get_PowerlineFrequency)(double* Val);
	STDMETHOD(IIviDmmAdvanced_put_PowerlineFrequency)(double Val);

	// IIviDmmFrequency
	STDMETHOD(IIviDmmFrequency_get_VoltageRange)(double* Val);
	STDMETHOD(IIviDmmFrequency_put_VoltageRange)(double Val);

	// IIviDmmMeasurement
	STDMETHOD(IIviDmmMeasurement_IsOverRange)(double MeasurementValue, VARIANT_BOOL* Val);
	STDMETHOD(IIviDmmMeasurement_SendSoftwareTrigger)();
	STDMETHOD(IIviDmmMeasurement_ReadMultiPoint)(long MaxTimeMilliseconds, SAFEARRAY** Val);
	STDMETHOD(IIviDmmMeasurement_Read)(long MaxTimeMilliseconds, double* Val);
	STDMETHOD(IIviDmmMeasurement_FetchMultiPoint)(long MaxTimeMilliseconds, SAFEARRAY** Val);
	STDMETHOD(IIviDmmMeasurement_Fetch)(long MaxTimeMilliseconds, double* Val);
	STDMETHOD(IIviDmmMeasurement_Abort)();
	STDMETHOD(IIviDmmMeasurement_Initiate)();

	// IIviDmmRTD
	STDMETHOD(IIviDmmRTD_Configure)(double Alpha, double Resistance);
	STDMETHOD(IIviDmmRTD_get_Alpha)(double* Val);
	STDMETHOD(IIviDmmRTD_put_Alpha)(double Val);
	STDMETHOD(IIviDmmRTD_get_Resistance)(double* Val);
	STDMETHOD(IIviDmmRTD_put_Resistance)(double Val);

	// IIviDmmThermocouple
	STDMETHOD(IIviDmmThermocouple_Configure)(IviDmmThermocoupleTypeEnum Type, IviDmmRefJunctionTypeEnum RefJunctionType);
	STDMETHOD(IIviDmmThermocouple_get_FixedRefJunction)(double* Val);
	STDMETHOD(IIviDmmThermocouple_put_FixedRefJunction)(double Val);
	STDMETHOD(IIviDmmThermocouple_get_RefJunctionType)(IviDmmRefJunctionTypeEnum* Val);
	STDMETHOD(IIviDmmThermocouple_put_RefJunctionType)(IviDmmRefJunctionTypeEnum Val);
	STDMETHOD(IIviDmmThermocouple_get_Type)(IviDmmThermocoupleTypeEnum* Val);
	STDMETHOD(IIviDmmThermocouple_put_Type)(IviDmmThermocoupleTypeEnum Val);

	// IIviDmmThermistor
	STDMETHOD(IIviDmmThermistor_get_Resistance)(double* Val);
	STDMETHOD(IIviDmmThermistor_put_Resistance)(double Val);

	// IIviDmmTemperature
	STDMETHOD(IIviDmmTemperature_get_TransducerType)(IviDmmTransducerTypeEnum* Val);
	STDMETHOD(IIviDmmTemperature_put_TransducerType)(IviDmmTransducerTypeEnum Val);
	STDMETHOD(IIviDmmTemperature_get_RTD)(IIviDmmRTD** Val);
	STDMETHOD(IIviDmmTemperature_get_Thermocouple)(IIviDmmThermocouple** Val);
	STDMETHOD(IIviDmmTemperature_get_Thermistor)(IIviDmmThermistor** Val);

	// IIviDmmMultiPoint
	STDMETHOD(IIviDmmMultiPoint_Configure)(long TriggerCount, long SampleCount, IviDmmSampleTriggerEnum SampleTrigger, double SampleInterval);
	STDMETHOD(IIviDmmMultiPoint_get_MeasurementComplete)(IviDmmMeasCompleteDestEnum* Val);
	STDMETHOD(IIviDmmMultiPoint_put_MeasurementComplete)(IviDmmMeasCompleteDestEnum Val);
	STDMETHOD(IIviDmmMultiPoint_get_Count)(long* Val);
	STDMETHOD(IIviDmmMultiPoint_put_Count)(long Val);
	STDMETHOD(IIviDmmMultiPoint_get_SampleCount)(long* Val);
	STDMETHOD(IIviDmmMultiPoint_put_SampleCount)(long Val);
	STDMETHOD(IIviDmmMultiPoint_get_SampleInterval)(double* Val);
	STDMETHOD(IIviDmmMultiPoint_put_SampleInterval)(double Val);
	STDMETHOD(IIviDmmMultiPoint_get_SampleTrigger)(IviDmmSampleTriggerEnum* Val);
	STDMETHOD(IIviDmmMultiPoint_put_SampleTrigger)(IviDmmSampleTriggerEnum Val);

	// IIviDmmTrigger
	STDMETHOD(IIviDmmTrigger_Configure)(IviDmmTriggerSourceEnum TriggerSource, double TriggerDelay);
	STDMETHOD(IIviDmmTrigger_get_Slope)(IviDmmTriggerSlopeEnum* Val);
	STDMETHOD(IIviDmmTrigger_put_Slope)(IviDmmTriggerSlopeEnum Val);
	STDMETHOD(IIviDmmTrigger_get_Delay)(double* Val);
	STDMETHOD(IIviDmmTrigger_put_Delay)(double Val);
	STDMETHOD(IIviDmmTrigger_get_Source)(IviDmmTriggerSourceEnum* Val);
	STDMETHOD(IIviDmmTrigger_put_Source)(IviDmmTriggerSourceEnum Val);
	STDMETHOD(IIviDmmTrigger_get_MultiPoint)(IIviDmmMultiPoint** Val);

	// IIviDmm
	STDMETHOD(IIviDmm_Configure)(IviDmmFunctionEnum Function, double Range, double Resolution);
	STDMETHOD(IIviDmm_get_Function)(IviDmmFunctionEnum* Val);
	STDMETHOD(IIviDmm_put_Function)(IviDmmFunctionEnum Val);
	STDMETHOD(IIviDmm_get_Range)(double* Val);
	STDMETHOD(IIviDmm_put_Range)(double Val);
	STDMETHOD(IIviDmm_get_Resolution)(double* Val);
	STDMETHOD(IIviDmm_put_Resolution)(double Val);
	STDMETHOD(IIviDmm_get_AC)(IIviDmmAC** Val);
	STDMETHOD(IIviDmm_get_Advanced)(IIviDmmAdvanced** Val);
	STDMETHOD(IIviDmm_get_Frequency)(IIviDmmFrequency** Val);
	STDMETHOD(IIviDmm_get_Measurement)(IIviDmmMeasurement** Val);
	STDMETHOD(IIviDmm_get_Temperature)(IIviDmmTemperature** Val);
	STDMETHOD(IIviDmm_get_Trigger)(IIviDmmTrigger** Val);

	// IIviDriver
	STDMETHOD(IIviDriver_Close)();
	STDMETHOD(IIviDriver_Initialize)(BSTR ResourceName, VARIANT_BOOL IdQuery, VARIANT_BOOL Reset, BSTR OptionString);
	STDMETHOD(IIviDriver_get_DriverOperation)(IIviDriverOperation** Val);
	STDMETHOD(IIviDriver_get_Identity)(IIviDriverIdentity** Val);
	STDMETHOD(IIviDriver_get_Utility)(IIviDriverUtility** Val);
	STDMETHOD(IIviDriver_get_Initialized)(VARIANT_BOOL* Val);

	// IIviDriverOperation
	STDMETHOD(IIviDriverOperation_GetNextCoercionRecord)(BSTR* Val);
	STDMETHOD(IIviDriverOperation_ResetInterchangeCheck)();
	STDMETHOD(IIviDriverOperation_GetNextInterchangeWarning)(BSTR* Val);
	STDMETHOD(IIviDriverOperation_ClearInterchangeWarnings)();
	STDMETHOD(IIviDriverOperation_InvalidateAllAttributes)();
	STDMETHOD(IIviDriverOperation_get_LogicalName)(BSTR* Val);
	STDMETHOD(IIviDriverOperation_get_IoResourceDescriptor)(BSTR* Val);
	STDMETHOD(IIviDriverOperation_get_Cache)(VARIANT_BOOL* Val);
	STDMETHOD(IIviDriverOperation_put_Cache)(VARIANT_BOOL Val);
	STDMETHOD(IIviDriverOperation_get_InterchangeCheck)(VARIANT_BOOL* Val);
	STDMETHOD(IIviDriverOperation_put_InterchangeCheck)(VARIANT_BOOL Val);
	STDMETHOD(IIviDriverOperation_get_QueryInstrumentStatus)(VARIANT_BOOL* Val);
	STDMETHOD(IIviDriverOperation_put_QueryInstrumentStatus)(VARIANT_BOOL Val);
	STDMETHOD(IIviDriverOperation_get_RangeCheck)(VARIANT_BOOL* Val);
	STDMETHOD(IIviDriverOperation_put_RangeCheck)(VARIANT_BOOL Val);
	STDMETHOD(IIviDriverOperation_get_RecordCoercions)(VARIANT_BOOL* Val);
	STDMETHOD(IIviDriverOperation_put_RecordCoercions)(VARIANT_BOOL Val);
	STDMETHOD(IIviDriverOperation_get_Simulate)(VARIANT_BOOL* Val);
	STDMETHOD(IIviDriverOperation_put_Simulate)(VARIANT_BOOL Val);
	STDMETHOD(IIviDriverOperation_get_DriverSetup)(BSTR* Val);

	// IIviDriverIdentity
	STDMETHOD(IIviDriverIdentity_get_InstrumentManufacturer)(BSTR* Val);
	STDMETHOD(IIviDriverIdentity_get_InstrumentModel)(BSTR* Val);
	STDMETHOD(IIviDriverIdentity_get_InstrumentFirmwareRevision)(BSTR* Val);
	STDMETHOD(IIviDriverIdentity_get_Identifier)(BSTR* Val);
	STDMETHOD(IIviDriverIdentity_get_SupportedInstrumentModels)(BSTR* Val);
	STDMETHOD(IIviDriverIdentity_get_SpecificationMajorVersion)(long* Val);
	STDMETHOD(IIviDriverIdentity_get_SpecificationMinorVersion)(long* Val);
	STDMETHOD(IIviDriverIdentity_get_GroupCapabilities)(BSTR* Val);

	// IIviComponentIdentity
	STDMETHOD(IIviComponentIdentity_get_Description)(BSTR* Val);
	STDMETHOD(IIviComponentIdentity_get_Revision)(BSTR* Val);
	STDMETHOD(IIviComponentIdentity_get_Vendor)(BSTR* Val);

	// IIviDriverUtility
	STDMETHOD(IIviDriverUtility_UnlockObject)();
	STDMETHOD(IIviDriverUtility_LockObject)();
	STDMETHOD(IIviDriverUtility_ErrorQuery)(long* ErrorCode, BSTR* ErrorMessage);
	STDMETHOD(IIviDriverUtility_SelfTest)(long* TestResult, BSTR* TestMessage);
	STDMETHOD(IIviDriverUtility_Disable)();
	STDMETHOD(IIviDriverUtility_ResetWithDefaults)();
	STDMETHOD(IIviDriverUtility_Reset)();
	// IAgilent34980A
	STDMETHOD(IAgilent34980A_get_Alarm)(IAgilent34980AAlarm** Val);
	STDMETHOD(IAgilent34980A_get_Calibration)(IAgilent34980ACalibration** Val);
	STDMETHOD(IAgilent34980A_get_Current)(IAgilent34980ACurrent** Val);
	STDMETHOD(IAgilent34980A_get_Diagnostic)(IAgilent34980ADiagnostic** Val);
	STDMETHOD(IAgilent34980A_get_Display)(IAgilent34980ADisplay** Val);
	STDMETHOD(IAgilent34980A_get_Frequency)(IAgilent34980AFrequency** Val);
	STDMETHOD(IAgilent34980A_get_FResistance)(IAgilent34980AFResistance** Val);
	STDMETHOD(IAgilent34980A_get_Measurement)(IAgilent34980AMeasurement** Val);
	STDMETHOD(IAgilent34980A_get_Memory)(IAgilent34980AMemory** Val);
	STDMETHOD(IAgilent34980A_get_Period)(IAgilent34980APeriod** Val);
	STDMETHOD(IAgilent34980A_get_Resistance)(IAgilent34980AResistance** Val);
	STDMETHOD(IAgilent34980A_get_Route)(IAgilent34980ARoute** Val);
	STDMETHOD(IAgilent34980A_get_Scale)(IAgilent34980AScale** Val);
	STDMETHOD(IAgilent34980A_get_Scan)(IAgilent34980AScan** Val);
	STDMETHOD(IAgilent34980A_get_Statistics)(IAgilent34980AStatistics** Val);
	STDMETHOD(IAgilent34980A_get_Status)(IAgilent34980AStatus** Val);
	STDMETHOD(IAgilent34980A_get_System)(IAgilent34980ASystem** Val);
	STDMETHOD(IAgilent34980A_get_Temperature)(IAgilent34980ATemperature** Val);
	STDMETHOD(IAgilent34980A_get_Voltage)(IAgilent34980AVoltage** Val);
	STDMETHOD(IAgilent34980A_get_Personality)(IAgilent34980APersonality** Val);
	STDMETHOD(IAgilent34980A_get_Trigger)(IAgilent34980ATrigger** Val);
	// IAgilent34980AAlarm
	STDMETHOD(IAgilent34980AAlarm_Clear)(VARIANT_BOOL clearAll, long Index);
	STDMETHOD(IAgilent34980AAlarm_AlarmScanSetup)(BSTR ChannelList, long Channel, long AlarmIndex, long NumSweeps, double UpperLimit);
	STDMETHOD(IAgilent34980AAlarm_get_LowerLimit)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AAlarm_put_LowerLimit)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AAlarm_get_LowerLimitEnable)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AAlarm_put_LowerLimitEnable)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AAlarm_get_Mode)(Agilent34980AAlarmModeEnum* Val);
	STDMETHOD(IAgilent34980AAlarm_put_Mode)(Agilent34980AAlarmModeEnum Val);
	STDMETHOD(IAgilent34980AAlarm_get_QueryAlarmQueue)(BSTR* Val);
	STDMETHOD(IAgilent34980AAlarm_get_Slope)(Agilent34980ASlopeEnum* Val);
	STDMETHOD(IAgilent34980AAlarm_put_Slope)(Agilent34980ASlopeEnum Val);
	STDMETHOD(IAgilent34980AAlarm_get_Source)(long index, BSTR* Val);
	STDMETHOD(IAgilent34980AAlarm_put_Source)(long index, BSTR Val);
	STDMETHOD(IAgilent34980AAlarm_get_UpperLimit)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AAlarm_put_UpperLimit)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AAlarm_get_UpperLimitEnable)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AAlarm_put_UpperLimitEnable)(BSTR ChannelList, VARIANT_BOOL Val);

	// IAgilent34980AACVoltage
	STDMETHOD(IAgilent34980AACVoltage_Configure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution);
	STDMETHOD(IAgilent34980AACVoltage_get_AutoRange)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AACVoltage_put_AutoRange)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AACVoltage_get_Bandwidth)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AACVoltage_put_Bandwidth)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AACVoltage_get_Range)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AACVoltage_put_Range)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AACVoltage_Measure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution, SAFEARRAY** Data);

	// IAgilent34980AACCurrent
	STDMETHOD(IAgilent34980AACCurrent_get_AutoRange)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AACCurrent_put_AutoRange)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AACCurrent_get_Bandwidth)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AACCurrent_put_Bandwidth)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AACCurrent_get_Range)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AACCurrent_put_Range)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AACCurrent_Measure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution, SAFEARRAY** val);
	STDMETHOD(IAgilent34980AACCurrent_Configure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution);

	// IAgilent34980ACalibration
	STDMETHOD(IAgilent34980ACalibration_put_Code)(BSTR Val);
	STDMETHOD(IAgilent34980ACalibration_get_String)(BSTR* Val);
	STDMETHOD(IAgilent34980ACalibration_put_String)(BSTR Val);
	STDMETHOD(IAgilent34980ACalibration_get_Count)(long* val);
	STDMETHOD(IAgilent34980ACalibration_get_LineFrequency)(double* val);
	STDMETHOD(IAgilent34980ACalibration_put_LineFrequency)(double val);
	STDMETHOD(IAgilent34980ACalibration_SecurityEnable)(VARIANT_BOOL Enable, BSTR Code);
	STDMETHOD(IAgilent34980ACalibration_get_SecurityState)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ACalibration_get_DAC)(IAgilent34980ADAC** Val);
	STDMETHOD(IAgilent34980ACalibration_get_DMM)(IAgilent34980ADMM** Val);
	// IAgilent34980ACurrent
	STDMETHOD(IAgilent34980ACurrent_get_ACCurrent)(IAgilent34980AACCurrent** Val);
	STDMETHOD(IAgilent34980ACurrent_get_DCCurrent)(IAgilent34980ADCCurrent** Val);

	// IAgilent34980ADCCurrent
	STDMETHOD(IAgilent34980ADCCurrent_Configure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution);
	STDMETHOD(IAgilent34980ADCCurrent_get_Aperture)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ADCCurrent_put_Aperture)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980ADCCurrent_get_AutoRange)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ADCCurrent_put_AutoRange)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ADCCurrent_get_NPLC)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ADCCurrent_put_NPLC)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980ADCCurrent_get_Range)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ADCCurrent_put_Range)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980ADCCurrent_get_Resolution)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ADCCurrent_Measure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution, SAFEARRAY** val);
	STDMETHOD(IAgilent34980ADCCurrent_get_AutoZero)(BSTR ChannelList, Agilent34980AAutoZeroEnum* Val);
	STDMETHOD(IAgilent34980ADCCurrent_put_AutoZero)(BSTR ChannelList, Agilent34980AAutoZeroEnum Val);

	// IAgilent34980ADCVoltage
	STDMETHOD(IAgilent34980ADCVoltage_Configure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution);
	STDMETHOD(IAgilent34980ADCVoltage_get_Aperture)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ADCVoltage_put_Aperture)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980ADCVoltage_get_AutoRange)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ADCVoltage_put_AutoRange)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ADCVoltage_get_NPLC)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ADCVoltage_put_NPLC)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980ADCVoltage_get_Range)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ADCVoltage_put_Range)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980ADCVoltage_get_Resolution)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ADCVoltage_Measure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution, SAFEARRAY** val);
	STDMETHOD(IAgilent34980ADCVoltage_get_AutoZero)(BSTR ChannelList, Agilent34980AAutoZeroEnum* Val);
	STDMETHOD(IAgilent34980ADCVoltage_put_AutoZero)(BSTR ChannelList, Agilent34980AAutoZeroEnum Val);
	STDMETHOD(IAgilent34980ADCVoltage_get_AutoImpedance)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ADCVoltage_put_AutoImpedance)(BSTR ChannelList, VARIANT_BOOL Val);

	// IAgilent34980ADiagnostic
	STDMETHOD(IAgilent34980ADiagnostic_RelayCyclesClear)(BSTR ChannelList);
	STDMETHOD(IAgilent34980ADiagnostic_DMMCyclesClear)(long index);
	STDMETHOD(IAgilent34980ADiagnostic_get_DMMCycles)(long Index, long* Val);
	STDMETHOD(IAgilent34980ADiagnostic_get_RelayCycles)(BSTR ChannelList, long* Val);

	// IAgilent34980ADisplay
	STDMETHOD(IAgilent34980ADisplay_ClearDisplay)();
	STDMETHOD(IAgilent34980ADisplay_get_DisplayEnabled)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ADisplay_put_DisplayEnabled)(VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ADisplay_get_DisplayText)(BSTR* Val);
	STDMETHOD(IAgilent34980ADisplay_put_DisplayText)(BSTR Val);
	STDMETHOD(IAgilent34980ADisplay_get_MonitorData)(double* Val);
	STDMETHOD(IAgilent34980ADisplay_get_MonitorEnable)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ADisplay_put_MonitorEnable)(VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ADisplay_get_MonitorMode)(Agilent34980AMonitorModeEnum* Val);
	STDMETHOD(IAgilent34980ADisplay_put_MonitorMode)(Agilent34980AMonitorModeEnum Val);
	STDMETHOD(IAgilent34980ADisplay_get_EnableMonitorChan)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ADisplay_put_EnableMonitorChan)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ADisplay_get_SelectMonitorChan)(BSTR* Val);
	STDMETHOD(IAgilent34980ADisplay_put_SelectMonitorChan)(BSTR Val);
	STDMETHOD(IAgilent34980ADisplay_MonitorDMM)();
	STDMETHOD(IAgilent34980ADisplay_MonitorChannel)(BSTR channel);

	// IAgilent34980AFrequency
	STDMETHOD(IAgilent34980AFrequency_Configure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution);
	STDMETHOD(IAgilent34980AFrequency_get_Aperture)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AFrequency_put_Aperture)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AFrequency_get_AutoRange)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AFrequency_put_AutoRange)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AFrequency_get_LowRange)(BSTR ChannelList, long* Val);
	STDMETHOD(IAgilent34980AFrequency_put_LowRange)(BSTR ChannelList, long Val);
	STDMETHOD(IAgilent34980AFrequency_get_Range)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AFrequency_Measure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution, SAFEARRAY** Val);

	// IAgilent34980AFResistance
	STDMETHOD(IAgilent34980AFResistance_Configure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution);
	STDMETHOD(IAgilent34980AFResistance_get_Aperture)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AFResistance_put_Aperture)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AFResistance_get_AutoRange)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AFResistance_put_AutoRange)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AFResistance_get_NPLC)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AFResistance_put_NPLC)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AFResistance_get_OCompensated)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AFResistance_put_OCompensated)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AFResistance_get_Range)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AFResistance_put_Range)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AFResistance_get_Resolution)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AFResistance_Measure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution, SAFEARRAY** val);

	// IAgilent34980AMeasurement
	STDMETHOD(IAgilent34980AMeasurement_Initiate)();
	STDMETHOD(IAgilent34980AMeasurement_Abort)();
	STDMETHOD(IAgilent34980AMeasurement_DestructiveRead)(long MaxCount, SAFEARRAY** val);
	STDMETHOD(IAgilent34980AMeasurement_Fetch)(SAFEARRAY** val);
	STDMETHOD(IAgilent34980AMeasurement_FetchNumbersOnly)(SAFEARRAY** data);
	STDMETHOD(IAgilent34980AMeasurement_get_DataFormat)(IAgilent34980ADataFormat** Val);
	STDMETHOD(IAgilent34980AMeasurement_QueryLast)(BSTR channel, double* Val);
	STDMETHOD(IAgilent34980AMeasurement_get_ReadingCount)(long* Val);
	STDMETHOD(IAgilent34980AMeasurement_Read)(BSTR ChannelList, SAFEARRAY** Val);
	STDMETHOD(IAgilent34980AMeasurement_ReadNumbersOnly)(BSTR ChannelList, SAFEARRAY** Val);
	STDMETHOD(IAgilent34980AMeasurement_RemoveReadings)(long NumReadings, SAFEARRAY** val);
	STDMETHOD(IAgilent34980AMeasurement_SendSoftwareTrigger)();
	STDMETHOD(IAgilent34980AMeasurement_get_MeasurementFunction)(BSTR Channel, BSTR* Val);
	STDMETHOD(IAgilent34980AMeasurement_put_MeasurementFunction)(BSTR Channel, BSTR Val);
	// IAgilent34980AMemory
	STDMETHOD(IAgilent34980AMemory_SaveState)(BSTR Identifier);
	STDMETHOD(IAgilent34980AMemory_RecallState)(BSTR Identifier);
	STDMETHOD(IAgilent34980AMemory_DeleteLocation)(long LocationNum, VARIANT_BOOL deleteAll);
	STDMETHOD(IAgilent34980AMemory_get_AutoRecall)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AMemory_put_AutoRecall)(VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AMemory_get_NumStates)(long* Val);
	STDMETHOD(IAgilent34980AMemory_get_StateName)(long LocationNum, BSTR* Val);
	STDMETHOD(IAgilent34980AMemory_put_StateName)(long LocationNum, BSTR Val);
	STDMETHOD(IAgilent34980AMemory_get_ValidState)(long LocationNum, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AMemory_get_Catalog)(BSTR* Val);

	// IAgilent34980APeriod
	STDMETHOD(IAgilent34980APeriod_Configure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution);
	STDMETHOD(IAgilent34980APeriod_get_Aperture)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980APeriod_put_Aperture)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980APeriod_get_AutoRange)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980APeriod_put_AutoRange)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980APeriod_get_Range)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980APeriod_Measure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution, SAFEARRAY** val);

	// IAgilent34980AResistance
	STDMETHOD(IAgilent34980AResistance_Configure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution);
	STDMETHOD(IAgilent34980AResistance_get_Aperture)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AResistance_put_Aperture)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AResistance_get_AutoRange)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AResistance_put_AutoRange)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AResistance_get_NPLC)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AResistance_put_NPLC)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AResistance_get_OCompensated)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AResistance_put_OCompensated)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AResistance_get_Range)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AResistance_put_Range)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AResistance_get_Resolution)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AResistance_Measure)(BSTR ChannelList, double Range, Agilent34980AResolutionEnum Resolution, SAFEARRAY** val);
	STDMETHOD(IAgilent34980AResistance_get_AutoZero)(BSTR ChannelList, Agilent34980AAutoZeroEnum* Val);
	STDMETHOD(IAgilent34980AResistance_put_AutoZero)(BSTR ChannelList, Agilent34980AAutoZeroEnum Val);

	// IAgilent34980AScale
	STDMETHOD(IAgilent34980AScale_OffsetNull)(BSTR ChannelList);
	STDMETHOD(IAgilent34980AScale_get_Gain)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AScale_put_Gain)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AScale_get_Offset)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AScale_put_Offset)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AScale_get_State)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AScale_put_State)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AScale_get_Unit)(BSTR ChannelList, BSTR* Val);
	STDMETHOD(IAgilent34980AScale_put_Unit)(BSTR ChannelList, BSTR Val);

	// IAgilent34980ARoute
	STDMETHOD(IAgilent34980ARoute_CloseExclusive)(BSTR ChannelList);
	STDMETHOD(IAgilent34980ARoute_get_AutoDelay)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ARoute_put_AutoDelay)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ARoute_get_Delay)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ARoute_put_Delay)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980ARoute_get_FWire)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ARoute_put_FWire)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ARoute_get_Done)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ARoute_Close)(BSTR ChannelList);
	STDMETHOD(IAgilent34980ARoute_Open)(BSTR ChannelList);
	STDMETHOD(IAgilent34980ARoute_get_IsClosed)(BSTR Channel, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ARoute_OpenAll)(long Slot);
	// IAgilent34980AScan
	STDMETHOD(IAgilent34980AScan_ConfigureScan)(BSTR ChannelList, long SweepCount, VARIANT_BOOL Ordered);
	STDMETHOD(IAgilent34980AScan_get_ScanList)(BSTR* Val);
	STDMETHOD(IAgilent34980AScan_put_ScanList)(BSTR Val);
	STDMETHOD(IAgilent34980AScan_get_ScanSize)(long* Val);
	STDMETHOD(IAgilent34980AScan_get_ScanTime)(BSTR* Val);
	STDMETHOD(IAgilent34980AScan_get_SweepCount)(long* Val);
	STDMETHOD(IAgilent34980AScan_put_SweepCount)(long Val);
	STDMETHOD(IAgilent34980AScan_get_OrderedScan)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AScan_put_OrderedScan)(VARIANT_BOOL Val);
	// IAgilent34980AStatistics
	STDMETHOD(IAgilent34980AStatistics_ClearStatistics)(BSTR ChannelList);
	STDMETHOD(IAgilent34980AStatistics_get_Average)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AStatistics_get_Count)(BSTR ChannelList, long* Val);
	STDMETHOD(IAgilent34980AStatistics_get_MaxValue)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AStatistics_get_MaxValueTime)(BSTR ChannelList, BSTR* Val);
	STDMETHOD(IAgilent34980AStatistics_get_MinValue)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AStatistics_get_MinValueTime)(BSTR ChannelList, BSTR* Val);
	STDMETHOD(IAgilent34980AStatistics_get_PTPeak)(BSTR ChannelList, double* Val);

	// IAgilent34980AStatus
	STDMETHOD(IAgilent34980AStatus_Preset)();
	STDMETHOD(IAgilent34980AStatus_ConfigureServiceRequest)(Agilent34980ASRQReasonEnum Reason);
	STDMETHOD(IAgilent34980AStatus_Clear)();
	STDMETHOD(IAgilent34980AStatus_get_Register)(Agilent34980AStatusRegisterEnum Register, Agilent34980AStatusSubRegisterEnum SubRegister, long* Val);
	STDMETHOD(IAgilent34980AStatus_put_Register)(Agilent34980AStatusRegisterEnum Register, Agilent34980AStatusSubRegisterEnum SubRegister, long Val);
	STDMETHOD(IAgilent34980AStatus_get_SerialPoll)(long* Val);
	// IAgilent34980ASystem
	STDMETHOD(IAgilent34980ASystem_WaitForOperationComplete)(long MaxTimeMilliseconds);
	STDMETHOD(IAgilent34980ASystem_SetSystemTime)(long hours, long mins, double Seconds);
	STDMETHOD(IAgilent34980ASystem_SetSystemDate)(long year, long month, long day);
	STDMETHOD(IAgilent34980ASystem_Preset)();
	STDMETHOD(IAgilent34980ASystem_GetSystemTime)(long* pHours, long* pMins, double* pSeconds);
	STDMETHOD(IAgilent34980ASystem_GetSystemDate)(long* pYear, long* pMonth, long* pDay);
	STDMETHOD(IAgilent34980ASystem_CardReset)(long SlotNum);
	STDMETHOD(IAgilent34980ASystem_get_AsyncEventsEnabled)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ASystem_put_AsyncEventsEnabled)(VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ASystem_get_CardType)(long SlotNum, BSTR* Val);
	STDMETHOD(IAgilent34980ASystem_get_Date)(BSTR* Val);
	STDMETHOD(IAgilent34980ASystem_put_Date)(BSTR Val);
	STDMETHOD(IAgilent34980ASystem_get_DMMEnabled)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ASystem_put_DMMEnabled)(VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ASystem_get_DMMInstalled)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ASystem_get_ReadingThreshold)(long* Val);
	STDMETHOD(IAgilent34980ASystem_put_ReadingThreshold)(long Val);
	STDMETHOD(IAgilent34980ASystem_get_SerialNumber)(BSTR* Val);
	STDMETHOD(IAgilent34980ASystem_get_Time)(BSTR* Val);
	STDMETHOD(IAgilent34980ASystem_put_Time)(BSTR Val);
	STDMETHOD(IAgilent34980ASystem_get_TimeoutMilliseconds)(long* Val);
	STDMETHOD(IAgilent34980ASystem_put_TimeoutMilliseconds)(long Val);
	STDMETHOD(IAgilent34980ASystem_get_IO)(IFormattedIO488** Val);
	STDMETHOD(IAgilent34980ASystem_get_EnableInterface)(Agilent34980AHWInterfaceEnum HWInterface, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ASystem_put_EnableInterface)(Agilent34980AHWInterfaceEnum HWInterface, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ASystem_LockRequest)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ASystem_LockRelease)();
	STDMETHOD(IAgilent34980ASystem_get_LockOwner)(BSTR* Val);
	STDMETHOD(IAgilent34980ASystem_SecureImmediate)();
	STDMETHOD(IAgilent34980ASystem_put_ModuleWireMode)(long SlotNumber, Agilent34980AWireModeEnum Val);
	STDMETHOD(IAgilent34980ASystem_get_ModuleEvents)(BSTR* Val);
	STDMETHOD(IAgilent34980ASystem_GetModuleTemperature)(Agilent34980AModuleTemperatureEnum Mode, long Slot, double* Val);
	// IAgilent34980ATemperature
	STDMETHOD(IAgilent34980ATemperature_get_ReadingUnits)(BSTR ChannelList, Agilent34980ATemperatureUnitsEnum* Val);
	STDMETHOD(IAgilent34980ATemperature_put_ReadingUnits)(BSTR ChannelList, Agilent34980ATemperatureUnitsEnum Val);
	STDMETHOD(IAgilent34980ATemperature_get_FRTD)(IAgilent34980AFRTD** Val);
	STDMETHOD(IAgilent34980ATemperature_get_RTD)(IAgilent34980ARTD** Val);
	STDMETHOD(IAgilent34980ATemperature_get_Thermocouple)(IAgilent34980AThermocouple** Val);
	STDMETHOD(IAgilent34980ATemperature_get_Thermistor)(IAgilent34980AThermistor** Val);
	STDMETHOD(IAgilent34980ATemperature_get_AutoZero)(BSTR ChannelList, Agilent34980AAutoZeroEnum* Val);
	STDMETHOD(IAgilent34980ATemperature_put_AutoZero)(BSTR ChannelList, Agilent34980AAutoZeroEnum Val);
	STDMETHOD(IAgilent34980ATemperature_get_NPLC)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ATemperature_put_NPLC)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980ATemperature_get_TransducerType)(BSTR ChannelList, Agilent34980ATransducerEnum* Val);
	STDMETHOD(IAgilent34980ATemperature_put_TransducerType)(BSTR ChannelList, Agilent34980ATransducerEnum Val);
	// IAgilent34980AVoltage
	STDMETHOD(IAgilent34980AVoltage_get_ACVoltage)(IAgilent34980AACVoltage** Val);
	STDMETHOD(IAgilent34980AVoltage_get_DCVoltage)(IAgilent34980ADCVoltage** Val);

	// IAgilent34980AFRTD
	STDMETHOD(IAgilent34980AFRTD_Configure)(BSTR ChannelList, Agilent34980AResolutionEnum Resolution, Agilent34980AFRTDAlphaEnum Type);
	STDMETHOD(IAgilent34980AFRTD_get_Resistance)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AFRTD_put_Resistance)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980AFRTD_get_Alpha)(BSTR ChannelList, Agilent34980AFRTDAlphaEnum* Val);
	STDMETHOD(IAgilent34980AFRTD_put_Alpha)(BSTR ChannelList, Agilent34980AFRTDAlphaEnum Val);
	STDMETHOD(IAgilent34980AFRTD_Measure)(BSTR ChannelList, Agilent34980ARTDAlphaEnum Type, Agilent34980AResolutionEnum Resolution, SAFEARRAY** val);
	STDMETHOD(IAgilent34980AFRTD_get_IsExternalReference)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AFRTD_put_IsExternalReference)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AFRTD_get_OCompensated)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AFRTD_put_OCompensated)(BSTR ChannelList, VARIANT_BOOL Val);

	// IAgilent34980ADataFormat
	STDMETHOD(IAgilent34980ADataFormat_Configure)(VARIANT_BOOL EnableAlarm, VARIANT_BOOL EnableChannel, VARIANT_BOOL EnableTime, Agilent34980ATimeOffsetEnum TimeType, VARIANT_BOOL EnableUnit);
	STDMETHOD(IAgilent34980ADataFormat_get_AlarmEnable)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ADataFormat_put_AlarmEnable)(VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ADataFormat_get_ChannelEnable)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ADataFormat_put_ChannelEnable)(VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ADataFormat_get_TimeEnable)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ADataFormat_put_TimeEnable)(VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ADataFormat_get_TimeType)(Agilent34980ATimeOffsetEnum* Val);
	STDMETHOD(IAgilent34980ADataFormat_put_TimeType)(Agilent34980ATimeOffsetEnum Val);
	STDMETHOD(IAgilent34980ADataFormat_get_UnitEnable)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ADataFormat_put_UnitEnable)(VARIANT_BOOL Val);
	// IAgilent34980ARTD
	STDMETHOD(IAgilent34980ARTD_Configure)(BSTR ChannelList, Agilent34980AResolutionEnum Resolution, Agilent34980ARTDAlphaEnum Type);
	STDMETHOD(IAgilent34980ARTD_Measure)(BSTR ChannelList, Agilent34980ARTDAlphaEnum Type, Agilent34980AResolutionEnum Resolution, SAFEARRAY** val);
	STDMETHOD(IAgilent34980ARTD_get_Resistance)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980ARTD_put_Resistance)(BSTR ChannelList, double Val);
	STDMETHOD(IAgilent34980ARTD_get_Alpha)(BSTR ChannelList, Agilent34980ARTDAlphaEnum* Val);
	STDMETHOD(IAgilent34980ARTD_put_Alpha)(BSTR ChannelList, Agilent34980ARTDAlphaEnum Val);
	STDMETHOD(IAgilent34980ARTD_get_IsExternalReference)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ARTD_put_IsExternalReference)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980ARTD_get_OCompensated)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ARTD_put_OCompensated)(BSTR ChannelList, VARIANT_BOOL Val);
	// IAgilent34980AThermistor
	STDMETHOD(IAgilent34980AThermistor_Configure)(BSTR ChannelList, Agilent34980AResolutionEnum Resolution, Agilent34980AThermistorEnum Type);
	STDMETHOD(IAgilent34980AThermistor_Measure)(BSTR ChannelList, Agilent34980AThermistorEnum Type, Agilent34980AResolutionEnum Resolution, SAFEARRAY** val);
	STDMETHOD(IAgilent34980AThermistor_get_Resistance)(BSTR ChannelList, Agilent34980AThermistorEnum* Val);
	STDMETHOD(IAgilent34980AThermistor_put_Resistance)(BSTR ChannelList, Agilent34980AThermistorEnum Val);
	STDMETHOD(IAgilent34980AThermistor_get_IsExternalReference)(BSTR ChannelList, VARIANT_BOOL* val);
	STDMETHOD(IAgilent34980AThermistor_put_IsExternalReference)(BSTR ChannelList, VARIANT_BOOL val);
	// IAgilent34980AThermocouple
	STDMETHOD(IAgilent34980AThermocouple_Configure)(BSTR ChannelList, Agilent34980AResolutionEnum Resolution, Agilent34980AThermocoupleEnum Type);
	STDMETHOD(IAgilent34980AThermocouple_Measure)(BSTR ChannelList, Agilent34980AThermocoupleEnum Type, Agilent34980AResolutionEnum Resolution, SAFEARRAY** val);
	STDMETHOD(IAgilent34980AThermocouple_get_ThermocoupleType)(BSTR ChannelList, Agilent34980AThermocoupleEnum* Val);
	STDMETHOD(IAgilent34980AThermocouple_put_ThermocoupleType)(BSTR ChannelList, Agilent34980AThermocoupleEnum Val);
	STDMETHOD(IAgilent34980AThermocouple_get_ReferenceJunctionType)(BSTR ChannelList, Agilent34980ARJunctionEnum* Val);
	STDMETHOD(IAgilent34980AThermocouple_put_ReferenceJunctionType)(BSTR ChannelList, Agilent34980ARJunctionEnum Val);
	STDMETHOD(IAgilent34980AThermocouple_get_FixedReferenceJunction)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AThermocouple_get_Check)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AThermocouple_put_Check)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AThermocouple_get_AutoImpedance)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980AThermocouple_put_AutoImpedance)(BSTR ChannelList, VARIANT_BOOL Val);
	STDMETHOD(IAgilent34980AThermocouple_get_ExternalReferenceJunction)(double* Val);
	STDMETHOD(IAgilent34980AThermocouple_get_InternalReferenceJunction)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34980AThermocouple_put_FixedReferenceJunction)(BSTR ChannelList, double Val);
	// IAgilent34980ATrigger
	STDMETHOD(IAgilent34980ATrigger_get_SampleCount)(long* Val);
	STDMETHOD(IAgilent34980ATrigger_put_SampleCount)(long Val);
	STDMETHOD(IAgilent34980ATrigger_get_Count)(long* Val);
	STDMETHOD(IAgilent34980ATrigger_put_Count)(long Val);
	STDMETHOD(IAgilent34980ATrigger_get_Source)(Agilent34980ATriggerSourceEnum* Val);
	STDMETHOD(IAgilent34980ATrigger_put_Source)(Agilent34980ATriggerSourceEnum Val);
	STDMETHOD(IAgilent34980ATrigger_get_Timer)(double* Val);
	STDMETHOD(IAgilent34980ATrigger_put_Timer)(double Val);
	STDMETHOD(IAgilent34980ATrigger_Configure)(Agilent34980ATriggerSourceEnum Source, long TriggerCount, double Timer, long SampleCount);
	STDMETHOD(IAgilent34980ATrigger_get_Delay)(double* Val);
	STDMETHOD(IAgilent34980ATrigger_put_Delay)(double Val);
	STDMETHOD(IAgilent34980ATrigger_get_DelayAuto)(VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34980ATrigger_put_DelayAuto)(VARIANT_BOOL Val);
	// IIviSwtch
	STDMETHOD(IIviSwtch_get_Channels)(IIviSwtchChannels** Val);
	STDMETHOD(IIviSwtch_get_Path)(IIviSwtchPath** Val);
	STDMETHOD(IIviSwtch_get_Scan)(IIviSwtchScan** Val);
	// IIviSwtchChannels
	STDMETHOD(IIviSwtchChannels_get_Item)(BSTR Name, IIviSwtchChannel** Val);
	STDMETHOD(IIviSwtchChannels_get_Count)(long* Val);
	STDMETHOD(IIviSwtchChannels_get_Name)(long Index, BSTR* Val);
	// IIviSwtchPath
	STDMETHOD(IIviSwtchPath_WaitForDebounce)(long MaxTimeMilliseconds);
	STDMETHOD(IIviSwtchPath_SetPath)(BSTR PathList);
	STDMETHOD(IIviSwtchPath_GetPath)(BSTR Channel1, BSTR Channel2, BSTR* Val);
	STDMETHOD(IIviSwtchPath_DisconnectAll)();
	STDMETHOD(IIviSwtchPath_Disconnect)(BSTR Channel1, BSTR Channel2);
	STDMETHOD(IIviSwtchPath_Connect)(BSTR Channel1, BSTR Channel2);
	STDMETHOD(IIviSwtchPath_CanConnect)(BSTR Channel1, BSTR Channel2, IviSwtchPathCapabilityEnum* Val);
	STDMETHOD(IIviSwtchPath_get_IsDebounced)(VARIANT_BOOL* Val);
	// IIviSwtchScan
	STDMETHOD(IIviSwtchScan_WaitForScanComplete)(long MaxTimeMilliseconds);
	STDMETHOD(IIviSwtchScan_SendSoftwareTrigger)();
	STDMETHOD(IIviSwtchScan_Abort)();
	STDMETHOD(IIviSwtchScan_Initiate)();
	STDMETHOD(IIviSwtchScan_ConfigureTrigger)(double ScanDelay, IviSwtchTriggerInputEnum TriggerInput, IviSwtchAdvancedOutputEnum AdvancedOutput);
	STDMETHOD(IIviSwtchScan_ConfigureList)(BSTR List, IviSwtchScanModeEnum Mode);
	STDMETHOD(IIviSwtchScan_get_IsScanning)(VARIANT_BOOL* Val);
	STDMETHOD(IIviSwtchScan_get_Continuous)(VARIANT_BOOL* Val);
	STDMETHOD(IIviSwtchScan_put_Continuous)(VARIANT_BOOL Val);
	STDMETHOD(IIviSwtchScan_get_NumberOfColumns)(long* Val);
	STDMETHOD(IIviSwtchScan_get_NumberOfRows)(long* Val);
	STDMETHOD(IIviSwtchScan_get_AdvancedOutput)(IviSwtchAdvancedOutputEnum* Val);
	STDMETHOD(IIviSwtchScan_put_AdvancedOutput)(IviSwtchAdvancedOutputEnum Val);
	STDMETHOD(IIviSwtchScan_get_Delay)(double* Val);
	STDMETHOD(IIviSwtchScan_put_Delay)(double Val);
	STDMETHOD(IIviSwtchScan_get_Input)(IviSwtchTriggerInputEnum* Val);
	STDMETHOD(IIviSwtchScan_put_Input)(IviSwtchTriggerInputEnum Val);
	STDMETHOD(IIviSwtchScan_get_List)(BSTR* Val);
	STDMETHOD(IIviSwtchScan_put_List)(BSTR Val);
	STDMETHOD(IIviSwtchScan_get_Mode)(IviSwtchScanModeEnum* Val);
	STDMETHOD(IIviSwtchScan_put_Mode)(IviSwtchScanModeEnum Val);
	// IAgilent34980ADMM
	STDMETHOD(IAgilent34980ADMM_PerformCalibration)();
	STDMETHOD(IAgilent34980ADMM_get_Count)(long* Val);
	STDMETHOD(IAgilent34980ADMM_get_String)(BSTR* Val);
	STDMETHOD(IAgilent34980ADMM_put_String)(BSTR Val);
	STDMETHOD(IAgilent34980ADMM_get_Value)(double* Val);
	STDMETHOD(IAgilent34980ADMM_put_Value)(double Val);
	// IAgilent34980ADAC
	STDMETHOD(IAgilent34980ADAC_AutoCalibrate)(short SlotNumber, VARIANT_BOOL All);
	STDMETHOD(IAgilent34980ADAC_Abort)();
	STDMETHOD(IAgilent34980ADAC_BeginVoltageCal)(BSTR ChannelList, short SetupNumber);
	STDMETHOD(IAgilent34980ADAC_get_Count)(short SlotNumber, long* Val);
	STDMETHOD(IAgilent34980ADAC_Point)(double PointData);
	STDMETHOD(IAgilent34980ADAC_get_String)(short SlotNumber, BSTR* Val);
	STDMETHOD(IAgilent34980ADAC_put_String)(short SlotNumber, BSTR Val);
	// IAgilent34980AAlarm2
	STDMETHOD(IAgilent34980AAlarm2_get_AlarmSequence)(long Index, BSTR* val);
	// IAgilent34980A2
	STDMETHOD(IAgilent34980A2_get_Alarm)(IAgilent34980AAlarm2** val);
	STDMETHOD(IAgilent34980A2_get_Route)(IAgilent34980ARoute2** val);
	STDMETHOD(IAgilent34980A2_get_Status)(IAgilent34980AStatus2** val);
	STDMETHOD(IAgilent34980A2_get_Calibration)(IAgilent34980ACalibration** val);
	STDMETHOD(IAgilent34980A2_get_Current)(IAgilent34980ACurrent** val);
	STDMETHOD(IAgilent34980A2_get_Diagnostic)(IAgilent34980ADiagnostic** val);
	STDMETHOD(IAgilent34980A2_get_Frequency)(IAgilent34980AFrequency** val);
	STDMETHOD(IAgilent34980A2_get_FResistance)(IAgilent34980AFResistance** val);
	STDMETHOD(IAgilent34980A2_get_Measurement)(IAgilent34980AMeasurement** val);
	STDMETHOD(IAgilent34980A2_get_Memory)(IAgilent34980AMemory** val);
	STDMETHOD(IAgilent34980A2_get_Period)(IAgilent34980APeriod** val);
	STDMETHOD(IAgilent34980A2_get_Personality)(IAgilent34980APersonality** val);
	STDMETHOD(IAgilent34980A2_get_Resistance)(IAgilent34980AResistance** val);
	STDMETHOD(IAgilent34980A2_get_Scale)(IAgilent34980AScale** val);
	STDMETHOD(IAgilent34980A2_get_Scan)(IAgilent34980AScan** val);
	STDMETHOD(IAgilent34980A2_get_Statistics)(IAgilent34980AStatistics** val);
	STDMETHOD(IAgilent34980A2_get_System)(IAgilent34980ASystem** val);
	STDMETHOD(IAgilent34980A2_get_Temperature)(IAgilent34980ATemperature** val);
	STDMETHOD(IAgilent34980A2_get_Trigger)(IAgilent34980ATrigger** val);
	STDMETHOD(IAgilent34980A2_get_Voltage)(IAgilent34980AVoltage** val);
	STDMETHOD(IAgilent34980A2_get_Display)(IAgilent34980ADisplay** val);
	// IAgilent34980ARoute2
	STDMETHOD(IAgilent34980ARoute2_get_ChannelLabel)(BSTR ChannelList, BSTR* val);
	STDMETHOD(IAgilent34980ARoute2_put_ChannelLabel)(BSTR ChannelList, BSTR val);
	STDMETHOD(IAgilent34980ARoute2_get_SequenceCatalog)(BSTR* val);
	STDMETHOD(IAgilent34980ARoute2_SequenceDefine)(BSTR SequenceName, BSTR CommandString);
	STDMETHOD(IAgilent34980ARoute2_SequenceDelete)(BSTR SequenceName);
	STDMETHOD(IAgilent34980ARoute2_SequenceDeleteAll)();
	STDMETHOD(IAgilent34980ARoute2_SequenceTriggerImmediate)(BSTR SequenceName);
	STDMETHOD(IAgilent34980ARoute2_get_SequenceTriggerSource)(BSTR SequenceName, Agilent34980ASequenceTriggerSourceEnum* val);
	STDMETHOD(IAgilent34980ARoute2_put_SequenceTriggerSource)(BSTR SequenceName, Agilent34980ASequenceTriggerSourceEnum val);
	// IAgilent34980AStatus2
	STDMETHOD(IAgilent34980AStatus2_get_ModuleRegister)(long Slot, Agilent34980AStatusSubRegisterEnum SubRegister, long* val);
	STDMETHOD(IAgilent34980AStatus2_put_ModuleRegister)(long Slot, Agilent34980AStatusSubRegisterEnum SubRegister, long val);
};

