Commit ce1d405c authored by SRT Operator's avatar SRT Operator
Browse files

debugging Xarcos configuration

parent ac0b7048
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -119,7 +119,6 @@ public:
	void getFeedAttr(ACS::longSeq& feed) const;	
    
    void setFeedZero();
    void setFeedZeroUno();

	/**
	 * Call this function in order to get the polarization for each input. 
@@ -632,6 +631,8 @@ public:
	bool m_XarcosC;
	bool m_XarcosK00;
	bool m_XarcosK77;
	bool m_XarcosK03;
	bool m_XarcosK06;
    bool start;
};

+62 −40
Original line number Diff line number Diff line
@@ -611,7 +611,7 @@ void CCommandLine::setup(const char *conf) throw (BackendsErrors::BackendBusyExI
		throw impl;
	}	
	//setDefaultConfiguration(); //could throw exceptions........
	ACS_LOG(LM_FULL_INFO,"CCommandLine::initializeConfiguration()",(LM_NOTICE,"BACKEND_INITIALIZED: %s",conf)); 
	//ACS_LOG(LM_FULL_INFO,"CCommandLine::initializeConfiguration()",(LM_NOTICE,"BACKEND_INITIALIZED: %s",conf)); 
}


@@ -774,7 +774,17 @@ void CCommandLine::getFeed(ACS::longSeq& feed) const
	//for (int i=0;i<m_sectionsNumber;i++) {
	feed.length(m_inputsNumber);
	for (int i=0;i<m_inputsNumber;i++) {
		feed[i]=m_feedNumberInput[i];
        if (m_XarcosK00 == true || m_XarcosC == true)
		    feed[i]=0;
        else if (m_XarcosK03 == true || m_XarcosK06 == true) {
            if (i <= 3)
                feed[i] = 0;
            else
                feed[i] = 1;
        }
        else
            //feed[i]=m_feedNumberInput[i];
            feed[i]=i;
	}
}

@@ -784,7 +794,23 @@ void CCommandLine::getFeedAttr(ACS::longSeq& feed) const

	feed.length(m_sectionsNumber);
	for (int i=0;i<m_sectionsNumber;i++) {
		feed[i]=m_feedNumberInput[2*i];
        if (m_XarcosK77 == false) {
            if (m_XarcosK00 == true || m_XarcosC == true)
                feed[i]=0;
            else if (m_XarcosK03 == true || m_XarcosK06 == true) {
                if (i <= 1)
                    feed[i] = 0;
                else {
                    if (m_XarcosK03 == true)
                        feed[i] = 3;
                    if (m_XarcosK06 == true)
                        feed[i] = 6;
                }
            }
                //feed[i]=m_feedNumberInput[2*i];
        }
        else
            feed[i]=m_feedNumberInput[i];
	}
}

@@ -807,25 +833,6 @@ void CCommandLine::setFeedZero() {
	m_feedNumberInput[7]=0;
}

void CCommandLine::setFeedZeroUno() {
    m_feedNumber[0]=0;
	m_feedNumberInput[0]=0;
    m_feedNumber[1]=0;
	m_feedNumberInput[1]=0;
    m_feedNumber[2]=0;
	m_feedNumberInput[2]=0;
    m_feedNumber[3]=0;
	m_feedNumberInput[3]=0;
    m_feedNumber[4]=1;
	m_feedNumberInput[4]=1;
    m_feedNumber[5]=1;
	m_feedNumberInput[5]=1;
    m_feedNumber[6]=1;
	m_feedNumberInput[6]=1;
    m_feedNumber[7]=1;
	m_feedNumberInput[7]=1;
}

void CCommandLine::getPolarization(ACS::longSeq& pol) const
{	
	AUTO_TRACE("CCommandLine::getPolarization()");
@@ -1350,16 +1357,24 @@ AUTO_TRACE("CCommandLine::setMode8bit()");
    start=false;
    }
    else {
		m_XarcosC=false;
	    m_XarcosK00 = false;
	    m_XarcosK77 = false;
	    m_XarcosK03 = false;
	    m_XarcosK06 = false;
        start = true;
        IRA::CIRATools::Wait(1,0);
		setup("NNNN");
        start = false;
        IRA::CIRATools::Wait(1,0);
        IRA::CIRATools::Wait(2,0);
    //printf("initialize configuration end\n");
	//IRA::CIRATools::Wait(2,0);
    if (config=="XK77") { //in order to add a new configuration add an other if
		m_XarcosC=false;
        m_XarcosK77=true;
        m_XarcosK00=false;
	    m_XarcosK03 = false;
	    m_XarcosK06 = false;
        setMode8bit(false);
        setSectionsNumber(7);
		IRA::CIRATools::Wait(0,100000);
@@ -1376,10 +1391,13 @@ AUTO_TRACE("CCommandLine::setMode8bit()");
		setSection(5,145,62.5,5,2,125,-1);
		IRA::CIRATools::Wait(0,100000);
		setSection(6,145,62.5,6,2,125,-1);
		m_XarcosC=false;
        m_XarcosK77=true;
    }
    else if (config=="XK06") {
		m_XarcosC=false;
        m_XarcosK77=false;
        m_XarcosK00=false;
	    m_XarcosK03 = false;
	    m_XarcosK06 = true;
        setMode8bit(true);
		setSectionsNumber(4);
		IRA::CIRATools::Wait(0,100000);
@@ -1390,11 +1408,13 @@ AUTO_TRACE("CCommandLine::setMode8bit()");
		setSection(2,145,62.5,6,2,125,-1);
		IRA::CIRATools::Wait(0,100000);
		setSection(3,174.296875,3.90625,6,2,7.8125,-1);
	    setFeedZeroUno();
		m_XarcosC=false;
        m_XarcosK77=false;
    }
    else if (config=="XK03") {
		m_XarcosC=false;
        m_XarcosK77=false;
        m_XarcosK00=false;
	    m_XarcosK03 = true;
	    m_XarcosK06 = false;
        setMode8bit(true);
        setSectionsNumber(4);
		IRA::CIRATools::Wait(0,100000);
@@ -1405,11 +1425,13 @@ AUTO_TRACE("CCommandLine::setMode8bit()");
		setSection(2,145,62.5,2,2,125,-1);
		IRA::CIRATools::Wait(0,100000);
		setSection(3,174.296875,3.90625,2,2,7.8125,-1);
	    setFeedZeroUno();
		m_XarcosC=false;
        m_XarcosK77=false;
    }
    else if(config=="XK00") {
        m_XarcosC=false;
        m_XarcosK00=true;
        m_XarcosK77=false;
	    m_XarcosK03 = false;
	    m_XarcosK06 = false;
		setMode8bit(true);
		setSectionsNumber(4);
		IRA::CIRATools::Wait(0,100000);
@@ -1421,12 +1443,14 @@ AUTO_TRACE("CCommandLine::setMode8bit()");
		IRA::CIRATools::Wait(0,100000);
		setSection(3,176.005859375,0.48828125,1,2,0.9765625,-1);
		IRA::CIRATools::Wait(0,100000);
	    setFeedZero();
        m_XarcosC=false;
        m_XarcosK00=true;
        m_XarcosK77=false;
	    //setFeedZero();
    }
    else if (config=="XC00") {
		m_XarcosC=true;
		m_XarcosK00=false;
		m_XarcosK77=false;
	    m_XarcosK03 = false;
	    m_XarcosK06 = false;
        setMode8bit(true);
        setSectionsNumber(4);
		IRA::CIRATools::Wait(0,100000);
@@ -1439,13 +1463,11 @@ AUTO_TRACE("CCommandLine::setMode8bit()");
		setSection(3,176.005859375,0.48828125,1,2,0.9765625,-1);
		IRA::CIRATools::Wait(0,100000);
	    setFeedZero();
		m_XarcosC=true;
		m_XarcosK00=false;
        m_XarcosK77=false;
    }
    else
        return false;
    }
	//ACS_LOG(LM_FULL_INFO,"CCommandLine::initializeConfiguration()",(LM_NOTICE,"BACKEND_INITIALIZED: %s",config)); 
	return true;
}

@@ -1461,8 +1483,8 @@ void CCommandLine::setSection(const long& input,const double& freq,const double&
	setAttenuation(input,-1);
    Init();//Configurazione nell'HW 
	getConfiguration();
    if (m_XarcosC == true || m_XarcosK00 == true)
        setFeedZero();
    //if (m_XarcosC == true || m_XarcosK00 == true)
    //    setFeedZero();
}

void CCommandLine::getTsys(ACS::doubleSeq& tsys) const
+47 −31
Original line number Diff line number Diff line
@@ -567,15 +567,20 @@ void XBackendsImpl::setSection(CORBA::Long input,CORBA::Double freq,CORBA::Doubl
		CORBA::Long feed,CORBA::Long pol,CORBA::Double sr,CORBA::Long bins)
	throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,BackendsErrors::BackendsErrorsEx)
{
	long fd;
    AUTO_TRACE("XBackendsImpl::setSection()");
	CSecAreaResourceWrapper<CCommandLine> line=m_commandLine->Get();
	try {		
		if (line->m_XarcosC == true)
            feed = 1;
   		line->setConfiguration(input,freq-ANALOG_FREQUENCY,bw,feed,pol,sr,bins);//Ricezione Specificha Nuova
            fd = 1;
        else
            fd=feed;
   		line->setConfiguration(input,freq-ANALOG_FREQUENCY,bw,fd,pol,sr,bins);//Ricezione Specificha Nuova
		line->setAttenuation(input,-1);
		line->Init();//Configurazione nell'HW 
		line->getConfiguration();
        //if (line->m_XarcosC == true/* || line->m_XarcosK00 == true*/)
        //    line->setFeedZero();
	}	
	catch (XBackendsErrors::DisableChInExImpl& ex) {
		_ADD_BACKTRACE(BackendsErrors::TXErrorExImpl,impl,ex,"XBackendsImpl::setSection()");
@@ -608,8 +613,8 @@ void XBackendsImpl::setSection(CORBA::Long input,CORBA::Double freq,CORBA::Doubl
		dummy.log(LM_DEBUG);
		throw dummy.getComponentErrorsEx();
	}
	if (line->m_XarcosC == true || line->m_XarcosK00 == true)
		line->setFeedZero();
	//if (line->m_XarcosC == true || line->m_XarcosK00 == true)
	//	line->setFeedZero();
}

ACS::doubleSeq *XBackendsImpl::getTpi ()
@@ -1034,15 +1039,21 @@ void XBackendsImpl::setXarcosConf(Backends::TXArcosConf conf) throw (CORBA::Syst
    line->m_XarcosC = false;
	line->m_XarcosK00 = false;
	line->m_XarcosK77 = false;
	line->m_XarcosK03 = false;
	line->m_XarcosK06 = false;
    line->start = true;
    IRA::CIRATools::Wait(1,0);
	line->setup("NNNN");
	line->setDefaultConfiguration();
    line->start = false;
        IRA::CIRATools::Wait(1,0);
		//line->setup(configuration);
        //IRA::CIRATools::Wait(1,0);
    IRA::CIRATools::Wait(2,0);
	switch (conf) {
		case (Backends::XArcos_K77): // XK77, ALL FEED
			line->m_XarcosC=false;
            line->m_XarcosK77=true;
	        line->m_XarcosK00 = false;
	        line->m_XarcosK03 = false;
	        line->m_XarcosK06 = false;
			setMode8bit(false);
            setSectionsNumber(7);
			IRA::CIRATools::Wait(0,100000);
@@ -1059,10 +1070,13 @@ void XBackendsImpl::setXarcosConf(Backends::TXArcosConf conf) throw (CORBA::Syst
			setSection(5,145,62.5,5,2,125,-1);
			IRA::CIRATools::Wait(0,100000);
			setSection(6,145,62.5,6,2,125,-1);
			line->m_XarcosC=false;
            line->m_XarcosK77=true;
			break;		
		case (Backends::XArcos_K06): // XK06, CENTRAL FEED & FEED 6
			line->m_XarcosC=false;
            line->m_XarcosK77=false;
	        line->m_XarcosK00=false;
	        line->m_XarcosK03 = false;
	        line->m_XarcosK06 = true;
			setMode8bit(true);
			setSectionsNumber(4);
			IRA::CIRATools::Wait(0,100000);
@@ -1073,11 +1087,13 @@ void XBackendsImpl::setXarcosConf(Backends::TXArcosConf conf) throw (CORBA::Syst
			setSection(2,145,62.5,6,2,125,-1);
			IRA::CIRATools::Wait(0,100000);
			setSection(3,174.296875,3.90625,6,2,7.8125,-1);
            line->setFeedZeroUno();
			line->m_XarcosC=false;
            line->m_XarcosK77=false;
			break;
		case (Backends::XArcos_K03): // XK03, CENTRAL FEED & FEED 3
			line->m_XarcosC=false;
            line->m_XarcosK77=false;
	        line->m_XarcosK00=false;
	        line->m_XarcosK03 = true;
	        line->m_XarcosK06 = false;
			setMode8bit(true);
			setSectionsNumber(4);
			IRA::CIRATools::Wait(0,100000);
@@ -1089,11 +1105,13 @@ void XBackendsImpl::setXarcosConf(Backends::TXArcosConf conf) throw (CORBA::Syst
			IRA::CIRATools::Wait(0,100000);
			setSection(3,174.296875,3.90625,2,2,7.8125,-1);
			IRA::CIRATools::Wait(0,100000);
            line->setFeedZeroUno();
			line->m_XarcosC=false;
            line->m_XarcosK77=false;
			break;
		case (Backends::XArcos_K00): // XK00, CENTRAL FEED
           	line->m_XarcosC=false;
           	line->m_XarcosK00=true;
            line->m_XarcosK77=false;
	        line->m_XarcosK03 = false;
	        line->m_XarcosK06 = false;
			setMode8bit(true);
			setSectionsNumber(4);
			IRA::CIRATools::Wait(0,100000);
@@ -1105,12 +1123,14 @@ void XBackendsImpl::setXarcosConf(Backends::TXArcosConf conf) throw (CORBA::Syst
			IRA::CIRATools::Wait(0,100000);
			setSection(3,176.005859375,0.48828125,1,2,0.9765625,-1);
			IRA::CIRATools::Wait(0,100000);
		   	line->setFeedZero();
           	line->m_XarcosC=false;
           	line->m_XarcosK00=true;
            line->m_XarcosK77=false;
		   	//line->setFeedZero();
			break;
		case (Backends::XArcos_C00): // XC00
           	line->m_XarcosC=true;
           	line->m_XarcosK00=false;
            line->m_XarcosK77=false;
	        line->m_XarcosK03 = false;
	        line->m_XarcosK06 = false;
			setMode8bit(true);
			setSectionsNumber(4);
			IRA::CIRATools::Wait(0,100000);
@@ -1123,13 +1143,9 @@ void XBackendsImpl::setXarcosConf(Backends::TXArcosConf conf) throw (CORBA::Syst
			setSection(3,176.005859375,0.48828125,1,2,0.9765625,-1);
			IRA::CIRATools::Wait(0,100000);
		   	line->setFeedZero();
           	line->m_XarcosC=true;
           	line->m_XarcosK00=false;
            line->m_XarcosK77=false;
		    	//setMode8bit(true);
			break;
	}
		line->setDefaultConfiguration();
		//line->setDefaultConfiguration();
}

void XBackendsImpl::setTargetFileName (const char * fileName) throw (CORBA::SystemException,ComponentErrors::ComponentErrorsEx,