Skip to content
Snippets Groups Projects
TextToSpeechStateMachine.cpp 9.43 KiB
Newer Older
Stuart Mark James's avatar
Stuart Mark James committed
/*----- PROTECTED REGION ID(TextToSpeechStateMachine.cpp) ENABLED START -----*/
//=============================================================================
//
// file :        TextToSpeechStateMachine.cpp
//
// description : State machine file for the TextToSpeech class
//
// project :     polly-text-to-speech
//
// 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 Lesser 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 Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
// 
//
// Copyright (C): 2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017
//                European Synchrotron Radiation Facility
//                BP 220, Grenoble 38043
//                France
//
//=============================================================================
//                This file is generated by POGO
//        (Program Obviously used to Generate tango Object)
//=============================================================================

#include <TextToSpeech.h>

/*----- PROTECTED REGION END -----*/	//	TextToSpeech::TextToSpeechStateMachine.cpp

//================================================================
//  States   |  Description
//================================================================
//  FAULT    |  A subsystem caused an error and the TextToSpeech state is FAULT.
//  OFF      |  The text to speech server is OFF.
//  ON       |  The text to speech server is ON.
//  UNKNOWN  |  Unknown error or initialisation state.


namespace TextToSpeech_ns
{
//=================================================
//		Attributes Allowed Methods
//=================================================

//--------------------------------------------------------
/**
 *	Method      : TextToSpeech::is_text_to_talk_allowed()
 *	Description : Execution allowed for text_to_talk attribute
 */
//--------------------------------------------------------
bool TextToSpeech::is_text_to_talk_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
	//	Not any excluded states for text_to_talk attribute in Write access.
	/*----- PROTECTED REGION ID(TextToSpeech::text_to_talkStateAllowed_WRITE) ENABLED START -----*/
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::text_to_talkStateAllowed_WRITE
Stuart Mark James's avatar
Stuart Mark James committed

	//	Not any excluded states for text_to_talk attribute in read access.
	/*----- PROTECTED REGION ID(TextToSpeech::text_to_talkStateAllowed_READ) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::text_to_talkStateAllowed_READ
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : TextToSpeech::is_voice_allowed()
 *	Description : Execution allowed for voice attribute
 */
//--------------------------------------------------------
bool TextToSpeech::is_voice_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
	//	Not any excluded states for voice attribute in Write access.
	/*----- PROTECTED REGION ID(TextToSpeech::voiceStateAllowed_WRITE) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::voiceStateAllowed_WRITE

	//	Not any excluded states for voice attribute in read access.
	/*----- PROTECTED REGION ID(TextToSpeech::voiceStateAllowed_READ) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::voiceStateAllowed_READ
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : TextToSpeech::is_jingle_allowed()
 *	Description : Execution allowed for jingle attribute
 */
//--------------------------------------------------------
bool TextToSpeech::is_jingle_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
	//	Not any excluded states for jingle attribute in Write access.
	/*----- PROTECTED REGION ID(TextToSpeech::jingleStateAllowed_WRITE) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::jingleStateAllowed_WRITE

	//	Not any excluded states for jingle attribute in read access.
	/*----- PROTECTED REGION ID(TextToSpeech::jingleStateAllowed_READ) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::jingleStateAllowed_READ
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : TextToSpeech::is_speech_delay_allowed()
 *	Description : Execution allowed for speech_delay attribute
 */
//--------------------------------------------------------
bool TextToSpeech::is_speech_delay_allowed(TANGO_UNUSED(Tango::AttReqType type))
{
	//	Not any excluded states for speech_delay attribute in Write access.
	/*----- PROTECTED REGION ID(TextToSpeech::speech_delayStateAllowed_WRITE) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::speech_delayStateAllowed_WRITE

	//	Not any excluded states for speech_delay attribute in read access.
	/*----- PROTECTED REGION ID(TextToSpeech::speech_delayStateAllowed_READ) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::speech_delayStateAllowed_READ
	return true;
}

Stuart Mark James's avatar
Stuart Mark James committed

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

//--------------------------------------------------------
/**
 *	Method      : TextToSpeech::is_Off_allowed()
 *	Description : Execution allowed for Off attribute
 */
//--------------------------------------------------------
bool TextToSpeech::is_Off_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
	//	Compare device state with not allowed states.
	if (get_state()==Tango::FAULT ||
		get_state()==Tango::OFF ||
Stuart Mark James's avatar
Stuart Mark James committed
		get_state()==Tango::UNKNOWN)
	{
	/*----- PROTECTED REGION ID(TextToSpeech::OffStateAllowed) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::OffStateAllowed
		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : TextToSpeech::is_On_allowed()
 *	Description : Execution allowed for On attribute
 */
//--------------------------------------------------------
bool TextToSpeech::is_On_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
	//	Compare device state with not allowed states.
	if (get_state()==Tango::FAULT ||
		get_state()==Tango::ON ||
Stuart Mark James's avatar
Stuart Mark James committed
		get_state()==Tango::UNKNOWN)
	{
	/*----- PROTECTED REGION ID(TextToSpeech::OnStateAllowed) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::OnStateAllowed
		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : TextToSpeech::is_Reset_allowed()
 *	Description : Execution allowed for Reset attribute
 */
//--------------------------------------------------------
bool TextToSpeech::is_Reset_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
	//	Not any excluded states for Reset command.
	/*----- PROTECTED REGION ID(TextToSpeech::ResetStateAllowed) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::ResetStateAllowed
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : TextToSpeech::is_DevClear_allowed()
 *	Description : Execution allowed for DevClear attribute
 */
//--------------------------------------------------------
bool TextToSpeech::is_DevClear_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
	//	Compare device state with not allowed states.
	if (get_state()==Tango::FAULT ||
		get_state()==Tango::OFF ||
Stuart Mark James's avatar
Stuart Mark James committed
		get_state()==Tango::UNKNOWN)
	{
	/*----- PROTECTED REGION ID(TextToSpeech::DevClearStateAllowed) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::DevClearStateAllowed
		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : TextToSpeech::is_DevStop_allowed()
 *	Description : Execution allowed for DevStop attribute
 */
//--------------------------------------------------------
bool TextToSpeech::is_DevStop_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
	//	Compare device state with not allowed states.
	if (get_state()==Tango::FAULT ||
		get_state()==Tango::OFF ||
Stuart Mark James's avatar
Stuart Mark James committed
		get_state()==Tango::UNKNOWN)
	{
	/*----- PROTECTED REGION ID(TextToSpeech::DevStopStateAllowed) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::DevStopStateAllowed
		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method      : TextToSpeech::is_DevTalk_allowed()
 *	Description : Execution allowed for DevTalk attribute
 */
//--------------------------------------------------------
bool TextToSpeech::is_DevTalk_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
	//	Compare device state with not allowed states.
	if (get_state()==Tango::FAULT ||
		get_state()==Tango::OFF ||
Stuart Mark James's avatar
Stuart Mark James committed
		get_state()==Tango::UNKNOWN)
	{
	/*----- PROTECTED REGION ID(TextToSpeech::DevTalkStateAllowed) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	TextToSpeech::DevTalkStateAllowed
		return false;
	}
	return true;
}


/*----- PROTECTED REGION ID(TextToSpeech::TextToSpeechStateAllowed.AdditionalMethods) ENABLED START -----*/

//	Additional Methods

/*----- PROTECTED REGION END -----*/	//	TextToSpeech::TextToSpeechStateAllowed.AdditionalMethods

}	//	End of namespace