Skip to content
Snippets Groups Projects
USB2StateMachine.cpp 5.4 KiB
Newer Older
Alessio Igor Bogani's avatar
Alessio Igor Bogani committed
/*----- PROTECTED REGION ID(USB2StateMachine.cpp) ENABLED START -----*/
//=============================================================================
//
// file :        USB2StateMachine.cpp
//
// description : State machine file for the USB2 class
//
// project :     
//
// 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: alessio $
//
// $Revision: 1.1.1.1 $
// $Date: 2018-01-16 15:32:20 $
//
// $HeadURL:  $
//
//=============================================================================
//                This file is generated by POGO
//        (Program Obviously used to Generate tango Object)
//=============================================================================

#include <USB2.h>

/*----- PROTECTED REGION END -----*/	//	USB2::USB2StateMachine.cpp

//================================================================
//  States  |  Description
//================================================================
//  ON      |  Connected
//  FAULT   |  Connection failed
//  INIT    |  


namespace USB2_ns
{
//=================================================
//		Attributes Allowed Methods
//=================================================

//--------------------------------------------------------
/**
 *	Method     : USB2::is_InputLength_allowed()
 *	Description: Execution allowed for InputLength attribute
Alessio Igor Bogani's avatar
Alessio Igor Bogani committed
 */
//--------------------------------------------------------
bool USB2::is_InputLength_allowed(TANGO_UNUSED(Tango::AttReqType type))
{

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

//--------------------------------------------------------
/**
 *	Method     : USB2::is_OutputLength_allowed()
 *	Description: Execution allowed for OutputLength attribute
Alessio Igor Bogani's avatar
Alessio Igor Bogani committed
 */
//--------------------------------------------------------
bool USB2::is_OutputLength_allowed(TANGO_UNUSED(Tango::AttReqType type))
{

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

//--------------------------------------------------------
/**
 *	Method     : USB2::is_Reconnections_allowed()
 *	Description: Execution allowed for Reconnections attribute
Alessio Igor Bogani's avatar
Alessio Igor Bogani committed
 */
//--------------------------------------------------------
bool USB2::is_Reconnections_allowed(TANGO_UNUSED(Tango::AttReqType type))
{

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


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

//--------------------------------------------------------
/**
 *	Method     : USB2::is_Write_allowed()
 *	Description: Execution allowed for Write attribute
Alessio Igor Bogani's avatar
Alessio Igor Bogani committed
 */
//--------------------------------------------------------
bool USB2::is_Write_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
	//	Compare device state with not allowed states.
	if (get_state()==Tango::INIT)
Alessio Igor Bogani's avatar
Alessio Igor Bogani committed
	{
	/*----- PROTECTED REGION ID(USB2::WriteStateAllowed) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	USB2::WriteStateAllowed
		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method     : USB2::is_Read_allowed()
 *	Description: Execution allowed for Read attribute
Alessio Igor Bogani's avatar
Alessio Igor Bogani committed
 */
//--------------------------------------------------------
bool USB2::is_Read_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
	//	Compare device state with not allowed states.
	if (get_state()==Tango::INIT)
Alessio Igor Bogani's avatar
Alessio Igor Bogani committed
	{
	/*----- PROTECTED REGION ID(USB2::ReadStateAllowed) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	USB2::ReadStateAllowed
		return false;
	}
	return true;
}

//--------------------------------------------------------
/**
 *	Method     : USB2::is_ReadUntil_allowed()
 *	Description: Execution allowed for ReadUntil attribute
Alessio Igor Bogani's avatar
Alessio Igor Bogani committed
 */
//--------------------------------------------------------
bool USB2::is_ReadUntil_allowed(TANGO_UNUSED(const CORBA::Any &any))
{
	//	Compare device state with not allowed states.
	if (get_state()==Tango::INIT)
Alessio Igor Bogani's avatar
Alessio Igor Bogani committed
	{
	/*----- PROTECTED REGION ID(USB2::ReadUntilStateAllowed) ENABLED START -----*/
	
	/*----- PROTECTED REGION END -----*/	//	USB2::ReadUntilStateAllowed
		return false;
	}
	return true;
}


/*----- PROTECTED REGION ID(USB2::USB2StateAllowed.AdditionalMethods) ENABLED START -----*/

//	Additional Methods

/*----- PROTECTED REGION END -----*/	//	USB2::USB2StateAllowed.AdditionalMethods

}	//	End of namespace