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);
50 TangoHKLAdapter
* _hklAdapter
;
51 std::string _proxy_name
;
52 std::string _proxy_stop_command_name
;
53 std::string _proxy_on_command_name
;
54 Tango::AttributeProxy
*_proxy
;
57 HklAxis
*_axis_r_real
;
58 HklAxis
*_axis_w_real
;
65 Tango::DevState _state
; // state of axe
67 bool connect(char *proxy_name
);
69 void to_HklAxis(void);
71 void from_proxy(bool simulated
);
75 #endif// __Axis_Adapter_H__