Skip to content
Snippets Groups Projects
CommunicationLink.h 1.54 KiB
Newer Older
LE's avatar
LE committed
// ============================================================================
//
// = CONTEXT
//    TANGO Project - Keithley Electrometer Support Library
//
// = FILENAME
//    CommunicationLink.h
//
// = AUTHOR
//    X. Elattaoui
//
//
// $Author: stephle $
//
// $Revision: 1.1 $
//
// $Log: not supported by cvs2svn $
//
// ============================================================================

#ifndef _COMMUNICATION_LINK_H_
#define _COMMUNICATION_LINK_H_

#include <string>

// ============================================================================
// DEPENDENCIES
// ============================================================================


/**
 *  \addtogroup Communication Management
 *  @{
 */

/**
 *  \brief Abstract class to manage a specific communication bus
 *
 *  \author Xavier Elattaoui
 *  \date 11-2006
 */

class CommunicationLink
{
public :
	
	/**
	* Initialization. 
	*/
	CommunicationLink (std::string& communication_link_name);
	
	/**
	* Release resources.
	*/
	virtual ~CommunicationLink (void);

	/**
	*  \brief Send command (data) as string to hardware.
	*
	*  \throws Tango::DevFailed
	*/
	virtual void write(std::string)	= 0; 
	
	/**
	*  \brief Gets hardware response as string.
	*
	*  \throws Tango::DevFailed
	*/
	virtual std::string read(void)	= 0;

	/**
	*  \brief Performs a write read operation as string.
	*
	*  \throws Tango::DevFailed
	*/
	virtual std::string write_read(std::string cmd_to_send) = 0;

protected :
	std::string _communication_Device_name;

};

/** @} */	//- end addtogroup

#endif // _COMMUNICATION_LINK_H_