* idem for the state and status.
[diffractometer.git] / src / PseudoAxes / PseudoAxes.h
blob606c778cbeb0f2e50ac06360914df3ef84aa4baa
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::DevBoolean *attr_initialized_read;
72 Tango::DevBoolean attr_initialized_write;
73 Tango::DevString *attr_modeNames_read;
74 Tango::DevString *attr_parametersNames_read;
75 Tango::DevDouble *attr_parameters_read;
76 Tango::DevDouble attr_parameters_write;
77 Tango::DevString *attr_pseudoAxisNames_read;
78 //@}
80 /**
81 * @name Device properties
82 * Device properties member data.
84 //@{
85 /**
86 * the diffractometer Proxy
88 string diffractometerProxy;
89 /**
90 * name of the HklPseudoAxisEngine used by this device.
92 string engineName;
93 //@}
95 /**@name Constructors
96 * Miscellaneous constructors */
97 //@{
98 /**
99 * Constructs a newly allocated Command object.
101 * @param cl Class.
102 * @param s Device Name
104 PseudoAxes(Tango::DeviceClass *cl,string &s);
106 * Constructs a newly allocated Command object.
108 * @param cl Class.
109 * @param s Device Name
111 PseudoAxes(Tango::DeviceClass *cl,const char *s);
113 * Constructs a newly allocated Command object.
115 * @param cl Class.
116 * @param s Device name
117 * @param d Device description.
119 PseudoAxes(Tango::DeviceClass *cl,const char *s,const char *d);
120 //@}
122 /**@name Destructor
123 * Only one desctructor is defined for this class */
124 //@{
126 * The object desctructor.
128 ~PseudoAxes() {delete_device();};
130 * will be called at device destruction or at init command.
132 void delete_device();
133 //@}
136 /**@name Miscellaneous methods */
137 //@{
139 * Initialize the device
141 virtual void init_device();
143 * Always executed method befor execution command method.
145 virtual void always_executed_hook();
147 //@}
150 * @name PseudoAxes methods prototypes
153 //@{
155 * Hardware acquisition for attributes.
157 virtual void read_attr_hardware(vector<long> &attr_list);
159 * Extract real attribute values for mode acquisition result.
161 virtual void read_mode(Tango::Attribute &attr);
163 * Write mode attribute values to hardware.
165 virtual void write_mode(Tango::WAttribute &attr);
167 * Extract real attribute values for initialized acquisition result.
169 virtual void read_initialized(Tango::Attribute &attr);
171 * Write initialized attribute values to hardware.
173 virtual void write_initialized(Tango::WAttribute &attr);
175 * Extract real attribute values for modeNames acquisition result.
177 virtual void read_modeNames(Tango::Attribute &attr);
179 * Extract real attribute values for parametersNames acquisition result.
181 virtual void read_parametersNames(Tango::Attribute &attr);
183 * Extract real attribute values for parameters acquisition result.
185 virtual void read_parameters(Tango::Attribute &attr);
187 * Write parameters attribute values to hardware.
189 virtual void write_parameters(Tango::WAttribute &attr);
191 * Extract real attribute values for pseudoAxisNames acquisition result.
193 virtual void read_pseudoAxisNames(Tango::Attribute &attr);
195 * Read/Write allowed for mode attribute.
197 virtual bool is_mode_allowed(Tango::AttReqType type);
199 * Read/Write allowed for initialized attribute.
201 virtual bool is_initialized_allowed(Tango::AttReqType type);
203 * Read/Write allowed for modeNames attribute.
205 virtual bool is_modeNames_allowed(Tango::AttReqType type);
207 * Read/Write allowed for parametersNames attribute.
209 virtual bool is_parametersNames_allowed(Tango::AttReqType type);
211 * Read/Write allowed for parameters attribute.
213 virtual bool is_parameters_allowed(Tango::AttReqType type);
215 * Read/Write allowed for pseudoAxisNames attribute.
217 virtual bool is_pseudoAxisNames_allowed(Tango::AttReqType type);
219 * Execution allowed for AxisInit command.
221 virtual bool is_AxisInit_allowed(const CORBA::Any &any);
223 * This command gets the device state (stored in its <i>device_state</i> data member) and returns it to the caller.
224 * @return State Code
225 * @exception DevFailed
227 virtual Tango::DevState dev_state();
229 * This command gets the device status (stored in its <i>device_status</i> data member) and returns it to the caller.
230 * @return Status description
231 * @exception DevFailed
233 virtual Tango::ConstDevString dev_status();
235 * Initialize the pseudoAxes (exemple the psi pseudo axis)
236 * @exception DevFailed
238 void axis_init();
241 * Read the device properties from database
243 void get_device_property();
244 //@}
246 // Here is the end of the automatic code generation part
247 //-------------------------------------------------------------
251 protected :
252 // Add your own data members here
253 //-----------------------------------------
254 Diffractometer_ns::PseudoAxesAdapter * _adapter;
255 Diffractometer_ns::TangoHKLAdapter * _hklAdapter;
258 } // namespace_ns
260 #endif // _PSEUDOAXES_H