Last change
on this file since 91 was 89, checked in by morasjul, 12 years ago |
PACPUS 2.0 Beta deployed in new branch
Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | /**
|
---|
2 | @file
|
---|
3 | Purpose: Lidar Detection
|
---|
4 |
|
---|
5 | @date created 2010-06-03 16:13
|
---|
6 | @author Julien Moras
|
---|
7 | @author Sergio Rodriguez
|
---|
8 | @version $Id: $
|
---|
9 | */
|
---|
10 |
|
---|
11 | #ifndef TestComponent1_H
|
---|
12 | #define TestComponent1_H
|
---|
13 |
|
---|
14 | #include <Pacpus/kernel/ComponentBase.h>
|
---|
15 | #include <Pacpus/kernel/inputOutputInterface.h>
|
---|
16 |
|
---|
17 | #include <QThread>
|
---|
18 | #include <QImage>
|
---|
19 |
|
---|
20 | #include <Pacpus/kernel/road_time.h>
|
---|
21 | #include <Pacpus/PacpusTools/pacpusStruct.h>
|
---|
22 | #include "Pacpus/structure/genericStructures.h"
|
---|
23 |
|
---|
24 | namespace pacpus {
|
---|
25 |
|
---|
26 | typedef unsigned long long timestamp_t;
|
---|
27 |
|
---|
28 | static timestamp_t get_timestamp ()
|
---|
29 | {
|
---|
30 | struct timeval now;
|
---|
31 | gettimeofday (&now, NULL);
|
---|
32 | return now.tv_usec + (timestamp_t)now.tv_sec * 1000000;
|
---|
33 | }
|
---|
34 |
|
---|
35 | //class PacpusImage : public PacpusTimeStampedData {
|
---|
36 | //public :
|
---|
37 | // QImage image;
|
---|
38 | //};
|
---|
39 |
|
---|
40 |
|
---|
41 | class TestComponent2;
|
---|
42 |
|
---|
43 | class TestComponent1
|
---|
44 | : public QThread
|
---|
45 | , public ComponentBase
|
---|
46 | {
|
---|
47 | Q_OBJECT
|
---|
48 |
|
---|
49 | public:
|
---|
50 | static const char * COMPONENT_TYPE;
|
---|
51 |
|
---|
52 | TestComponent1(QString name);
|
---|
53 | ~TestComponent1();
|
---|
54 |
|
---|
55 | virtual void stopActivity();
|
---|
56 | virtual void startActivity();
|
---|
57 | virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
|
---|
58 |
|
---|
59 | protected:
|
---|
60 |
|
---|
61 | void run();
|
---|
62 |
|
---|
63 |
|
---|
64 | public Q_SLOTS:
|
---|
65 |
|
---|
66 |
|
---|
67 | private:
|
---|
68 | //QThread thread;
|
---|
69 |
|
---|
70 |
|
---|
71 | };
|
---|
72 |
|
---|
73 | } // namespace pacpus
|
---|
74 |
|
---|
75 | #endif // TestComponent1_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.