1 #ifndef __AXIS_ADAPTER_H__
2 #define __AXIS_ADAPTER_H__
5 #include <hkl/hkl-axis.h>
7 namespace DiffractometerDevice_ns
{
11 AxisAdapter(HklAxis
*read
, HklAxis
*write
);
15 Tango::Group
*connect(std::string
const & device_name
);
17 std::string
const get_name(void) const;
19 std::string
const & get_device_name(void) const {return _device_name
;}
21 Tango::DevState
const & get_state(void) const {return _state
;}
23 void set_state(Tango::DevState
const & state
) {_state
= state
;}
25 bool const is_ready(void) const;
27 double const & get_read(void) const {return _read
;}
29 double const & get_write(void) const {return _write
;}
31 /* return the write part of the axis taking into account the range */
32 double get_write_for_proxy(void);
34 void write(double value
, bool simulated
);
36 void from_HklAxis(void);
38 void to_HklAxis(void);
40 void from_proxy(void);
46 std::string _device_name
;
47 Tango::DeviceProxy
*_proxy
;
48 HklAxis
*_axis_r
; // pointer to axe from hkl library
54 Tango::DevState _state
; // state of axe
58 #endif// __Axis_Adapter_H__