* do not remove dynamic devices when stopping the Diffractometer device.
[diffractometer.git] / src / PseudoAxes / PseudoAxes.h
blobd0be0aa41f3c628ab33c02ccdd43e956c5ac7f25
1 //=============================================================================
2 //
3 // file : PseudoAxes.h
4 //
5 // description : Include for the PseudoAxes class.
6 //
7 // project :
8 //
9 // $Author: $
11 // $Revision: $
13 // $Log: $
15 // copyleft : European Synchrotron Radiation Facility
16 // BP 220, Grenoble 38043
17 // FRANCE
19 //=============================================================================
21 // This file is generated by POGO
22 // (Program Obviously used to Generate tango Object)
24 // (c) - Software Engineering Group - ESRF
25 //=============================================================================
26 #ifndef _PSEUDOAXES_H
27 #define _PSEUDOAXES_H
29 #include <tango.h>
30 //using namespace Tango;
31 #include <TangoHKLAdapter.h>
33 /**
34 * @author $Author: $
35 * @version $Revision: $
38 // Add your own constants definitions here.
39 //-----------------------------------------------
42 namespace PseudoAxes_ns
45 /**
46 * Class Description:
51 * Device States Description:
55 class PseudoAxes: public Tango::Device_3Impl
57 public :
58 // Add your own data members here
59 //-----------------------------------------
62 // Here is the Start of the automatic code generation part
63 //-------------------------------------------------------------
64 /**
65 * @name attributes
66 * Attributs member data.
68 //@{
69 Tango::DevString *attr_mode_read;
70 Tango::DevString attr_mode_write;
71 Tango::DevString *attr_modeNames_read;
72 Tango::DevString *attr_parametersNames_read;
73 Tango::DevDouble *attr_parameters_read;
74 Tango::DevDouble attr_parameters_write;
75 Tango::DevString *attr_pseudoAxisNames_read;
76 //@}
78 /**
79 * @name Device properties
80 * Device properties member data.
82 //@{
83 /**
84 * the diffractometer Proxy
86 string diffractometerProxy;
87 /**
88 * name of the HklPseudoAxisEngine used by this device.
90 string engineName;
91 //@}
93 /**@name Constructors
94 * Miscellaneous constructors */
95 //@{
96 /**
97 * Constructs a newly allocated Command object.
99 * @param cl Class.
100 * @param s Device Name
102 PseudoAxes(Tango::DeviceClass *cl,string &s);
104 * Constructs a newly allocated Command object.
106 * @param cl Class.
107 * @param s Device Name
109 PseudoAxes(Tango::DeviceClass *cl,const char *s);
111 * Constructs a newly allocated Command object.
113 * @param cl Class.
114 * @param s Device name
115 * @param d Device description.
117 PseudoAxes(Tango::DeviceClass *cl,const char *s,const char *d);
118 //@}
120 /**@name Destructor
121 * Only one desctructor is defined for this class */
122 //@{
124 * The object desctructor.
126 ~PseudoAxes() {delete_device();};
128 * will be called at device destruction or at init command.
130 void delete_device();
131 //@}
134 /**@name Miscellaneous methods */
135 //@{
137 * Initialize the device
139 virtual void init_device();
141 * Always executed method befor execution command method.
143 virtual void always_executed_hook();
145 //@}
148 * @name PseudoAxes methods prototypes
151 //@{
153 * Hardware acquisition for attributes.
155 virtual void read_attr_hardware(vector<long> &attr_list);
157 * Extract real attribute values for mode acquisition result.
159 virtual void read_mode(Tango::Attribute &attr);
161 * Write mode attribute values to hardware.
163 virtual void write_mode(Tango::WAttribute &attr);
165 * Extract real attribute values for modeNames acquisition result.
167 virtual void read_modeNames(Tango::Attribute &attr);
169 * Extract real attribute values for parametersNames acquisition result.
171 virtual void read_parametersNames(Tango::Attribute &attr);
173 * Extract real attribute values for parameters acquisition result.
175 virtual void read_parameters(Tango::Attribute &attr);
177 * Write parameters attribute values to hardware.
179 virtual void write_parameters(Tango::WAttribute &attr);
181 * Extract real attribute values for pseudoAxisNames acquisition result.
183 virtual void read_pseudoAxisNames(Tango::Attribute &attr);
185 * Read/Write allowed for mode attribute.
187 virtual bool is_mode_allowed(Tango::AttReqType type);
189 * Read/Write allowed for modeNames attribute.
191 virtual bool is_modeNames_allowed(Tango::AttReqType type);
193 * Read/Write allowed for parametersNames attribute.
195 virtual bool is_parametersNames_allowed(Tango::AttReqType type);
197 * Read/Write allowed for parameters attribute.
199 virtual bool is_parameters_allowed(Tango::AttReqType type);
201 * Read/Write allowed for pseudoAxisNames attribute.
203 virtual bool is_pseudoAxisNames_allowed(Tango::AttReqType type);
205 * Execution allowed for AxisInit command.
207 virtual bool is_AxisInit_allowed(const CORBA::Any &any);
209 * This command gets the device state (stored in its <i>device_state</i> data member) and returns it to the caller.
210 * @return State Code
211 * @exception DevFailed
213 virtual Tango::DevState dev_state();
215 * This command gets the device status (stored in its <i>device_status</i> data member) and returns it to the caller.
216 * @return Status description
217 * @exception DevFailed
219 virtual Tango::ConstDevString dev_status();
221 * Initialize the pseudoAxes (exemple the psi pseudo axis)
222 * @exception DevFailed
224 void axis_init();
227 * Read the device properties from database
229 void get_device_property();
230 //@}
232 // Here is the end of the automatic code generation part
233 //-------------------------------------------------------------
237 protected :
238 // Add your own data members here
239 //-----------------------------------------
240 Diffractometer_ns::PseudoAxesAdapter * _adapter;
241 Diffractometer_ns::TangoHKLAdapter * _hklAdapter;
244 } // namespace_ns
246 #endif // _PSEUDOAXES_H