1 #ifndef __PSEUDOAXES_ADAPTER_H__
2 #define __PSEUDOAXES_ADAPTER_H__
5 #include "AxisAdapter.h"
9 namespace PseudoAxes_ns
{
13 namespace Diffractometer_ns
{
16 class TangoHKLAdapter
;
18 struct PseudoAxesConfig
{
19 Tango::DevState state
;
21 Tango::DevBoolean initialized
;
22 Tango::DevString mode
;
23 Matrix
<double> parameters
;
24 Matrix
<char *> parameters_names
;
25 Matrix
<char *> pseudo_axes_names
;
26 Matrix
<char *> mode_names
;
31 class PseudoAxesAdapter
{
32 friend class TangoHKLAdapter
;
35 PseudoAxesAdapter(TangoHKLAdapter
*hklAdapter
, size_t _idx
,
36 HklPseudoAxisEngine
*engine_r
,
37 HklPseudoAxisEngine
*engine_w
);
39 virtual ~PseudoAxesAdapter(void);
41 PseudoAxesConfig
get_config(void);
43 std::string
const & get_proxy_name(void) const {return _proxy_name
;}
44 char const * get_name(void) const;
46 void set_axis_value(size_t idx
, double value
);
47 void set_mode(const Tango::DevString name
);
48 void set_initialized(const Tango::DevBoolean initialized
);
49 void set_parameters(const Matrix
<double> values
);
51 void set_device(PseudoAxes_ns::PseudoAxes
*device
) {_device
= device
;}
58 void add_dynamic_attributes(void);
59 void remove_dynamic_attributes(void);
62 TangoHKLAdapter
*_hklAdapter
;
63 HklPseudoAxisEngine
*_engine_r
;
64 HklPseudoAxisEngine
*_engine_w
;
67 PseudoAxes_ns::PseudoAxes
*_device
;
68 PseudoAxesConfig _config
;
69 std::string _proxy_name
;
70 std::vector
<Tango::Attr
*> _dynamic_attribute_pseudo_axes_axis
;
71 std::vector
<AxisAdapter
*> _axes
;
73 void update_axes_i(HklPseudoAxisEngine
*engine
);
76 void add_dynamic_attributes_i(void);
81 #endif // __PSEUDOAXES_ADAPTER_H__