1 #include "Diffractometer.h"
2 #include "AxisAttrib.h"
3 #include "PseudoAxesAttrib.h"
6 namespace Diffractometer_ns
8 void Diffractometer::refresh_crystal_parameters()
10 DEBUG_STREAM
<< "Diffractometer::refresh_crystal_parameters(): entering... !" << endl
;
14 _hklAdapter
->get_sample_lattices(attr_A_read
, attr_B_read
, attr_C_read
,
15 attr_Alpha_read
, attr_Beta_read
, attr_Gamma_read
,
16 attr_AStar_read
, attr_BStar_read
, attr_CStar_read
,
17 attr_AlphaStar_read
, attr_BetaStar_read
, attr_GammaStar_read
);
20 /* this method return false if everythings goes fine, true otherwise */
21 bool Diffractometer::get_type_from_property(std::string
const & name
, HklGeometryType
&type
)
25 if (!strcasecmp(name
.c_str(), "2CV"))
26 type
= HKL_GEOMETRY_TYPE_TWOC_VERTICAL
;
27 else if (!strcasecmp(name
.c_str(), "E4CV"))
28 type
= HKL_GEOMETRY_TYPE_EULERIAN4C_VERTICAL
;
29 else if (!strcasecmp(name
.c_str(), "K4CV"))
30 type
= HKL_GEOMETRY_TYPE_KAPPA4C_VERTICAL
;
31 else if (!strcasecmp(name
.c_str(), "K6C"))
32 type
= HKL_GEOMETRY_TYPE_KAPPA6C
;
33 else if (!strcasecmp(name
.c_str(), "E6C"))
34 type
= HKL_GEOMETRY_TYPE_EULERIAN6C
;
35 else if (!strcasecmp(name
.c_str(), "ZAXIS"))
36 type
= HKL_GEOMETRY_TYPE_ZAXIS
;
43 void Diffractometer::create_dynamic_attributes(void)
46 _hklAdapter
->attach_dynamic_attributes_to_device();
49 void Diffractometer::remove_dynamic_attributes(void)
52 _hklAdapter
->detach_dynamic_attributes_from_device();