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

/// <summary>
/// Closes the I/O session to the instrument.  Driver methods and properties that
/// access the instrument are not accessible after Close is called.
/// </summary>
/// <remarks>
/// 
/// </remarks>
/// <returns>
///	
/// </returns>
HRESULT Agilent34980A::IIviDriver_Close()
{
	HRESULT hr = S_OK;

	hr = DriverBase::Close();

	return hr;
}

/// <summary>
/// Opens the I/O session to the instrument.  Driver methods and properties that
/// access the instrument are only accessible after Initialize is called.  Initialize
/// optionally performs a Reset and queries the instrument to validate the instrument
/// model.
/// </summary>
/// <remarks>
/// 
/// </remarks>
/// <returns>
///	
/// </returns>
/// <param name="ResourceName">
///	An IVI logical name or an instrument specific string that identifies the address
/// of the instrument, such as a VISA resource descriptor string.
/// </param>
/// <param name="IdQuery">
///	Specifies whether to verify the ID of the instrument.
/// </param>
/// <param name="Reset">
///	Specifies whether to reset the instrument.
/// </param>
/// <param name="OptionString">
///	The user can use the OptionsString parameter to specify the initial values of
/// certain IVI inherent attributes for the session. The format of an assignment
/// in the OptionsString parameteris "Name=Value", where Name is one of: RangeCheck,
/// QuerytInstrStatus, Cache, Simulate, RecordCoercions, InterchangeCheck,or DriverSetup.
/// Value is either true or false except for DriverSetup. If the Options String
/// parameter contains an assignment for the Driver Setup attribute, the Initialize
/// function assumes that everything following "DriverSetup=" is part of the assignment.
/// </param>
HRESULT Agilent34980A::IIviDriver_Initialize(BSTR ResourceName, VARIANT_BOOL IdQuery, VARIANT_BOOL Reset, BSTR OptionString)
{
	HRESULT hr = S_OK;

	hr = DriverBase::Initialize(ResourceName, IdQuery, Reset, OptionString);

	return hr;
}

/// <summary>
///	Pointer to the IIviDriverOperation interface
/// </summary>
/// <remarks>
///	
/// </remarks>
HRESULT Agilent34980A::IIviDriver_get_DriverOperation(IIviDriverOperation** Val)
{
	HRESULT hr = S_OK;

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

	return hr;
}

/// <summary>
///	Pointer to the IIviDriverIdentity interface
/// </summary>
/// <remarks>
///	
/// </remarks>
HRESULT Agilent34980A::IIviDriver_get_Identity(IIviDriverIdentity** Val)
{
	HRESULT hr = S_OK;

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

	return hr;
}

/// <summary>
///	Pointer to the IIviDriverUtility interface
/// </summary>
/// <remarks>
///	
/// </remarks>
HRESULT Agilent34980A::IIviDriver_get_Utility(IIviDriverUtility** Val)
{
	HRESULT hr = S_OK;

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

	return hr;
}

/// <summary>
///	Initialized is True between a successful call to the Initialize method and a
/// successful call to the Close method, and False at all other times.
/// </summary>
/// <remarks>
///	
/// </remarks>
HRESULT Agilent34980A::IIviDriver_get_Initialized(VARIANT_BOOL* Val)
{
	HRESULT hr = S_OK;

	hr = DriverBase::get_Initialized(Val);

	return hr;
}


