/******************************************************************************
 *                                                                         
 *               Copyright 2004-2006 Agilent Technologies
 *               All rights reserved.
 *
 *****************************************************************************/
 
#include "stdafx.h"
#include "CoAgilent34980A.h"

/// <summary>
///	The type of device used to measure the temperature. This property affects instrument
/// behavior only when Function is set to a temperature measurement.
/// </summary>
/// <remarks>
///	
/// </remarks>
HRESULT Agilent34980A::IIviDmmTemperature_get_TransducerType(IviDmmTransducerTypeEnum* Val)
{
	HRESULT hr = S_OK;
	CString sResp;
	//hr = InstrQueryf( "TEMP:TRAN:TYPE?", sResp, DEFAULT_STRING_LENGTH );
	hr = InstrQueryCommandEnum( Val );
	//sResp.Remove( '\n' );
	//if( sResp=="FRTD" )
	//	*Val = IviDmmTransducerType4WireRtd;
	//else if( sResp=="RTD" )
	//	*Val = IviDmmTransducerType2WireRtd;
	//else
	//	return ReportError( IDS_E_IVI_UNEXPECTED_RESPONSE );
	return hr;
}

/// <summary>
///	The type of device used to measure the temperature. This property affects instrument
/// behavior only when Function is set to a temperature measurement.
/// </summary>
/// <remarks>
///	
/// </remarks>
HRESULT Agilent34980A::IIviDmmTemperature_put_TransducerType(IviDmmTransducerTypeEnum Val)
{
	HRESULT hr = S_OK;
	//CString s = Val==IviDmmTransducerType4WireRtd ? "FRTD" : "RTD";
	//hr = InstrPrintf( "TEMP:TRAN:TYPE %s", s );
	hr = InstrPrintCommand();
	
	return hr;
}

/// <summary>
///	Pointer to the class-compliant IIviDmmRtd interface
/// </summary>
/// <remarks>
///	
/// </remarks>
HRESULT Agilent34980A::IIviDmmTemperature_get_RTD(IIviDmmRTD** Val)
{
	HRESULT hr = S_OK;

	hr = InternalQueryInterface(this, _GetEntries(), __uuidof(*Val), reinterpret_cast<void**>(Val));

	return hr;
}

/// <summary>
///	Pointer to the class-compliant IIviDmmThermocouple interface
/// </summary>
/// <remarks>
///	
/// </remarks>
HRESULT Agilent34980A::IIviDmmTemperature_get_Thermocouple(IIviDmmThermocouple** Val)
{
	HRESULT hr = S_OK;

	hr = InternalQueryInterface(this, _GetEntries(), __uuidof(*Val), reinterpret_cast<void**>(Val));

	return hr;
}

/// <summary>
///	Pointer to the class-compliant IIviDmmThermistor interface
/// </summary>
/// <remarks>
///	
/// </remarks>
HRESULT Agilent34980A::IIviDmmTemperature_get_Thermistor(IIviDmmThermistor** Val)
{
	HRESULT hr = S_OK;

	hr = InternalQueryInterface(this, _GetEntries(), __uuidof(*Val), reinterpret_cast<void**>(Val));

	return hr;
}


