Commit cb18065e authored by Giuseppe Carboni's avatar Giuseppe Carboni Committed by GitHub
Browse files

Fix issue 392 (#406)

* Fix #392, delayed coordinates request from FitsWriter::getFakeDump

* Fix #392, moved the delay parameter into CDB
parent c27b7f3e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@
	 <xs:attribute name="TrackingFlagDutyCycle" type="xs:unsignedLong" use="required" />
	 <!-- limit the enquire rate to the minor servo subsystem. It is the minimum time between two enquires (microseconds) -->
	 <xs:attribute name="MinorServoEnquireMinGap" type="xs:unsignedLong" use="required" />	
	 <!-- this time set the time delay used when generating fake timestamps (microseconds) -->
	 <xs:attribute name="FakeDataTimeDelay" type="xs:unsignedLong" use="required" />
	 <!-- the interface of the component that leads the Antenna subsystem -->
	 <xs:attribute name="AntennaBossInterface" type="xs:string" use="required" />
	 <!-- the interface of component that stores observatory information -->
+7 −1
Original line number Diff line number Diff line
@@ -64,6 +64,11 @@ public:
	*/
	const long& getRepetitionCacheTime() const { return m_repetitionCacheTime; }
	
	/**
	 * @return the number of microseconds to be applied when generating timestamps in fake mode
	*/
	const long& getFakeDataTimeDelay() const { return m_fakeDataTimeDelay; }

	/**
	 * @return the number of microseconds that the log filter will take as expiration time for a log message
	*/
@@ -119,6 +124,7 @@ private:
	long m_meteoParameterDutyCycle;
	long m_trackingFlagDutyCycle;
	long m_minorServoEnquireMinGap;
	long m_fakeDataTimeDelay;
	IRA::CString m_antennaBossComp;
	IRA::CString m_observatoryComp;
	IRA::CString m_receiversBossComp;
+1 −1
Original line number Diff line number Diff line
@@ -388,7 +388,7 @@ public:
	 * greater than the <i>m_stopTime</i>.
	 *
	 */
	bool getFakeDump(ACS::Time& time,bool& calOn,char *& memory,char *& buffer,bool& tracking,long& buffSize);
	bool getFakeDump(ACS::Time& time,const long& delay,bool& calOn,char *& memory,char *& buffer,bool& tracking,long& buffSize);
	
	/**
	 * return the size of the dump buffer
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ void CConfiguration::init(maci::ContainerServices *Services) throw (ComponentErr
	_GET_DWORD_ATTRIBUTE("MeteoParameterDutyCycle","Weather sensor enquire gap  (uSec)",m_meteoParameterDutyCycle);
	_GET_DWORD_ATTRIBUTE("TrackingFlagDutyCycle","Tracking flag enquire gap  (uSec)",m_trackingFlagDutyCycle);
	_GET_DWORD_ATTRIBUTE("MinorServoEnquireMinGap","Minor Servo enquire gap  (uSec)",m_minorServoEnquireMinGap);
	_GET_DWORD_ATTRIBUTE("FakeDataTimeDelay","Time delay if fake timestamps generation  (uSec)",m_fakeDataTimeDelay);
	_GET_STRING_ATTRIBUTE("AntennaBossInterface","Antenna Boss component interface is ",m_antennaBossComp);
	_GET_STRING_ATTRIBUTE("ObservatoryInterface","Observatory component is ",m_observatoryComp);
	_GET_STRING_ATTRIBUTE("ReceiversBossInterface","Receivers Boss component interface is ",m_receiversBossComp);
+2 −1
Original line number Diff line number Diff line
@@ -228,13 +228,14 @@ long CDataCollection::getDumpCollectionSize()
	return m_dumpCollection.getCollectionSize();
}

bool CDataCollection::getFakeDump(ACS::Time& time,bool& calOn,char *& memory,char *& buffer,bool& tracking,long& buffSize)
bool CDataCollection::getFakeDump(ACS::Time& time,const long& delay,bool& calOn,char *& memory,char *& buffer,bool& tracking,long& buffSize)
{
	long size=0;
	TIMEVALUE clock;
	ACS::Time now;
	IRA::CIRATools::getTime(clock);
	now=clock.value().value;
	now-=delay*10;
	//IRA::CString outString;
	//IRA::CIRATools::timeToStr(now,outString);
	//cout << "current time " << (const char *) outString << endl;
Loading