void FileWriterComponent::processMessageFromBelow(boost::shared_ptr<StackDataSet> set) { LOG(LDEBUG) << "FileWriter::processMessageFromBelow() called."; if(fromBelow_x) { writeBlock(set); } sendUpwards(set); }
void FileReaderComponent::fileReadingLoop() { boost::this_thread::sleep(boost::posix_time::milliseconds(100)); try { while(running_) { if(enabled_x) { boost::shared_ptr<StackDataSet> readDataBuffer(new StackDataSet); readBlock(readDataBuffer); if(++count_ == packets_x) running_ = false; if(sendBelow_x) { sendDownwards(readDataBuffer); } else { sendUpwards(readDataBuffer); } } else { boost::this_thread::sleep(boost::posix_time::milliseconds(1)); } boost::this_thread::interruption_point(); boost::this_thread::sleep(boost::posix_time::milliseconds(delay_x)); } } catch(IrisException& ex) { LOG(LFATAL) << "Error in FileReader component: " << ex.what() << " - file reading thread exiting."; } }
/*! Process a message from below * * This example just passes data through. */ void FileReaderComponent::processMessageFromBelow(boost::shared_ptr<StackDataSet> set) { sendUpwards(set); }