Rev | Line | |
---|
[163] | 1 | /**
|
---|
| 2 | @file
|
---|
| 3 | Purpose: Lidar Detection
|
---|
| 4 |
|
---|
| 5 | @date created 2010-06-03 16:13
|
---|
| 6 | @author Julien Moras
|
---|
| 7 | @version $Id: $
|
---|
| 8 | */
|
---|
| 9 |
|
---|
| 10 | #ifndef PRODUCEREXAMPLE_H
|
---|
| 11 | #define PRODUCEREXAMPLE_H
|
---|
| 12 |
|
---|
| 13 | #include "ProducerConsumerExampleConfig.h"
|
---|
| 14 |
|
---|
| 15 | #include <Pacpus/kernel/ComponentBase.h>
|
---|
| 16 | #include <Pacpus/kernel/road_time.h>
|
---|
| 17 | //#include <Pacpus/structure/genericStructures.h>
|
---|
[291] | 18 |
|
---|
| 19 | #include <boost/asio.hpp>
|
---|
| 20 | #include <boost/date_time/posix_time/posix_time_types.hpp>
|
---|
| 21 | #include <fstream>
|
---|
[163] | 22 | #include <QImage>
|
---|
| 23 |
|
---|
[291] | 24 | namespace pacpus
|
---|
| 25 | {
|
---|
[163] | 26 |
|
---|
| 27 | class PRODUCERCONSUMEREXAMPLE_API ProducerExample
|
---|
[291] | 28 | : public QObject
|
---|
| 29 | , public ComponentBase
|
---|
[163] | 30 | {
|
---|
| 31 | Q_OBJECT
|
---|
| 32 |
|
---|
| 33 | public:
|
---|
| 34 | static const char * COMPONENT_TYPE;
|
---|
| 35 |
|
---|
| 36 | ProducerExample(QString name);
|
---|
| 37 | ~ProducerExample();
|
---|
| 38 |
|
---|
| 39 | virtual void addInputs();
|
---|
| 40 | virtual void addOutputs();
|
---|
| 41 |
|
---|
| 42 | virtual void startActivity();
|
---|
| 43 | virtual void stopActivity();
|
---|
| 44 |
|
---|
| 45 | virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
|
---|
| 46 |
|
---|
[291] | 47 | private:
|
---|
| 48 | void produce(int& counter);
|
---|
[163] | 49 |
|
---|
| 50 | private:
|
---|
[176] | 51 | std::string mOutputFileName;
|
---|
[291] | 52 |
|
---|
| 53 | std::fstream mFile;
|
---|
| 54 | OutputInterface<QImage, ProducerExample>* mImageOutput;
|
---|
| 55 |
|
---|
| 56 | boost::asio::io_service mIo;
|
---|
| 57 | boost::posix_time::time_duration mInterval;
|
---|
| 58 | boost::asio::deadline_timer mTimer;
|
---|
[163] | 59 | };
|
---|
| 60 |
|
---|
| 61 | } // namespace pacpus
|
---|
| 62 |
|
---|
| 63 | #endif // PRODUCEREXAMPLE_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.