Skip to content
Snippets Groups Projects
Select Git revision
  • main
  • release_1_3_2
  • release_1_3_1
  • release_1_3_0
  • release_1_2_3
  • release_1_2_2
  • release_1_2_1
  • release_1_2_0
  • release_1_1_5
  • release_1_1_4
  • release_1_1_3
  • release_1_1_2
  • release_1_1_1
  • release_1_1_0
  • release_1_0_2
  • release_1_0_1
  • release_1_0_0
17 results

pom.xml

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    SingleShotAOManager.cpp 14.18 KiB
    //=============================================================================
    // SingleShotAOManager.cpp
    //=============================================================================
    // abstraction.......SingleShotAOManager
    // class.............SingleShotAOManager
    // original author...S.Gara - Nexeya
    //=============================================================================
    
    
    // ============================================================================
    // DEPENDENCIES
    // ============================================================================
    #include <yat4tango/LogHelper.h>
    #include "SingleShotAOManager.h"
    
    namespace SingleShotAO_ns
    {
    
    //- check ssao macro:
    #define CHECK_SSAO() \
    	do \
    	{ \
    	if (! m_ssao) \
    	THROW_DEVFAILED("DEVICE_ERROR", \
    	"request aborted - the AO board isn't accessible ", \
    	"SingleShotAOManager::check_ssao"); \
    } while (0)
    
    // ============================================================================
    // SingleShotAOManager::SingleShotAOManager ()
    // ============================================================================ 
    SingleShotAOManager::SingleShotAOManager (Tango::DeviceImpl * hostDevice)
    : yat4tango::DeviceTask(hostDevice)
    {
    	//- trace/profile this method
    	yat4tango::TraceHelper t("SingleShotAOManager::SingleShotAOManager", this);
    
    	enable_timeout_msg(false);
    	enable_periodic_msg(false);
    
    	m_state = Tango::INIT;
    	m_status = "Initialization in progress";
    }
    
    // ============================================================================
    // SingleShotAOManager::~SingleShotAOManager ()
    // ============================================================================ 
    SingleShotAOManager::~SingleShotAOManager ()
    {
    	enable_periodic_msg(false);
    }
    
    // ============================================================================
    // SingleShotAOManager::get_state ()
    // ============================================================================ 
    Tango::DevState SingleShotAOManager::get_state()
    {
    	bool l_isRunning = false;
    	if (m_state != Tango::FAULT)
    	{
    		for (unsigned int l_cpt = 0;l_cpt < m_nb_chan;l_cpt++)
    		{
    			if (m_isRunning[l_cpt])
    			{
    				l_isRunning = true;
    			}
    		}
    		if (l_isRunning)
    		{
    			m_state = Tango::MOVING;