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

/// <summary>
/// Releases a previously obtained mutlithread lock.
/// </summary>
/// <remarks>
/// 
/// </remarks>
/// <returns>
///	
/// </returns>
HRESULT Agilent34980A::IIviDriverUtility_UnlockObject()
{
	HRESULT hr = S_OK;

	hr = DriverBase::UnlockObject();

	return hr;
}

/// <summary>
/// Obtains a multithread lock on the driver after waiting until all other execution
/// threads have released their locks on the instrument session.
/// </summary>
/// <remarks>
/// 
/// </remarks>
/// <returns>
///	
/// </returns>
HRESULT Agilent34980A::IIviDriverUtility_LockObject()
{
	HRESULT hr = S_OK;

	hr = DriverBase::LockObject();

	return hr;
}

/// <summary>
/// Queries the instrument and returns instrument specific error information.  This
/// function can be used when QueryInstrumentStatus is True to retrieve error details
/// when the driver detects an instrument error.
/// </summary>
/// <remarks>
/// 
/// </remarks>
/// <returns>
///	
/// </returns>
/// <param name="ErrorCode">
///	Instrument error code
/// </param>
/// <param name="ErrorMessage">
///	Instrument error message
/// </param>
HRESULT Agilent34980A::IIviDriverUtility_ErrorQuery(long* ErrorCode, BSTR* ErrorMessage)
{
	HRESULT hr = S_OK;

	hr = DriverBase::ErrorQuery(ErrorCode, ErrorMessage);

	return hr;
}

/// <summary>
/// Performs an instrument self test, waits for the instrument to complete the test,
/// and queries the instrument for the results.  If the instrument passes the test,
/// TestResult is zero and TestMessage is 'Self test passed'.
/// </summary>
/// <remarks>
/// 
/// </remarks>
/// <returns>
///	
/// </returns>
/// <param name="TestResult">
///	The numeric result from the self test operation. 0 = no error (test passed)
/// </param>
/// <param name="TestMessage">
///	The self test status message
/// </param>
HRESULT Agilent34980A::IIviDriverUtility_SelfTest(long* TestResult, BSTR* TestMessage)
{
	HRESULT hr = S_OK;

	hr = DriverBase::SelfTest(TestResult, TestMessage);

	return hr;
}

/// <summary>
/// Quickly places the instrument in a state where it has no, or minimal, effect
/// on the external system to which it is connected.  This state is not necessarily
/// a known state.
/// </summary>
/// <remarks>
/// 
/// </remarks>
/// <returns>
///	
/// </returns>
HRESULT Agilent34980A::IIviDriverUtility_Disable()
{
	HRESULT hr = S_OK;

	hr = DriverBase::Disable();

	return hr;
}

/// <summary>
/// Does the equivalent of Reset and then, (1) disables class extension capability
/// groups, (2) sets attributes to initial values defined by class specs, and (3)
/// configures the driver to option string settings used when Initialize was last
/// executed.
/// </summary>
/// <remarks>
/// 
/// </remarks>
/// <returns>
///	
/// </returns>
HRESULT Agilent34980A::IIviDriverUtility_ResetWithDefaults()
{
	HRESULT hr = S_OK;

	hr = DriverBase::ResetWithDefaults();

	return hr;
}

/// <summary>
/// Places the instrument in a known state and configures instrument options on
/// which the IVI specific driver depends (for example, enabling/disabling headers).
/// </summary>
/// <remarks>
///  For an IEEE 488.2 instrument, Reset sends the string *RST to the instrument.
/// </remarks>
/// <returns>
///	
/// </returns>
HRESULT Agilent34980A::IIviDriverUtility_Reset()
{
	HRESULT hr = S_OK;

	hr = DriverBase::Reset();

	return hr;
}


