Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// ============================================================================
//
// = 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_