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






/// <summary>
/// Configures a digital channel as an input of the specified width..
/// </summary>
/// <remarks>
/// Threshold values may range 0 to 5V in 20mV steps.
/// </remarks>
/// <returns>
///	
/// </returns>
/// <param name="ChannelList">
///	One or more channels in the form sccc.
/// </param>
/// <param name="Width">
///	Width of the digital channel.
/// </param>
/// <param name="Threshold">
///	Threshold voltage (in Volts).
/// </param>
HRESULT Agilent34950A::IAgilent34950AInput_Configure(BSTR ChannelList, Agilent34950AChannelWidthEnum Width, double Threshold)
{
	HRESULT hr = S_OK;

	hr = InstrPrintCommand();

	return hr;
}

/// <summary>
///	Sets or gets the digital input threshold for the given channel(s).
/// </summary>
/// <remarks>
///	The threshold voltage can range from 0V to 5V with ~20mV steps. The default
/// is 0.8V.  Can be sent at any time, but applies only when the channel is an input.
///  The query returns the current setting.
/// </remarks>
/// <param name="ChannelList">
///	One or more channels in the form sccc.
/// </param>
HRESULT Agilent34950A::IAgilent34950AInput_get_Threshold(BSTR ChannelList, double* val)
{
	HRESULT hr = S_OK;

	hr = InstrQueryCommand(val);

	return hr;
}

/// <summary>
///	Sets or gets the digital input threshold for the given channel(s).
/// </summary>
/// <remarks>
///	The threshold voltage can range from 0V to 5V with ~20mV steps. The default
/// is 0.8V.  Can be sent at any time, but applies only when the channel is an input.
///  The query returns the current setting.
/// </remarks>
/// <param name="ChannelList">
///	One or more channels in the form sccc.
/// </param>
HRESULT Agilent34950A::IAgilent34950AInput_put_Threshold(BSTR ChannelList, double val)
{
	HRESULT hr = S_OK;

	hr = InstrPrintCommand();

	return hr;
}




/// <summary>
///	Pointer to the IAgilent34950AInputMemory interface.
/// </summary>
/// <remarks>
///	
/// </remarks>
HRESULT Agilent34950A::IAgilent34950AInput_get_Memory(IAgilent34950AInputMemory** val)
{
	HRESULT hr = S_OK;

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

	return hr;
}

