Commit 092e1824 authored by Marco De Marco's avatar Marco De Marco
Browse files

Ignore files, pre and post process added

parent 13e70b66
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -23,12 +23,12 @@ private:
//------------------------------------------------------------------------------
	Configuration(std::string watchPath, std::string regularPath,
		std::string warningPath, std::string errorPath, std::string scriptPath,
		int workerNumber, int sleepTime, int waitTime, uint32_t iNotifyMask,
        bool ignoreTimeout) : m_watchPath(watchPath), m_regularPath(regularPath),
		int workerNumber, int sleepTime, int waitTime, uint32_t iNotifyMask) :
		m_watchPath(watchPath), m_regularPath(regularPath),
        m_warningPath(warningPath), m_errorPath(errorPath),
        m_scriptPath(scriptPath), m_workerNumber(workerNumber),
        m_sleepTime(sleepTime), m_waitTime(waitTime),
        m_iNotifyMask(iNotifyMask), m_ignoreTimeout(ignoreTimeout) { }
        m_iNotifyMask(iNotifyMask) { }

	virtual ~Configuration() {}

@@ -47,11 +47,11 @@ public:
	static Configuration::SP create(std::string watchPath,
		std::string regularPath, std::string warningPath, std::string errorPath,
        std::string scriptPath, int workerNumber, int sleepTime, int waitTime,
        uint32_t iNotifyMask, bool ignoreTimeout)
        uint32_t iNotifyMask)
	{
		Configuration::SP c_sp(new Configuration(watchPath, regularPath,
			warningPath, errorPath, scriptPath, workerNumber, sleepTime,
			waitTime, iNotifyMask, ignoreTimeout), Configuration::Deleter());
			waitTime, iNotifyMask), Configuration::Deleter());

		return c_sp;
	}
@@ -65,7 +65,6 @@ public:
    unsigned int getSleepTime() const { return m_sleepTime; }
	unsigned int getWaitTime() const { return m_waitTime; }
	uint32_t getINotifyMask() const { return m_iNotifyMask; }
	bool getIgnoreTimeout() const { return m_ignoreTimeout; }

private:
//------------------------------------------------------------------------------
@@ -97,9 +96,6 @@ private:

	//INotify mask
	const uint32_t m_iNotifyMask;

	//Ignore timeout
	const bool m_ignoreTimeout;
};

}   //End of namespace
+5 −17
Original line number Diff line number Diff line
@@ -229,7 +229,6 @@ void PreProcessor::get_device_property()
	dev_prop.push_back(Tango::DbDatum("SleepTime"));
	dev_prop.push_back(Tango::DbDatum("WaitTime"));
	dev_prop.push_back(Tango::DbDatum("WorkerNumber"));
	dev_prop.push_back(Tango::DbDatum("IgnoreTimeout"));
	dev_prop.push_back(Tango::DbDatum("AutoStart"));


@@ -345,17 +344,6 @@ void PreProcessor::get_device_property()
		//	And try to extract WorkerNumber value from database
		if (dev_prop[i].is_empty()==false)	dev_prop[i]  >>  workerNumber;

		//	Try to initialize IgnoreTimeout from class property
		cl_prop = ds_class->get_class_property(dev_prop[++i].name);
		if (cl_prop.is_empty()==false)	cl_prop  >>  ignoreTimeout;
		else {
			//	Try to initialize IgnoreTimeout from default device value
			def_prop = ds_class->get_default_device_property(dev_prop[i].name);
			if (def_prop.is_empty()==false)	def_prop  >>  ignoreTimeout;
		}
		//	And try to extract IgnoreTimeout value from database
		if (dev_prop[i].is_empty()==false)	dev_prop[i]  >>  ignoreTimeout;

		//	Try to initialize AutoStart from class property
		cl_prop = ds_class->get_class_property(dev_prop[++i].name);
		if (cl_prop.is_empty()==false)	cl_prop  >>  autoStart;
@@ -418,7 +406,7 @@ void PreProcessor::get_device_property()
            throw(invalid_argument("WorkerNumber property out of range or not defined"));

        m_configuration_sp = Configuration::create(watchPath, regularPath, warningPath,
			errorPath, scriptPath, workerNumber, sleepTime, waitTime, inotifyMask, ignoreTimeout);
			errorPath, scriptPath, workerNumber, sleepTime, waitTime, inotifyMask);
    }
    catch(invalid_argument& ex)
    {
@@ -439,7 +427,7 @@ void PreProcessor::get_device_property()
//--------------------------------------------------------
void PreProcessor::always_executed_hook()
{
	INFO_STREAM << "PreProcessor::always_executed_hook()  " << device_name << endl;
	DEBUG_STREAM << "PreProcessor::always_executed_hook()  " << device_name << endl;
	/*----- PROTECTED REGION ID(PreProcessor::always_executed_hook) ENABLED START -----*/

	if(get_state() != Tango::FAULT)
+0 −4
Original line number Diff line number Diff line
@@ -120,10 +120,6 @@ public:
	Tango::DevUShort	waitTime;
	//	WorkerNumber:
	Tango::DevUShort	workerNumber;
	//	IgnoreTimeout:	Behaviour for missing end of file after timeout case:
	//  true = process those files like regulars files
	//  false = process those files like erroneous files
	Tango::DevBoolean	ignoreTimeout;
	//	AutoStart:	Exec On command after init if state is not fault
	Tango::DevBoolean	autoStart;

+0 −5
Original line number Diff line number Diff line
@@ -41,11 +41,6 @@
      <type xsi:type="pogoDsl:UShortType"/>
      <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
    </deviceProperties>
	<deviceProperties name="IgnoreTimeout" description="Behaviour for missing end of file after timeout case: &#xA;true = process those files like regulars files&#xA;false = process those files like erroneous files">
		<type xsi:type="pogoDsl:BooleanType"/>
		<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
		<DefaultPropValue>false</DefaultPropValue>
	</deviceProperties>
    <deviceProperties name="AutoStart" description="Exec On command after init if state is not fault">
      <type xsi:type="pogoDsl:BooleanType"/>
      <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
+0 −14
Original line number Diff line number Diff line
@@ -395,20 +395,6 @@ void PreProcessorClass::set_default_property()
		dev_def_prop.push_back(data);
		add_wiz_dev_prop(prop_name, prop_desc,  prop_def);
	}
	else
		add_wiz_dev_prop(prop_name, prop_desc);
	prop_name = "IgnoreTimeout";
	prop_desc = "Behaviour for missing end of file after timeout case: \ntrue = process those files like regulars files\nfalse = process those files like erroneous files";
	prop_def  = "false";
	vect_data.clear();
	vect_data.push_back("false");
	if (prop_def.length()>0)
	{
		Tango::DbDatum	data(prop_name);
		data << vect_data ;
		dev_def_prop.push_back(data);
		add_wiz_dev_prop(prop_name, prop_desc,  prop_def);
	}
	else
		add_wiz_dev_prop(prop_name, prop_desc);
	prop_name = "AutoStart";
Loading