source: pacpusframework/branches/0.1.x/examples/ProducerConsumerExample/ConsumerExample.h@ 361

Last change on this file since 361 was 163, checked in by Marek Kurdej, 11 years ago

Added: test component from PacpusCityVIP.
Added: PACPUS_BUILD_EXAMPLES variable.

File size: 807 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 <QThread>
10
11namespace pacpus {
12
13class PRODUCERCONSUMEREXAMPLE_API ConsumerExample
14 : public QObject
15 , public ComponentBase
16{
17 Q_OBJECT
18
19public:
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
28private:
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.