From 9a04c489cda65d886f007cf22ae4d40e49bf36d5 Mon Sep 17 00:00:00 2001 From: Claudio Scafuri <claudio.scafuri@elettra.eu> Date: Fri, 7 Feb 2025 16:43:40 +0100 Subject: [PATCH] ceh seems ok --- src/E2Sextupole.cpp | 319 ++++++++++++++++++-------------- src/E2Sextupole.h | 92 ++++----- src/E2Sextupole.xmi | 16 +- src/E2SextupoleClass.cpp | 220 +++++++++++----------- src/E2SextupoleClass.h | 112 +++++------ src/E2SextupoleStateMachine.cpp | 144 +++++++------- 6 files changed, 476 insertions(+), 427 deletions(-) diff --git a/src/E2Sextupole.cpp b/src/E2Sextupole.cpp index f6f4d0c..5cc03aa 100644 --- a/src/E2Sextupole.cpp +++ b/src/E2Sextupole.cpp @@ -73,17 +73,17 @@ // BeamEnergy | Tango::DevDouble Scalar // DesignStrength | Tango::DevDouble Scalar // bbaEnable | Tango::DevBoolean Scalar -// CehStrength | Tango::DevDouble Scalar -// CehCorrectionStrength | Tango::DevDouble Scalar -// CehResonanceStrength | Tango::DevDouble Scalar -// CevStrength | Tango::DevDouble Scalar -// CevCorrectionStrength | Tango::DevDouble Scalar -// CevResonanceStrength | Tango::DevDouble Scalar +// CEHStrength | Tango::DevDouble Scalar +// CEHCorrectionStrength | Tango::DevDouble Scalar +// CEHResonanceStrength | Tango::DevDouble Scalar +// CEVStrength | Tango::DevDouble Scalar +// CEVCorrectionStrength | Tango::DevDouble Scalar +// CEVResonanceStrength | Tango::DevDouble Scalar // SQStrength | Tango::DevDouble Scalar // SQCorrectionStrength | Tango::DevDouble Scalar // SQResonanceStrength | Tango::DevDouble Scalar -// CeHCurrent | Tango::DevDouble Scalar -// CeVCurrent | Tango::DevDouble Scalar +// CEHCurrent | Tango::DevDouble Scalar +// CEVCurrent | Tango::DevDouble Scalar // PolynomA | Tango::DevDouble Spectrum ( max = 3) // PolynomB | Tango::DevDouble Spectrum ( max = 3) //================================================================ @@ -206,17 +206,17 @@ void E2Sextupole::delete_device() delete[] attr_BeamEnergy_read; delete[] attr_DesignStrength_read; delete[] attr_bbaEnable_read; - delete[] attr_CehStrength_read; - delete[] attr_CehCorrectionStrength_read; - delete[] attr_CehResonanceStrength_read; - delete[] attr_CevStrength_read; - delete[] attr_CevCorrectionStrength_read; - delete[] attr_CevResonanceStrength_read; + delete[] attr_CEHStrength_read; + delete[] attr_CEHCorrectionStrength_read; + delete[] attr_CEHResonanceStrength_read; + delete[] attr_CEVStrength_read; + delete[] attr_CEVCorrectionStrength_read; + delete[] attr_CEVResonanceStrength_read; delete[] attr_SQStrength_read; delete[] attr_SQCorrectionStrength_read; delete[] attr_SQResonanceStrength_read; - delete[] attr_CeHCurrent_read; - delete[] attr_CeVCurrent_read; + delete[] attr_CEHCurrent_read; + delete[] attr_CEVCurrent_read; delete[] attr_PolynomA_read; delete[] attr_PolynomB_read; } @@ -235,7 +235,7 @@ void E2Sextupole::init_device() // Initialization before get_device_property() call /* clang-format off */ - set_state(Tango::INIT); + set_state(Tango::UNKNOWN); set_status("Init"); design_strength_initialized = false; /*----- PROTECTED REGION END -----*/ // E2Sextupole::init_device_before @@ -251,17 +251,17 @@ void E2Sextupole::init_device() attr_BeamEnergy_read = new Tango::DevDouble[1]; attr_DesignStrength_read = new Tango::DevDouble[1]; attr_bbaEnable_read = new Tango::DevBoolean[1]; - attr_CehStrength_read = new Tango::DevDouble[1]; - attr_CehCorrectionStrength_read = new Tango::DevDouble[1]; - attr_CehResonanceStrength_read = new Tango::DevDouble[1]; - attr_CevStrength_read = new Tango::DevDouble[1]; - attr_CevCorrectionStrength_read = new Tango::DevDouble[1]; - attr_CevResonanceStrength_read = new Tango::DevDouble[1]; + attr_CEHStrength_read = new Tango::DevDouble[1]; + attr_CEHCorrectionStrength_read = new Tango::DevDouble[1]; + attr_CEHResonanceStrength_read = new Tango::DevDouble[1]; + attr_CEVStrength_read = new Tango::DevDouble[1]; + attr_CEVCorrectionStrength_read = new Tango::DevDouble[1]; + attr_CEVResonanceStrength_read = new Tango::DevDouble[1]; attr_SQStrength_read = new Tango::DevDouble[1]; attr_SQCorrectionStrength_read = new Tango::DevDouble[1]; attr_SQResonanceStrength_read = new Tango::DevDouble[1]; - attr_CeHCurrent_read = new Tango::DevDouble[1]; - attr_CeVCurrent_read = new Tango::DevDouble[1]; + attr_CEHCurrent_read = new Tango::DevDouble[1]; + attr_CEVCurrent_read = new Tango::DevDouble[1]; attr_PolynomA_read = new Tango::DevDouble[3]; attr_PolynomB_read = new Tango::DevDouble[3]; // No longer if mandatory property not set. @@ -290,6 +290,7 @@ void E2Sextupole::init_device() ceh_set_current.resize(1, 0.0); ceh_set_strength.resize(1,0.0); ceh_current_state = Tango::OFF; //safe guess + ceh_design_strength = 0.0; //safe guess cev_current_dev = nullptr; cev_current_cb = nullptr; @@ -299,6 +300,7 @@ void E2Sextupole::init_device() cev_set_current.resize(1, 0.0); cev_set_strength.resize(1,0.0); cev_current_state = Tango::OFF; //safe guess + cev_design_strength = 0.0; try{ main_current_dev = new Tango::DeviceProxy(currentDevice); @@ -1114,39 +1116,39 @@ void E2Sextupole::write_bbaEnable(Tango::WAttribute &attr) } //-------------------------------------------------------- /** - * Read attribute CehStrength related method + * Read attribute CEHStrength related method * Description: embbeded corrector horizontal kick * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::read_CehStrength(Tango::Attribute &attr) +void E2Sextupole::read_CEHStrength(Tango::Attribute &attr) { - DEBUG_STREAM << "E2Sextupole::read_CehStrength(Tango::Attribute &attr) entering... " << std::endl; - /*----- PROTECTED REGION ID(E2Sextupole::read_CehStrength) ENABLED START -----*/ + DEBUG_STREAM << "E2Sextupole::read_CEHStrength(Tango::Attribute &attr) entering... " << std::endl; + /*----- PROTECTED REGION ID(E2Sextupole::read_CEHStrength) ENABLED START -----*/ /* clang-format on */ // Set the attribute value - attr.set_value(attr_CehStrength_read); + attr.set_value(attr_CEHStrength_read); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CehStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CEHStrength } //-------------------------------------------------------- /** - * Write attribute CehStrength related method + * Write attribute CEHStrength related method * Description: embbeded corrector horizontal kick * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::write_CehStrength(Tango::WAttribute &attr) +void E2Sextupole::write_CEHStrength(Tango::WAttribute &attr) { - DEBUG_STREAM << "E2Sextupole::write_CehStrength(Tango::WAttribute &attr) entering... " << std::endl; + DEBUG_STREAM << "E2Sextupole::write_CEHStrength(Tango::WAttribute &attr) entering... " << std::endl; // Retrieve write value Tango::DevDouble w_val; attr.get_write_value(w_val); - /*----- PROTECTED REGION ID(E2Sextupole::write_CehStrength) ENABLED START -----*/ + /*----- PROTECTED REGION ID(E2Sextupole::write_CEHStrength) ENABLED START -----*/ /* clang-format on */ // Add your own code omni_mutex_lock guardio(iomutex); @@ -1159,49 +1161,50 @@ void E2Sextupole::write_CehStrength(Tango::WAttribute &attr) ceh_set_strength[0] = w_val; wValCehCorrStrength = w_val - wValCehResStrength; /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CehStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEHStrength } //-------------------------------------------------------- /** - * Read attribute CehCorrectionStrength related method + * Read attribute CEHCorrectionStrength related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::read_CehCorrectionStrength(Tango::Attribute &attr) +void E2Sextupole::read_CEHCorrectionStrength(Tango::Attribute &attr) { - DEBUG_STREAM << "E2Sextupole::read_CehCorrectionStrength(Tango::Attribute &attr) entering... " << std::endl; - /*----- PROTECTED REGION ID(E2Sextupole::read_CehCorrectionStrength) ENABLED START -----*/ + DEBUG_STREAM << "E2Sextupole::read_CEHCorrectionStrength(Tango::Attribute &attr) entering... " << std::endl; + /*----- PROTECTED REGION ID(E2Sextupole::read_CEHCorrectionStrength) ENABLED START -----*/ /* clang-format on */ // Set the attribute value - attr.set_value(attr_CehCorrectionStrength_read); + attr.set_value(attr_CEHCorrectionStrength_read); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CehCorrectionStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CEHCorrectionStrength } //-------------------------------------------------------- /** - * Write attribute CehCorrectionStrength related method + * Write attribute CEHCorrectionStrength related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::write_CehCorrectionStrength(Tango::WAttribute &attr) +void E2Sextupole::write_CEHCorrectionStrength(Tango::WAttribute &attr) { - DEBUG_STREAM << "E2Sextupole::write_CehCorrectionStrength(Tango::WAttribute &attr) entering... " << std::endl; + DEBUG_STREAM << "E2Sextupole::write_CEHCorrectionStrength(Tango::WAttribute &attr) entering... " << std::endl; // Retrieve write value Tango::DevDouble w_val; attr.get_write_value(w_val); - /*----- PROTECTED REGION ID(E2Sextupole::write_CehCorrectionStrength) ENABLED START -----*/ + /*----- PROTECTED REGION ID(E2Sextupole::write_CEHCorrectionStrength) ENABLED START -----*/ /* clang-format on */ // Add your own code omni_mutex_lock guardio(iomutex); Tango::DevDouble newStrength; //resonanceAtt->get_write_value(_resStrength); - newStrength = w_val + wValCehResStrength + *attr_CehCorrectionStrength_read; + newStrength = w_val + wValCehResStrength + ceh_design_strength; + std::vector<double> req_strength; std::vector<double> curr_out; req_strength.push_back(newStrength); @@ -1212,48 +1215,48 @@ void E2Sextupole::write_CehCorrectionStrength(Tango::WAttribute &attr) ceh_set_strength[0] = newStrength; cehStrengthAtt->set_write_value(ceh_set_strength[0]); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CehCorrectionStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEHCorrectionStrength } //-------------------------------------------------------- /** - * Read attribute CehResonanceStrength related method + * Read attribute CEHResonanceStrength related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::read_CehResonanceStrength(Tango::Attribute &attr) +void E2Sextupole::read_CEHResonanceStrength(Tango::Attribute &attr) { - DEBUG_STREAM << "E2Sextupole::read_CehResonanceStrength(Tango::Attribute &attr) entering... " << std::endl; - /*----- PROTECTED REGION ID(E2Sextupole::read_CehResonanceStrength) ENABLED START -----*/ + DEBUG_STREAM << "E2Sextupole::read_CEHResonanceStrength(Tango::Attribute &attr) entering... " << std::endl; + /*----- PROTECTED REGION ID(E2Sextupole::read_CEHResonanceStrength) ENABLED START -----*/ /* clang-format on */ // Set the attribute value - attr.set_value(attr_CehResonanceStrength_read); + attr.set_value(attr_CEHResonanceStrength_read); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CehResonanceStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CEHResonanceStrength } //-------------------------------------------------------- /** - * Write attribute CehResonanceStrength related method + * Write attribute CEHResonanceStrength related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::write_CehResonanceStrength(Tango::WAttribute &attr) +void E2Sextupole::write_CEHResonanceStrength(Tango::WAttribute &attr) { - DEBUG_STREAM << "E2Sextupole::write_CehResonanceStrength(Tango::WAttribute &attr) entering... " << std::endl; + DEBUG_STREAM << "E2Sextupole::write_CEHResonanceStrength(Tango::WAttribute &attr) entering... " << std::endl; // Retrieve write value Tango::DevDouble w_val; attr.get_write_value(w_val); - /*----- PROTECTED REGION ID(E2Sextupole::write_CehResonanceStrength) ENABLED START -----*/ + /*----- PROTECTED REGION ID(E2Sextupole::write_CEHResonanceStrength) ENABLED START -----*/ /* clang-format on */ // Add your own code omni_mutex_lock guardio(iomutex); Tango::DevDouble newStrength; - newStrength = w_val + wValCehCorrStrength + *attr_CehCorrectionStrength_read; + newStrength = w_val + wValCehCorrStrength + ceh_design_strength; std::vector<double> req_strength; std::vector<double> curr_out; req_strength.push_back(newStrength); @@ -1261,131 +1264,131 @@ void E2Sextupole::write_CehResonanceStrength(Tango::WAttribute &attr) Tango::DeviceAttribute watt("Current", curr_out[0]); ceh_current_dev->write_attribute(watt); wValCehResStrength = w_val; - *attr_CehResonanceStrength_read = w_val; + *attr_CEHResonanceStrength_read = w_val; ceh_set_strength[0] = newStrength; cehStrengthAtt->set_write_value(ceh_set_strength[0]); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CehResonanceStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEHResonanceStrength } //-------------------------------------------------------- /** - * Read attribute CevStrength related method + * Read attribute CEVStrength related method * Description: embbeded corrector vertical kick * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::read_CevStrength(Tango::Attribute &attr) +void E2Sextupole::read_CEVStrength(Tango::Attribute &attr) { - DEBUG_STREAM << "E2Sextupole::read_CevStrength(Tango::Attribute &attr) entering... " << std::endl; - /*----- PROTECTED REGION ID(E2Sextupole::read_CevStrength) ENABLED START -----*/ + DEBUG_STREAM << "E2Sextupole::read_CEVStrength(Tango::Attribute &attr) entering... " << std::endl; + /*----- PROTECTED REGION ID(E2Sextupole::read_CEVStrength) ENABLED START -----*/ /* clang-format on */ // Set the attribute value - attr.set_value(attr_CevStrength_read); + attr.set_value(attr_CEVStrength_read); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CevStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CEVStrength } //-------------------------------------------------------- /** - * Write attribute CevStrength related method + * Write attribute CEVStrength related method * Description: embbeded corrector vertical kick * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::write_CevStrength(Tango::WAttribute &attr) +void E2Sextupole::write_CEVStrength(Tango::WAttribute &attr) { - DEBUG_STREAM << "E2Sextupole::write_CevStrength(Tango::WAttribute &attr) entering... " << std::endl; + DEBUG_STREAM << "E2Sextupole::write_CEVStrength(Tango::WAttribute &attr) entering... " << std::endl; // Retrieve write value Tango::DevDouble w_val; attr.get_write_value(w_val); - /*----- PROTECTED REGION ID(E2Sextupole::write_CevStrength) ENABLED START -----*/ + /*----- PROTECTED REGION ID(E2Sextupole::write_CEVStrength) ENABLED START -----*/ /* clang-format on */ // Add your own code /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CevStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEVStrength } //-------------------------------------------------------- /** - * Read attribute CevCorrectionStrength related method + * Read attribute CEVCorrectionStrength related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::read_CevCorrectionStrength(Tango::Attribute &attr) +void E2Sextupole::read_CEVCorrectionStrength(Tango::Attribute &attr) { - DEBUG_STREAM << "E2Sextupole::read_CevCorrectionStrength(Tango::Attribute &attr) entering... " << std::endl; - /*----- PROTECTED REGION ID(E2Sextupole::read_CevCorrectionStrength) ENABLED START -----*/ + DEBUG_STREAM << "E2Sextupole::read_CEVCorrectionStrength(Tango::Attribute &attr) entering... " << std::endl; + /*----- PROTECTED REGION ID(E2Sextupole::read_CEVCorrectionStrength) ENABLED START -----*/ /* clang-format on */ // Set the attribute value - attr.set_value(attr_CevCorrectionStrength_read); + attr.set_value(attr_CEVCorrectionStrength_read); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CevCorrectionStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CEVCorrectionStrength } //-------------------------------------------------------- /** - * Write attribute CevCorrectionStrength related method + * Write attribute CEVCorrectionStrength related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::write_CevCorrectionStrength(Tango::WAttribute &attr) +void E2Sextupole::write_CEVCorrectionStrength(Tango::WAttribute &attr) { - DEBUG_STREAM << "E2Sextupole::write_CevCorrectionStrength(Tango::WAttribute &attr) entering... " << std::endl; + DEBUG_STREAM << "E2Sextupole::write_CEVCorrectionStrength(Tango::WAttribute &attr) entering... " << std::endl; // Retrieve write value Tango::DevDouble w_val; attr.get_write_value(w_val); - /*----- PROTECTED REGION ID(E2Sextupole::write_CevCorrectionStrength) ENABLED START -----*/ + /*----- PROTECTED REGION ID(E2Sextupole::write_CEVCorrectionStrength) ENABLED START -----*/ /* clang-format on */ // Add your own code /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CevCorrectionStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEVCorrectionStrength } //-------------------------------------------------------- /** - * Read attribute CevResonanceStrength related method + * Read attribute CEVResonanceStrength related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::read_CevResonanceStrength(Tango::Attribute &attr) +void E2Sextupole::read_CEVResonanceStrength(Tango::Attribute &attr) { - DEBUG_STREAM << "E2Sextupole::read_CevResonanceStrength(Tango::Attribute &attr) entering... " << std::endl; - /*----- PROTECTED REGION ID(E2Sextupole::read_CevResonanceStrength) ENABLED START -----*/ + DEBUG_STREAM << "E2Sextupole::read_CEVResonanceStrength(Tango::Attribute &attr) entering... " << std::endl; + /*----- PROTECTED REGION ID(E2Sextupole::read_CEVResonanceStrength) ENABLED START -----*/ /* clang-format on */ // Set the attribute value - attr.set_value(attr_CevResonanceStrength_read); + attr.set_value(attr_CEVResonanceStrength_read); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CevResonanceStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CEVResonanceStrength } //-------------------------------------------------------- /** - * Write attribute CevResonanceStrength related method + * Write attribute CEVResonanceStrength related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::write_CevResonanceStrength(Tango::WAttribute &attr) +void E2Sextupole::write_CEVResonanceStrength(Tango::WAttribute &attr) { - DEBUG_STREAM << "E2Sextupole::write_CevResonanceStrength(Tango::WAttribute &attr) entering... " << std::endl; + DEBUG_STREAM << "E2Sextupole::write_CEVResonanceStrength(Tango::WAttribute &attr) entering... " << std::endl; // Retrieve write value Tango::DevDouble w_val; attr.get_write_value(w_val); - /*----- PROTECTED REGION ID(E2Sextupole::write_CevResonanceStrength) ENABLED START -----*/ + /*----- PROTECTED REGION ID(E2Sextupole::write_CEVResonanceStrength) ENABLED START -----*/ /* clang-format on */ // Add your own code /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CevResonanceStrength + /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEVResonanceStrength } //-------------------------------------------------------- /** @@ -1509,85 +1512,87 @@ void E2Sextupole::write_SQResonanceStrength(Tango::WAttribute &attr) } //-------------------------------------------------------- /** - * Read attribute CeHCurrent related method + * Read attribute CEHCurrent related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::read_CeHCurrent(Tango::Attribute &attr) +void E2Sextupole::read_CEHCurrent(Tango::Attribute &attr) { - DEBUG_STREAM << "E2Sextupole::read_CeHCurrent(Tango::Attribute &attr) entering... " << std::endl; - /*----- PROTECTED REGION ID(E2Sextupole::read_CeHCurrent) ENABLED START -----*/ + DEBUG_STREAM << "E2Sextupole::read_CEHCurrent(Tango::Attribute &attr) entering... " << std::endl; + /*----- PROTECTED REGION ID(E2Sextupole::read_CEHCurrent) ENABLED START -----*/ /* clang-format on */ // Set the attribute value - attr.set_value(attr_CeHCurrent_read); + attr.set_value(attr_CEHCurrent_read); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CeHCurrent + /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CEHCurrent } //-------------------------------------------------------- /** - * Write attribute CeHCurrent related method + * Write attribute CEHCurrent related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::write_CeHCurrent(Tango::WAttribute &attr) +void E2Sextupole::write_CEHCurrent(Tango::WAttribute &attr) { - DEBUG_STREAM << "E2Sextupole::write_CeHCurrent(Tango::WAttribute &attr) entering... " << std::endl; + DEBUG_STREAM << "E2Sextupole::write_CEHCurrent(Tango::WAttribute &attr) entering... " << std::endl; // Retrieve write value Tango::DevDouble w_val; attr.get_write_value(w_val); - /*----- PROTECTED REGION ID(E2Sextupole::write_CeHCurrent) ENABLED START -----*/ + /*----- PROTECTED REGION ID(E2Sextupole::write_CEHCurrent) ENABLED START -----*/ /* clang-format on */ // Add your own code Tango::DeviceAttribute watt("Current",w_val); ceh_current_dev->write_attribute(watt); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CeHCurrent + /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEHCurrent } //-------------------------------------------------------- /** - * Read attribute CeVCurrent related method + * Read attribute CEVCurrent related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::read_CeVCurrent(Tango::Attribute &attr) +void E2Sextupole::read_CEVCurrent(Tango::Attribute &attr) { - DEBUG_STREAM << "E2Sextupole::read_CeVCurrent(Tango::Attribute &attr) entering... " << std::endl; - /*----- PROTECTED REGION ID(E2Sextupole::read_CeVCurrent) ENABLED START -----*/ + DEBUG_STREAM << "E2Sextupole::read_CEVCurrent(Tango::Attribute &attr) entering... " << std::endl; + /*----- PROTECTED REGION ID(E2Sextupole::read_CEVCurrent) ENABLED START -----*/ /* clang-format on */ // Set the attribute value - attr.set_value(attr_CeVCurrent_read); + attr.set_value(attr_CEVCurrent_read); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CeVCurrent + /*----- PROTECTED REGION END -----*/ // E2Sextupole::read_CEVCurrent } //-------------------------------------------------------- /** - * Write attribute CeVCurrent related method + * Write attribute CEVCurrent related method * * * Data type: Tango::DevDouble * Attr type: Scalar */ //-------------------------------------------------------- -void E2Sextupole::write_CeVCurrent(Tango::WAttribute &attr) +void E2Sextupole::write_CEVCurrent(Tango::WAttribute &attr) { - DEBUG_STREAM << "E2Sextupole::write_CeVCurrent(Tango::WAttribute &attr) entering... " << std::endl; + DEBUG_STREAM << "E2Sextupole::write_CEVCurrent(Tango::WAttribute &attr) entering... " << std::endl; // Retrieve write value Tango::DevDouble w_val; attr.get_write_value(w_val); - /*----- PROTECTED REGION ID(E2Sextupole::write_CeVCurrent) ENABLED START -----*/ + /*----- PROTECTED REGION ID(E2Sextupole::write_CEVCurrent) ENABLED START -----*/ /* clang-format on */ // Add your own code + Tango::DeviceAttribute watt("Current",w_val); + cev_current_dev->write_attribute(watt); /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CeVCurrent + /*----- PROTECTED REGION END -----*/ // E2Sextupole::write_CEVCurrent } //-------------------------------------------------------- /** @@ -1797,16 +1802,16 @@ void E2Sextupole::init_strengths(void) // initialize strengths from power supply ceh_set_current[0] = _current[0]; cehStrengthAtt->set_write_value(_strength[0]); - *attr_CehStrength_read = _strength[0]; + *attr_CEHStrength_read = _strength[0]; ceh_set_strength[0] = _strength[0]; Tango::DevDouble corr = _strength[0]; - mainCorrectionAtt->set_write_value(corr); - *attr_CorrectionStrength_read = corr; - wValMainCorrStrength = corr; + cehCorrectionAtt->set_write_value(corr); + *attr_CEHCorrectionStrength_read = corr; + wValCehCorrStrength = corr; cehResonanceAtt->set_write_value(0.0); // start with resonance strength always at 0! - *attr_CehResonanceStrength_read = 0.0; - wValCehCorrStrength = 0.0; + *attr_CEHResonanceStrength_read = 0.0; + wValCehResStrength = 0.0; } catch (Tango::DevFailed &e) { Tango::Except::print_exception(e); } @@ -1814,13 +1819,14 @@ void E2Sextupole::init_strengths(void) // initialize strengths from power supply } //------------------------------------------------------------ // handle changes of power supplies read current (actual current) -void E2Sextupole::update_values_read(void) +void E2Sextupole::update_values_read_main(void) { if (isnan(*attr_Current_read)){ //handle error attr_Strength_read[0] = NAN; return; } - //INFO_STREAM << "update values read"; + + INFO_STREAM << "update values read main"; std::vector<Tango::DevDouble> read_curr; std::vector<Tango::DevDouble> read_strength; omni_mutex_lock guardio(iomutex); @@ -1828,18 +1834,38 @@ void E2Sextupole::update_values_read(void) sextupole->compute_strengths(magnet_rigidity_inv, read_curr, read_strength); attr_Strength_read[0] = read_strength[0]; attr_CorrectionStrength_read[0] = attr_Strength_read[0] -( attr_DesignStrength_read[0] + attr_ResonanceStrength_read[0]); + + + } +void E2Sextupole::update_values_read_ceh(void) +{ + if (isnan(*attr_CEHCurrent_read)){ //handle error + attr_CEHStrength_read[0] = NAN; + return; + } + INFO_STREAM << "update values read ceh"; + std::vector<Tango::DevDouble> read_curr; + std::vector<Tango::DevDouble> read_strength; + omni_mutex_lock guardio(iomutex); + read_curr.push_back(*attr_CEHCurrent_read); + ceh->compute_strengths(magnet_rigidity_inv, read_curr, read_strength); + attr_CEHStrength_read[0] = read_strength[0]; + attr_CEHCorrectionStrength_read[0] = attr_CEHStrength_read[0] - ( ceh_design_strength + attr_CEHResonanceStrength_read[0]); + + +} //------------------------------------------------------------ // handle change of write set point of power supplies current -void E2Sextupole::update_values_write(void) +void E2Sextupole::update_values_write_main(void) { if (isnan(*attr_Current_read)){ //handle error attr_Strength_read[0] = NAN; return; } - INFO_STREAM << "update values write"; + INFO_STREAM << "update values write main"; std::vector<Tango::DevDouble> read_curr; std::vector<Tango::DevDouble> read_strength; omni_mutex_lock guardio(iomutex); @@ -1849,6 +1875,20 @@ void E2Sextupole::update_values_write(void) mainCorrectionAtt->set_write_value(wValMainCorrStrength); } +// handle change of write set point of ceh power supply current +void E2Sextupole::update_values_write_ceh(void) +{ + + INFO_STREAM << "update values write ceh"; + std::vector<Tango::DevDouble> read_curr; + std::vector<Tango::DevDouble> read_strength; + omni_mutex_lock guardio(iomutex); + read_curr.push_back(ceh_set_current[0]); //must use the write value + ceh->compute_strengths(magnet_rigidity_inv, read_curr, read_strength); + wValCehCorrStrength = read_strength[0] - (wValCehResStrength + ceh_design_strength); + cehCorrectionAtt->set_write_value(wValCehCorrStrength); +} + //------------------------------------------------------------ // handles change of power supples state - may just filter values void E2Sextupole::update_values_state(void) @@ -1942,15 +1982,17 @@ MainCurrentEventCallback::MainCurrentEventCallback(E2Sextupole* sext, EventSourc } void MainCurrentEventCallback::push_event(Tango::EventData* ev) //callback core method { - bool update_read = false; - bool update_write = false; + bool update_read_main = false; + bool update_write_main = false; + bool update_read_ceh = false; + bool update_write_ceh = false; bool update_state = false; if (ev->err) { //std::cerr << ev->err << " " << ev->attr_name << std::endl; e2_sext->set_state(Tango::FAULT); e2_sext->set_status("event error"); *e2_sext->attr_Current_read = NAN; - e2_sext->update_values_read(); + e2_sext->update_values_read_main(); return; } { @@ -1963,27 +2005,26 @@ void MainCurrentEventCallback::push_event(Tango::EventData* ev) //callback core if (attrname == "current") { switch (source){ case MainPS: - *(ev->attr_value) >> *(e2_sext->attr_Current_read); break; + *(ev->attr_value) >> *(e2_sext->attr_Current_read); update_read_main = true;break; case CeHPS: - *(ev->attr_value) >> *(e2_sext->attr_CeHCurrent_read); break; + *(ev->attr_value) >> *(e2_sext->attr_CEHCurrent_read); update_read_ceh = true; break; case CeVPS: - *(ev->attr_value) >> *(e2_sext->attr_CeVCurrent_read); break; + *(ev->attr_value) >> *(e2_sext->attr_CEVCurrent_read); break; } - update_read = true; } if (attrname == "currentset") { Tango::DevDouble newcurr; *(ev->attr_value) >> newcurr; switch (source){ case MainPS: - e2_sext->set_main_current_write(newcurr); break; + e2_sext->set_main_current_write(newcurr); update_write_main = true; break; case CeHPS: - e2_sext->set_ceh_current_write(newcurr); break; + e2_sext->set_ceh_current_write(newcurr); update_write_ceh = true; break; case CeVPS: e2_sext->set_cev_current_write(newcurr); break; } - update_write = true; + } if (attrname == "state") { Tango::DevState st; @@ -2002,8 +2043,10 @@ void MainCurrentEventCallback::push_event(Tango::EventData* ev) //callback core update_state = true; } } - if (update_read) e2_sext->update_values_read(); - if (update_write) e2_sext->update_values_write(); + if (update_read_main) e2_sext->update_values_read_main(); + if (update_write_main) e2_sext->update_values_write_main(); + if (update_read_ceh) e2_sext->update_values_read_ceh(); + if (update_write_ceh) e2_sext->update_values_write_ceh(); if (update_state) e2_sext->update_values_state(); } //-------------------------------------------------------- diff --git a/src/E2Sextupole.h b/src/E2Sextupole.h index 0b631e8..c91fd8d 100644 --- a/src/E2Sextupole.h +++ b/src/E2Sextupole.h @@ -115,6 +115,7 @@ class E2Sextupole : public TANGO_BASE_CLASS Tango::WAttribute *cehResonanceAtt; std::vector<double> ceh_set_current; //the actual set point of the current (from the power supply) used for strength calculations std::vector<double> ceh_set_strength; //the strength set point + Tango::DevDouble ceh_design_strength; // may be later promoted to meomorized attribute //cev current @@ -128,8 +129,9 @@ class E2Sextupole : public TANGO_BASE_CLASS Tango::WAttribute *cevResonanceAtt; std::vector<double> cev_set_current; //the actual set point of the current (from the power supply) used for strength calculations std::vector<double> cev_set_strength; //the strength set point + Tango::DevDouble cev_design_strength; // may be later promoted to meomorized attribute - + // add support for quadrupole bool design_strength_initialized; //true when design strenght has been called at least one , first call is to init valude from DB public: @@ -199,17 +201,17 @@ public: Tango::DevDouble *attr_BeamEnergy_read; Tango::DevDouble *attr_DesignStrength_read; Tango::DevBoolean *attr_bbaEnable_read; - Tango::DevDouble *attr_CehStrength_read; - Tango::DevDouble *attr_CehCorrectionStrength_read; - Tango::DevDouble *attr_CehResonanceStrength_read; - Tango::DevDouble *attr_CevStrength_read; - Tango::DevDouble *attr_CevCorrectionStrength_read; - Tango::DevDouble *attr_CevResonanceStrength_read; + Tango::DevDouble *attr_CEHStrength_read; + Tango::DevDouble *attr_CEHCorrectionStrength_read; + Tango::DevDouble *attr_CEHResonanceStrength_read; + Tango::DevDouble *attr_CEVStrength_read; + Tango::DevDouble *attr_CEVCorrectionStrength_read; + Tango::DevDouble *attr_CEVResonanceStrength_read; Tango::DevDouble *attr_SQStrength_read; Tango::DevDouble *attr_SQCorrectionStrength_read; Tango::DevDouble *attr_SQResonanceStrength_read; - Tango::DevDouble *attr_CeHCurrent_read; - Tango::DevDouble *attr_CeVCurrent_read; + Tango::DevDouble *attr_CEHCurrent_read; + Tango::DevDouble *attr_CEVCurrent_read; Tango::DevDouble *attr_PolynomA_read; Tango::DevDouble *attr_PolynomB_read; @@ -357,65 +359,65 @@ public: virtual void write_bbaEnable(Tango::WAttribute &attr); virtual bool is_bbaEnable_allowed(Tango::AttReqType type); /** - * Attribute CehStrength related methods + * Attribute CEHStrength related methods * Description: embbeded corrector horizontal kick * * Data type: Tango::DevDouble * Attr type: Scalar */ - virtual void read_CehStrength(Tango::Attribute &attr); - virtual void write_CehStrength(Tango::WAttribute &attr); - virtual bool is_CehStrength_allowed(Tango::AttReqType type); + virtual void read_CEHStrength(Tango::Attribute &attr); + virtual void write_CEHStrength(Tango::WAttribute &attr); + virtual bool is_CEHStrength_allowed(Tango::AttReqType type); /** - * Attribute CehCorrectionStrength related methods + * Attribute CEHCorrectionStrength related methods * * * Data type: Tango::DevDouble * Attr type: Scalar */ - virtual void read_CehCorrectionStrength(Tango::Attribute &attr); - virtual void write_CehCorrectionStrength(Tango::WAttribute &attr); - virtual bool is_CehCorrectionStrength_allowed(Tango::AttReqType type); + virtual void read_CEHCorrectionStrength(Tango::Attribute &attr); + virtual void write_CEHCorrectionStrength(Tango::WAttribute &attr); + virtual bool is_CEHCorrectionStrength_allowed(Tango::AttReqType type); /** - * Attribute CehResonanceStrength related methods + * Attribute CEHResonanceStrength related methods * * * Data type: Tango::DevDouble * Attr type: Scalar */ - virtual void read_CehResonanceStrength(Tango::Attribute &attr); - virtual void write_CehResonanceStrength(Tango::WAttribute &attr); - virtual bool is_CehResonanceStrength_allowed(Tango::AttReqType type); + virtual void read_CEHResonanceStrength(Tango::Attribute &attr); + virtual void write_CEHResonanceStrength(Tango::WAttribute &attr); + virtual bool is_CEHResonanceStrength_allowed(Tango::AttReqType type); /** - * Attribute CevStrength related methods + * Attribute CEVStrength related methods * Description: embbeded corrector vertical kick * * Data type: Tango::DevDouble * Attr type: Scalar */ - virtual void read_CevStrength(Tango::Attribute &attr); - virtual void write_CevStrength(Tango::WAttribute &attr); - virtual bool is_CevStrength_allowed(Tango::AttReqType type); + virtual void read_CEVStrength(Tango::Attribute &attr); + virtual void write_CEVStrength(Tango::WAttribute &attr); + virtual bool is_CEVStrength_allowed(Tango::AttReqType type); /** - * Attribute CevCorrectionStrength related methods + * Attribute CEVCorrectionStrength related methods * * * Data type: Tango::DevDouble * Attr type: Scalar */ - virtual void read_CevCorrectionStrength(Tango::Attribute &attr); - virtual void write_CevCorrectionStrength(Tango::WAttribute &attr); - virtual bool is_CevCorrectionStrength_allowed(Tango::AttReqType type); + virtual void read_CEVCorrectionStrength(Tango::Attribute &attr); + virtual void write_CEVCorrectionStrength(Tango::WAttribute &attr); + virtual bool is_CEVCorrectionStrength_allowed(Tango::AttReqType type); /** - * Attribute CevResonanceStrength related methods + * Attribute CEVResonanceStrength related methods * * * Data type: Tango::DevDouble * Attr type: Scalar */ - virtual void read_CevResonanceStrength(Tango::Attribute &attr); - virtual void write_CevResonanceStrength(Tango::WAttribute &attr); - virtual bool is_CevResonanceStrength_allowed(Tango::AttReqType type); + virtual void read_CEVResonanceStrength(Tango::Attribute &attr); + virtual void write_CEVResonanceStrength(Tango::WAttribute &attr); + virtual bool is_CEVResonanceStrength_allowed(Tango::AttReqType type); /** * Attribute SQStrength related methods * Description: embbeded skew quadrupole strength @@ -447,25 +449,25 @@ public: virtual void write_SQResonanceStrength(Tango::WAttribute &attr); virtual bool is_SQResonanceStrength_allowed(Tango::AttReqType type); /** - * Attribute CeHCurrent related methods + * Attribute CEHCurrent related methods * * * Data type: Tango::DevDouble * Attr type: Scalar */ - virtual void read_CeHCurrent(Tango::Attribute &attr); - virtual void write_CeHCurrent(Tango::WAttribute &attr); - virtual bool is_CeHCurrent_allowed(Tango::AttReqType type); + virtual void read_CEHCurrent(Tango::Attribute &attr); + virtual void write_CEHCurrent(Tango::WAttribute &attr); + virtual bool is_CEHCurrent_allowed(Tango::AttReqType type); /** - * Attribute CeVCurrent related methods + * Attribute CEVCurrent related methods * * * Data type: Tango::DevDouble * Attr type: Scalar */ - virtual void read_CeVCurrent(Tango::Attribute &attr); - virtual void write_CeVCurrent(Tango::WAttribute &attr); - virtual bool is_CeVCurrent_allowed(Tango::AttReqType type); + virtual void read_CEVCurrent(Tango::Attribute &attr); + virtual void write_CEVCurrent(Tango::WAttribute &attr); + virtual bool is_CEVCurrent_allowed(Tango::AttReqType type); /** * Attribute PolynomA related methods * Description: array of normal multipole components @@ -537,8 +539,12 @@ public: void set_main_current_write(const double& curr); void set_ceh_current_write(const double& curr); void set_cev_current_write(const double& curr); - void update_values_write(void); //update internal calculated values when current write value is updated; - void update_values_read(void); //update internal calculated values when current read value is updated; + void update_values_write_main(void); //update internal calculated values when current write value is updated; + void update_values_read_main(void); //update internal calculated values when current read value is updated; + void update_values_write_ceh(void); //update internal calculated values when current ceh (SQ) write value is updated; + void update_values_read_ceh(void); //update internal calculated values when current ceh (SQ) read value is updated; + void update_values_write_cev(void); //update internal calculated values when current cev write value is updated; + void update_values_read_cev(void); //update internal calculated values when current cev read value is updated; void update_values_state(void); //update internal calculated values when power supply state is updated; void init_strengths(void); // initialize strengths from power supply values void subscribe_events(void); //subcribe events to power supply diff --git a/src/E2Sextupole.xmi b/src/E2Sextupole.xmi index 7827ea3..ca10219 100644 --- a/src/E2Sextupole.xmi +++ b/src/E2Sextupole.xmi @@ -198,7 +198,7 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <properties description="Read / and set the rele that modfy the sestupole cabling. If true the skew quadrupole QS is enabled, If fals the embedded horizontal corrector CEH is enabled.
If the magnet is permanetly cabled with the embedded skew quadrupole, the aiitrbute is always true nd is not writable." label="bba enabled" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/> </attributes> - <attributes name="CehStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> + <attributes name="CEHStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> <dataType xsi:type="pogoDsl:DoubleType"/> <changeEvent fire="false" libCheckCriteria="false"/> <archiveEvent fire="false" libCheckCriteria="false"/> @@ -206,7 +206,7 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <properties description="embbeded corrector horizontal kick" label="horizontal kick" unit="rad" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/> </attributes> - <attributes name="CehCorrectionStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> + <attributes name="CEHCorrectionStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> <dataType xsi:type="pogoDsl:DoubleType"/> <changeEvent fire="false" libCheckCriteria="false"/> <archiveEvent fire="false" libCheckCriteria="false"/> @@ -214,7 +214,7 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <properties description="" label="horizontal emebedded corrector correction strength" unit="rad" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/> </attributes> - <attributes name="CehResonanceStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> + <attributes name="CEHResonanceStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> <dataType xsi:type="pogoDsl:DoubleType"/> <changeEvent fire="false" libCheckCriteria="false"/> <archiveEvent fire="false" libCheckCriteria="false"/> @@ -222,7 +222,7 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <properties description="" label="embedded horizontal corrector resonance strength" unit="rad" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/> </attributes> - <attributes name="CevStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> + <attributes name="CEVStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> <dataType xsi:type="pogoDsl:DoubleType"/> <changeEvent fire="false" libCheckCriteria="false"/> <archiveEvent fire="false" libCheckCriteria="false"/> @@ -230,7 +230,7 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <properties description="embbeded corrector vertical kick" label="vertical kick" unit="rad" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/> </attributes> - <attributes name="CevCorrectionStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> + <attributes name="CEVCorrectionStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> <dataType xsi:type="pogoDsl:DoubleType"/> <changeEvent fire="false" libCheckCriteria="false"/> <archiveEvent fire="false" libCheckCriteria="false"/> @@ -238,7 +238,7 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <properties description="" label="vertical emebedded corrector correction strength" unit="rad" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/> </attributes> - <attributes name="CevResonanceStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> + <attributes name="CEVResonanceStrength" attType="Scalar" rwType="READ_WRITE" displayLevel="EXPERT" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> <dataType xsi:type="pogoDsl:DoubleType"/> <changeEvent fire="false" libCheckCriteria="false"/> <archiveEvent fire="false" libCheckCriteria="false"/> @@ -270,7 +270,7 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <properties description="" label="skew quadrupole resonance strength" unit="1/m^2" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/> </attributes> - <attributes name="CeHCurrent" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> + <attributes name="CEHCurrent" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> <dataType xsi:type="pogoDsl:DoubleType"/> <changeEvent fire="false" libCheckCriteria="false"/> <archiveEvent fire="false" libCheckCriteria="false"/> @@ -278,7 +278,7 @@ <status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <properties description="" label="horizontal corrector current" unit="A" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/> </attributes> - <attributes name="CeVCurrent" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> + <attributes name="CEVCurrent" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false"> <dataType xsi:type="pogoDsl:DoubleType"/> <changeEvent fire="false" libCheckCriteria="false"/> <archiveEvent fire="false" libCheckCriteria="false"/> diff --git a/src/E2SextupoleClass.cpp b/src/E2SextupoleClass.cpp index 2ab1d05..2fd95ec 100644 --- a/src/E2SextupoleClass.cpp +++ b/src/E2SextupoleClass.cpp @@ -869,138 +869,138 @@ void E2SextupoleClass::attribute_factory(std::vector<Tango::Attr *> &att_list) // Not Memorized att_list.push_back(bbaenable); - // Attribute : CehStrength - CehStrengthAttrib *cehstrength = new CehStrengthAttrib(); + // Attribute : CEHStrength + CEHStrengthAttrib *cehstrength = new CEHStrengthAttrib(); Tango::UserDefaultAttrProp cehstrength_prop; cehstrength_prop.set_description("embbeded corrector horizontal kick"); cehstrength_prop.set_label("horizontal kick"); cehstrength_prop.set_unit("rad"); - // standard_unit not set for CehStrength - // display_unit not set for CehStrength - // format not set for CehStrength - // max_value not set for CehStrength - // min_value not set for CehStrength - // max_alarm not set for CehStrength - // min_alarm not set for CehStrength - // max_warning not set for CehStrength - // min_warning not set for CehStrength - // delta_t not set for CehStrength - // delta_val not set for CehStrength + // standard_unit not set for CEHStrength + // display_unit not set for CEHStrength + // format not set for CEHStrength + // max_value not set for CEHStrength + // min_value not set for CEHStrength + // max_alarm not set for CEHStrength + // min_alarm not set for CEHStrength + // max_warning not set for CEHStrength + // min_warning not set for CEHStrength + // delta_t not set for CEHStrength + // delta_val not set for CEHStrength cehstrength->set_default_properties(cehstrength_prop); // Not Polled cehstrength->set_disp_level(Tango::EXPERT); // Not Memorized att_list.push_back(cehstrength); - // Attribute : CehCorrectionStrength - CehCorrectionStrengthAttrib *cehcorrectionstrength = new CehCorrectionStrengthAttrib(); + // Attribute : CEHCorrectionStrength + CEHCorrectionStrengthAttrib *cehcorrectionstrength = new CEHCorrectionStrengthAttrib(); Tango::UserDefaultAttrProp cehcorrectionstrength_prop; - // description not set for CehCorrectionStrength + // description not set for CEHCorrectionStrength cehcorrectionstrength_prop.set_label("horizontal emebedded corrector correction strength"); cehcorrectionstrength_prop.set_unit("rad"); - // standard_unit not set for CehCorrectionStrength - // display_unit not set for CehCorrectionStrength - // format not set for CehCorrectionStrength - // max_value not set for CehCorrectionStrength - // min_value not set for CehCorrectionStrength - // max_alarm not set for CehCorrectionStrength - // min_alarm not set for CehCorrectionStrength - // max_warning not set for CehCorrectionStrength - // min_warning not set for CehCorrectionStrength - // delta_t not set for CehCorrectionStrength - // delta_val not set for CehCorrectionStrength + // standard_unit not set for CEHCorrectionStrength + // display_unit not set for CEHCorrectionStrength + // format not set for CEHCorrectionStrength + // max_value not set for CEHCorrectionStrength + // min_value not set for CEHCorrectionStrength + // max_alarm not set for CEHCorrectionStrength + // min_alarm not set for CEHCorrectionStrength + // max_warning not set for CEHCorrectionStrength + // min_warning not set for CEHCorrectionStrength + // delta_t not set for CEHCorrectionStrength + // delta_val not set for CEHCorrectionStrength cehcorrectionstrength->set_default_properties(cehcorrectionstrength_prop); // Not Polled cehcorrectionstrength->set_disp_level(Tango::EXPERT); // Not Memorized att_list.push_back(cehcorrectionstrength); - // Attribute : CehResonanceStrength - CehResonanceStrengthAttrib *cehresonancestrength = new CehResonanceStrengthAttrib(); + // Attribute : CEHResonanceStrength + CEHResonanceStrengthAttrib *cehresonancestrength = new CEHResonanceStrengthAttrib(); Tango::UserDefaultAttrProp cehresonancestrength_prop; - // description not set for CehResonanceStrength + // description not set for CEHResonanceStrength cehresonancestrength_prop.set_label("embedded horizontal corrector resonance strength"); cehresonancestrength_prop.set_unit("rad"); - // standard_unit not set for CehResonanceStrength - // display_unit not set for CehResonanceStrength - // format not set for CehResonanceStrength - // max_value not set for CehResonanceStrength - // min_value not set for CehResonanceStrength - // max_alarm not set for CehResonanceStrength - // min_alarm not set for CehResonanceStrength - // max_warning not set for CehResonanceStrength - // min_warning not set for CehResonanceStrength - // delta_t not set for CehResonanceStrength - // delta_val not set for CehResonanceStrength + // standard_unit not set for CEHResonanceStrength + // display_unit not set for CEHResonanceStrength + // format not set for CEHResonanceStrength + // max_value not set for CEHResonanceStrength + // min_value not set for CEHResonanceStrength + // max_alarm not set for CEHResonanceStrength + // min_alarm not set for CEHResonanceStrength + // max_warning not set for CEHResonanceStrength + // min_warning not set for CEHResonanceStrength + // delta_t not set for CEHResonanceStrength + // delta_val not set for CEHResonanceStrength cehresonancestrength->set_default_properties(cehresonancestrength_prop); // Not Polled cehresonancestrength->set_disp_level(Tango::EXPERT); // Not Memorized att_list.push_back(cehresonancestrength); - // Attribute : CevStrength - CevStrengthAttrib *cevstrength = new CevStrengthAttrib(); + // Attribute : CEVStrength + CEVStrengthAttrib *cevstrength = new CEVStrengthAttrib(); Tango::UserDefaultAttrProp cevstrength_prop; cevstrength_prop.set_description("embbeded corrector vertical kick"); cevstrength_prop.set_label("vertical kick"); cevstrength_prop.set_unit("rad"); - // standard_unit not set for CevStrength - // display_unit not set for CevStrength - // format not set for CevStrength - // max_value not set for CevStrength - // min_value not set for CevStrength - // max_alarm not set for CevStrength - // min_alarm not set for CevStrength - // max_warning not set for CevStrength - // min_warning not set for CevStrength - // delta_t not set for CevStrength - // delta_val not set for CevStrength + // standard_unit not set for CEVStrength + // display_unit not set for CEVStrength + // format not set for CEVStrength + // max_value not set for CEVStrength + // min_value not set for CEVStrength + // max_alarm not set for CEVStrength + // min_alarm not set for CEVStrength + // max_warning not set for CEVStrength + // min_warning not set for CEVStrength + // delta_t not set for CEVStrength + // delta_val not set for CEVStrength cevstrength->set_default_properties(cevstrength_prop); // Not Polled cevstrength->set_disp_level(Tango::EXPERT); // Not Memorized att_list.push_back(cevstrength); - // Attribute : CevCorrectionStrength - CevCorrectionStrengthAttrib *cevcorrectionstrength = new CevCorrectionStrengthAttrib(); + // Attribute : CEVCorrectionStrength + CEVCorrectionStrengthAttrib *cevcorrectionstrength = new CEVCorrectionStrengthAttrib(); Tango::UserDefaultAttrProp cevcorrectionstrength_prop; - // description not set for CevCorrectionStrength + // description not set for CEVCorrectionStrength cevcorrectionstrength_prop.set_label("vertical emebedded corrector correction strength"); cevcorrectionstrength_prop.set_unit("rad"); - // standard_unit not set for CevCorrectionStrength - // display_unit not set for CevCorrectionStrength - // format not set for CevCorrectionStrength - // max_value not set for CevCorrectionStrength - // min_value not set for CevCorrectionStrength - // max_alarm not set for CevCorrectionStrength - // min_alarm not set for CevCorrectionStrength - // max_warning not set for CevCorrectionStrength - // min_warning not set for CevCorrectionStrength - // delta_t not set for CevCorrectionStrength - // delta_val not set for CevCorrectionStrength + // standard_unit not set for CEVCorrectionStrength + // display_unit not set for CEVCorrectionStrength + // format not set for CEVCorrectionStrength + // max_value not set for CEVCorrectionStrength + // min_value not set for CEVCorrectionStrength + // max_alarm not set for CEVCorrectionStrength + // min_alarm not set for CEVCorrectionStrength + // max_warning not set for CEVCorrectionStrength + // min_warning not set for CEVCorrectionStrength + // delta_t not set for CEVCorrectionStrength + // delta_val not set for CEVCorrectionStrength cevcorrectionstrength->set_default_properties(cevcorrectionstrength_prop); // Not Polled cevcorrectionstrength->set_disp_level(Tango::EXPERT); // Not Memorized att_list.push_back(cevcorrectionstrength); - // Attribute : CevResonanceStrength - CevResonanceStrengthAttrib *cevresonancestrength = new CevResonanceStrengthAttrib(); + // Attribute : CEVResonanceStrength + CEVResonanceStrengthAttrib *cevresonancestrength = new CEVResonanceStrengthAttrib(); Tango::UserDefaultAttrProp cevresonancestrength_prop; - // description not set for CevResonanceStrength + // description not set for CEVResonanceStrength cevresonancestrength_prop.set_label("embedded vertical corrector resonance strength"); cevresonancestrength_prop.set_unit("rad"); - // standard_unit not set for CevResonanceStrength - // display_unit not set for CevResonanceStrength - // format not set for CevResonanceStrength - // max_value not set for CevResonanceStrength - // min_value not set for CevResonanceStrength - // max_alarm not set for CevResonanceStrength - // min_alarm not set for CevResonanceStrength - // max_warning not set for CevResonanceStrength - // min_warning not set for CevResonanceStrength - // delta_t not set for CevResonanceStrength - // delta_val not set for CevResonanceStrength + // standard_unit not set for CEVResonanceStrength + // display_unit not set for CEVResonanceStrength + // format not set for CEVResonanceStrength + // max_value not set for CEVResonanceStrength + // min_value not set for CEVResonanceStrength + // max_alarm not set for CEVResonanceStrength + // min_alarm not set for CEVResonanceStrength + // max_warning not set for CEVResonanceStrength + // min_warning not set for CEVResonanceStrength + // delta_t not set for CEVResonanceStrength + // delta_val not set for CEVResonanceStrength cevresonancestrength->set_default_properties(cevresonancestrength_prop); // Not Polled cevresonancestrength->set_disp_level(Tango::EXPERT); @@ -1076,46 +1076,46 @@ void E2SextupoleClass::attribute_factory(std::vector<Tango::Attr *> &att_list) // Not Memorized att_list.push_back(sqresonancestrength); - // Attribute : CeHCurrent - CeHCurrentAttrib *cehcurrent = new CeHCurrentAttrib(); + // Attribute : CEHCurrent + CEHCurrentAttrib *cehcurrent = new CEHCurrentAttrib(); Tango::UserDefaultAttrProp cehcurrent_prop; - // description not set for CeHCurrent + // description not set for CEHCurrent cehcurrent_prop.set_label("horizontal corrector current"); cehcurrent_prop.set_unit("A"); - // standard_unit not set for CeHCurrent - // display_unit not set for CeHCurrent - // format not set for CeHCurrent - // max_value not set for CeHCurrent - // min_value not set for CeHCurrent - // max_alarm not set for CeHCurrent - // min_alarm not set for CeHCurrent - // max_warning not set for CeHCurrent - // min_warning not set for CeHCurrent - // delta_t not set for CeHCurrent - // delta_val not set for CeHCurrent + // standard_unit not set for CEHCurrent + // display_unit not set for CEHCurrent + // format not set for CEHCurrent + // max_value not set for CEHCurrent + // min_value not set for CEHCurrent + // max_alarm not set for CEHCurrent + // min_alarm not set for CEHCurrent + // max_warning not set for CEHCurrent + // min_warning not set for CEHCurrent + // delta_t not set for CEHCurrent + // delta_val not set for CEHCurrent cehcurrent->set_default_properties(cehcurrent_prop); // Not Polled cehcurrent->set_disp_level(Tango::OPERATOR); // Not Memorized att_list.push_back(cehcurrent); - // Attribute : CeVCurrent - CeVCurrentAttrib *cevcurrent = new CeVCurrentAttrib(); + // Attribute : CEVCurrent + CEVCurrentAttrib *cevcurrent = new CEVCurrentAttrib(); Tango::UserDefaultAttrProp cevcurrent_prop; - // description not set for CeVCurrent + // description not set for CEVCurrent cevcurrent_prop.set_label("vertical corrector current"); cevcurrent_prop.set_unit("A"); - // standard_unit not set for CeVCurrent - // display_unit not set for CeVCurrent - // format not set for CeVCurrent - // max_value not set for CeVCurrent - // min_value not set for CeVCurrent - // max_alarm not set for CeVCurrent - // min_alarm not set for CeVCurrent - // max_warning not set for CeVCurrent - // min_warning not set for CeVCurrent - // delta_t not set for CeVCurrent - // delta_val not set for CeVCurrent + // standard_unit not set for CEVCurrent + // display_unit not set for CEVCurrent + // format not set for CEVCurrent + // max_value not set for CEVCurrent + // min_value not set for CEVCurrent + // max_alarm not set for CEVCurrent + // min_alarm not set for CEVCurrent + // max_warning not set for CEVCurrent + // min_warning not set for CEVCurrent + // delta_t not set for CEVCurrent + // delta_val not set for CEVCurrent cevcurrent->set_default_properties(cevcurrent_prop); // Not Polled cevcurrent->set_disp_level(Tango::OPERATOR); diff --git a/src/E2SextupoleClass.h b/src/E2SextupoleClass.h index 371695c..e7651d3 100644 --- a/src/E2SextupoleClass.h +++ b/src/E2SextupoleClass.h @@ -162,94 +162,94 @@ public: {return (static_cast<E2Sextupole *>(dev))->is_bbaEnable_allowed(ty);} }; -// Attribute CehStrength class definition -class CehStrengthAttrib: public Tango::Attr +// Attribute CEHStrength class definition +class CEHStrengthAttrib: public Tango::Attr { public: - CehStrengthAttrib():Attr("CehStrength", + CEHStrengthAttrib():Attr("CEHStrength", Tango::DEV_DOUBLE, Tango::READ_WRITE) {} - ~CehStrengthAttrib() {} + ~CEHStrengthAttrib() {} virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att) - {(static_cast<E2Sextupole *>(dev))->read_CehStrength(att);} + {(static_cast<E2Sextupole *>(dev))->read_CEHStrength(att);} virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att) - {(static_cast<E2Sextupole *>(dev))->write_CehStrength(att);} + {(static_cast<E2Sextupole *>(dev))->write_CEHStrength(att);} virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty) - {return (static_cast<E2Sextupole *>(dev))->is_CehStrength_allowed(ty);} + {return (static_cast<E2Sextupole *>(dev))->is_CEHStrength_allowed(ty);} }; -// Attribute CehCorrectionStrength class definition -class CehCorrectionStrengthAttrib: public Tango::Attr +// Attribute CEHCorrectionStrength class definition +class CEHCorrectionStrengthAttrib: public Tango::Attr { public: - CehCorrectionStrengthAttrib():Attr("CehCorrectionStrength", + CEHCorrectionStrengthAttrib():Attr("CEHCorrectionStrength", Tango::DEV_DOUBLE, Tango::READ_WRITE) {} - ~CehCorrectionStrengthAttrib() {} + ~CEHCorrectionStrengthAttrib() {} virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att) - {(static_cast<E2Sextupole *>(dev))->read_CehCorrectionStrength(att);} + {(static_cast<E2Sextupole *>(dev))->read_CEHCorrectionStrength(att);} virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att) - {(static_cast<E2Sextupole *>(dev))->write_CehCorrectionStrength(att);} + {(static_cast<E2Sextupole *>(dev))->write_CEHCorrectionStrength(att);} virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty) - {return (static_cast<E2Sextupole *>(dev))->is_CehCorrectionStrength_allowed(ty);} + {return (static_cast<E2Sextupole *>(dev))->is_CEHCorrectionStrength_allowed(ty);} }; -// Attribute CehResonanceStrength class definition -class CehResonanceStrengthAttrib: public Tango::Attr +// Attribute CEHResonanceStrength class definition +class CEHResonanceStrengthAttrib: public Tango::Attr { public: - CehResonanceStrengthAttrib():Attr("CehResonanceStrength", + CEHResonanceStrengthAttrib():Attr("CEHResonanceStrength", Tango::DEV_DOUBLE, Tango::READ_WRITE) {} - ~CehResonanceStrengthAttrib() {} + ~CEHResonanceStrengthAttrib() {} virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att) - {(static_cast<E2Sextupole *>(dev))->read_CehResonanceStrength(att);} + {(static_cast<E2Sextupole *>(dev))->read_CEHResonanceStrength(att);} virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att) - {(static_cast<E2Sextupole *>(dev))->write_CehResonanceStrength(att);} + {(static_cast<E2Sextupole *>(dev))->write_CEHResonanceStrength(att);} virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty) - {return (static_cast<E2Sextupole *>(dev))->is_CehResonanceStrength_allowed(ty);} + {return (static_cast<E2Sextupole *>(dev))->is_CEHResonanceStrength_allowed(ty);} }; -// Attribute CevStrength class definition -class CevStrengthAttrib: public Tango::Attr +// Attribute CEVStrength class definition +class CEVStrengthAttrib: public Tango::Attr { public: - CevStrengthAttrib():Attr("CevStrength", + CEVStrengthAttrib():Attr("CEVStrength", Tango::DEV_DOUBLE, Tango::READ_WRITE) {} - ~CevStrengthAttrib() {} + ~CEVStrengthAttrib() {} virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att) - {(static_cast<E2Sextupole *>(dev))->read_CevStrength(att);} + {(static_cast<E2Sextupole *>(dev))->read_CEVStrength(att);} virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att) - {(static_cast<E2Sextupole *>(dev))->write_CevStrength(att);} + {(static_cast<E2Sextupole *>(dev))->write_CEVStrength(att);} virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty) - {return (static_cast<E2Sextupole *>(dev))->is_CevStrength_allowed(ty);} + {return (static_cast<E2Sextupole *>(dev))->is_CEVStrength_allowed(ty);} }; -// Attribute CevCorrectionStrength class definition -class CevCorrectionStrengthAttrib: public Tango::Attr +// Attribute CEVCorrectionStrength class definition +class CEVCorrectionStrengthAttrib: public Tango::Attr { public: - CevCorrectionStrengthAttrib():Attr("CevCorrectionStrength", + CEVCorrectionStrengthAttrib():Attr("CEVCorrectionStrength", Tango::DEV_DOUBLE, Tango::READ_WRITE) {} - ~CevCorrectionStrengthAttrib() {} + ~CEVCorrectionStrengthAttrib() {} virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att) - {(static_cast<E2Sextupole *>(dev))->read_CevCorrectionStrength(att);} + {(static_cast<E2Sextupole *>(dev))->read_CEVCorrectionStrength(att);} virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att) - {(static_cast<E2Sextupole *>(dev))->write_CevCorrectionStrength(att);} + {(static_cast<E2Sextupole *>(dev))->write_CEVCorrectionStrength(att);} virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty) - {return (static_cast<E2Sextupole *>(dev))->is_CevCorrectionStrength_allowed(ty);} + {return (static_cast<E2Sextupole *>(dev))->is_CEVCorrectionStrength_allowed(ty);} }; -// Attribute CevResonanceStrength class definition -class CevResonanceStrengthAttrib: public Tango::Attr +// Attribute CEVResonanceStrength class definition +class CEVResonanceStrengthAttrib: public Tango::Attr { public: - CevResonanceStrengthAttrib():Attr("CevResonanceStrength", + CEVResonanceStrengthAttrib():Attr("CEVResonanceStrength", Tango::DEV_DOUBLE, Tango::READ_WRITE) {} - ~CevResonanceStrengthAttrib() {} + ~CEVResonanceStrengthAttrib() {} virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att) - {(static_cast<E2Sextupole *>(dev))->read_CevResonanceStrength(att);} + {(static_cast<E2Sextupole *>(dev))->read_CEVResonanceStrength(att);} virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att) - {(static_cast<E2Sextupole *>(dev))->write_CevResonanceStrength(att);} + {(static_cast<E2Sextupole *>(dev))->write_CEVResonanceStrength(att);} virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty) - {return (static_cast<E2Sextupole *>(dev))->is_CevResonanceStrength_allowed(ty);} + {return (static_cast<E2Sextupole *>(dev))->is_CEVResonanceStrength_allowed(ty);} }; // Attribute SQStrength class definition @@ -297,34 +297,34 @@ public: {return (static_cast<E2Sextupole *>(dev))->is_SQResonanceStrength_allowed(ty);} }; -// Attribute CeHCurrent class definition -class CeHCurrentAttrib: public Tango::Attr +// Attribute CEHCurrent class definition +class CEHCurrentAttrib: public Tango::Attr { public: - CeHCurrentAttrib():Attr("CeHCurrent", + CEHCurrentAttrib():Attr("CEHCurrent", Tango::DEV_DOUBLE, Tango::READ_WRITE) {} - ~CeHCurrentAttrib() {} + ~CEHCurrentAttrib() {} virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att) - {(static_cast<E2Sextupole *>(dev))->read_CeHCurrent(att);} + {(static_cast<E2Sextupole *>(dev))->read_CEHCurrent(att);} virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att) - {(static_cast<E2Sextupole *>(dev))->write_CeHCurrent(att);} + {(static_cast<E2Sextupole *>(dev))->write_CEHCurrent(att);} virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty) - {return (static_cast<E2Sextupole *>(dev))->is_CeHCurrent_allowed(ty);} + {return (static_cast<E2Sextupole *>(dev))->is_CEHCurrent_allowed(ty);} }; -// Attribute CeVCurrent class definition -class CeVCurrentAttrib: public Tango::Attr +// Attribute CEVCurrent class definition +class CEVCurrentAttrib: public Tango::Attr { public: - CeVCurrentAttrib():Attr("CeVCurrent", + CEVCurrentAttrib():Attr("CEVCurrent", Tango::DEV_DOUBLE, Tango::READ_WRITE) {} - ~CeVCurrentAttrib() {} + ~CEVCurrentAttrib() {} virtual void read(Tango::DeviceImpl *dev,Tango::Attribute &att) - {(static_cast<E2Sextupole *>(dev))->read_CeVCurrent(att);} + {(static_cast<E2Sextupole *>(dev))->read_CEVCurrent(att);} virtual void write(Tango::DeviceImpl *dev,Tango::WAttribute &att) - {(static_cast<E2Sextupole *>(dev))->write_CeVCurrent(att);} + {(static_cast<E2Sextupole *>(dev))->write_CEVCurrent(att);} virtual bool is_allowed(Tango::DeviceImpl *dev,Tango::AttReqType ty) - {return (static_cast<E2Sextupole *>(dev))->is_CeVCurrent_allowed(ty);} + {return (static_cast<E2Sextupole *>(dev))->is_CEVCurrent_allowed(ty);} }; // Attribute PolynomA class definition diff --git a/src/E2SextupoleStateMachine.cpp b/src/E2SextupoleStateMachine.cpp index 50b332d..75a31b1 100644 --- a/src/E2SextupoleStateMachine.cpp +++ b/src/E2SextupoleStateMachine.cpp @@ -220,133 +220,133 @@ bool E2Sextupole::is_bbaEnable_allowed(TANGO_UNUSED(Tango::AttReqType type)) //-------------------------------------------------------- /** - * Method : E2Sextupole::is_CehStrength_allowed() - * Description: Execution allowed for CehStrength attribute + * Method : E2Sextupole::is_CEHStrength_allowed() + * Description: Execution allowed for CEHStrength attribute */ //-------------------------------------------------------- -bool E2Sextupole::is_CehStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) +bool E2Sextupole::is_CEHStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) { - // Not any excluded states for CehStrength attribute in Write access. - /*----- PROTECTED REGION ID(E2Sextupole::CehStrengthStateAllowed_WRITE) ENABLED START -----*/ + // Not any excluded states for CEHStrength attribute in Write access. + /*----- PROTECTED REGION ID(E2Sextupole::CEHStrengthStateAllowed_WRITE) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CehStrengthStateAllowed_WRITE + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEHStrengthStateAllowed_WRITE - // Not any excluded states for CehStrength attribute in read access. - /*----- PROTECTED REGION ID(E2Sextupole::CehStrengthStateAllowed_READ) ENABLED START -----*/ + // Not any excluded states for CEHStrength attribute in read access. + /*----- PROTECTED REGION ID(E2Sextupole::CEHStrengthStateAllowed_READ) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CehStrengthStateAllowed_READ + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEHStrengthStateAllowed_READ return true; } //-------------------------------------------------------- /** - * Method : E2Sextupole::is_CehCorrectionStrength_allowed() - * Description: Execution allowed for CehCorrectionStrength attribute + * Method : E2Sextupole::is_CEHCorrectionStrength_allowed() + * Description: Execution allowed for CEHCorrectionStrength attribute */ //-------------------------------------------------------- -bool E2Sextupole::is_CehCorrectionStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) +bool E2Sextupole::is_CEHCorrectionStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) { - // Not any excluded states for CehCorrectionStrength attribute in Write access. - /*----- PROTECTED REGION ID(E2Sextupole::CehCorrectionStrengthStateAllowed_WRITE) ENABLED START -----*/ + // Not any excluded states for CEHCorrectionStrength attribute in Write access. + /*----- PROTECTED REGION ID(E2Sextupole::CEHCorrectionStrengthStateAllowed_WRITE) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CehCorrectionStrengthStateAllowed_WRITE + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEHCorrectionStrengthStateAllowed_WRITE - // Not any excluded states for CehCorrectionStrength attribute in read access. - /*----- PROTECTED REGION ID(E2Sextupole::CehCorrectionStrengthStateAllowed_READ) ENABLED START -----*/ + // Not any excluded states for CEHCorrectionStrength attribute in read access. + /*----- PROTECTED REGION ID(E2Sextupole::CEHCorrectionStrengthStateAllowed_READ) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CehCorrectionStrengthStateAllowed_READ + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEHCorrectionStrengthStateAllowed_READ return true; } //-------------------------------------------------------- /** - * Method : E2Sextupole::is_CehResonanceStrength_allowed() - * Description: Execution allowed for CehResonanceStrength attribute + * Method : E2Sextupole::is_CEHResonanceStrength_allowed() + * Description: Execution allowed for CEHResonanceStrength attribute */ //-------------------------------------------------------- -bool E2Sextupole::is_CehResonanceStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) +bool E2Sextupole::is_CEHResonanceStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) { - // Not any excluded states for CehResonanceStrength attribute in Write access. - /*----- PROTECTED REGION ID(E2Sextupole::CehResonanceStrengthStateAllowed_WRITE) ENABLED START -----*/ + // Not any excluded states for CEHResonanceStrength attribute in Write access. + /*----- PROTECTED REGION ID(E2Sextupole::CEHResonanceStrengthStateAllowed_WRITE) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CehResonanceStrengthStateAllowed_WRITE + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEHResonanceStrengthStateAllowed_WRITE - // Not any excluded states for CehResonanceStrength attribute in read access. - /*----- PROTECTED REGION ID(E2Sextupole::CehResonanceStrengthStateAllowed_READ) ENABLED START -----*/ + // Not any excluded states for CEHResonanceStrength attribute in read access. + /*----- PROTECTED REGION ID(E2Sextupole::CEHResonanceStrengthStateAllowed_READ) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CehResonanceStrengthStateAllowed_READ + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEHResonanceStrengthStateAllowed_READ return true; } //-------------------------------------------------------- /** - * Method : E2Sextupole::is_CevStrength_allowed() - * Description: Execution allowed for CevStrength attribute + * Method : E2Sextupole::is_CEVStrength_allowed() + * Description: Execution allowed for CEVStrength attribute */ //-------------------------------------------------------- -bool E2Sextupole::is_CevStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) +bool E2Sextupole::is_CEVStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) { - // Not any excluded states for CevStrength attribute in Write access. - /*----- PROTECTED REGION ID(E2Sextupole::CevStrengthStateAllowed_WRITE) ENABLED START -----*/ + // Not any excluded states for CEVStrength attribute in Write access. + /*----- PROTECTED REGION ID(E2Sextupole::CEVStrengthStateAllowed_WRITE) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CevStrengthStateAllowed_WRITE + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEVStrengthStateAllowed_WRITE - // Not any excluded states for CevStrength attribute in read access. - /*----- PROTECTED REGION ID(E2Sextupole::CevStrengthStateAllowed_READ) ENABLED START -----*/ + // Not any excluded states for CEVStrength attribute in read access. + /*----- PROTECTED REGION ID(E2Sextupole::CEVStrengthStateAllowed_READ) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CevStrengthStateAllowed_READ + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEVStrengthStateAllowed_READ return true; } //-------------------------------------------------------- /** - * Method : E2Sextupole::is_CevCorrectionStrength_allowed() - * Description: Execution allowed for CevCorrectionStrength attribute + * Method : E2Sextupole::is_CEVCorrectionStrength_allowed() + * Description: Execution allowed for CEVCorrectionStrength attribute */ //-------------------------------------------------------- -bool E2Sextupole::is_CevCorrectionStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) +bool E2Sextupole::is_CEVCorrectionStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) { - // Not any excluded states for CevCorrectionStrength attribute in Write access. - /*----- PROTECTED REGION ID(E2Sextupole::CevCorrectionStrengthStateAllowed_WRITE) ENABLED START -----*/ + // Not any excluded states for CEVCorrectionStrength attribute in Write access. + /*----- PROTECTED REGION ID(E2Sextupole::CEVCorrectionStrengthStateAllowed_WRITE) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CevCorrectionStrengthStateAllowed_WRITE + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEVCorrectionStrengthStateAllowed_WRITE - // Not any excluded states for CevCorrectionStrength attribute in read access. - /*----- PROTECTED REGION ID(E2Sextupole::CevCorrectionStrengthStateAllowed_READ) ENABLED START -----*/ + // Not any excluded states for CEVCorrectionStrength attribute in read access. + /*----- PROTECTED REGION ID(E2Sextupole::CEVCorrectionStrengthStateAllowed_READ) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CevCorrectionStrengthStateAllowed_READ + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEVCorrectionStrengthStateAllowed_READ return true; } //-------------------------------------------------------- /** - * Method : E2Sextupole::is_CevResonanceStrength_allowed() - * Description: Execution allowed for CevResonanceStrength attribute + * Method : E2Sextupole::is_CEVResonanceStrength_allowed() + * Description: Execution allowed for CEVResonanceStrength attribute */ //-------------------------------------------------------- -bool E2Sextupole::is_CevResonanceStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) +bool E2Sextupole::is_CEVResonanceStrength_allowed(TANGO_UNUSED(Tango::AttReqType type)) { - // Not any excluded states for CevResonanceStrength attribute in Write access. - /*----- PROTECTED REGION ID(E2Sextupole::CevResonanceStrengthStateAllowed_WRITE) ENABLED START -----*/ + // Not any excluded states for CEVResonanceStrength attribute in Write access. + /*----- PROTECTED REGION ID(E2Sextupole::CEVResonanceStrengthStateAllowed_WRITE) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CevResonanceStrengthStateAllowed_WRITE + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEVResonanceStrengthStateAllowed_WRITE - // Not any excluded states for CevResonanceStrength attribute in read access. - /*----- PROTECTED REGION ID(E2Sextupole::CevResonanceStrengthStateAllowed_READ) ENABLED START -----*/ + // Not any excluded states for CEVResonanceStrength attribute in read access. + /*----- PROTECTED REGION ID(E2Sextupole::CEVResonanceStrengthStateAllowed_READ) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CevResonanceStrengthStateAllowed_READ + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEVResonanceStrengthStateAllowed_READ return true; } @@ -418,45 +418,45 @@ bool E2Sextupole::is_SQResonanceStrength_allowed(TANGO_UNUSED(Tango::AttReqType //-------------------------------------------------------- /** - * Method : E2Sextupole::is_CeHCurrent_allowed() - * Description: Execution allowed for CeHCurrent attribute + * Method : E2Sextupole::is_CEHCurrent_allowed() + * Description: Execution allowed for CEHCurrent attribute */ //-------------------------------------------------------- -bool E2Sextupole::is_CeHCurrent_allowed(TANGO_UNUSED(Tango::AttReqType type)) +bool E2Sextupole::is_CEHCurrent_allowed(TANGO_UNUSED(Tango::AttReqType type)) { - // Not any excluded states for CeHCurrent attribute in Write access. - /*----- PROTECTED REGION ID(E2Sextupole::CeHCurrentStateAllowed_WRITE) ENABLED START -----*/ + // Not any excluded states for CEHCurrent attribute in Write access. + /*----- PROTECTED REGION ID(E2Sextupole::CEHCurrentStateAllowed_WRITE) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CeHCurrentStateAllowed_WRITE + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEHCurrentStateAllowed_WRITE - // Not any excluded states for CeHCurrent attribute in read access. - /*----- PROTECTED REGION ID(E2Sextupole::CeHCurrentStateAllowed_READ) ENABLED START -----*/ + // Not any excluded states for CEHCurrent attribute in read access. + /*----- PROTECTED REGION ID(E2Sextupole::CEHCurrentStateAllowed_READ) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CeHCurrentStateAllowed_READ + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEHCurrentStateAllowed_READ return true; } //-------------------------------------------------------- /** - * Method : E2Sextupole::is_CeVCurrent_allowed() - * Description: Execution allowed for CeVCurrent attribute + * Method : E2Sextupole::is_CEVCurrent_allowed() + * Description: Execution allowed for CEVCurrent attribute */ //-------------------------------------------------------- -bool E2Sextupole::is_CeVCurrent_allowed(TANGO_UNUSED(Tango::AttReqType type)) +bool E2Sextupole::is_CEVCurrent_allowed(TANGO_UNUSED(Tango::AttReqType type)) { - // Not any excluded states for CeVCurrent attribute in Write access. - /*----- PROTECTED REGION ID(E2Sextupole::CeVCurrentStateAllowed_WRITE) ENABLED START -----*/ + // Not any excluded states for CEVCurrent attribute in Write access. + /*----- PROTECTED REGION ID(E2Sextupole::CEVCurrentStateAllowed_WRITE) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CeVCurrentStateAllowed_WRITE + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEVCurrentStateAllowed_WRITE - // Not any excluded states for CeVCurrent attribute in read access. - /*----- PROTECTED REGION ID(E2Sextupole::CeVCurrentStateAllowed_READ) ENABLED START -----*/ + // Not any excluded states for CEVCurrent attribute in read access. + /*----- PROTECTED REGION ID(E2Sextupole::CEVCurrentStateAllowed_READ) ENABLED START -----*/ /* clang-format on */ /* clang-format off */ - /*----- PROTECTED REGION END -----*/ // E2Sextupole::CeVCurrentStateAllowed_READ + /*----- PROTECTED REGION END -----*/ // E2Sextupole::CEVCurrentStateAllowed_READ return true; } -- GitLab