/******************************************************************************
 *                                                                         
 *               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"

[	
	// COM component categories
	implements_category("CATID_IVI_COM_DRIVER_PERSONALITY"),

	// General attributes
	coclass,
	threading(both),
	vi_progid("Agilent34952A.Agilent34952A"),
	progid("Agilent34952A.Agilent34952A.1"),
	uuid("b1054eba-5ead-4ed3-96ff-00b1b111fcc9"),
	helpstring("Agilent34952A Class"),
	default(IAgilent34952A)
]
class ATL_NO_VTABLE Agilent34952A : 
	public CPersonality<Agilent34952A, CVisaComIOProvider>,
	public ISupportErrorInfo,
	public _IAgilent34952A,
	public _IAgilent34952ADAC,
	public _IAgilent34952ADigital,
	public _IAgilent34952ATotalize
{
public:
	HRESULT FinalConstruct();
	void FinalRelease();

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

	HRESULT FinalInitialize();
	HRESULT FinalClose();

	CString GetSelectCommand()
	{
		return "";	
	}

	DECLARE_PROTECT_FINAL_CONSTRUCT()
	DECLARE_NIMBUS_CLASS(Agilent34952A)

public:

public:
	// IAgilent34952A
	STDMETHOD(IAgilent34952A_get_DAC)(IAgilent34952ADAC** Val);
	STDMETHOD(IAgilent34952A_get_Digital)(IAgilent34952ADigital** Val);
	STDMETHOD(IAgilent34952A_get_Totalize)(IAgilent34952ATotalize** Val);
	// IAgilent34952ADAC
	STDMETHOD(IAgilent34952ADAC_get_Voltage)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34952ADAC_put_Voltage)(BSTR ChannelList, double Val);

	// IAgilent34952ADigital
	STDMETHOD(IAgilent34952ADigital_Configure)(BSTR ChannelList, Agilent34952ADigitalModeEnum Mode, Agilent34952ADirectionEnum Direction);
	STDMETHOD(IAgilent34952ADigital_QueryLastByte)(BSTR ChannelList, BYTE* Val);
	STDMETHOD(IAgilent34952ADigital_QueryLastWord)(BSTR ChannelList, short* Val);
	STDMETHOD(IAgilent34952ADigital_ReadBit)(BSTR ChannelList, long BitNumber, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34952ADigital_ReadByte)(BSTR ChannelList, BYTE* Val);
	STDMETHOD(IAgilent34952ADigital_ReadWord)(BSTR ChannelList, short* Val);
	STDMETHOD(IAgilent34952ADigital_ReadLongWord)(BSTR ChannelList, long* Val);
	STDMETHOD(IAgilent34952ADigital_WriteBit)(BSTR ChannelList, long BitNumber, long Data);
	STDMETHOD(IAgilent34952ADigital_WriteByte)(BSTR ChannelList, BYTE Data);
	STDMETHOD(IAgilent34952ADigital_WriteWord)(BSTR ChannelList, short Data);
	STDMETHOD(IAgilent34952ADigital_WriteLongWord)(BSTR ChannelList, long Data);
	STDMETHOD(IAgilent34952ADigital_get_ComparisonData)(BSTR ChannelList, BYTE* val);
	STDMETHOD(IAgilent34952ADigital_put_ComparisonData)(BSTR ChannelList, BYTE val);
	STDMETHOD(IAgilent34952ADigital_get_ComparisonEnable)(BSTR ChannelList, VARIANT_BOOL* val);
	STDMETHOD(IAgilent34952ADigital_put_ComparisonEnable)(BSTR ChannelList, VARIANT_BOOL val);
	STDMETHOD(IAgilent34952ADigital_get_ComparisonMask)(BSTR ChannelList, long* Val);
	STDMETHOD(IAgilent34952ADigital_put_ComparisonMask)(BSTR ChannelList, long Val);
	STDMETHOD(IAgilent34952ADigital_get_ComparisonType)(BSTR ChannelList, Agilent34952AComparisonTypeEnum* Val);
	STDMETHOD(IAgilent34952ADigital_put_ComparisonType)(BSTR ChannelList, Agilent34952AComparisonTypeEnum Val);
	STDMETHOD(IAgilent34952ADigital_get_State)(BSTR ChannelList, VARIANT_BOOL* Val);
	STDMETHOD(IAgilent34952ADigital_get_Direction)(BSTR ChannelList, Agilent34952ADirectionEnum* Val);
	STDMETHOD(IAgilent34952ADigital_put_Direction)(BSTR ChannelList, Agilent34952ADirectionEnum Val);
	STDMETHOD(IAgilent34952ADigital_get_ComparisonDataByte)(BSTR ChannelList, BYTE* val);
	STDMETHOD(IAgilent34952ADigital_put_ComparisonDataByte)(BSTR ChannelList, BYTE val);
	STDMETHOD(IAgilent34952ADigital_get_ComparisonDataWord)(BSTR ChannelList, short* val);
	STDMETHOD(IAgilent34952ADigital_put_ComparisonDataWord)(BSTR ChannelList, short val);
	STDMETHOD(IAgilent34952ADigital_get_ComparisonDataLongWord)(BSTR ChannelList, long* val);
	STDMETHOD(IAgilent34952ADigital_put_ComparisonDataLongWord)(BSTR ChannelList, long val);
	STDMETHOD(IAgilent34952ADigital_get_ComparisonMaskByte)(BSTR ChannelList, BYTE* val);
	STDMETHOD(IAgilent34952ADigital_put_ComparisonMaskByte)(BSTR ChannelList, BYTE val);
	STDMETHOD(IAgilent34952ADigital_get_ComparisonMaskWord)(BSTR ChannelList, short* val);
	STDMETHOD(IAgilent34952ADigital_put_ComparisonMaskWord)(BSTR ChannelList, short val);
	STDMETHOD(IAgilent34952ADigital_get_ComparisonMaskLongWord)(BSTR ChannelList, long* val);
	STDMETHOD(IAgilent34952ADigital_put_ComparisonMaskLongWord)(BSTR ChannelList, long val);
	// IAgilent34952ATotalize
	STDMETHOD(IAgilent34952ATotalize_ClearTotal)(BSTR ChannelList);
	STDMETHOD(IAgilent34952ATotalize_Configure)(BSTR ChannelList, Agilent34952ATotalizeTypeEnum Type, Agilent34952ATotalizeThresholdModeEnum Mode, Agilent34952ATotalizeSlopeEnum Slope);
	STDMETHOD(IAgilent34952ATotalize_ReadData)(BSTR ChannelList, double* Val);
	STDMETHOD(IAgilent34952ATotalize_get_Mode)(BSTR ChannelList, Agilent34952ATotalizeThresholdModeEnum* Val);
	STDMETHOD(IAgilent34952ATotalize_put_Mode)(BSTR ChannelList, Agilent34952ATotalizeThresholdModeEnum Val);
	STDMETHOD(IAgilent34952ATotalize_get_ReadType)(BSTR ChannelList, Agilent34952ATotalizeTypeEnum* Val);
	STDMETHOD(IAgilent34952ATotalize_put_ReadType)(BSTR ChannelList, Agilent34952ATotalizeTypeEnum Val);
	STDMETHOD(IAgilent34952ATotalize_get_Slope)(BSTR ChannelList, Agilent34952ATotalizeSlopeEnum* Val);
	STDMETHOD(IAgilent34952ATotalize_put_Slope)(BSTR ChannelList, Agilent34952ATotalizeSlopeEnum Val);

};

