1 #ifndef __AXIS_ADAPTER_H__
2 #define __AXIS_ADAPTER_H__
5 #include <hkl/hkl-axis.h>
7 namespace Diffractometer_ns
{
10 class TangoHKLAdapter
;
14 friend class TangoHKLAdapter
;
17 AxisAdapter(TangoHKLAdapter
* hklAdapter
, HklAxis
*axis_r
, HklAxis
*axis_w
,
18 HklAxis
*axis_r_real
, HklAxis
*axis_w_real
);
20 virtual ~AxisAdapter(void);
22 std::string
const get_name(void) const;
23 std::string
const get_proxy_name(void) const;
25 Tango::DevState
const & get_state(void) const {return _state
;}
26 void set_state(Tango::DevState
const & state
) {_state
= state
;}
28 bool const is_ready(void) const;
30 double const & get_read(void) const {return _read
;}
32 double const & get_read_real(void) const {return _read_real
;}
34 double const & get_write(void) const {return _write
;}
36 double const & get_write_real(void) const {return _write_real
;}
38 void write(double value
);
40 void from_HklAxis(void);
48 TangoHKLAdapter
* _hklAdapter
;
49 std::string _proxy_name
;
50 std::string _proxy_stop_command_name
;
51 Tango::AttributeProxy
*_proxy
;
54 HklAxis
*_axis_r_real
;
55 HklAxis
*_axis_w_real
;
62 Tango::DevState _state
; // state of axe
64 bool connect(char *proxy_name
);
66 void to_HklAxis(void);
68 void from_proxy(bool simulated
);
72 #endif// __Axis_Adapter_H__