Commit 83f60316 authored by Andrea Orlat's avatar Andrea Orlat
Browse files

removed some printf in Scheduler module. Showed the field RewindOffset from...

removed some printf in Scheduler module. Showed the field RewindOffset from the DewarPositioner in ReceieverBossTui
parent 286e401f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ void updateDewar(Receivers::DewarPositioner_ptr dewar)
	char *corbaStr;
	IRA::CString configuration;
	bool isRewRequired,isRewinding;
	double position,iStaticPos,iParPos,dParPos;
	double position,iStaticPos,iParPos,dParPos,rewOff;
	bool isReady;
	Receivers::TDewarPositionerScanInfo_var info;
	IRA::CString outString,format;
@@ -34,6 +34,7 @@ void updateDewar(Receivers::DewarPositioner_ptr dewar)
			iStaticPos=info->iStaticPos;
			iParPos=info->iParallacticPos;
			dParPos=info->dParallacticPos;
			rewOff=info->rewindingOffset;
		}
		else {
			configuration="none";
@@ -41,7 +42,7 @@ void updateDewar(Receivers::DewarPositioner_ptr dewar)
			isRewinding=false;
			position=0.0;
			isReady=true;
			iStaticPos=iParPos=dParPos=0;
			iStaticPos=iParPos=dParPos=rewOff=0;
		}
	}
	catch (...) {
@@ -70,7 +71,7 @@ void updateDewar(Receivers::DewarPositioner_ptr dewar)
	extraLabel3->setValue(outString);
	extraLabel3->setStyle(TW::CStyle(TW::CColorPair::WHITE_BLACK,0));
	extraLabel3->Refresh();
	format.Format("%05.1lf / %07.3lf / %07.3lf",iStaticPos,iParPos,dParPos);
	format.Format("%05.1lf / %07.3lf / %07.3lf / %05.1lf",iStaticPos,iParPos,dParPos,rewOff);
	outString="Dewar Position: "+format;
	extraLabel4->setValue(outString);
	extraLabel4->setStyle(TW::CStyle(TW::CColorPair::WHITE_BLACK,0));
+3 −3
Original line number Diff line number Diff line
@@ -362,7 +362,7 @@ ACS::Time CCore::closeScan(bool wait) throw (ComponentErrors::ComponentNotActive
			ACS_LOG(LM_FULL_INFO,"CCore::closeScan()",(LM_DEBUG,"ANTENNA_CLOSE_SCAN_EPOCH %lld",antennaUT));
			IRA::CString outstr;
			IRA::CIRATools::timeToStr(antennaUT,outstr);
			printf("tempo di chiusura (Antenna): %s\n",(const char*)outstr);
			//printf("tempo di chiusura (Antenna): %s\n",(const char*)outstr);
		}
		else {
			_EXCPT(ComponentErrors::ComponentNotActiveExImpl,impl,"CCore::closeScan()");
@@ -399,7 +399,7 @@ ACS::Time CCore::closeScan(bool wait) throw (ComponentErrors::ComponentNotActive
				ACS_LOG(LM_FULL_INFO,"CCore::closeScan()",(LM_DEBUG,"MINOR_SERVO_CLOSE_SCAN_EPOCH %lld",servoUT));
				IRA::CString outstr;
				IRA::CIRATools::timeToStr(servoUT,outstr);
				printf("tempo di chiusura (Servo): %s\n",(const char*)outstr);
				//printf("tempo di chiusura (Servo): %s\n",(const char*)outstr);
			}
			else {
				_EXCPT(ComponentErrors::ComponentNotActiveExImpl,impl,"CCore::closeScan()");
@@ -434,7 +434,7 @@ ACS::Time CCore::closeScan(bool wait) throw (ComponentErrors::ComponentNotActive
			ACS_LOG(LM_FULL_INFO,"CCore::closeScan()",(LM_DEBUG,"RECEIEVERS_STOP_SCAN_EPOCH %lld",receiversUT));
			IRA::CString outstr;
			IRA::CIRATools::timeToStr(receiversUT,outstr);
			printf("tempo di chiusura (receievers): %s\n",(const char*)outstr);
			//printf("tempo di chiusura (receievers): %s\n",(const char*)outstr);
		}
		else {
			_EXCPT(ComponentErrors::ComponentNotActiveExImpl,impl,"CCore::closeScan()");
+8 −8
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ void CCore::_goTo(const double& azimuth,const double& elevation) throw (Manageme
	MinorServo::MinorServoScan servo;
	Receivers::TReceiversParameters receievers;
	Schedule::CSubScanBinder binder(&primary,&secondary,&servo,&receievers);
	printf("Parametri del goTo %lf, %lf\n",azimuth,elevation); 
	//printf("Parametri del goTo %lf, %lf\n",azimuth,elevation);
	binder.goTo(azimuth,elevation);
	startTime=0; // it means start as soon as possible
	startScan(startTime,&primary,&secondary,&servo,&receievers); //ManagementErrors::TelescopeSubScanErrorExImpl,ManagementErrors::TargetOrSubscanNotFeasibleExImpl
@@ -507,7 +507,7 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent
	loadAntennaBoss(m_antennaBoss,m_antennaBossError);
	// now let's collect all the information required by computation
	digits=m_config->getFTrackDigits();
	printf("digits :%ld\n",digits);
	//printf("digits :%ld\n",digits);
	//---------------------------------------------------------------------------------------------------
	//3) info from backend--------------------------------------------------------------------------------
	try {
@@ -522,7 +522,7 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent
	}
	sections=sectionsNumberRO->get_sync(comp.out()); // number of backend sections
	inputSection=inputSectionRO->get_sync(comp.out());
	printf("sections :%ld\n",sections);
	//printf("sections :%ld\n",sections);
	if ((m_restFrequency.length()>1) && (m_restFrequency.length()!=(unsigned)sections)) {   // check one rest frequency or as many as section are given
		_EXCPT(ManagementErrors::InvalidRestFrequencyExImpl,impl,"CCore::_fTrack()");
		throw impl;
@@ -583,7 +583,7 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent
		_EXCPT(ComponentErrors::UnexpectedExImpl,impl,"CCore::_fTrack()");
		throw impl;
	}
	for (unsigned t=0;t<topocentricFreq->length();t++) printf("topocentric Freq :%lf\n",topocentricFreq[t]);
	//for (unsigned t=0;t<topocentricFreq->length();t++) //printf("topocentric Freq :%lf\n",topocentricFreq[t]);
	// just to make sure the topocentric sequence has the right dimension!
	if (topocentricFreq->length()!=m_restFrequency.length()) {
		topocentricFreq->length(m_restFrequency.length());
@@ -600,7 +600,7 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent
		throw impl;
	}
	IFNumber=IFNumberRO->get_sync(comp.out()); // number of output IFs of the receeever
	printf("if number :%ld\n",IFNumber);
	//printf("if number :%ld\n",IFNumber);
	try {
		m_receiversBoss->getIFOutput(bckinputFeed,bckinputIF,fndoutputFreq.out(),fndoutputBw.out(),fndoutputPol.out(),fndoutputLO.out());
	}
@@ -636,16 +636,16 @@ void CCore::_fTrack(const char *dev) throw (ComponentErrors::CouldntGetComponent
	for (long j=0;j<inputs;j++) {
		if ((device=="ALL") || (device=="LO")) {
			currentSection=inputSection[j];
			printf("currentSection :%ld\n",currentSection);
			//printf("currentSection :%ld\n",currentSection);
			if (topocentricFreq->length()==1) {
				inputLO[j]=IRA::CIRATools::roundNearest(topocentricFreq[0]-bckinputFreq[currentSection]-
						(bckinputBW[currentSection]/2.0),digits);
				printf("inputLO[j] :%lf\n",inputLO[j]);
				//printf("inputLO[j] :%lf\n",inputLO[j]);
			}
			else {
				inputLO[j]=IRA::CIRATools::roundNearest(topocentricFreq[currentSection]-bckinputFreq[currentSection]-
						(bckinputBW[currentSection]/2.0),digits);
				printf("inputLO[j] :%lf\n",inputLO[j]);
				//printf("inputLO[j] :%lf\n",inputLO[j]);
			}
			lo[bckinputIF[j]]=inputLO[j]; // local oscillator per IFs
		}
+21 −21
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ void CScheduleExecutor::runLoop()
				m_stage=STARTTIME_WAIT;
			}
			case STARTTIME_WAIT: {
				printf("START TIME WAIT\n");
				//printf("START TIME WAIT\n");
			 	if (m_schedule->getSchedMode()==CSchedule::TIMETAGGED) {
			 	 	TIMEVALUE currentUT;	
			 	 	IRA::CDateTime now;
@@ -95,7 +95,7 @@ void CScheduleExecutor::runLoop()
			 	}				
			}
			case SCAN_SELECTION: { //select the next scan to be done.....in case of errors the schedule is stopped.	
				printf("SCAN_SELECTION\n");		
				//printf("SCAN_SELECTION\n");
				if (m_haltMe) { //asked to close at the end of the scan...so close exactly at the beginning of the next one
					m_stopMe=true;
					break;
@@ -121,7 +121,7 @@ void CScheduleExecutor::runLoop()
			case SCAN_CHECK: {// checks the scan if it feasible to be done in time...if not the previous stage is executed again. In case of error the scan is aborted
				double minEl,maxEl;
				bool ok;
				printf("SCAN_CHECK\n");
				//printf("SCAN_CHECK\n");
				try {
					ACS_LOG(LM_FULL_INFO,"CScheduleExecutor::runLoop()",(LM_DEBUG,"CHECKING_THE_SCAN"));
					m_schedule->getElevationLimits(minEl,maxEl);
@@ -129,11 +129,11 @@ void CScheduleExecutor::runLoop()
					secondary=static_cast<Antenna::TTrackingParameters *>(m_currentScanRec.secondaryParameters);
					servoPar=static_cast<MinorServo::MinorServoScan *>(m_currentScanRec.servoParameters);
					recvPar=static_cast<Receivers::TReceiversParameters *>(m_currentScanRec.receieversParsmeters);
					printf("Eseguo checkScan\n");
					printf("ut: %llu\n",m_currentScan.ut);
					//printf("Eseguo checkScan\n");
					//printf("ut: %llu\n",m_currentScan.ut);
					ok=m_core->checkScan(m_currentScan.ut,primary,secondary,servoPar,recvPar,minEl,maxEl);
					printf("ut: %llu\n",m_currentScan.ut);
					printf("Fatto checkScan\n");
					//printf("ut: %llu\n",m_currentScan.ut);
					//printf("Fatto checkScan\n");
				}
				catch (ACSErr::ACSbaseExImpl& ex) {
					_ADD_BACKTRACE(ManagementErrors::SubscanErrorExImpl,impl,ex,"CScheduleExecutor::runLoop()");
@@ -184,17 +184,17 @@ void CScheduleExecutor::runLoop()
				}
			}
			case SCAN_PREPARATION: {  // command the scan to the telescope...in case of error the current scan is aborted
				printf("SCAN_PREPARATION\n");
				//printf("SCAN_PREPARATION\n");
				try {
					ACS_LOG(LM_FULL_INFO,"CScheduleExecutor::runLoop()",(LM_DEBUG,"COMMAND_SCAN_TO_THE_TELESCOPE"));
					primary=static_cast<Antenna::TTrackingParameters *>(m_currentScanRec.primaryParameters);
					secondary=static_cast<Antenna::TTrackingParameters *>(m_currentScanRec.secondaryParameters);
					servoPar=static_cast<MinorServo::MinorServoScan *>(m_currentScanRec.servoParameters);
					recvPar=static_cast<Receivers::TReceiversParameters *>(m_currentScanRec.receieversParsmeters);
					printf("Eseguo doScan\n");
					printf("ut: %llu\n",m_currentScan.ut);
					//printf("Eseguo doScan\n");
					//printf("ut: %llu\n",m_currentScan.ut);
					m_core->doScan(m_currentScan.ut,primary,secondary,servoPar,recvPar);
					printf("Fatto doScan\n");
					//printf("Fatto doScan\n");
					m_closeScanTimer=0;
				}
				catch (ACSErr::ACSbaseExImpl& Ex) {
@@ -211,7 +211,7 @@ void CScheduleExecutor::runLoop()
				m_stage=WRITING_INITIALIZATION;
			}
			case WRITING_INITIALIZATION: { //prepare the data transfer, it configures the backend and the writer. In case of error the scan is aborted.
				printf("WRITING_INIT\n");
				//printf("WRITING_INIT\n");
				try {
					ACS_LOG(LM_FULL_INFO,"CScheduleExecutor::runLoop()",(LM_DEBUG,"PREPARE_DATA_ACQUISITION"));
					prepareFileWriting(m_currentScan);
@@ -228,7 +228,7 @@ void CScheduleExecutor::runLoop()
				m_stage=PRE_SCAN_PROC;
			}
			case PRE_SCAN_PROC: { // It executed the pre scan procedure. In case of error the scheduled is continued	
				printf("PRE_SCAN_PROC\n");
				//printf("PRE_SCAN_PROC\n");
				ACS::stringSeq preProc;
				//WORD preProcArgs;
				if (m_currentScan.preScan!=_SCHED_NULLTARGET) {
@@ -276,7 +276,7 @@ void CScheduleExecutor::runLoop()
				m_stage=SCAN_START;	 
			}
			case SCAN_START: { // It starts the data acquisition......In case of error the current scan is aborted				
				printf("SCAN_START\n");
				//printf("SCAN_START\n");
				bool start=false;
				if (m_currentScan.ut==0) {
					if (m_core->isTracking()) {
@@ -330,7 +330,7 @@ void CScheduleExecutor::runLoop()
				m_stage=STOP_SCHEDULING;
			}
			case STOP_SCHEDULING: { // schedule the scan stop..in case of error. the schedule is aborted
				printf("STOP_SCHEDULING\n");
				//printf("STOP_SCHEDULING\n");
				if (m_core->isStreamStarted()) {
					m_lastScheduledTime=m_startRecordTime+(unsigned long long)(m_currentScan.duration*10000000); // this is the stop time in 100 ns.
					IRA::CString out;
@@ -351,7 +351,7 @@ void CScheduleExecutor::runLoop()
				m_stage=SCAN_EXECUTION;
			}
			case SCAN_EXECUTION: { //it waits for the scan completion...in case of error the scan is forcibly aborted
				printf("SCAN_EXECTION\n");
				//printf("SCAN_EXECTION\n");
				if (!m_subScanDone) {
					break;
				}
@@ -372,7 +372,7 @@ void CScheduleExecutor::runLoop()
				m_stage=POST_SCAN_PROC;
			}
			case POST_SCAN_PROC: { //Executes the post scan procedure..in case of error nothing is done. We try to keep it up.
				printf("POST_SCAN_PROC\n");
				//printf("POST_SCAN_PROC\n");
				if (m_currentScan.postScan!=_SCHED_NULLTARGET) {
					ACS_LOG(LM_FULL_INFO,"CScheduleExecutor::runLoop()",(LM_DEBUG,"POSTSCAN_PROCEDURE_IS_NOT_NULL"));
					if (m_currentScan.postScanBlocking) {
@@ -403,13 +403,13 @@ void CScheduleExecutor::runLoop()
				m_stage=SCAN_CLOSEUP;
			}
			case SCAN_CLOSEUP : {
				printf("SCAN_CLOSEUP\n");
				//printf("SCAN_CLOSEUP\n");
				// trying to clean up and close the current scan commanded to the telescope
				try {
					m_closeScanTimer=m_core->closeScan(false);
					IRA::CString outstr;
					IRA::CIRATools::timeToStr(m_closeScanTimer,outstr);
					printf("tempo di chiusura: %s\n",(const char*)outstr);
					//printf("tempo di chiusura: %s\n",(const char*)outstr);
				}
				catch (ACSErr::ACSbaseExImpl& ex) {
					_ADD_BACKTRACE(ManagementErrors::CloseTelescopeScanErrorExImpl,impl,ex,"CScheduleExecutor::runLoop()");
@@ -422,7 +422,7 @@ void CScheduleExecutor::runLoop()
				break;
			}
			case CLOSEUP_WAIT : {
				printf("CLOSEUP_WAIT\n");
				//printf("CLOSEUP_WAIT\n");
				if (m_closeScanTimer!=0) {
					TIMEVALUE now;
					IRA::CIRATools::getTime(now);
@@ -434,7 +434,7 @@ void CScheduleExecutor::runLoop()
				m_stage=RECORDING_FINALIZE;
			}
			case RECORDING_FINALIZE: {
				printf("RECORDING_FINALIZE\n");
				//printf("RECORDING_FINALIZE\n");
				// wait for the recorder to consume all the data in its cache
				try {
					if (m_core->checkRecording()) {