Commit ceec876a authored by yannick legoc's avatar yannick legoc
Browse files

Added sleepTimeMS to remote dpp live process controllers.

parent ee64cc8d
...@@ -45,7 +45,6 @@ RemoteDPPCoincidence::RemoteDPPCoincidence(const std::string& name) : ...@@ -45,7 +45,6 @@ RemoteDPPCoincidence::RemoteDPPCoincidence(const std::string& name) :
detectorChannel.init(this, SAVE, "detector_channel"); detectorChannel.init(this, SAVE, "detector_channel");
coincidenceResolution.init(this, SAVE, "coincidence_resolution"); coincidenceResolution.init(this, SAVE, "coincidence_resolution");
maxBlock.init(this, SAVE, "max_block"); maxBlock.init(this, SAVE, "max_block");
refreshTimeS.init(this, SAVE, "refresh_time_s");
totalNumberOfChannels.init(this, NOSAVE, "total_number_of_channels"); totalNumberOfChannels.init(this, NOSAVE, "total_number_of_channels");
nOrder.init(this, NOSAVE, "n_order"); nOrder.init(this, NOSAVE, "n_order");
......
...@@ -54,7 +54,6 @@ private: ...@@ -54,7 +54,6 @@ private:
DynamicProperty<int32> detectorChannel; DynamicProperty<int32> detectorChannel;
Property<int32> coincidenceResolution; Property<int32> coincidenceResolution;
Property<int32> maxBlock; Property<int32> maxBlock;
Property<int32> refreshTimeS;
Property<int32> totalNumberOfChannels; Property<int32> totalNumberOfChannels;
......
...@@ -44,7 +44,6 @@ RemoteDPPHistogram::RemoteDPPHistogram(const std::string& name) : ...@@ -44,7 +44,6 @@ RemoteDPPHistogram::RemoteDPPHistogram(const std::string& name) :
delay.init(this, SAVE, "delay"); delay.init(this, SAVE, "delay");
dT.init(this, SAVE, "dT"); dT.init(this, SAVE, "dT");
maxBlock.init(this, SAVE, "max_block"); maxBlock.init(this, SAVE, "max_block");
refreshTimeS.init(this, SAVE, "refresh_time_s");
totalNumberOfChannels.init(this, NOSAVE, "total_number_of_channels"); totalNumberOfChannels.init(this, NOSAVE, "total_number_of_channels");
crateId.init(this, NOSAVE, "crate_id"); crateId.init(this, NOSAVE, "crate_id");
......
...@@ -53,7 +53,6 @@ private: ...@@ -53,7 +53,6 @@ private:
Property<int32> delay; Property<int32> delay;
Property<int32> dT; Property<int32> dT;
Property<int32> maxBlock; Property<int32> maxBlock;
Property<int32> refreshTimeS;
Property<int32> totalNumberOfChannels; Property<int32> totalNumberOfChannels;
......
...@@ -39,6 +39,8 @@ RemoteDPPLiveProcess::RemoteDPPLiveProcess(const std::string& name) : ...@@ -39,6 +39,8 @@ RemoteDPPLiveProcess::RemoteDPPLiveProcess(const std::string& name) :
blockSize.init(this, SAVE, "block_size"); blockSize.init(this, SAVE, "block_size");
mode.init(this, SAVE, "mode"); mode.init(this, SAVE, "mode");
testFileName.init(this, SAVE, "test_file_name"); testFileName.init(this, SAVE, "test_file_name");
refreshTimeS.init(this, SAVE, "refresh_time_s");
sleepTimeMS.init(this, SAVE, "sleep_time_ms");
} }
RemoteDPPLiveProcess::RemoteDPPLiveProcess(const RemoteDPPLiveProcess& controller) : RemoteDPPLiveProcess::RemoteDPPLiveProcess(const RemoteDPPLiveProcess& controller) :
...@@ -123,16 +125,16 @@ void RemoteDPPLiveProcess::fileReadingLoop() { ...@@ -123,16 +125,16 @@ void RemoteDPPLiveProcess::fileReadingLoop() {
// Send the data // Send the data
m_publisher->sendBinary(data); m_publisher->sendBinary(data);
//sleep(refreshTimeS()); // Sleep for milliseconds.
usleep(10000); boost::this_thread::sleep(boost::posix_time::milliseconds(sleepTimeMS()));
} }
cout << "controller has stopped" << endl; cout << "controller has stopped" << endl;
m_publisher->sendEnd(); m_publisher->sendEnd();
cout << "finished reading file" << endl; cout << "finished reading file" << endl;
} }
} }
std::auto_ptr<boost::thread> RemoteDPPLiveProcess::startFileReading() { std::auto_ptr<boost::thread> RemoteDPPLiveProcess::startFileReading() {
......
...@@ -51,6 +51,8 @@ protected: ...@@ -51,6 +51,8 @@ protected:
Property<int32> blockSize; Property<int32> blockSize;
Property<std::string> mode; Property<std::string> mode;
Property<std::string> testFileName; Property<std::string> testFileName;
Property<int32> refreshTimeS;
Property<int32> sleepTimeMS;
std::auto_ptr<cameo::Server> m_server; std::auto_ptr<cameo::Server> m_server;
std::auto_ptr<cameo::application::Publisher> m_publisher; std::auto_ptr<cameo::application::Publisher> m_publisher;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment