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>
|
---|
[176] | 9 | #include <string>
|
---|
[163] | 10 |
|
---|
[288] | 11 | namespace pacpus
|
---|
| 12 | {
|
---|
[163] | 13 |
|
---|
| 14 | class PRODUCERCONSUMEREXAMPLE_API ConsumerExample
|
---|
[288] | 15 | : public QObject
|
---|
| 16 | , public ComponentBase
|
---|
[163] | 17 | {
|
---|
| 18 | Q_OBJECT
|
---|
| 19 |
|
---|
| 20 | public:
|
---|
| 21 | ConsumerExample(QString name);
|
---|
| 22 | ~ConsumerExample();
|
---|
| 23 |
|
---|
| 24 | virtual void stopActivity();
|
---|
| 25 | virtual void startActivity();
|
---|
| 26 | virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
|
---|
| 27 | void process(const QImage& matrix);
|
---|
| 28 |
|
---|
| 29 | private:
|
---|
| 30 | virtual void addInputs();
|
---|
| 31 | virtual void addOutputs();
|
---|
| 32 |
|
---|
| 33 | QImage matrix;
|
---|
| 34 |
|
---|
| 35 | int m_counter;
|
---|
| 36 | std::ofstream m_file;
|
---|
[176] | 37 |
|
---|
| 38 | std::string mOutputFileName;
|
---|
[163] | 39 | };
|
---|
| 40 |
|
---|
| 41 | } // namespace pacpus
|
---|
| 42 |
|
---|
| 43 | #endif // CONSUMEREXAMPLE_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.