source: pacpusframework/trunk/examples/ProducerConsumerExample/ConsumerExample.h@ 291

Last change on this file since 291 was 291, checked in by Marek Kurdej, 10 years ago

Reworked threading in InputInterfaceBase, each slot has its own processing thread.

File size: 812 bytes
Line 
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 <string>
10
11namespace pacpus
12{
13
14class PRODUCERCONSUMEREXAMPLE_API ConsumerExample
15 : public QObject
16 , public ComponentBase
17{
18 Q_OBJECT
19
20public:
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
29private:
30 virtual void addInputs();
31 virtual void addOutputs();
32
33 QImage matrix;
34
35 int m_counter;
36 std::ofstream m_file;
37
38 std::string mOutputFileName;
39};
40
41} // namespace pacpus
42
43#endif // CONSUMEREXAMPLE_H
Note: See TracBrowser for help on using the repository browser.