From d398f8abb3e052c20a3b0311a87b7add98804cc0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= Date: Thu, 11 Jun 2009 12:05:02 +0200 Subject: [PATCH] * add the PseudoaxesProxies attribut to the Diffractometer --- src/Diffractometer/Diffractometer.cpp | 12 ++++++++++++ src/Diffractometer/Diffractometer.h | 11 ++++++++++- src/Diffractometer/DiffractometerClass.cpp | 6 +++++- src/Diffractometer/DiffractometerClass.h | 12 ++++++++++++ src/Diffractometer/DiffractometerStateMachine.cpp | 14 ++++++++++++++ 5 files changed, 53 insertions(+), 2 deletions(-) diff --git a/src/Diffractometer/Diffractometer.cpp b/src/Diffractometer/Diffractometer.cpp index 745e573..05956e7 100644 --- a/src/Diffractometer/Diffractometer.cpp +++ b/src/Diffractometer/Diffractometer.cpp @@ -436,6 +436,18 @@ void Diffractometer::read_attr_hardware(vector &attr_list) } //+---------------------------------------------------------------------------- // +// method : Diffractometer::read_pseudoAxesProxies +// +// description : Extract real attribute values for pseudoAxesProxies acquisition result. +// +//----------------------------------------------------------------------------- +void Diffractometer::read_pseudoAxesProxies(Tango::Attribute &attr) +{ + DEBUG_STREAM << "Diffractometer::read_pseudoAxesProxies(Tango::Attribute &attr) entering... "<< endl; +} + +//+---------------------------------------------------------------------------- +// // method : Diffractometer::read_PseudoAxesNames // // description : Extract real attribute values for PseudoAxesNames acquisition result. diff --git a/src/Diffractometer/Diffractometer.h b/src/Diffractometer/Diffractometer.h index 26e75a3..bf3e987 100644 --- a/src/Diffractometer/Diffractometer.h +++ b/src/Diffractometer/Diffractometer.h @@ -53,7 +53,7 @@ namespace Diffractometer_ns /** * Class Description: - * This class can be used to compute cristallography computation + * This class can be used to compute cristallography computation */ /* @@ -116,6 +116,7 @@ public : Tango::DevDouble *attr_GammaStar_read; Tango::DevString *attr_CrystalNames_read; Tango::DevString *attr_AxesNames_read; + Tango::DevString *attr_pseudoAxesProxies_read; Tango::DevString *attr_PseudoAxesNames_read; Tango::DevString *attr_ModeNames_read; Tango::DevDouble *attr_Angles_read; @@ -366,6 +367,10 @@ public : */ virtual void read_AxesNames(Tango::Attribute &attr); /** + * Extract real attribute values for pseudoAxesProxies acquisition result. + */ + virtual void read_pseudoAxesProxies(Tango::Attribute &attr); +/** * Extract real attribute values for PseudoAxesNames acquisition result. */ virtual void read_PseudoAxesNames(Tango::Attribute &attr); @@ -510,6 +515,10 @@ public : */ virtual bool is_AxesNames_allowed(Tango::AttReqType type); /** + * Read/Write allowed for pseudoAxesProxies attribute. + */ + virtual bool is_pseudoAxesProxies_allowed(Tango::AttReqType type); +/** * Read/Write allowed for PseudoAxesNames attribute. */ virtual bool is_PseudoAxesNames_allowed(Tango::AttReqType type); diff --git a/src/Diffractometer/DiffractometerClass.cpp b/src/Diffractometer/DiffractometerClass.cpp index f43b496..b1d9419 100644 --- a/src/Diffractometer/DiffractometerClass.cpp +++ b/src/Diffractometer/DiffractometerClass.cpp @@ -1394,6 +1394,10 @@ void DiffractometerClass::attribute_factory(vector &att_list) axes_names->set_default_properties(axes_names_prop); att_list.push_back(axes_names); + // Attribute : pseudoAxesProxies + pseudoAxesProxiesAttrib *pseudo_axes_proxies = new pseudoAxesProxiesAttrib(); + att_list.push_back(pseudo_axes_proxies); + // Attribute : PseudoAxesNames PseudoAxesNamesAttrib *pseudo_axes_names = new PseudoAxesNamesAttrib(); att_list.push_back(pseudo_axes_names); @@ -1591,7 +1595,7 @@ void DiffractometerClass::write_class_property() // Put Description Tango::DbDatum description("Description"); vector str_desc; - str_desc.push_back("This class can be used to compute cristallography computation "); + str_desc.push_back("This class can be used to compute cristallography computation"); description << str_desc; data.push_back(description); diff --git a/src/Diffractometer/DiffractometerClass.h b/src/Diffractometer/DiffractometerClass.h index 0632dd2..3d8eaab 100644 --- a/src/Diffractometer/DiffractometerClass.h +++ b/src/Diffractometer/DiffractometerClass.h @@ -161,6 +161,18 @@ public: {return (static_cast(dev))->is_PseudoAxesNames_allowed(ty);} }; +class pseudoAxesProxiesAttrib: public Tango::SpectrumAttr +{ +public: + pseudoAxesProxiesAttrib():SpectrumAttr("pseudoAxesProxies", Tango::DEV_STRING, Tango::READ, 100) {}; + ~pseudoAxesProxiesAttrib() {}; + + virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att) + {(static_cast(dev))->read_pseudoAxesProxies(att);} + virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty) + {return (static_cast(dev))->is_pseudoAxesProxies_allowed(ty);} +}; + class AxesNamesAttrib: public Tango::SpectrumAttr { public: diff --git a/src/Diffractometer/DiffractometerStateMachine.cpp b/src/Diffractometer/DiffractometerStateMachine.cpp index 670a72e..aa94242 100644 --- a/src/Diffractometer/DiffractometerStateMachine.cpp +++ b/src/Diffractometer/DiffractometerStateMachine.cpp @@ -562,6 +562,20 @@ bool Diffractometer::is_UB_allowed(Tango::AttReqType type) // Re-Start of Generated Code return true; } +//+---------------------------------------------------------------------------- +// +// method : Diffractometer::is_pseudoAxesProxies_allowed +// +// description : Read/Write allowed for pseudoAxesProxies attribute. +// +//----------------------------------------------------------------------------- +bool Diffractometer::is_pseudoAxesProxies_allowed(Tango::AttReqType type) +{ + // End of Generated Code + + // Re-Start of Generated Code + return true; +} //================================================= // Commands Allowed Methods -- 2.11.4.GIT