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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
//=============================================================================
// TIMIQLib.h
//=============================================================================
// abstraction.......Tim IQ Application Programming Interface
// class.............TIMIQLib
// original author...J. GOUNO - NEXEYA-FRANCE
//=============================================================================
#ifndef _TIMIQ_LIB_H_
#define _TIMIQ_LIB_H_
// ============================================================================
// DEPENDENCIES
// ============================================================================
#include <TIMIQException.h>
#include <TIMIQCurl.h>
// ==========================================================================
// DEFINITION OF API
//
// This API allows access to an electronic equipment "TimIQ".
// It allows a control software to send and receive data
// via a http web protocol.
// ===========================================================================
namespace TIMIQLib_ns {
//- low layer TimIQ curl class
//-----------------------------
class TIMIQCurl;
//------------------------------------------------------------------------
//- TIMIQProxy Class
//- Ensures the interface of the timIQ equipment with
//- a tango software control system
//------------------------------------------------------------------------
class TIMIQLib
{
public:
// Contructor
TIMIQLib ();
// Destructor
~TIMIQLib();
//- Write functions
//---------------------------------------------------------------------------
// Sets data to TimIQ equipment
// @param data float value.
void set_data(float data) throw (Exception);
// Regulates "I" tension to TimIQ equipment
// @param iValue float value.
void set_iValue(float iValue)throw (Exception);
// Regulates "Q" tension to TimIQ equipment
// @param qValue float value.
void set_qValue(float qValue)throw (Exception);
// Sets board temperature to TimIQ equipment
// @param boardTemperature float value.
void set_boardTemperature(float boardTemperature) throw (Exception);
// Sets command to TimIQ equipment
// @param cmd TimIQCmd_t value.
void set_command(E_timiq_cmd_t& cmd) throw (Exception);
//- Read functions
//---------------------------------------------------------------------------
// Gets data from TimIQ equipment
// @param [out] data float pointer.
void get_data(float &data)throw (Exception);
// Gets "I" value from TimIQ equipment
// @param [out] iValue float pointer.
void get_iValue(float& iValue)throw (Exception);
// Gets "Q" value from TimIQ equipment
// @param [out] qValue float pointer.
void get_qValue(float& qValue)throw (Exception);
// Gets the mixer cosinus output from TimIQ equipment
// @param [out] mixerCosOutput float pointer.
void get_mixerCosOutput(float& mixerCosOutput)throw (Exception);
// Gets the mixer sinus output from TimIQ equipment
// @param [out] mixerSinOutput float pointer.
void get_mixerSinOutput(float& mixerSinOutput)throw (Exception);
// Gets the board temperature from TimIQ equipment
// @param [out] boardTemperature float pointer.
void get_boardTemperature(float& boardTemperature)throw (Exception);
// Gets state of TimIQ equipment
// @param [out] status string
E_timiq_code_t get_state(std::string& status) throw (Exception);
// Initialize TimIQCurl library
// @param ip_address string, port_number string
void init (const std::string& ip_address, const short& port_number) throw (Exception);
private:
//- internal members
//--------------------------
TIMIQCurl * m_timiq_hw;
//- ip address number
std::string m_ipAddress;
//- port number
std::string m_numPort;
//- internal function
//-------------------------
// ...
};
} // namespace TIMIQLib_ns
#endif // _TIMIQ_LIB_H_