Skip to content
Snippets Groups Projects
Select Git revision
  • 62a784b3bbcd00dca6b4369c53275365909b443c
  • main default protected
  • develop
  • release_2_8_3
  • release_2_8_2
  • release_2_8_1
  • release_2_8_0
  • release_2_7_1
  • release_2_7_0
  • release_2_6_0
  • release_2_5_29
  • release_2_5_28
  • release_2_5_27
  • release_2_5_26
  • release_2_5_25
  • release_2_5_24
  • release_2_5_23
  • release_2_5_22
  • release_2_5_21
  • release_2_5_20
  • release_2_5_18
  • release_2_5_17
  • release_2_5_16
23 results

TangoGpibLink.h

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    TangoGpibLink.h 2.38 KiB
    // ============================================================================
    //
    // = CONTEXT
    //    TANGO Project - Keithley Electrometer Support Library
    //
    // = FILENAME
    //    TangoGpibLink.h
    //
    // = AUTHOR
    //    X. Elattaoui
    //
    // ============================================================================
    
    #ifndef _TANGO_GPIB_LINK_H_
    #define _TANGO_GPIB_LINK_H_
    
    // ============================================================================
    // DEPENDENCIES
    // ============================================================================
    #include <tango.h>
    #include <DeviceProxyHelper.h>
    #include "CommunicationLink.h"
    
    /**
     *  \addtogroup Communication Management
     *  @{
     */
    
    /**
     *  \brief This class manage the GPIB communication bus
     *
     *  \author Xavier Elattaoui
     *  \date 11-2006
     */
    
    class TangoGpibLink : public CommunicationLink
    {
    
    public :
    	/**
    	* Initialization. 
    	*/
    	TangoGpibLink (std::string& gpib_device_name);
    	
    	/**
    	*  \brief Release resources.
    	*/
    	virtual ~TangoGpibLink (void);
    	
    	/**
    	*  \brief Send command (data) as string to hardware.
    	*
    	*  \throws Tango::DevFailed
    	*/
    	void write(std::string cmd)	 throw (Tango::DevFailed);
    	
    	/**
    	*  \brief Gets hardware response as string.
    	*
    	*  \throws Tango::DevFailed
    	*/
    	std::string read(void)		 throw (Tango::DevFailed);
    
    	/**
    	*  \brief Performs a write read operation as string.
    	*
    	*  \throws Tango::DevFailed
    	*/
    	std::string write_read(std::string cmd)  throw (Tango::DevFailed);
    
    	/**
    	*  \brief Returns the Gpib SRQ line state : used here to know if Keithley 
      *           device is ready after an integration cycle.
    	*
    	*  \throws Tango::DevFailed
    	*/
    	bool SRQLineState             (void) throw (Tango::DevFailed); //- used to know if the integration cycle is done! 
    	short readStatusByteRegister  (void) throw (Tango::DevFailed); //- device status byte register value on SRQ! 
    
    	/**
    	*  \brief Clear a specific device (same as reset *RST).
    	*
    	*  \throws Tango::DevFailed
    	*/
    	void clear(void)  throw (Tango::DevFailed);
    
    	/**
    	*  \brief Trigg device on the gpib bus.
    	*
    	*  \throws Tango::DevFailed
    	*/
    	void trigger(void)  throw (Tango::DevFailed);
    
    private :
    
    	/**
    	* Creates a proxy on the specified GPIB Device.
    	*/
    	void create_gpib_proxy(void) throw (Tango::DevFailed);
      
    	Tango::DeviceProxyHelper* _gpib_proxy;
    
    	bool _is_gpib_proxy_created;
    	
    	std::string response;
    
    };
    
    /** @} */	//- end addtogroup
    
    #endif		// _TANGO_GPIB_LINK_H_