Skip to content
Snippets Groups Projects
Select Git revision
  • 9b56c0ccfd96170364548a8c85ae28e796f007c4
  • main default protected
  • release_2_1_0
  • release_2_0_4
  • release_2_0_2
  • release_2_0_1
  • release_2_0_0
  • release_1_0_4
  • release_1_0_3
  • release_1_0_2
  • release_1_0_1
  • v0
  • release_1_0_0
  • release_0_1
14 results

DevCommandsTable.html

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_