Commit a53a7097 authored by Matteo DB's avatar Matteo DB
Browse files

exception reworking

Rework exception from idl to componentcore (beta)
parent 726e7cfe
Loading
Loading
Loading
Loading
+7 −13
Original line number Diff line number Diff line
@@ -80,9 +80,7 @@ public:
     * C receiver ( LOW - HIGH ).
     * @details Throw an exception if mode is not valid or it got some init errors.
     */
    void activate(const char *mode) throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl,
            ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl,ReceiversErrors::NoRemoteControlErrorExImpl,
            ReceiversErrors::ReceiverControlBoardErrorExImpl);
    void activate(const char *mode) throw (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl);

    /**
     * It deactivates the receiver.
@@ -112,8 +110,7 @@ public:
     * It allows to change the operating mode of the receiver. If the mode does not correspond to a valid mode an error is thrown.
     * @param  mode mode code as a string
     */
    void setMode(const char * mode) throw  (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl,
            ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl);
    void setMode(const char * mode) throw  (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl);

    /**
     * It returns the current operating mode of the receiver.
@@ -127,15 +124,13 @@ public:
     * @brief Select current reciver, C HIGH
     * 
     */
    void setReceiverHigh()throw  (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl,
            ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl);
    void setReceiverHigh()throw  (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl);

    /**
     * @brief Select current reciver, C LOW
     * 
     */
    void setReceiverLow()throw  (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl,
            ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl);
    void setReceiverLow()throw  (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl);

        /* *** LOs *** */

@@ -148,13 +143,12 @@ public:
     * @throw ComponentErrors::CORBAProblemExImpl
     * @thorw ReceiversErrors::LocalOscillatorErrorExImpl
     */
    void setLO(const ACS::doubleSeq& lo) throw (ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl,ComponentErrors::CouldntGetComponentExImpl,
            ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl);
    void setLO(const ACS::doubleSeq& lo) throw (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl);
    /**
     * It returns back the current local oscillator frequency settings.
     * @param lo output sequence
     */
    void getLO(ACS::doubleSeq& lo);
    void getLO(ACS::doubleSeq& lo) throw (ReceiversErrors::LocalOscillatorErrorExImpl);

    /**
     * I checks if the local oscillator is locked properly
@@ -450,7 +444,7 @@ protected:
    /**
     * used to free the reference to the local oscillator device
     */
    void unloadLocalOscillator();
    void unloadLocalOscillator() throw (ReceiversErrors::LocalOscillatorErrorExImpl);

private:

+29 −45
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
#include <enumpropROImpl.h>
#include <SP_parser.h>
#include <IRA>
#include <MedicinaCBandS.h> /** @todo da dove arriva questo ?*/
#include <MedicinaCBandS.h> 
#include <ComponentErrors.h>
#include <ReceiversErrors.h>
#include "ComponentCore.h"
@@ -91,7 +91,7 @@ public:
	 * logs the COMPSTATE_OPERATIONAL
	 * @throw ACSErr::ACSbaseExImpl
	*/
	virtual void execute() throw (ACSErr::ACSbaseExImpl);
	virtual void execute() throw (ACSErr::ACSbaseExImpl, ComponentErrors::ComponentErrorsEx);
	
	/** 
	 * Called by the container before destroying the server in a normal situation. This function takes charge of 
@@ -113,7 +113,7 @@ public:
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 */
	 virtual void activate(const char * setup_mode) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	 virtual void activate(const char * setup_mode) throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);

	/**
	 * It must be called to switch off the receiver.
@@ -121,7 +121,7 @@ public:
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 */
	 virtual void deactivate() throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	 virtual void deactivate() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
		

	/**
@@ -142,7 +142,7 @@ public:
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 */
	void calOn() throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	void calOn() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);

	/**
	 * This method is used to turn the calibration diode off.
@@ -150,7 +150,7 @@ public:
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 */
	void calOff() throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	void calOff() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	

    /**
@@ -159,10 +159,7 @@ public:
     * @throw ComponentErrors::ComponentErrorsEx
     * @throw ReceiversErrors::ReceiversErrorsEx
     */
    void externalCalOn() throw (
            CORBA::SystemException, 
            ComponentErrors::ComponentErrorsEx, 
            ReceiversErrors::ReceiversErrorsEx);
    void externalCalOn() throw (ComponentErrors::ComponentErrorsEx, ReceiversErrors::ReceiversErrorsEx);


    /**
@@ -171,10 +168,7 @@ public:
     * @throw ComponentErrors::ComponentErrorsEx
     * @throw ReceiversErrors::ReceiversErrorsEx
     */
    void externalCalOff() throw (
            CORBA::SystemException, 
            ComponentErrors::ComponentErrorsEx, 
            ReceiversErrors::ReceiversErrorsEx);
    void externalCalOff() throw (ComponentErrors::ComponentErrorsEx, ReceiversErrors::ReceiversErrorsEx);


	/**
@@ -184,7 +178,7 @@ public:
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 */
	void setLO(const ACS::doubleSeq& lo) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	void setLO(const ACS::doubleSeq& lo) throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	
	/**
	 * This method allows to set the operating mode of the receiver. In that implementation the receiver does not have special modes so a call to this method
@@ -194,12 +188,11 @@ public:
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 * @throw ComponentErrors::ComponentErrorsEx
	 */
	void setMode(const char * mode) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	void setMode(const char * mode) throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	
	/**
	 * This method is called when the values of the calibration mark of the receiver are required. A value is returned for every provided sub bands.
	 * The sub bands are defined by giving the feed number, the polarization, the initial frequency and the bandwidth.	 
	 * @throw CORBA::SystemException
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 * @param freqs for each sub band this is the list of the starting frequencies (in MHz). The value is compared and adjusted to the the real
@@ -215,12 +208,11 @@ public:
	 * @return the list of the noise calibration value in Kelvin degrees.
	 */
    virtual ACS::doubleSeq * getCalibrationMark(const ACS::doubleSeq& freqs, const ACS::doubleSeq& bandwidths, const ACS::longSeq& feeds, const ACS::longSeq& ifs,
    		ACS::doubleSeq_out skyFreq,ACS::doubleSeq_out skyBw,CORBA::Boolean_out onoff,CORBA::Double_out scaleFactor) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    		ACS::doubleSeq_out skyFreq,ACS::doubleSeq_out skyBw,CORBA::Boolean_out onoff,CORBA::Double_out scaleFactor) throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);

	/**
	 * This method is called in order to know the geometry of the receiver. The geometry is given along the X and Y axis where the central feed is the origin
	 * the axis. The relative power (normalized to one) with respect to the central feed is also given.	 
	 * @throw CORBA::SystemException
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 * @param X the positions relative to the central beam of the feeds along the X axis (radians)
@@ -228,8 +220,7 @@ public:
	 * @param power the relative power of the feeds
	 * @return the number of feeds
	 */    
    virtual CORBA::Long getFeeds(ACS::doubleSeq_out X,ACS::doubleSeq_out Y,ACS::doubleSeq_out power) throw (CORBA::SystemException,
    		ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    virtual CORBA::Long getFeeds(ACS::doubleSeq_out X,ACS::doubleSeq_out Y,ACS::doubleSeq_out power) throw (ComponentErrors::ComponentErrorsEx, ReceiversErrors::ReceiversErrorsEx);
    

    /**
@@ -245,7 +236,6 @@ public:
     * @param LO it gives (if present) the value of the local oscillator (MHz).
     * @throw ComponentErrors::ComponentErrorsEx
     * @throw ReceiversErrors::ReceiversErrorsEx
     * @throw CORBA::SystemException
     */
    virtual void getIFOutput(
            const ACS::longSeq& feeds,
@@ -254,11 +244,10 @@ public:
            ACS::doubleSeq_out bw,
            ACS::longSeq_out pols,
            ACS::doubleSeq_out LO
    ) throw (CORBA::SystemException, ComponentErrors::ComponentErrorsEx, ReceiversErrors::ReceiversErrorsEx);
    ) throw ( ComponentErrors::ComponentErrorsEx, ReceiversErrors::ReceiversErrorsEx);

	/**
	 * This method is called in order to know the taper of the receiver.	
	 * @throw CORBA::SystemException
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 * @param freq starting frequency of the detector in MHz. The value is compared and adjusted to the the real initial frequency of the receiver.
@@ -268,41 +257,36 @@ public:
	 * @param waveLen corresponding wave length in meters
	 * @return the value of the taper in db
	 */        
    virtual CORBA::Double getTaper(CORBA::Double freq,CORBA::Double bandWidth,CORBA::Long feed,CORBA::Long ifNumber,CORBA::Double_out waveLen) throw (
    		CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    virtual CORBA::Double getTaper(CORBA::Double freq,CORBA::Double bandWidth,CORBA::Long feed,CORBA::Long ifNumber,CORBA::Double_out waveLen) throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    
	/**
	 * This method is called in order to turn the LNA On.
	 * @throw CORBA::SystemException
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 */
    virtual void turnLNAsOn() throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    virtual void turnLNAsOn() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);

	/**
	 * This method is called in order to turn the LNA Off.	
	 * @throw CORBA::SystemException
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 */
    virtual void turnLNAsOff() throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    virtual void turnLNAsOff() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    

	/**
	 * It allows to turn the antenna unit on
	 * @throw CORBA::SystemException
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 */
	virtual void turnAntennaUnitOn() throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	virtual void turnAntennaUnitOn() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);

	/**
	 *  It allows to turn the antenna unit off
	 * @throw CORBA::SystemException
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
	 */
	virtual void turnAntennaUnitOff() throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
	virtual void turnAntennaUnitOff() throw (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);

	/**
	 * Returns a reference to the mode property implementation of the IDL interface.
@@ -410,7 +394,7 @@ public:
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
     */
    virtual void turnVacuumSensorOn() throw  (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    virtual void turnVacuumSensorOn() throw  (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);

    /**
     * it turns the vacuum sensor on
@@ -418,32 +402,32 @@ public:
	 * @throw ComponentErrors::ComponentErrorsEx
	 * @throw ReceiversErrors::ReceiversErrorsEx
     */
    virtual void turnVacuumSensorOff() throw  (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    virtual void turnVacuumSensorOff() throw  (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    
    /**
    * @brief Vacuum pump on
    */
    virtual void turnVacuumPumpOn(const char *) throw  (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    virtual void turnVacuumPumpOn(const char *) throw  (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);

	/**
    * @brief Vacuum pump off
    */
    virtual void turnVacuumPumpOff() throw  (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    virtual void turnVacuumPumpOff() throw  (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    
    /**
    * @brief Vacuum valve opening
    */
    virtual void openVacuumValve(const char *) throw  (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    virtual void openVacuumValve(const char *) throw  (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);

	/**
    * @brief Heat resistors on
    */
    virtual void turnDewarHeatResistorsOn() throw  (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    virtual void turnDewarHeatResistorsOn() throw  (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);
    
	/**
    * @brief Heat resistor off
    */
    virtual void turnDewarHeatResistorsOff() throw  (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);    
    virtual void turnDewarHeatResistorsOff() throw  (ComponentErrors::ComponentErrorsEx,ReceiversErrors::ReceiversErrorsEx);    


	/**
+65 −54
Original line number Diff line number Diff line
@@ -80,16 +80,18 @@ void CComponentCore::cleanup()
{
    //make sure no one is using the object
    baci::ThreadSyncGuard guard(&m_mutex);
    try{
        if (m_control) {
            m_control->closeConnection();
            delete m_control;
        }
        m_mixer.releaseComponents();
    catch(...){
        /* Do nothing, exit without throwing anything as requested by idl */
    }
}

void CComponentCore::activate(const char *mode) throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl,
        ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl,ReceiversErrors::NoRemoteControlErrorExImpl,
        ReceiversErrors::ReceiverControlBoardErrorExImpl)
void CComponentCore::activate(const char *mode) throw (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl)
{
	MED_TRACE_MSG(" IN ");    
    /* activate mode */
@@ -111,10 +113,16 @@ void CComponentCore::activate(const char *mode) throw (ReceiversErrors::ModeErro
    /* For every feed ( L R for med C) populate core member  
     * arrays eg bandwidth polarization.. */
    ReceiverConfHandler::ConfigurationSetup l_setup= m_configuration.getCurrentSetup();	   
    try{
        m_startFreq.length(l_setup.m_IFs);
        m_bandwidth.length(l_setup.m_IFs);
        m_polarization.length(l_setup.m_IFs);
        m_localOscillatorValue.length(l_setup.m_IFs);
    }catch(...){
         MED_TRACE_MSG(" Unexpected configuration exception! ");
        _EXCPT(ComponentErrors::ComponentErrorsExImpl,impl,"CComponentErrors::acitvate()");
        throw impl;
    }

    MED_TRACE_FMT("IFMin len %d\n",l_setup.m_IFMin.size());
	MED_TRACE_FMT("IFBandwidth len %d\n",l_setup.m_IFBandwidth.size());
@@ -128,7 +136,6 @@ void CComponentCore::activate(const char *mode) throw (ReceiversErrors::ModeErro
        MED_TRACE_FMT("Fixed LO2[0] %f\n",l_setup.m_fixedLO2[0]);
    }


    try{
        for (WORD i=0; i < l_setup.m_IFs; i++) {
            MED_TRACE_MSG(" SET PARAMS IF ");
@@ -162,7 +169,7 @@ void CComponentCore::activate(const char *mode) throw (ReceiversErrors::ModeErro
        throw impl;
    }
    MED_TRACE_FMT("Setting default value to LO %f", l_setup.m_defaultLO[0]);    
    m_mixer.setValue(l_setup.m_defaultLO[0]);
    m_mixer.setValue(l_setup.m_defaultLO[0]); /* Throws receiver or component exImpl */
    // Basic operations
    lnaOn(); // throw (ReceiversErrors::NoRemoteControlErrorExImpl,ReceiversErrors::ReceiverControlBoardErrorExImpl)    
    // Remote control check
@@ -195,7 +202,7 @@ void CComponentCore::deactivate() throw (ReceiversErrors::NoRemoteControlErrorEx
{
    // no guard needed.
    lnaOff(); // throw (ReceiversErrors::NoRemoteControlErrorExImpl,ReceiversErrors::ReceiverControlBoardErrorExImpl)
    m_mixer.releaseComponents();
    m_mixer.releaseComponents(); // throws throw (ReceiversErrors::LocalOscillatorErrorExImpl)
}


@@ -233,14 +240,12 @@ const Management::TSystemStatus& CComponentCore::getComponentStatus()

/* *** SETUP *** */

void CComponentCore::setReceiverHigh()throw  (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl,
            ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl)
void CComponentCore::setReceiverHigh()throw  (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl)
{
    baci::ThreadSyncGuard guard(&m_mutex);
    try {
        m_control->setReceiverHigh();
    }
    catch (IRA::ReceiverControlEx& ex) {
    }catch (IRA::ReceiverControlEx& ex) {
        _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::setReceiverHigh()");
        impl.setDetails(ex.what().c_str());
        setStatusBit(CONNECTIONERROR);
@@ -250,14 +255,12 @@ void CComponentCore::setReceiverHigh()throw (ReceiversErrors::ModeErrorExImpl,C
    clearStatusBit(CONNECTIONERROR); // the communication was ok so clear the CONNECTIONERROR bit
}

void CComponentCore::setReceiverLow()throw  (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl,
            ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl)
void CComponentCore::setReceiverLow()throw  (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl)
{
    baci::ThreadSyncGuard guard(&m_mutex);
    try{
        m_control->setReceiverLow();   
    }
    catch (IRA::ReceiverControlEx& ex) {
     }catch (IRA::ReceiverControlEx& ex) {
        _EXCPT(ReceiversErrors::ReceiverControlBoardErrorExImpl,impl,"CComponentCore::setReceiverHigh()");
        impl.setDetails(ex.what().c_str());
        setStatusBit(CONNECTIONERROR);
@@ -267,15 +270,14 @@ void CComponentCore::setReceiverLow()throw (ReceiversErrors::ModeErrorExImpl,Co
    clearStatusBit(CONNECTIONERROR); // the communication was ok so clear the CONNECTIONERROR bit
}

void CComponentCore::setMode(const char * mode) throw (ReceiversErrors::ModeErrorExImpl,ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl,
        ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl)
void CComponentCore::setMode(const char * mode) throw (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl)
{
	 MED_TRACE_MSG(" IN ");
    baci::ThreadSyncGuard guard(&m_mutex);
    m_calDiode=false;
    IRA::CString cmdMode(mode);
    cmdMode.MakeUpper();        
    bool l_res= m_configuration.m_conf_hnd.setMode(mode);
    bool l_res= m_configuration.m_conf_hnd.setMode(mode); // throw (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl)
    if (!l_res) {
		MED_TRACE_MSG(" EXCP ");
        _EXCPT(ReceiversErrors::ModeErrorExImpl,impl,"CComponentErrors::setMode()");
@@ -297,6 +299,8 @@ void CComponentCore::setMode(const char * mode) throw (ReceiversErrors::ModeErro
    	}
    }catch(...){
    	MED_TRACE_MSG(" EXC 1 ");	
        _EXCPT(ComponentErrors::ComponentErrorsExImpl,impl,"CComponentErrors::setMode()");
        throw impl;
    }
    // the set the default LO for the default LO for the selected mode.....
    ACS::doubleSeq lo;
@@ -326,8 +330,7 @@ const IRA::CString CComponentCore::getSetupMode(){
/* *** LO *** */

void CComponentCore::setLO(const ACS::doubleSeq& lo)
         throw (ComponentErrors::ValidationErrorExImpl,ComponentErrors::ValueOutofRangeExImpl,
        ComponentErrors::CouldntGetComponentExImpl,ComponentErrors::CORBAProblemExImpl,ReceiversErrors::LocalOscillatorErrorExImpl)
         throw (ReceiversErrors::ReceiversErrorsExImpl,ComponentErrors::ComponentErrorsExImpl)
{    
	MED_TRACE_MSG(" IN ");	
    baci::ThreadSyncGuard guard(&m_mutex);
@@ -351,13 +354,14 @@ void CComponentCore::setLO(const ACS::doubleSeq& lo)
        MED_TRACE_FMT( "m_bandwidth[0] : %f", m_bandwidth[0]);
    }catch(...){
        ACS_LOG(LM_FULL_INFO,"CComponentCore::setLO()",(LM_NOTICE,"Exception calculating bw"));  
        return;
        _EXCPT(ComponentErrors::ComponentErrorsExImpl,impl,"CComponentErrors::setMode()");
        throw impl;          
    }
    ACS_LOG(LM_FULL_INFO,"CComponentCore::setLO()",(LM_NOTICE,"LOCAL_OSCILLATOR %lf",l_lo_value));
	MED_TRACE_MSG(" OUT ");
}

void CComponentCore::getLO(ACS::doubleSeq& lo)
void CComponentCore::getLO(ACS::doubleSeq& lo) throw (ReceiversErrors::LocalOscillatorErrorExImpl)
{
    baci::ThreadSyncGuard guard(&m_mutex);    
    lo[0]= m_mixer.getValue();    
@@ -377,10 +381,17 @@ void CComponentCore::checkLocalOscillator() throw (ComponentErrors::CORBAProblem

void CComponentCore::loadLocalOscillator() throw (ComponentErrors::CouldntGetComponentExImpl)
{
    try{
        m_mixer.loadComponents();   
    }catch(ComponentErrors::CouldntGetComponentExImpl& ex){
        setComponentStatus(Management::MNG_FAILURE);
        _IRA_LOGFILTER_LOG(LM_CRITICAL,"CComponentCore::loadLocalOscillator()","ReceiverControl allocation error");
        _EXCPT(ComponentErrors::ComponentErrorsExImpl,dummy,"CComponentCore::loadLocalOscillator()");
        throw dummy;
    }
}

void CComponentCore::unloadLocalOscillator()
void CComponentCore::unloadLocalOscillator() throw (ReceiversErrors::LocalOscillatorErrorExImpl)
{
    m_mixer.releaseComponents();   
}
+42 −43

File changed.

Preview size limit exceeded, changes collapsed.

+4 −1
Original line number Diff line number Diff line
@@ -13,7 +13,10 @@
			"cmath": "cpp",
			"complex": "cpp",
			"valarray": "cpp",
			"set": "cpp"
			"set": "cpp",
			"ostream": "cpp",
			"xlocale": "cpp",
			"xstring": "cpp"
		}
	}
}
 No newline at end of file