/******************************************************************************
 *                                                                         
 *               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("Agilent34945A.Agilent34945A"),
	progid("Agilent34945A.Agilent34945A.1"),
	uuid("6452a389-2790-48af-8541-c330d7e5430b"),
	helpstring("Agilent34945A Class"),
	default(IAgilent34945A)
]
class ATL_NO_VTABLE Agilent34945A : 
	public CPersonality<Agilent34945A, CVisaComIOProvider>,
	public ISupportErrorInfo,
	public _IAgilent34945A,
	public _IAgilent34945AChannel,
	public _IAgilent34945AModule,
	public _IAgilent34945ASystem
{
public:
	int CalculateBank( CString &channel );
	HRESULT FinalConstruct();
	void FinalRelease();

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

	HRESULT FinalInitialize();
	HRESULT FinalClose();

	CString GetSelectCommand()
	{
		return "";
	}

	DECLARE_PROTECT_FINAL_CONSTRUCT()
	DECLARE_NIMBUS_CLASS(Agilent34945A)

public:

public:
	// IAgilent34945A
	STDMETHOD(IAgilent34945A_get_Channel)(IAgilent34945AChannel** val);
	STDMETHOD(IAgilent34945A_get_Module)(IAgilent34945AModule** val);
	STDMETHOD(IAgilent34945A_get_System)(IAgilent34945ASystem** val);

	// IAgilent34945AChannel
	STDMETHOD(IAgilent34945AChannel_Configure)(BSTR ChannelList, VARIANT_BOOL Paired, VARIANT_BOOL PulseMode, double PulseWidth, double RecoveryTime, double SettleTime);
	STDMETHOD(IAgilent34945AChannel_Close)(BSTR ChannelList);
	STDMETHOD(IAgilent34945AChannel_Open)(BSTR ChannelList);
	STDMETHOD(IAgilent34945AChannel_get_DriveState)(BSTR ChannelList, VARIANT_BOOL* val);
	STDMETHOD(IAgilent34945AChannel_get_PairedMode)(BSTR ChannelList, VARIANT_BOOL* val);
	STDMETHOD(IAgilent34945AChannel_put_PairedMode)(BSTR ChannelList, VARIANT_BOOL val);
	STDMETHOD(IAgilent34945AChannel_get_PulseMode)(BSTR ChannelList, VARIANT_BOOL* val);
	STDMETHOD(IAgilent34945AChannel_put_PulseMode)(BSTR ChannelList, VARIANT_BOOL val);
	STDMETHOD(IAgilent34945AChannel_get_PulseWidth)(BSTR ChannelList, double* val);
	STDMETHOD(IAgilent34945AChannel_put_PulseWidth)(BSTR ChannelList, double val);
	STDMETHOD(IAgilent34945AChannel_get_RecoveryTime)(BSTR ChannelList, double* val);
	STDMETHOD(IAgilent34945AChannel_put_RecoveryTime)(BSTR ChannelList, double val);
	STDMETHOD(IAgilent34945AChannel_get_SettleTime)(BSTR ChannelList, double* val);
	STDMETHOD(IAgilent34945AChannel_put_SettleTime)(BSTR ChannelList, double val);
	STDMETHOD(IAgilent34945AChannel_get_VerificationEnable)(BSTR ChannelList, VARIANT_BOOL* val);
	STDMETHOD(IAgilent34945AChannel_put_VerificationEnable)(BSTR ChannelList, VARIANT_BOOL val);
	STDMETHOD(IAgilent34945AChannel_get_VerificationPolarity)(BSTR ChannelList, Agilent34945APolarityEnum* val);
	STDMETHOD(IAgilent34945AChannel_put_VerificationPolarity)(BSTR ChannelList, Agilent34945APolarityEnum val);
	STDMETHOD(IAgilent34945AChannel_get_StateAtReset)(BSTR ChannelList, VARIANT_BOOL* val);
	STDMETHOD(IAgilent34945AChannel_put_StateAtReset)(BSTR ChannelList, VARIANT_BOOL val);
	STDMETHOD(IAgilent34945AChannel_get_IsClosed)(BSTR Channel, VARIANT_BOOL* val);

	// IAgilent34945AModule
	STDMETHOD(IAgilent34945AModule_get_BankDriveType)(BSTR RemoteModuleList, long Bank, Agilent34945ADriveTypeEnum* val);
	STDMETHOD(IAgilent34945AModule_put_BankDriveType)(BSTR RemoteModuleList, long Bank, Agilent34945ADriveTypeEnum val);
	STDMETHOD(IAgilent34945AModule_get_BankLEDEnable)(BSTR RemoteModuleList, long Bank, VARIANT_BOOL* val);
	STDMETHOD(IAgilent34945AModule_put_BankLEDEnable)(BSTR RemoteModuleList, long Bank, VARIANT_BOOL val);
	STDMETHOD(IAgilent34945AModule_get_BankLEDDriveLevel)(BSTR RemoteModuleList, long Bank, double* val);
	STDMETHOD(IAgilent34945AModule_put_BankLEDDriveLevel)(BSTR RemoteModuleList, long Bank, double val);
	STDMETHOD(IAgilent34945AModule_BankPreset)(BSTR RemoteModuleList, long Bank);
	STDMETHOD(IAgilent34945AModule_get_DriveChannelLimit)(BSTR RemoteModuleList, long* val);
	STDMETHOD(IAgilent34945AModule_put_DriveChannelLimit)(BSTR RemoteModuleList, long val);
	STDMETHOD(IAgilent34945AModule_get_DriveSource)(BSTR RemoteModuleList, Agilent34945ADriveSourceEnum* val);
	STDMETHOD(IAgilent34945AModule_put_DriveSource)(BSTR RemoteModuleList, Agilent34945ADriveSourceEnum val);
	STDMETHOD(IAgilent34945AModule_get_DriveSourceBootState)(BSTR RemoteModuleList, Agilent34945ADriveSourceEnum* val);
	STDMETHOD(IAgilent34945AModule_put_DriveSourceBootState)(BSTR RemoteModuleList, Agilent34945ADriveSourceEnum val);
	// IAgilent34945ASystem
	STDMETHOD(IAgilent34945ASystem_RemoteModuleReset)(long Slot);
	STDMETHOD(IAgilent34945ASystem_get_RemoteModuleDescription)(BSTR RemoteModule, long Bank, BSTR* val);
	STDMETHOD(IAgilent34945ASystem_get_RemoteModuleType)(BSTR RemoteModule, long Bank, BSTR* val);
	STDMETHOD(IAgilent34945ASystem_get_RemoteModuleStatus)(long Slot, BSTR* val);

};

