/*----- PROTECTED REGION ID(Mks651dStateMachine.cpp) ENABLED START -----*/
static const char *RcsId = "$Id: Mks651dStateMachine.cpp,v 1.2 2012-03-08 09:50:01 mdm Exp $";
//=============================================================================
//
// file :        Mks651dStateMachine.cpp
//
// description : C++ source for the �name� and its alowed
//               methods for commands and attributes
//
// project :     Mks651d.
//
// $Author: mdm $
//
// $Revision: 1.2 $
// $Date: 2012-03-08 09:50:01 $
//
// SVN only:
// $HeadURL:  $
//
// CVS only:
// $Source: /home/cvsadm/cvsroot/fermi/servers/651d/src/Mks651dStateMachine.cpp,v $
// $Log: Mks651dStateMachine.cpp,v $
// Revision 1.2  2012-03-08 09:50:01  mdm
// New version of server
//
//
//=============================================================================
//                This file is generated by POGO
//        (Program Obviously used to Generate tango Object)
//=============================================================================



#include <Mks651d.h>
#include <Mks651dClass.h>

/*----- PROTECTED REGION END -----*/


/*
 * Mks651d states description:
 *
 * OPEN :	 
 * CLOSE :	 
 * FAULT :	 
 */

namespace Mks651d_ns
{

//=================================================
//		Attributes Allowed Methods
//=================================================

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_PressureState_allowed()
 *	Description : Execution allowed for Pressure attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_Pressure_allowed(Tango::AttReqType type)
{
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_PressureStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_PressureStateAllowed_READ

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_PositionState_allowed()
 *	Description : Execution allowed for Position attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_Position_allowed(Tango::AttReqType type)
{
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_PositionStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_PositionStateAllowed_READ

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_ControlTypeState_allowed()
 *	Description : Execution allowed for ControlType attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_ControlType_allowed(Tango::AttReqType type)
{
	//	Check if access type.
	if ( type!=Tango::READ_REQ )
	{
		if (	//	Compare device state with not allowed states for WRITE 
			get_state() == Tango::FAULT)
		{
		
	/*----- PROTECTED REGION ID(Mks651d::ControlTypeStateAllowed_WRITE) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::ControlTypeStateAllowed_WRITE

			return false;
		}
		return true;
	}
	else
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_ControlTypeStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_ControlTypeStateAllowed_READ

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_SensorTypeState_allowed()
 *	Description : Execution allowed for SensorType attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_SensorType_allowed(Tango::AttReqType type)
{
	//	Check if access type.
	if ( type!=Tango::READ_REQ )
	{
		if (	//	Compare device state with not allowed states for WRITE 
			get_state() == Tango::FAULT)
		{
		
	/*----- PROTECTED REGION ID(Mks651d::SensorTypeStateAllowed_WRITE) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::SensorTypeStateAllowed_WRITE

			return false;
		}
		return true;
	}
	else
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_SensorTypeStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_SensorTypeStateAllowed_READ

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_SensorVoltageState_allowed()
 *	Description : Execution allowed for SensorVoltage attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_SensorVoltage_allowed(Tango::AttReqType type)
{
	//	Check if access type.
	if ( type!=Tango::READ_REQ )
	{
		if (	//	Compare device state with not allowed states for WRITE 
			get_state() == Tango::FAULT)
		{
		
	/*----- PROTECTED REGION ID(Mks651d::SensorVoltageStateAllowed_WRITE) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::SensorVoltageStateAllowed_WRITE

			return false;
		}
		return true;
	}
	else
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_SensorVoltageStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_SensorVoltageStateAllowed_READ

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_SensorRangeState_allowed()
 *	Description : Execution allowed for SensorRange attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_SensorRange_allowed(Tango::AttReqType type)
{
	//	Check if access type.
	if ( type!=Tango::READ_REQ )
	{
		if (	//	Compare device state with not allowed states for WRITE 
			get_state() == Tango::FAULT)
		{
		
	/*----- PROTECTED REGION ID(Mks651d::SensorRangeStateAllowed_WRITE) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::SensorRangeStateAllowed_WRITE

			return false;
		}
		return true;
	}
	else
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_SensorRangeStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_SensorRangeStateAllowed_READ

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_ControlModeState_allowed()
 *	Description : Execution allowed for ControlMode attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_ControlMode_allowed(Tango::AttReqType type)
{
	//	Check if access type.
	if ( type!=Tango::READ_REQ )
	{
		if (	//	Compare device state with not allowed states for WRITE 
			get_state() == Tango::FAULT)
		{
		
	/*----- PROTECTED REGION ID(Mks651d::ControlModeStateAllowed_WRITE) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::ControlModeStateAllowed_WRITE

			return false;
		}
		return true;
	}
	else
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_ControlModeStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_ControlModeStateAllowed_READ

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_ValveTypeState_allowed()
 *	Description : Execution allowed for ValveType attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_ValveType_allowed(Tango::AttReqType type)
{
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_ValveTypeStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_ValveTypeStateAllowed_READ

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_AnalogSPRangeState_allowed()
 *	Description : Execution allowed for AnalogSPRange attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_AnalogSPRange_allowed(Tango::AttReqType type)
{
	//	Check if access type.
	if ( type!=Tango::READ_REQ )
	{
		if (	//	Compare device state with not allowed states for WRITE 
			get_state() == Tango::FAULT)
		{
		
	/*----- PROTECTED REGION ID(Mks651d::AnalogSPRangeStateAllowed_WRITE) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::AnalogSPRangeStateAllowed_WRITE

			return false;
		}
		return true;
	}
	else
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_AnalogSPRangeStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_AnalogSPRangeStateAllowed_READ

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_SelectedSPState_allowed()
 *	Description : Execution allowed for SelectedSP attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_SelectedSP_allowed(Tango::AttReqType type)
{
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_SelectedSPStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_SelectedSPStateAllowed_READ

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_PowerFailResponseState_allowed()
 *	Description : Execution allowed for PowerFailResponse attribute.
 */
//--------------------------------------------------------

bool Mks651d::is_PowerFailResponse_allowed(Tango::AttReqType type)
{
	//	Check if access type.
	if ( type!=Tango::READ_REQ )
	{
		if (	//	Compare device state with not allowed states for WRITE 
			get_state() == Tango::FAULT)
		{
		
	/*----- PROTECTED REGION ID(Mks651d::PowerFailResponseStateAllowed_WRITE) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::PowerFailResponseStateAllowed_WRITE

			return false;
		}
		return true;
	}
	else
	if (	//	Compare device state with not allowed states for READ 
		get_state() == Tango::FAULT)
	{
	
	/*----- PROTECTED REGION ID(Mks651d::read_PowerFailResponseStateAllowed_READ) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::read_PowerFailResponseStateAllowed_READ

		return false;
	}
	return true;
}


	/*----- PROTECTED REGION ID(Mks651d::are_dynamic_attributes_allowed) ENABLED START -----*/

	//	Add your code to check if dynamic attributes are alowed

	/*----- PROTECTED REGION END -----*/	//	Mks651d::are_dynamic_attributes_allowed


//=================================================
//		Commands Allowed Methods
//=================================================


//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_OpenState_allowed()
 *	Description : Execution allowed for Open command.
 */
//--------------------------------------------------------

bool Mks651d::is_Open_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::OpenStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::OpenStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_CloseState_allowed()
 *	Description : Execution allowed for Close command.
 */
//--------------------------------------------------------

bool Mks651d::is_Close_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::CloseStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::CloseStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_StopState_allowed()
 *	Description : Execution allowed for Stop command.
 */
//--------------------------------------------------------

bool Mks651d::is_Stop_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::StopStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::StopStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_SelectSPState_allowed()
 *	Description : Execution allowed for SelectSP command.
 */
//--------------------------------------------------------

bool Mks651d::is_SelectSP_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::SelectSPStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::SelectSPStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_ReadSPLevelState_allowed()
 *	Description : Execution allowed for ReadSPLevel command.
 */
//--------------------------------------------------------

bool Mks651d::is_ReadSPLevel_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::ReadSPLevelStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::ReadSPLevelStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_WriteSPLevelState_allowed()
 *	Description : Execution allowed for WriteSPLevel command.
 */
//--------------------------------------------------------

bool Mks651d::is_WriteSPLevel_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::WriteSPLevelStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::WriteSPLevelStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_ReadSPTypeState_allowed()
 *	Description : Execution allowed for ReadSPType command.
 */
//--------------------------------------------------------

bool Mks651d::is_ReadSPType_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::ReadSPTypeStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::ReadSPTypeStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_WriteSPTypeState_allowed()
 *	Description : Execution allowed for WriteSPType command.
 */
//--------------------------------------------------------

bool Mks651d::is_WriteSPType_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::WriteSPTypeStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::WriteSPTypeStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_ReadSoftStartState_allowed()
 *	Description : Execution allowed for ReadSoftStart command.
 */
//--------------------------------------------------------

bool Mks651d::is_ReadSoftStart_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::ReadSoftStartStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::ReadSoftStartStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_WriteSoftStartState_allowed()
 *	Description : Execution allowed for WriteSoftStart command.
 */
//--------------------------------------------------------

bool Mks651d::is_WriteSoftStart_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::WriteSoftStartStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::WriteSoftStartStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_ReadSPGainState_allowed()
 *	Description : Execution allowed for ReadSPGain command.
 */
//--------------------------------------------------------

bool Mks651d::is_ReadSPGain_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::ReadSPGainStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::ReadSPGainStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_WriteSPGainState_allowed()
 *	Description : Execution allowed for WriteSPGain command.
 */
//--------------------------------------------------------

bool Mks651d::is_WriteSPGain_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::WriteSPGainStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::WriteSPGainStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_ReadSPLeadState_allowed()
 *	Description : Execution allowed for ReadSPLead command.
 */
//--------------------------------------------------------

bool Mks651d::is_ReadSPLead_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::ReadSPLeadStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::ReadSPLeadStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_WriteSPLeadState_allowed()
 *	Description : Execution allowed for WriteSPLead command.
 */
//--------------------------------------------------------

bool Mks651d::is_WriteSPLead_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::WriteSPLeadStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::WriteSPLeadStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_ReadThresholdState_allowed()
 *	Description : Execution allowed for ReadThreshold command.
 */
//--------------------------------------------------------

bool Mks651d::is_ReadThreshold_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::ReadThresholdStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::ReadThresholdStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_WriteThresholdState_allowed()
 *	Description : Execution allowed for WriteThreshold command.
 */
//--------------------------------------------------------

bool Mks651d::is_WriteThreshold_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::WriteThresholdStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::WriteThresholdStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_StartLearningState_allowed()
 *	Description : Execution allowed for StartLearning command.
 */
//--------------------------------------------------------

bool Mks651d::is_StartLearning_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::StartLearningStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::StartLearningStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_StopLearningState_allowed()
 *	Description : Execution allowed for StopLearning command.
 */
//--------------------------------------------------------

bool Mks651d::is_StopLearning_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::StopLearningStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::StopLearningStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_LearnAnalogState_allowed()
 *	Description : Execution allowed for LearnAnalog command.
 */
//--------------------------------------------------------

bool Mks651d::is_LearnAnalog_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::LearnAnalogStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::LearnAnalogStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_CalibrateAdcState_allowed()
 *	Description : Execution allowed for CalibrateAdc command.
 */
//--------------------------------------------------------

bool Mks651d::is_CalibrateAdc_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::CalibrateAdcStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::CalibrateAdcStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_ZeroSensorState_allowed()
 *	Description : Execution allowed for ZeroSensor command.
 */
//--------------------------------------------------------

bool Mks651d::is_ZeroSensor_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::ZeroSensorStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::ZeroSensorStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_RemoveZeroState_allowed()
 *	Description : Execution allowed for RemoveZero command.
 */
//--------------------------------------------------------

bool Mks651d::is_RemoveZero_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::RemoveZeroStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::RemoveZeroStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_SetZeroState_allowed()
 *	Description : Execution allowed for SetZero command.
 */
//--------------------------------------------------------

bool Mks651d::is_SetZero_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::SetZeroStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::SetZeroStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_LearnZeroState_allowed()
 *	Description : Execution allowed for LearnZero command.
 */
//--------------------------------------------------------

bool Mks651d::is_LearnZero_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::LearnZeroStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::LearnZeroStateAllowed

		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : Mks651d::is_DirectCommandState_allowed()
 *	Description : Execution allowed for DirectCommand command.
 */
//--------------------------------------------------------

bool Mks651d::is_DirectCommand_allowed(const CORBA::Any &any)
{
	if (	//	Compare device state with not allowed states for command 
		get_state() == Tango::FAULT)
	{

	/*----- PROTECTED REGION ID(Mks651d::DirectCommandStateAllowed) ENABLED START -----*/

	/*----- PROTECTED REGION END -----*/	//	Mks651d::DirectCommandStateAllowed

		return false;
	}
	return true;
}


	/*----- PROTECTED REGION ID(Mks651d::are_dynamic_commands_allowed) ENABLED START -----*/

	//	Add your code to check if dynamic commands are alowed

	/*----- PROTECTED REGION END -----*/	//	Mks651d::are_dynamic_commands_allowed

}	// namespace Mks651d_ns