Skip to content
Snippets Groups Projects
Keithley428.h 6.8 KiB
Newer Older
Teresa Nunez's avatar
Teresa Nunez committed
//=============================================================================
//
// file :        Keithley428.h
//
// description : Include for the Keithley428 class.
//
// project :	Keithley428 Current Amplifier
//
// $Author:  $
//
// $Revision:  $
// $Date:  $
//
// SVN only:
// $HeadURL: $
//
// CVS only:
// $Source:  $
// $Log:  $
//
// copyleft :    European Synchrotron Radiation Facility
//               BP 220, Grenoble 38043
//               FRANCE
//
//=============================================================================
//
//  		This file is generated by POGO
//	(Program Obviously used to Generate tango Object)
//
//         (c) - Software Engineering Group - ESRF
//=============================================================================
#ifndef _KEITHLEY428_H
#define _KEITHLEY428_H

#include <tango.h>
using namespace Tango;

/**
 * @author	$Author:  $
 * @version	$Revision:  $
 */

 //	Add your own constant definitions here.
 //-----------------------------------------------

#define MAX_STRING_LENGTH	 	256


namespace Keithley428_ns
{

/**
 * Class Description:
 * Class for controlling the Keithley428 current amplifier.
 */

/*
 *	Device States Description:
*  Tango::ON :
*  Tango::FAULT :
 */


class Keithley428: public Tango::Device_4Impl
{
public :
	//	Add your own data members here
	//-----------------------------------------


	//	Here is the Start of the automatic code generation part
	//-------------------------------------------------------------	
/**
 *	@name attributes
 *	Attribute member data.
 */
//@{
		Tango::DevLong	*attr_Gain_read;
		Tango::DevLong	attr_Gain_write;
		Tango::DevString	*attr_GainStr_read;
		Tango::DevLong	*attr_Overloaded_read;
		Tango::DevLong	*attr_Bypass_read;
		Tango::DevLong	attr_Bypass_write;
		Tango::DevString	*attr_filterState_read;
		Tango::DevString	*attr_autoFilterState_read;
//@}

/**
 * @name Device properties
 * Device properties member data.
 */
//@{
/**
 *	Name of the gpib device connected to the hardware.
 */
	string	gpibDevice;
/**
 *	Type of the Gpib device used to communicate with the Keithley.
 *	this can be:
 *	1 -> Desy GpibDevice (default value)
 *	2 -> Soleil GpibDeviceServer
 */
	Tango::DevUShort	gpibDeviceType;
//@}

/**
 *	@name Device properties
 *	Device property member data.
 */
//@{
//@}

/**@name Constructors
 * Miscellaneous constructors */
//@{
/**
 * Constructs a newly allocated Command object.
 *
 *	@param cl	Class.
 *	@param s 	Device Name
 */
	Keithley428(Tango::DeviceClass *cl,string &s);
/**
 * Constructs a newly allocated Command object.
 *
 *	@param cl	Class.
 *	@param s 	Device Name
 */
	Keithley428(Tango::DeviceClass *cl,const char *s);
/**
 * Constructs a newly allocated Command object.
 *
 *	@param cl	Class.
 *	@param s 	Device name
 *	@param d	Device description.
 */
	Keithley428(Tango::DeviceClass *cl,const char *s,const char *d);
//@}

/**@name Destructor
 * Only one destructor is defined for this class */
//@{
/**
 * The object destructor.
 */	
	~Keithley428() {delete_device();};
/**
 *	will be called at device destruction or at init command.
 */
	void delete_device();
//@}

	
/**@name Miscellaneous methods */
//@{
/**
 *	Initialize the device
 */
	virtual void init_device();
/**
 *	Always executed method before execution command method.
 */
	virtual void always_executed_hook();

//@}

/**
 * @name Keithley428 methods prototypes
 */

//@{
/**
 *	Hardware acquisition for attributes.
 */
	virtual void read_attr_hardware(vector<long> &attr_list);
/**
 *	Extract real attribute values for Gain acquisition result.
 */
	virtual void read_Gain(Tango::Attribute &attr);
/**
 *	Write Gain attribute values to hardware.
 */
	virtual void write_Gain(Tango::WAttribute &attr);
/**
 *	Extract real attribute values for GainStr acquisition result.
 */
	virtual void read_GainStr(Tango::Attribute &attr);
/**
 *	Extract real attribute values for Overloaded acquisition result.
 */
	virtual void read_Overloaded(Tango::Attribute &attr);
/**
 *	Extract real attribute values for Bypass acquisition result.
 */
	virtual void read_Bypass(Tango::Attribute &attr);
/**
 *	Write Bypass attribute values to hardware.
 */
	virtual void write_Bypass(Tango::WAttribute &attr);
/**
 *	Extract real attribute values for filterState acquisition result.
 */
	virtual void read_filterState(Tango::Attribute &attr);
/**
 *	Extract real attribute values for autoFilterState acquisition result.
 */
	virtual void read_autoFilterState(Tango::Attribute &attr);
/**
 *	Read/Write allowed for Gain attribute.
 */
	virtual bool is_Gain_allowed(Tango::AttReqType type);
/**
 *	Read/Write allowed for GainStr attribute.
 */
	virtual bool is_GainStr_allowed(Tango::AttReqType type);
/**
 *	Read/Write allowed for Overloaded attribute.
 */
	virtual bool is_Overloaded_allowed(Tango::AttReqType type);
/**
 *	Read/Write allowed for Bypass attribute.
 */
	virtual bool is_Bypass_allowed(Tango::AttReqType type);
/**
 *	Read/Write allowed for filterState attribute.
 */
	virtual bool is_filterState_allowed(Tango::AttReqType type);
/**
 *	Read/Write allowed for autoFilterState attribute.
 */
	virtual bool is_autoFilterState_allowed(Tango::AttReqType type);
/**
 *	Execution allowed for PerformZeroCorrect command.
 */
	virtual bool is_PerformZeroCorrect_allowed(const CORBA::Any &any);
/**
 *	Execution allowed for FilterOn command.
 */
	virtual bool is_FilterOn_allowed(const CORBA::Any &any);
/**
 *	Execution allowed for FilterOff command.
 */
	virtual bool is_FilterOff_allowed(const CORBA::Any &any);
/**
 *	Execution allowed for AutoFilterOn command.
 */
	virtual bool is_AutoFilterOn_allowed(const CORBA::Any &any);
/**
 *	Execution allowed for AutoFilterOff command.
 */
	virtual bool is_AutoFilterOff_allowed(const CORBA::Any &any);
/**
 * Perform Zero correction.
 *	@exception DevFailed
 */
	void	perform_zero_correct();
/**
 * Turn the filter ON
 *	@exception DevFailed
 */
	void	filter_on();
/**
 * Turn the filter OFF
 *	@exception DevFailed
 */
	void	filter_off();
/**
 * Enable Auto Filter
 *	@exception DevFailed
 */
	void	auto_filter_on();
/**
 * Disable Auto Filter
 *	@exception DevFailed
 */
	void	auto_filter_off();

/**
 *	Read the device properties from database
 */
	 void get_device_property();
//@}

	//	Here is the end of the automatic code generation part
	//-------------------------------------------------------------	



protected :	
	//	Add your own data members here
	//-----------------------------------------

	 DeviceProxy *gpib_device;

	 DevString  buffer;
	 char tmp_buffer[180];

     std::string m_write_read;
     std::string m_write;
};

}	// namespace_ns

#endif	// _KEITHLEY428_H