1 //=============================================================================
3 // file : DiffractometerDevice.h
5 // description : Include for the DiffractometerDevice class.
13 // $Log: DiffractometerDevice.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 _DIFFRACTOMETERDEVICE_H
35 #define _DIFFRACTOMETERDEVICE_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 DiffractometerDevice_ns
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 DiffractometerDevice
: 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_PseudoAxesNames_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 DiffractometerDevice(Tango::DeviceClass
*cl
,string
&s
);
172 * Constructs a newly allocated Command object.
175 * @param s Device Name
177 DiffractometerDevice(Tango::DeviceClass
*cl
,const char *s
);
179 * Constructs a newly allocated Command object.
182 * @param s Device name
183 * @param d Device description.
185 DiffractometerDevice(Tango::DeviceClass
*cl
,const char *s
,const char *d
);
189 * Only one desctructor is defined for this class */
192 * The object desctructor.
194 ~DiffractometerDevice() {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 DiffractometerDevice 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 PseudoAxesNames acquisition result.
371 virtual void read_PseudoAxesNames(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 PseudoAxesNames attribute.
515 virtual bool is_PseudoAxesNames_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 * Stops the movement of all axis driven by the Diffractometer
692 * @exception DevFailed
696 * Create a new crystal
697 * @param argin Name of the new crystal
698 * @exception DevFailed
700 void add_new_crystal(Tango::DevString
);
702 * This commands requires the definition of 1 reflection defined by (h,k,l ) coordinates.
703 * This coodinates are associated with the current angles configuration.
705 * TODO: d�taill� le commentaire
706 * reflections i.e : h, k, l, relevance, enable/disable
707 * @param argin reflections i.e : h, k, l, relevance, enable/disable
708 * @exception DevFailed
710 void add_reflection(const Tango::DevVarDoubleArray
*);
712 * Compute affinement for the current crystal with available list of reflection.
713 * @param argin name of the crystal to fit
714 * @return the fitness of the crystal after the affinement.
715 * @exception DevFailed
717 Tango::DevDouble
affine_crystal(Tango::DevString
);
719 * Clears the attribute ComputedAngles.
720 * Useful to get a fresh view of calculations already made
721 * @exception DevFailed
723 void computed_angles_clear();
725 * this commande works only in simulated mode.
726 * It computhe [-hmax: hmax] etc.. angles computations.
727 * @param argin hmax, kmax, lmax
728 * @exception DevFailed
730 void computed_angles_hkllist(const Tango::DevVarDoubleArray
*);
732 * Compute Matrix U from two reflections
733 * @param argin a two elements array with the index of reflection to use
734 * @exception DevFailed
736 void compute_u(const Tango::DevVarLongArray
*);
738 * Defines crystal lattice parameters.
739 * This information is mandatory for angles calculations.
740 * Angles units are degrees
741 * @param argin Crystal parameters : alpha,beta,gamma, A,B,C
742 * @exception DevFailed
744 void configure_crystal(const Tango::DevVarDoubleArray
*);
746 * Copy the current crytal as another name
748 * @exception DevFailed
750 void copy_current_crystal_as(Tango::DevString
);
752 * Copy one reflection from the current crystal to another crystal
753 * @param argin Double: Reflection number of the current crystal String : Name of the crystal where copy this reflection
754 * @exception DevFailed
756 void copy_reflection_to(const Tango::DevVarDoubleStringArray
*);
758 * Delete the current from this device
759 * @exception DevFailed
761 void delete_current_crystal();
763 * This commands redefine the maximum of iteration for an affinement.
771 * Iteration value of the last calculation
772 * @param argin Affinement name
773 * @return Iteration value of the last calculation
774 * @exception DevFailed
776 Tango::DevLong
get_affinement_iteration(Tango::DevString
);
778 * This commands returns the list of Affinement names.
779 * @return List of Affinement names
780 * @exception DevFailed
782 Tango::DevVarStringArray
*get_affinement_list();
784 * This commands redefine the maximum of iteration for an affinement.
792 * Value of the maximum
793 * @param argin Affinement name
794 * @return Value of iteration max
795 * @exception DevFailed
797 Tango::DevLong
get_affinement_max_iteration(Tango::DevString
);
799 * this method return the names of the dynamic attributes created from the hkl axes names
800 * kappa -> AxisKappa etc...
801 * @return namers of the axes
802 * @exception DevFailed
804 Tango::DevVarStringArray
*get_axes_names();
806 * Return all crystals names registed into the device
807 * @return all crystals names registed
808 * @exception DevFailed
810 Tango::DevVarStringArray
*get_crystal_names();
812 * Return all values of a parameter for the current crystal
813 * @param argin Name of parameter (see getParametersNames for the complete list of parameters)
814 * @return In the order : minimum value, maximum value, affinement enable
815 * @exception DevFailed
817 Tango::DevVarDoubleStringArray
*get_crystal_parameter_values(Tango::DevString
);
821 * @return description
822 * @exception DevFailed
824 Tango::DevString
get_mode_description(Tango::DevString
);
827 * @return Parameters names of the current mode
828 * @exception DevFailed
830 Tango::DevVarStringArray
*get_mode_parameters_names();
832 * Double : values of parameters
833 * @return String : Names of parameters ; Double : values of parameters
834 * @exception DevFailed
836 Tango::DevVarDoubleStringArray
*get_mode_parameters_values();
839 * @param argin name of parameter
840 * @return value of this parameter
841 * @exception DevFailed
843 Tango::DevDouble
get_mode_parameter_value(Tango::DevString
);
846 * @param argin index of reflection
847 * @return H, K, L, Relevance, Affinement Enabled
848 * @exception DevFailed
850 Tango::DevVarDoubleArray
*get_reflection(Tango::DevShort
);
852 * Return the number of reflection of the current crystal
853 * @return Number of reflection in current crytal
854 * @exception DevFailed
856 Tango::DevUShort
get_reflection_size();
859 * @param argin the idx of the computed angles
860 * @exception DevFailed
862 void goto_computed_angles(Tango::DevShort
);
864 * Go to axis values of the given reflection
865 * @param argin reflection number
866 * @exception DevFailed
868 void goto_reflection(Tango::DevShort
);
871 * @exception DevFailed
875 * This commands removes reflection from the current cristal.
876 * @param argin index of reflection to remove
877 * @exception DevFailed
879 void remove_reflection(Tango::DevShort
);
882 * @exception DevFailed
886 * This commands redefine the maximum of iteration for an affinement.
887 * index = index of reflection
891 * relevance = relevance value of this reflection
892 * affinement enabled = if true this reflection is associated with Affinement calculation
893 * @param argin Affinement name, Value of iteration max
894 * @exception DevFailed
896 void set_affinement_max_iteration(const Tango::DevVarStringArray
*);
898 * Double : min value, max value, affinement enable
899 * @param argin String : Name of parameter ; Double : min value, max value, affinement enable
900 * @exception DevFailed
902 void set_crystal_parameter_values(const Tango::DevVarDoubleStringArray
*);
904 * This command will set the triplet (h,k,l
905 * @param argin h,k,l values
906 * @exception DevFailed
908 void set_hkl(const Tango::DevVarDoubleArray
*);
910 * Double : value of parameter
911 * @param argin String : name of parameter ; Double : value of parameter
912 * @exception DevFailed
914 void set_mode_parameters_values(const Tango::DevVarDoubleStringArray
*);
916 * This commands redefine the parameters of 1 reflection of the current cristal.
917 * index = index of reflection
921 * relevance = relevance value of this reflection
922 * affinement enabled = if true this reflection is associated with Affinement calculation
923 * @param argin reflections i.e : index, h, k, l, relevance, affinement enabled
924 * @exception DevFailed
926 void set_reflection(const Tango::DevVarDoubleArray
*);
929 * Read the device properties from database
931 void get_device_property();
934 // Here is the end of the automatic code generation part
935 //-------------------------------------------------------------
940 // Add your own data members here
941 //-----------------------------------------
942 bool _helper_not_initialized
;
943 bool _write_attributes_hkl_together
;
945 TangoHKLAdapter
* _hklAdapter
;
946 HklGeometryType _type
;
947 std::vector
<Tango::Attr
*> _dynamic_attributes
;
948 std::vector
<std::string
> _dynamic_axes_names
;
949 char ** _dynamic_axes_names_char
;
951 unsigned int _computedAngles_size
;
953 Tango::WAttribute
*_att_h_w
;
954 Tango::WAttribute
*_att_k_w
;
955 Tango::WAttribute
*_att_l_w
;
957 Tango::DevVarStringArray _mode_names_dev_varstring_array
;
958 Tango::DevVarStringArray _crystal_names_dev_varstring_array
;
960 // thoses methods are declared in the DiffractometerDeviceExtra.cpp
962 void compute_angles(double h
, double k
,double l
);
964 // refresh crystal parameters
965 void refresh_crystal_parameters(void);
967 HklGeometryType
get_type_from_property(std::string
const & name
);
969 void remove_dynamic_attributes(void);
972 * Tango overloaded method used to manage the simultaneous writing
975 void write_attributes_3(const Tango::AttributeValueList
& values
) throw (CORBA::SystemException
, Tango::DevFailed
, Tango::MultiDevFailed
);
978 void create_dynamic_attributes(void);
983 #endif // _DIFFRACTOMETERDEVICE_H