1 | /*********************************************************************
|
---|
2 | // created: 2014-11-11 - 10:48
|
---|
3 | // filename: SickComponent.h
|
---|
4 | //
|
---|
5 | // author: Cyril Fougeray
|
---|
6 | // Copyright Heudiasyc UMR UTC/CNRS 6599
|
---|
7 | //
|
---|
8 | // version: $Id: $
|
---|
9 | //
|
---|
10 | // purpose: Declaration of the SickComponent class
|
---|
11 | *********************************************************************/
|
---|
12 |
|
---|
13 | #ifndef SICKCOMPONENT_H
|
---|
14 | #define SICKCOMPONENT_H
|
---|
15 |
|
---|
16 | #include "Pacpus/kernel/ComponentBase.h"
|
---|
17 | #include "Pacpus/kernel/DbiteFile.h"
|
---|
18 |
|
---|
19 | #include <fstream>
|
---|
20 | #include <QThread>
|
---|
21 | #include <string>
|
---|
22 |
|
---|
23 | #include "SickLDMRSSensor.h"
|
---|
24 | #include "SickLMSSensor.h"
|
---|
25 |
|
---|
26 | // Export macro for Sick DLL for Windows only
|
---|
27 | #ifdef WIN32
|
---|
28 | # ifdef SICK_EXPORTS
|
---|
29 | // make DLL
|
---|
30 | # define SICK_API __declspec(dllexport)
|
---|
31 | # else
|
---|
32 | // use DLL
|
---|
33 | # define SICK_API __declspec(dllimport)
|
---|
34 | # endif
|
---|
35 | #else
|
---|
36 | // On other platforms, simply ignore this
|
---|
37 | # define SICK_API
|
---|
38 | #endif
|
---|
39 |
|
---|
40 |
|
---|
41 | class QEvent;
|
---|
42 |
|
---|
43 | namespace pacpus {
|
---|
44 |
|
---|
45 | /**
|
---|
46 | * @brief The SickComponent class
|
---|
47 | *
|
---|
48 | * This class defines a PACPUS component used to acquire Sick lidars data.
|
---|
49 | */
|
---|
50 | class SICK_API SickComponent
|
---|
51 | : public QThread
|
---|
52 | , public ComponentBase
|
---|
53 | {
|
---|
54 | Q_OBJECT
|
---|
55 |
|
---|
56 | public:
|
---|
57 | /// Constructor
|
---|
58 | SickComponent(QString name);
|
---|
59 |
|
---|
60 | /// Destructor
|
---|
61 | ~SickComponent();
|
---|
62 |
|
---|
63 | void run() {}
|
---|
64 |
|
---|
65 | virtual void stopActivity(); /*!< To stop the processing thread */
|
---|
66 | virtual void startActivity(); /*!< To start the processing thread */
|
---|
67 |
|
---|
68 | /**
|
---|
69 | * @brief Configure compenent.
|
---|
70 | * @param config XML file passed in order to configure the Sick Component.
|
---|
71 | *
|
---|
72 | * This function instanciate every sensor configured through the XML file.
|
---|
73 | * The XML file must be formated as expected by this function, see [annexe TODO]{TODO}.
|
---|
74 | */
|
---|
75 | virtual ComponentBase::COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
|
---|
76 |
|
---|
77 | SickComponent * myParent;
|
---|
78 |
|
---|
79 | private:
|
---|
80 | //! Vector of the different sensors used.
|
---|
81 | std::vector<AbstractSickSensor*> *S_sensors;
|
---|
82 | };
|
---|
83 |
|
---|
84 | } // namespace pacpus
|
---|
85 |
|
---|
86 | #endif // SICKCOMPONENT_H
|
---|