/******************************************************************************
 *                                                                         
 *               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("Agilent34959A.Agilent34959A"),
	progid("Agilent34959A.Agilent34959A.1"),
	uuid("638ef5af-200e-4035-b5ec-07275dcefee0"),
	helpstring("Agilent34959A Class"),
	default(IAgilent34959A)
]
class ATL_NO_VTABLE Agilent34959A : 
	public CPersonality<Agilent34959A, CVisaComIOProvider>,
	public ISupportErrorInfo,
	public _IAgilent34959A,
	public _IAgilent34959ARoute,
	public _IAgilent34959ADigital
{
public:
	HRESULT FinalConstruct();
	void FinalRelease();

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

	HRESULT FinalInitialize();
	HRESULT FinalClose();
	
	CString GetSelectCommand()
	{
		return "";	
	}

DECLARE_PROTECT_FINAL_CONSTRUCT()
DECLARE_NIMBUS_CLASS(Agilent34959A)

public:
	
public:
	// IAgilent34959A
	STDMETHOD(IAgilent34959A_get_Digital)(IAgilent34959ADigital** val);
	STDMETHOD(IAgilent34959A_get_Route)(IAgilent34959ARoute** val);

	// IAgilent34959ARoute
	STDMETHOD(IAgilent34959ARoute_Close)(BSTR ChannelList);
	STDMETHOD(IAgilent34959ARoute_Open)(BSTR ChannelList);
	STDMETHOD(IAgilent34959ARoute_OpenAll)(long Slot);
	STDMETHOD(IAgilent34959ARoute_get_IsClosed)(BSTR Channel, VARIANT_BOOL* val);

	// IAgilent34959ADigital
	STDMETHOD(IAgilent34959ADigital_Configure)(BSTR ChannelList, Agilent34959AWidthEnum Width, Agilent34959ADirectionEnum Direction);
	STDMETHOD(IAgilent34959ADigital_QueryLastBit)(BSTR ChannelList, long BitNumber, VARIANT_BOOL* val);
	STDMETHOD(IAgilent34959ADigital_QueryLastByte)(BSTR ChannelList, BYTE* val);
	STDMETHOD(IAgilent34959ADigital_QueryLastWord)(BSTR ChannelList, short* val);
	STDMETHOD(IAgilent34959ADigital_ReadBit)(BSTR Channel, long BitNumber, VARIANT_BOOL* val);
	STDMETHOD(IAgilent34959ADigital_ReadByte)(BSTR ChannelList, BYTE* val);
	STDMETHOD(IAgilent34959ADigital_ReadWord)(BSTR ChannelList, short* val);
	STDMETHOD(IAgilent34959ADigital_WriteBit)(BSTR ChannelList, long BitNumber, VARIANT_BOOL Data);
	STDMETHOD(IAgilent34959ADigital_WriteByte)(BSTR ChannelList, BYTE Data);
	STDMETHOD(IAgilent34959ADigital_WriteWord)(BSTR ChannelList, short Data);
	STDMETHOD(IAgilent34959ADigital_get_Direction)(BSTR ChannelList, Agilent34959ADirectionEnum* val);
	STDMETHOD(IAgilent34959ADigital_put_Direction)(BSTR ChannelList, Agilent34959ADirectionEnum val);
	STDMETHOD(IAgilent34959ADigital_get_Width)(BSTR ChannelList, Agilent34959AWidthEnum* val);
	STDMETHOD(IAgilent34959ADigital_put_Width)(BSTR ChannelList, Agilent34959AWidthEnum val);

};

