1 //=============================================================================
3 // file : Diffractometer.h
5 // description : Include for the Diffractometer class.
7 // project : Diffractometer
13 // $Log: Diffractometer.h,v $
14 // Revision 1.3 2008/10/16 10:16:55 piccaf
15 // * update to build on windows with vc8
16 // * add the Eulerian6C diffractometer.
17 // * add the dynamic attributes in the factory instead of the init device
19 // Revision 1.2 2008/09/22 08:46:23 piccaf
20 // * add files from the new diffractometer Device
23 // copyleft : European Synchrotron Radiation Facility
24 // BP 220, Grenoble 38043
27 //=============================================================================
29 // This file is generated by POGO
30 // (Program Obviously used to Generate tango Object)
32 // (c) - Software Engineering Group - ESRF
33 //=============================================================================
34 #ifndef _DIFFRACTOMETER_H
35 #define _DIFFRACTOMETER_H
38 //using namespace Tango;
41 * @author $Author: piccaf $
42 * @version $Revision: 1.3 $
45 // Add your own constants definitions here.
46 //-----------------------------------------------
48 #include "PogoHelper.h"
49 #include "TangoHKLAdapter.h"
51 namespace Diffractometer_ns
56 * This class can be used to compute cristallography computation
60 * Device States Description:
61 * Tango::FAULT : HKLlibrary not initialised or at least 1 of the motor is in FAULT state
62 * Tango::ALARM : At least 1 of the motor is in ALARM state
63 * Tango::STANDBY : All motors are in STANDBY state
64 * Tango::MOVING : At least one motor is in MOVING state
65 * Tango::OFF : At least one motor is in OFF state
69 class Diffractometer
: public Tango::Device_3Impl
72 // Add your own data members here
73 //-----------------------------------------
76 // Here is the Start of the automatic code generation part
77 //-------------------------------------------------------------
80 * Attributs member data.
83 Tango::DevDouble
*attr_H_read
;
84 Tango::DevDouble attr_H_write
;
85 Tango::DevDouble
*attr_K_read
;
86 Tango::DevDouble attr_K_write
;
87 Tango::DevDouble
*attr_L_read
;
88 Tango::DevDouble attr_L_write
;
89 Tango::DevString
*attr_Mode_read
;
90 Tango::DevString attr_Mode_write
;
91 Tango::DevShort
*attr_AnglesIdx_read
;
92 Tango::DevShort attr_AnglesIdx_write
;
93 Tango::DevBoolean
*attr_Simulated_read
;
94 Tango::DevBoolean attr_Simulated_write
;
95 Tango::DevDouble
*attr_WaveLength_read
;
96 Tango::DevDouble attr_WaveLength_write
;
97 Tango::DevString
*attr_Crystal_read
;
98 Tango::DevString attr_Crystal_write
;
99 Tango::DevDouble
*attr_A_read
;
100 Tango::DevDouble
*attr_B_read
;
101 Tango::DevDouble
*attr_C_read
;
102 Tango::DevDouble
*attr_Alpha_read
;
103 Tango::DevDouble
*attr_Beta_read
;
104 Tango::DevDouble
*attr_Gamma_read
;
105 Tango::DevDouble
*attr_Ux_read
;
106 Tango::DevDouble attr_Ux_write
;
107 Tango::DevDouble
*attr_Uy_read
;
108 Tango::DevDouble attr_Uy_write
;
109 Tango::DevDouble
*attr_Uz_read
;
110 Tango::DevDouble attr_Uz_write
;
111 Tango::DevDouble
*attr_AStar_read
;
112 Tango::DevDouble
*attr_BStar_read
;
113 Tango::DevDouble
*attr_CStar_read
;
114 Tango::DevDouble
*attr_AlphaStar_read
;
115 Tango::DevDouble
*attr_BetaStar_read
;
116 Tango::DevDouble
*attr_GammaStar_read
;
117 Tango::DevString
*attr_CrystalNames_read
;
118 Tango::DevString
*attr_AxesNames_read
;
119 Tango::DevString
*attr_pseudoAxesProxies_read
;
120 Tango::DevString
*attr_ModeNames_read
;
121 Tango::DevDouble
*attr_Angles_read
;
122 Tango::DevBoolean
*attr_AnglesDegenerated_read
;
123 Tango::DevBoolean
*attr_AnglesRangeCheck_read
;
124 Tango::DevDouble
*attr_ComputedAngles_read
;
125 Tango::DevDouble
*attr_CrystalReflections_read
;
126 Tango::DevDouble
*attr_Reflections_read
;
127 Tango::DevDouble attr_Reflections_write
;
128 Tango::DevDouble
*attr_ReflectionsAngles_read
;
129 Tango::DevDouble
*attr_UB_read
;
133 * @name Device properties
134 * Device properties member data.
138 * Definition of the Tau constant .
139 * Possible values are pi or 1 .
142 Tango::DevDouble tauConstant
;
146 vector
<string
> realAxisProxies
;
148 * The name of the lambda attribute proxy.
150 * The diffractometer use it to read the lambda value from another Device
152 string lambdaAttributeProxy
;
154 * The Type of the diffractometer
158 string diffractometerType
;
161 /**@name Constructors
162 * Miscellaneous constructors */
165 * Constructs a newly allocated Command object.
168 * @param s Device Name
170 Diffractometer(Tango::DeviceClass
*cl
,string
&s
);
172 * Constructs a newly allocated Command object.
175 * @param s Device Name
177 Diffractometer(Tango::DeviceClass
*cl
,const char *s
);
179 * Constructs a newly allocated Command object.
182 * @param s Device name
183 * @param d Device description.
185 Diffractometer(Tango::DeviceClass
*cl
,const char *s
,const char *d
);
189 * Only one desctructor is defined for this class */
192 * The object desctructor.
194 ~Diffractometer() {delete_device();};
196 * will be called at device destruction or at init command.
198 void delete_device();
202 /**@name Miscellaneous methods */
205 * Initialize the device
207 virtual void init_device();
209 * Always executed method befor execution command method.
211 virtual void always_executed_hook();
216 * @name Diffractometer methods prototypes
221 * Hardware acquisition for attributes.
223 virtual void read_attr_hardware(vector
<long> &attr_list
);
225 * Extract real attribute values for H acquisition result.
227 virtual void read_H(Tango::Attribute
&attr
);
229 * Write H attribute values to hardware.
231 virtual void write_H(Tango::WAttribute
&attr
);
233 * Extract real attribute values for K acquisition result.
235 virtual void read_K(Tango::Attribute
&attr
);
237 * Write K attribute values to hardware.
239 virtual void write_K(Tango::WAttribute
&attr
);
241 * Extract real attribute values for L acquisition result.
243 virtual void read_L(Tango::Attribute
&attr
);
245 * Write L attribute values to hardware.
247 virtual void write_L(Tango::WAttribute
&attr
);
249 * Extract real attribute values for Mode acquisition result.
251 virtual void read_Mode(Tango::Attribute
&attr
);
253 * Write Mode attribute values to hardware.
255 virtual void write_Mode(Tango::WAttribute
&attr
);
257 * Extract real attribute values for AnglesIdx acquisition result.
259 virtual void read_AnglesIdx(Tango::Attribute
&attr
);
261 * Write AnglesIdx attribute values to hardware.
263 virtual void write_AnglesIdx(Tango::WAttribute
&attr
);
265 * Extract real attribute values for Simulated acquisition result.
267 virtual void read_Simulated(Tango::Attribute
&attr
);
269 * Write Simulated attribute values to hardware.
271 virtual void write_Simulated(Tango::WAttribute
&attr
);
273 * Extract real attribute values for WaveLength acquisition result.
275 virtual void read_WaveLength(Tango::Attribute
&attr
);
277 * Write WaveLength attribute values to hardware.
279 virtual void write_WaveLength(Tango::WAttribute
&attr
);
281 * Extract real attribute values for Crystal acquisition result.
283 virtual void read_Crystal(Tango::Attribute
&attr
);
285 * Write Crystal attribute values to hardware.
287 virtual void write_Crystal(Tango::WAttribute
&attr
);
289 * Extract real attribute values for A acquisition result.
291 virtual void read_A(Tango::Attribute
&attr
);
293 * Extract real attribute values for B acquisition result.
295 virtual void read_B(Tango::Attribute
&attr
);
297 * Extract real attribute values for C acquisition result.
299 virtual void read_C(Tango::Attribute
&attr
);
301 * Extract real attribute values for Alpha acquisition result.
303 virtual void read_Alpha(Tango::Attribute
&attr
);
305 * Extract real attribute values for Beta acquisition result.
307 virtual void read_Beta(Tango::Attribute
&attr
);
309 * Extract real attribute values for Gamma acquisition result.
311 virtual void read_Gamma(Tango::Attribute
&attr
);
313 * Extract real attribute values for Ux acquisition result.
315 virtual void read_Ux(Tango::Attribute
&attr
);
317 * Write Ux attribute values to hardware.
319 virtual void write_Ux(Tango::WAttribute
&attr
);
321 * Extract real attribute values for Uy acquisition result.
323 virtual void read_Uy(Tango::Attribute
&attr
);
325 * Write Uy attribute values to hardware.
327 virtual void write_Uy(Tango::WAttribute
&attr
);
329 * Extract real attribute values for Uz acquisition result.
331 virtual void read_Uz(Tango::Attribute
&attr
);
333 * Write Uz attribute values to hardware.
335 virtual void write_Uz(Tango::WAttribute
&attr
);
337 * Extract real attribute values for AStar acquisition result.
339 virtual void read_AStar(Tango::Attribute
&attr
);
341 * Extract real attribute values for BStar acquisition result.
343 virtual void read_BStar(Tango::Attribute
&attr
);
345 * Extract real attribute values for CStar acquisition result.
347 virtual void read_CStar(Tango::Attribute
&attr
);
349 * Extract real attribute values for AlphaStar acquisition result.
351 virtual void read_AlphaStar(Tango::Attribute
&attr
);
353 * Extract real attribute values for BetaStar acquisition result.
355 virtual void read_BetaStar(Tango::Attribute
&attr
);
357 * Extract real attribute values for GammaStar acquisition result.
359 virtual void read_GammaStar(Tango::Attribute
&attr
);
361 * Extract real attribute values for CrystalNames acquisition result.
363 virtual void read_CrystalNames(Tango::Attribute
&attr
);
365 * Extract real attribute values for AxesNames acquisition result.
367 virtual void read_AxesNames(Tango::Attribute
&attr
);
369 * Extract real attribute values for pseudoAxesProxies acquisition result.
371 virtual void read_pseudoAxesProxies(Tango::Attribute
&attr
);
373 * Extract real attribute values for ModeNames acquisition result.
375 virtual void read_ModeNames(Tango::Attribute
&attr
);
377 * Extract real attribute values for Angles acquisition result.
379 virtual void read_Angles(Tango::Attribute
&attr
);
381 * Extract real attribute values for AnglesDegenerated acquisition result.
383 virtual void read_AnglesDegenerated(Tango::Attribute
&attr
);
385 * Extract real attribute values for AnglesRangeCheck acquisition result.
387 virtual void read_AnglesRangeCheck(Tango::Attribute
&attr
);
389 * Extract real attribute values for ComputedAngles acquisition result.
391 virtual void read_ComputedAngles(Tango::Attribute
&attr
);
393 * Extract real attribute values for CrystalReflections acquisition result.
395 virtual void read_CrystalReflections(Tango::Attribute
&attr
);
397 * Extract real attribute values for Reflections acquisition result.
399 virtual void read_Reflections(Tango::Attribute
&attr
);
401 * Write Reflections attribute values to hardware.
403 virtual void write_Reflections(Tango::WAttribute
&attr
);
405 * Extract real attribute values for ReflectionsAngles acquisition result.
407 virtual void read_ReflectionsAngles(Tango::Attribute
&attr
);
409 * Extract real attribute values for UB acquisition result.
411 virtual void read_UB(Tango::Attribute
&attr
);
413 * Read/Write allowed for H attribute.
415 virtual bool is_H_allowed(Tango::AttReqType type
);
417 * Read/Write allowed for K attribute.
419 virtual bool is_K_allowed(Tango::AttReqType type
);
421 * Read/Write allowed for L attribute.
423 virtual bool is_L_allowed(Tango::AttReqType type
);
425 * Read/Write allowed for Mode attribute.
427 virtual bool is_Mode_allowed(Tango::AttReqType type
);
429 * Read/Write allowed for AnglesIdx attribute.
431 virtual bool is_AnglesIdx_allowed(Tango::AttReqType type
);
433 * Read/Write allowed for Simulated attribute.
435 virtual bool is_Simulated_allowed(Tango::AttReqType type
);
437 * Read/Write allowed for WaveLength attribute.
439 virtual bool is_WaveLength_allowed(Tango::AttReqType type
);
441 * Read/Write allowed for Crystal attribute.
443 virtual bool is_Crystal_allowed(Tango::AttReqType type
);
445 * Read/Write allowed for A attribute.
447 virtual bool is_A_allowed(Tango::AttReqType type
);
449 * Read/Write allowed for B attribute.
451 virtual bool is_B_allowed(Tango::AttReqType type
);
453 * Read/Write allowed for C attribute.
455 virtual bool is_C_allowed(Tango::AttReqType type
);
457 * Read/Write allowed for Alpha attribute.
459 virtual bool is_Alpha_allowed(Tango::AttReqType type
);
461 * Read/Write allowed for Beta attribute.
463 virtual bool is_Beta_allowed(Tango::AttReqType type
);
465 * Read/Write allowed for Gamma attribute.
467 virtual bool is_Gamma_allowed(Tango::AttReqType type
);
469 * Read/Write allowed for Ux attribute.
471 virtual bool is_Ux_allowed(Tango::AttReqType type
);
473 * Read/Write allowed for Uy attribute.
475 virtual bool is_Uy_allowed(Tango::AttReqType type
);
477 * Read/Write allowed for Uz attribute.
479 virtual bool is_Uz_allowed(Tango::AttReqType type
);
481 * Read/Write allowed for AStar attribute.
483 virtual bool is_AStar_allowed(Tango::AttReqType type
);
485 * Read/Write allowed for BStar attribute.
487 virtual bool is_BStar_allowed(Tango::AttReqType type
);
489 * Read/Write allowed for CStar attribute.
491 virtual bool is_CStar_allowed(Tango::AttReqType type
);
493 * Read/Write allowed for AlphaStar attribute.
495 virtual bool is_AlphaStar_allowed(Tango::AttReqType type
);
497 * Read/Write allowed for BetaStar attribute.
499 virtual bool is_BetaStar_allowed(Tango::AttReqType type
);
501 * Read/Write allowed for GammaStar attribute.
503 virtual bool is_GammaStar_allowed(Tango::AttReqType type
);
505 * Read/Write allowed for CrystalNames attribute.
507 virtual bool is_CrystalNames_allowed(Tango::AttReqType type
);
509 * Read/Write allowed for AxesNames attribute.
511 virtual bool is_AxesNames_allowed(Tango::AttReqType type
);
513 * Read/Write allowed for pseudoAxesProxies attribute.
515 virtual bool is_pseudoAxesProxies_allowed(Tango::AttReqType type
);
517 * Read/Write allowed for ModeNames attribute.
519 virtual bool is_ModeNames_allowed(Tango::AttReqType type
);
521 * Read/Write allowed for Angles attribute.
523 virtual bool is_Angles_allowed(Tango::AttReqType type
);
525 * Read/Write allowed for AnglesDegenerated attribute.
527 virtual bool is_AnglesDegenerated_allowed(Tango::AttReqType type
);
529 * Read/Write allowed for AnglesRangeCheck attribute.
531 virtual bool is_AnglesRangeCheck_allowed(Tango::AttReqType type
);
533 * Read/Write allowed for ComputedAngles attribute.
535 virtual bool is_ComputedAngles_allowed(Tango::AttReqType type
);
537 * Read/Write allowed for CrystalReflections attribute.
539 virtual bool is_CrystalReflections_allowed(Tango::AttReqType type
);
541 * Read/Write allowed for Reflections attribute.
543 virtual bool is_Reflections_allowed(Tango::AttReqType type
);
545 * Read/Write allowed for ReflectionsAngles attribute.
547 virtual bool is_ReflectionsAngles_allowed(Tango::AttReqType type
);
549 * Read/Write allowed for UB attribute.
551 virtual bool is_UB_allowed(Tango::AttReqType type
);
553 * Execution allowed for Abort command.
555 virtual bool is_Abort_allowed(const CORBA::Any
&any
);
557 * Execution allowed for AddNewCrystal command.
559 virtual bool is_AddNewCrystal_allowed(const CORBA::Any
&any
);
561 * Execution allowed for AddReflection command.
563 virtual bool is_AddReflection_allowed(const CORBA::Any
&any
);
565 * Execution allowed for AffineCrystal command.
567 virtual bool is_AffineCrystal_allowed(const CORBA::Any
&any
);
569 * Execution allowed for ComputedAnglesClear command.
571 virtual bool is_ComputedAnglesClear_allowed(const CORBA::Any
&any
);
573 * Execution allowed for ComputedAnglesHKLList command.
575 virtual bool is_ComputedAnglesHKLList_allowed(const CORBA::Any
&any
);
577 * Execution allowed for ComputeU command.
579 virtual bool is_ComputeU_allowed(const CORBA::Any
&any
);
581 * Execution allowed for ConfigureCrystal command.
583 virtual bool is_ConfigureCrystal_allowed(const CORBA::Any
&any
);
585 * Execution allowed for CopyCurrentCrystalAs command.
587 virtual bool is_CopyCurrentCrystalAs_allowed(const CORBA::Any
&any
);
589 * Execution allowed for CopyReflectionTo command.
591 virtual bool is_CopyReflectionTo_allowed(const CORBA::Any
&any
);
593 * Execution allowed for DeleteCurrentCrystal command.
595 virtual bool is_DeleteCurrentCrystal_allowed(const CORBA::Any
&any
);
597 * Execution allowed for GetAffinementIteration command.
599 virtual bool is_GetAffinementIteration_allowed(const CORBA::Any
&any
);
601 * Execution allowed for GetAffinementList command.
603 virtual bool is_GetAffinementList_allowed(const CORBA::Any
&any
);
605 * Execution allowed for GetAffinementMaxIteration command.
607 virtual bool is_GetAffinementMaxIteration_allowed(const CORBA::Any
&any
);
609 * Execution allowed for GetAxesNames command.
611 virtual bool is_GetAxesNames_allowed(const CORBA::Any
&any
);
613 * Execution allowed for GetCrystalNames command.
615 virtual bool is_GetCrystalNames_allowed(const CORBA::Any
&any
);
617 * Execution allowed for GetCrystalParameterValues command.
619 virtual bool is_GetCrystalParameterValues_allowed(const CORBA::Any
&any
);
621 * Execution allowed for GetModeDescription command.
623 virtual bool is_GetModeDescription_allowed(const CORBA::Any
&any
);
625 * Execution allowed for GetModeParametersNames command.
627 virtual bool is_GetModeParametersNames_allowed(const CORBA::Any
&any
);
629 * Execution allowed for GetModeParametersValues command.
631 virtual bool is_GetModeParametersValues_allowed(const CORBA::Any
&any
);
633 * Execution allowed for GetModeParameterValue command.
635 virtual bool is_GetModeParameterValue_allowed(const CORBA::Any
&any
);
637 * Execution allowed for GetReflection command.
639 virtual bool is_GetReflection_allowed(const CORBA::Any
&any
);
641 * Execution allowed for GetReflectionSize command.
643 virtual bool is_GetReflectionSize_allowed(const CORBA::Any
&any
);
645 * Execution allowed for GotoComputedAngles command.
647 virtual bool is_GotoComputedAngles_allowed(const CORBA::Any
&any
);
649 * Execution allowed for GotoReflection command.
651 virtual bool is_GotoReflection_allowed(const CORBA::Any
&any
);
653 * Execution allowed for Load command.
655 virtual bool is_Load_allowed(const CORBA::Any
&any
);
657 * Execution allowed for RemoveReflection command.
659 virtual bool is_RemoveReflection_allowed(const CORBA::Any
&any
);
661 * Execution allowed for Save command.
663 virtual bool is_Save_allowed(const CORBA::Any
&any
);
665 * Execution allowed for SetAffinementMaxIteration command.
667 virtual bool is_SetAffinementMaxIteration_allowed(const CORBA::Any
&any
);
669 * Execution allowed for SetCrystalParameterValues command.
671 virtual bool is_SetCrystalParameterValues_allowed(const CORBA::Any
&any
);
673 * Execution allowed for SetHKL command.
675 virtual bool is_SetHKL_allowed(const CORBA::Any
&any
);
677 * Execution allowed for SetModeParametersValues command.
679 virtual bool is_SetModeParametersValues_allowed(const CORBA::Any
&any
);
681 * Execution allowed for SetReflection command.
683 virtual bool is_SetReflection_allowed(const CORBA::Any
&any
);
685 * This command gets the device state (stored in its <i>device_state</i> data member) and returns it to the caller.
687 * @exception DevFailed
689 virtual Tango::DevState
dev_state();
691 * This command gets the device status (stored in its <i>device_status</i> data member) and returns it to the caller.
692 * @return Status description
693 * @exception DevFailed
695 virtual Tango::ConstDevString
dev_status();
697 * Stops the movement of all axis driven by the Diffractometer
698 * @exception DevFailed
702 * Create a new crystal
703 * @param argin Name of the new crystal
704 * @exception DevFailed
706 void add_new_crystal(Tango::DevString
);
708 * This commands requires the definition of 1 reflection defined by (h,k,l ) coordinates.
709 * This coodinates are associated with the current angles configuration.
711 * TODO: d�taill� le commentaire
712 * reflections i.e : h, k, l, relevance, enable/disable
713 * @param argin reflections i.e : h, k, l, relevance, enable/disable
714 * @exception DevFailed
716 void add_reflection(const Tango::DevVarDoubleArray
*);
718 * Compute affinement for the current crystal with available list of reflection.
719 * @param argin name of the crystal to fit
720 * @return the fitness of the crystal after the affinement.
721 * @exception DevFailed
723 Tango::DevDouble
affine_crystal(Tango::DevString
);
725 * Clears the attribute ComputedAngles.
726 * Useful to get a fresh view of calculations already made
727 * @exception DevFailed
729 void computed_angles_clear();
731 * this commande works only in simulated mode.
732 * It computhe [-hmax: hmax] etc.. angles computations.
733 * @param argin hmax, kmax, lmax
734 * @exception DevFailed
736 void computed_angles_hkllist(const Tango::DevVarDoubleArray
*);
738 * Compute Matrix U from two reflections
739 * @param argin a two elements array with the index of reflection to use
740 * @exception DevFailed
742 void compute_u(const Tango::DevVarLongArray
*);
744 * Defines crystal lattice parameters.
745 * This information is mandatory for angles calculations.
746 * Angles units are degrees
747 * @param argin Crystal parameters : alpha,beta,gamma, A,B,C
748 * @exception DevFailed
750 void configure_crystal(const Tango::DevVarDoubleArray
*);
752 * Copy the current crytal as another name
754 * @exception DevFailed
756 void copy_current_crystal_as(Tango::DevString
);
758 * Copy one reflection from the current crystal to another crystal
759 * @param argin Double: Reflection number of the current crystal String : Name of the crystal where copy this reflection
760 * @exception DevFailed
762 void copy_reflection_to(const Tango::DevVarDoubleStringArray
*);
764 * Delete the current from this device
765 * @exception DevFailed
767 void delete_current_crystal();
769 * This commands redefine the maximum of iteration for an affinement.
777 * Iteration value of the last calculation
778 * @param argin Affinement name
779 * @return Iteration value of the last calculation
780 * @exception DevFailed
782 Tango::DevLong
get_affinement_iteration(Tango::DevString
);
784 * This commands returns the list of Affinement names.
785 * @return List of Affinement names
786 * @exception DevFailed
788 Tango::DevVarStringArray
*get_affinement_list();
790 * This commands redefine the maximum of iteration for an affinement.
798 * Value of the maximum
799 * @param argin Affinement name
800 * @return Value of iteration max
801 * @exception DevFailed
803 Tango::DevLong
get_affinement_max_iteration(Tango::DevString
);
805 * this method return the names of the dynamic attributes created from the hkl axes names
806 * kappa -> AxisKappa etc...
807 * @return namers of the axes
808 * @exception DevFailed
810 Tango::DevVarStringArray
*get_axes_names();
812 * Return all crystals names registed into the device
813 * @return all crystals names registed
814 * @exception DevFailed
816 Tango::DevVarStringArray
*get_crystal_names();
818 * Return all values of a parameter for the current crystal
819 * @param argin Name of parameter (see getParametersNames for the complete list of parameters)
820 * @return In the order : minimum value, maximum value, affinement enable
821 * @exception DevFailed
823 Tango::DevVarDoubleStringArray
*get_crystal_parameter_values(Tango::DevString
);
827 * @return description
828 * @exception DevFailed
830 Tango::DevString
get_mode_description(Tango::DevString
);
833 * @return Parameters names of the current mode
834 * @exception DevFailed
836 Tango::DevVarStringArray
*get_mode_parameters_names();
838 * Double : values of parameters
839 * @return String : Names of parameters ; Double : values of parameters
840 * @exception DevFailed
842 Tango::DevVarDoubleStringArray
*get_mode_parameters_values();
845 * @param argin name of parameter
846 * @return value of this parameter
847 * @exception DevFailed
849 Tango::DevDouble
get_mode_parameter_value(Tango::DevString
);
852 * @param argin index of reflection
853 * @return H, K, L, Relevance, Affinement Enabled
854 * @exception DevFailed
856 Tango::DevVarDoubleArray
*get_reflection(Tango::DevShort
);
858 * Return the number of reflection of the current crystal
859 * @return Number of reflection in current crytal
860 * @exception DevFailed
862 Tango::DevUShort
get_reflection_size();
865 * @param argin the idx of the computed angles
866 * @exception DevFailed
868 void goto_computed_angles(Tango::DevShort
);
870 * Go to axis values of the given reflection
871 * @param argin reflection number
872 * @exception DevFailed
874 void goto_reflection(Tango::DevShort
);
877 * @exception DevFailed
881 * This commands removes reflection from the current cristal.
882 * @param argin index of reflection to remove
883 * @exception DevFailed
885 void remove_reflection(Tango::DevShort
);
888 * @exception DevFailed
892 * This commands redefine the maximum of iteration for an affinement.
893 * index = index of reflection
897 * relevance = relevance value of this reflection
898 * affinement enabled = if true this reflection is associated with Affinement calculation
899 * @param argin Affinement name, Value of iteration max
900 * @exception DevFailed
902 void set_affinement_max_iteration(const Tango::DevVarStringArray
*);
904 * Double : min value, max value, affinement enable
905 * @param argin String : Name of parameter ; Double : min value, max value, affinement enable
906 * @exception DevFailed
908 void set_crystal_parameter_values(const Tango::DevVarDoubleStringArray
*);
910 * This command will set the triplet (h,k,l
911 * @param argin h,k,l values
912 * @exception DevFailed
914 void set_hkl(const Tango::DevVarDoubleArray
*);
916 * Double : value of parameter
917 * @param argin String : name of parameter ; Double : value of parameter
918 * @exception DevFailed
920 void set_mode_parameters_values(const Tango::DevVarDoubleStringArray
*);
922 * This commands redefine the parameters of 1 reflection of the current cristal.
923 * index = index of reflection
927 * relevance = relevance value of this reflection
928 * affinement enabled = if true this reflection is associated with Affinement calculation
929 * @param argin reflections i.e : index, h, k, l, relevance, affinement enabled
930 * @exception DevFailed
932 void set_reflection(const Tango::DevVarDoubleArray
*);
935 * Read the device properties from database
937 void get_device_property();
940 // Here is the end of the automatic code generation part
941 //-------------------------------------------------------------
946 // Add your own data members here
947 //-----------------------------------------
948 bool _helper_not_initialized
;
949 bool _write_attributes_hkl_together
;
951 TangoHKLAdapter
* _hklAdapter
;
952 HklGeometryType _type
;
954 unsigned int _computedAngles_size
;
956 Tango::WAttribute
*_att_h_w
;
957 Tango::WAttribute
*_att_k_w
;
958 Tango::WAttribute
*_att_l_w
;
960 Tango::DevVarStringArray _mode_names_dev_varstring_array
;
961 Tango::DevVarStringArray _crystal_names_dev_varstring_array
;
963 // thoses methods are declared in the DiffractometerExtra.cpp
965 void compute_angles(double h
, double k
,double l
);
967 // refresh crystal parameters
968 void refresh_crystal_parameters(void);
970 HklGeometryType
get_type_from_property(std::string
const & name
);
972 void remove_dynamic_attributes(void);
975 * Tango overloaded method used to manage the simultaneous writing
978 void write_attributes_3(const Tango::AttributeValueList
& values
) throw (CORBA::SystemException
, Tango::DevFailed
, Tango::MultiDevFailed
);
981 void create_dynamic_attributes(void);
986 #endif // _DIFFRACTOMETER_H