Commit 0d5d7560 authored by Andrea Orlat's avatar Andrea Orlat
Browse files

support for data directory specific for backend

parent e693f7bc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
		<xs:attribute name="alias" type="xs:string" use="required"/>
		<xs:attribute name="backend" type="xs:string" use="required"/>
		<xs:attribute name="noData" type="xs:boolean" use="required"/>
		<xs:attribute name="dataPath" type="xs:string" use="required"/>		
	</xs:complexType>

	<xs:complexType name="TelescopeEquipmentType">
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ void AntennaBossImpl::initialize() throw (ACSErr::ACSbaseExImpl)
	m_parser->add("lonlatOffsets",new function2<CBossCore,non_constant,void_type,I<angleOffset_type<rad> >,I<angleOffset_type<rad> > >(boss,&CBossCore::setGalacticOffsets),2);
	//m_parser->add("skydipOTF",new function3<CBossCore,non_constant,time_type,I<elevation_type<rad,false> >,I<elevation_type<rad,false> >,I<interval_type> >(boss,&CBossCore::skydip),3);
	m_parser->add("antennaReset",new function0<CBossCore,non_constant,void_type >(boss,&CBossCore::resetFailures),0);
	m_parser->add("goOff",new function2<CBossCore,non_constant,void_type,I<enum_type<AntennaFrame2String,Antenna::TCoordinateFrame > >,I<double_type > >(boss,&CBossCore::goOff),2);
	//m_parser->add("goOff",new function2<CBossCore,non_constant,void_type,I<enum_type<AntennaFrame2String,Antenna::TCoordinateFrame > >,I<double_type > >(boss,&CBossCore::goOff),2);
	m_parser->add("radialVelocity",new function3<CBossCore,non_constant,void_type,I<  basic_type<double,double_converter,VRad_WildCard> >,
			I<enum_type<ReferenceFrame_converter,Antenna::TReferenceFrame,ReferenceFrame_WildCard> >,
			I<enum_type<VradDefinition_converter,Antenna::TVradDefinition,VradDefinition_WildCard> >  >(boss,&CBossCore::radialVelocity),3);
+6 −3
Original line number Diff line number Diff line
@@ -85,9 +85,9 @@ void CDataCollection::saveMainHeaders(Backends::TMainHeader const * h,Backends::
		printf("IF: %ld %ld\n",(long)m_sectionH->IF[0],(long)m_sectionH->IF[1]);
	}*/
	m_ready=true; // main headers are saved....before that no activity can take place	
	if (getIsNoData()) { // this is a special behaviour with no data
		m_start=true;
	}
	//if (getIsNoData()) {
	//	m_start=true;
	//}
}

bool CDataCollection::saveDump(char * memory)
@@ -382,6 +382,9 @@ bool CDataCollection::setSubScanSetup(const Management::TSubScanSetup& setup,boo
			m_scanAxis=setup.axis;
			m_startUTTime=setup.startUt;
			//setup.startUt and setup.targetID are not used
			if (getIsNoData()) { // this is a special behaviour with no data
            	m_start=true;
			}
			return true;
		}
		else {
+11 −4
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ public:
		IRA::CString alias;
		IRA::CString backend;
		bool noData;
		IRA::CString dataPath;
	} TAvailableBackends;

	/**
@@ -121,7 +122,7 @@ public:
	/**
	 * @return the path to the directory where to store the data files.
	 */
	const IRA::CString& getDataDirectory() const { return m_dataDir; }
	const IRA::CString& getDataDirectory() const;
	/**
	 * @return the path to the directory where to store the system data file or auxiliary data or files not coming from a schedule
	 */
@@ -140,7 +141,7 @@ public:
	long getScheduleExecutorSleepTime() const { return m_scheduleExecutorSleepTime; }
	
	/**
	 * @return the time (microsecods) gap between two transition of the calibration diode.
	 * @return the time (microseconds) gap between two transition of the calibration diode.
	 */ 
	long getTsysGapTime() const { return m_TsysGapTime; }
	
@@ -187,11 +188,15 @@ public:
	 * check the availability of a backend from its name or an alias
	 * @param name name of the backend or an alias
	 * @param backend it return the name of the backend i.e its component instance
	 * #param noData true if the backend will sent no raw data through the data transfer channel
	 * @param pos current position - if available - in the internal backend list (index)
	 * @return true if the backend has been verified to be available in the configuration
	 */
	bool getAvailableBackend(const IRA::CString& name,IRA::CString& backend,bool& noData) const;
	bool getAvailableBackend(const IRA::CString& name,IRA::CString& backend,long &pos) const;

	void setCurrentBackend(const long& pos)
	{
		m_currentBackendIndex=pos;
	}

private:
	IRA::CString m_schedDir;
@@ -223,6 +228,8 @@ private:
	TMinorServoAxis* m_axis;
	TAvailableBackends* m_backend;

	long m_currentBackendIndex;

	/**
	 * Pointer to the DB table used to load the station procedures from the CDB 
	*/
+2 −1
Original line number Diff line number Diff line
@@ -367,7 +367,8 @@ private:
	 */
	void prepareFileWriting(const CSchedule::TRecord& rec) throw (ManagementErrors::ScheduleErrorExImpl,
			ComponentErrors::OperationErrorExImpl,ComponentErrors::CORBAProblemExImpl,ComponentErrors::UnexpectedExImpl,ComponentErrors::CouldntGetComponentExImpl,
			ComponentErrors::CouldntReleaseComponentExImpl,ManagementErrors::BackendProcedureErrorExImpl);
			ComponentErrors::CouldntReleaseComponentExImpl,ManagementErrors::BackendProcedureErrorExImpl,
			ManagementErrors::BackendNotAvailableExImpl);
	
	/**
	 * This method will abort the current scan and force the executor to start from the next one
Loading