/*----- PROTECTED REGION ID(MCCE2ElectrometersStateMachine.cpp) ENABLED START -----*/ static const char *RcsId = "$Id: $"; //============================================================================= // // file : MCCE2ElectrometersStateMachine.cpp // // description : State machine file for the MCCE2Electrometers class // // project : Novelec MCCE-2 Electrometers // // This file is part of Tango device class. // // Tango is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Tango is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Tango. If not, see <http://www.gnu.org/licenses/>. // // $Author: $ // // $Revision: $ // $Date: $ // // $HeadURL: $ // //============================================================================= // This file is generated by POGO // (Program Obviously used to Generate tango Object) //============================================================================= #include <MCCE2Electrometers.h> /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::MCCE2ElectrometersStateMachine.cpp //================================================================ // States | Description //================================================================ // ON | Device up and ready // ALARM | Device initialisation not complete or a bad channel number is set. // FAULT | Internal electrometer interface is not built or a Serial communication error occurred. // DISABLE | No electrometer conected! namespace MCCE2Electrometers_ns { //================================================= // Attributes Allowed Methods //================================================= //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_electrometerChannel_allowed() * Description : Execution allowed for electrometerChannel attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_electrometerChannel_allowed(TANGO_UNUSED(Tango::AttReqType type)) { // Not any excluded states for electrometerChannel attribute in Write access. /*----- PROTECTED REGION ID(MCCE2Electrometers::electrometerChannelStateAllowed_WRITE) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::electrometerChannelStateAllowed_WRITE // Not any excluded states for electrometerChannel attribute in read access. /*----- PROTECTED REGION ID(MCCE2Electrometers::electrometerChannelStateAllowed_READ) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::electrometerChannelStateAllowed_READ return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_range1_allowed() * Description : Execution allowed for range1 attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_range1_allowed(TANGO_UNUSED(Tango::AttReqType type)) { // Not any excluded states for range1 attribute in read access. /*----- PROTECTED REGION ID(MCCE2Electrometers::range1StateAllowed_READ) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::range1StateAllowed_READ return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_range2_allowed() * Description : Execution allowed for range2 attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_range2_allowed(TANGO_UNUSED(Tango::AttReqType type)) { // Not any excluded states for range2 attribute in read access. /*----- PROTECTED REGION ID(MCCE2Electrometers::range2StateAllowed_READ) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::range2StateAllowed_READ return true; } //================================================= // Commands Allowed Methods //================================================= //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_RangeUP_allowed() * Description : Execution allowed for RangeUP attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_RangeUP_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::RangeUPStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::RangeUPStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_RangeDOWN_allowed() * Description : Execution allowed for RangeDOWN attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_RangeDOWN_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::RangeDOWNStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::RangeDOWNStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_SetZeroVFFunction_allowed() * Description : Execution allowed for SetZeroVFFunction attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_SetZeroVFFunction_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::SetZeroVFFunctionStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::SetZeroVFFunctionStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_SetOffsetZeroV1Function_allowed() * Description : Execution allowed for SetOffsetZeroV1Function attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_SetOffsetZeroV1Function_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::SetOffsetZeroV1FunctionStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::SetOffsetZeroV1FunctionStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_SetLeakageZeroV2Function_allowed() * Description : Execution allowed for SetLeakageZeroV2Function attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_SetLeakageZeroV2Function_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::SetLeakageZeroV2FunctionStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::SetLeakageZeroV2FunctionStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_SetTestFunction_allowed() * Description : Execution allowed for SetTestFunction attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_SetTestFunction_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::SetTestFunctionStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::SetTestFunctionStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_SetMeasureFunction_allowed() * Description : Execution allowed for SetMeasureFunction attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_SetMeasureFunction_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::SetMeasureFunctionStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::SetMeasureFunctionStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_MCCE2_ON_allowed() * Description : Execution allowed for MCCE2_ON attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_MCCE2_ON_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::MCCE2_ONStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::MCCE2_ONStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_MCCE2_OFF_allowed() * Description : Execution allowed for MCCE2_OFF attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_MCCE2_OFF_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::MCCE2_OFFStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::MCCE2_OFFStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_Local_allowed() * Description : Execution allowed for Local attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_Local_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::LocalStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::LocalStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_Remote_allowed() * Description : Execution allowed for Remote attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_Remote_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::RemoteStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::RemoteStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_Reset_allowed() * Description : Execution allowed for Reset attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_Reset_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::ResetStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::ResetStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_ClearRegisters_allowed() * Description : Execution allowed for ClearRegisters attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_ClearRegisters_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::ClearRegistersStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::ClearRegistersStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_GetRange_allowed() * Description : Execution allowed for GetRange attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_GetRange_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::GetRangeStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::GetRangeStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_SetRange_allowed() * Description : Execution allowed for SetRange attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_SetRange_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::SetRangeStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::SetRangeStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_GetMode_allowed() * Description : Execution allowed for GetMode attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_GetMode_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::GetModeStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::GetModeStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_GetPolarity_allowed() * Description : Execution allowed for GetPolarity attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_GetPolarity_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::GetPolarityStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::GetPolarityStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_SetPolarity_allowed() * Description : Execution allowed for SetPolarity attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_SetPolarity_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::SetPolarityStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::SetPolarityStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_GetHzFilter_allowed() * Description : Execution allowed for GetHzFilter attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_GetHzFilter_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::GetHzFilterStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::GetHzFilterStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_SetHzFilter_allowed() * Description : Execution allowed for SetHzFilter attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_SetHzFilter_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::SetHzFilterStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::SetHzFilterStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_GetGain_allowed() * Description : Execution allowed for GetGain attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_GetGain_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::GetGainStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::GetGainStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_SetGain_allowed() * Description : Execution allowed for SetGain attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_SetGain_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Compare device state with not allowed states. if (get_state()==Tango::FAULT || get_state()==Tango::DISABLE) { /*----- PROTECTED REGION ID(MCCE2Electrometers::SetGainStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::SetGainStateAllowed return false; } return true; } //-------------------------------------------------------- /** * Method : MCCE2Electrometers::is_GetElectrometerTypeStr_allowed() * Description : Execution allowed for GetElectrometerTypeStr attribute */ //-------------------------------------------------------- bool MCCE2Electrometers::is_GetElectrometerTypeStr_allowed(TANGO_UNUSED(const CORBA::Any &any)) { // Not any excluded states for GetElectrometerTypeStr command. /*----- PROTECTED REGION ID(MCCE2Electrometers::GetElectrometerTypeStrStateAllowed) ENABLED START -----*/ /*----- PROTECTED REGION END -----*/ // MCCE2Electrometers::GetElectrometerTypeStrStateAllowed return true; } } // End of namespace