Last change
on this file since 168 was 163, checked in by Marek Kurdej, 12 years ago |
Added: test component from PacpusCityVIP.
Added: PACPUS_BUILD_EXAMPLES variable.
|
File size:
807 bytes
|
Rev | Line | |
---|
[163] | 1 | #ifndef CONSUMEREXAMPLE_H
|
---|
| 2 | #define CONSUMEREXAMPLE_H
|
---|
| 3 |
|
---|
| 4 | #include "ProducerConsumerExampleConfig.h"
|
---|
| 5 |
|
---|
| 6 | #include <fstream>
|
---|
| 7 | #include <Pacpus/kernel/ComponentBase.h>
|
---|
| 8 | #include <QImage>
|
---|
| 9 | #include <QThread>
|
---|
| 10 |
|
---|
| 11 | namespace pacpus {
|
---|
| 12 |
|
---|
| 13 | class PRODUCERCONSUMEREXAMPLE_API ConsumerExample
|
---|
| 14 | : public QObject
|
---|
| 15 | , public ComponentBase
|
---|
| 16 | {
|
---|
| 17 | Q_OBJECT
|
---|
| 18 |
|
---|
| 19 | public:
|
---|
| 20 | ConsumerExample(QString name);
|
---|
| 21 | ~ConsumerExample();
|
---|
| 22 |
|
---|
| 23 | virtual void stopActivity();
|
---|
| 24 | virtual void startActivity();
|
---|
| 25 | virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
|
---|
| 26 | void process(const QImage& matrix);
|
---|
| 27 |
|
---|
| 28 | private:
|
---|
| 29 | virtual void addInputs();
|
---|
| 30 | virtual void addOutputs();
|
---|
| 31 |
|
---|
| 32 | QImage matrix;
|
---|
| 33 | QThread thread;
|
---|
| 34 |
|
---|
| 35 | int m_counter;
|
---|
| 36 | std::ofstream m_file;
|
---|
| 37 | };
|
---|
| 38 |
|
---|
| 39 | } // namespace pacpus
|
---|
| 40 |
|
---|
| 41 | #endif // CONSUMEREXAMPLE_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.