source: flair-dev/trunk/include/FlairSensorActuator/SimuCamera.h@ 11

Last change on this file since 11 was 4, checked in by Sanahuja Guillaume, 9 years ago

sensoractuator

File size: 2.7 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file SimuCamera.h
7 * \brief Class for a simulation camera
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/03/06
10 * \version 4.0
11 */
12
13#ifndef SIMUCAMERA_H
14#define SIMUCAMERA_H
15
16#include <Camera.h>
17#include <Thread.h>
18#include <cxcore.h>
19
20namespace flair
21{
22 namespace core
23 {
24 class SharedMem;
25 }
26 namespace gui
27 {
28 class SpinBox;
29 }
30}
31
32namespace flair
33{
34namespace sensor
35{
36 /*! \class SimuCamera
37 *
38 * \brief Class for a simulation camera
39 */
40 class SimuCamera : public core::Thread, public Camera
41 {
42 public:
43 /*!
44 * \brief Constructor
45 *
46 * Construct a SimuCamera. Control part.
47 *
48 * \param parent parent
49 * \param name name
50 * \param width width
51 * \param height height
52 * \param channels number of channels
53 * \param dev_id device id
54 * \param priority priority of the Thread
55 */
56 SimuCamera(const core::FrameworkManager* parent,std::string name,uint16_t width,uint16_t height,uint8_t channels,uint32_t dev_id,uint8_t priority);
57
58 /*!
59 * \brief Constructor
60 *
61 * Construct a SimuCamera. Simulation part.\n
62 * The Thread of this class should not be run.
63 *
64 * \param parent parent
65 * \param name name
66 * \param width width
67 * \param height height
68 * \param channels number of channels
69 * \param dev_id device id
70 */
71 SimuCamera(const core::IODevice* parent,std::string name,uint16_t width,uint16_t height,uint8_t channels,uint32_t dev_id);
72
73 /*!
74 * \brief Destructor
75 *
76 */
77 ~SimuCamera();
78
79 protected:
80 /*!
81 * \brief SharedMem to access datas
82 *
83 */
84 core::SharedMem *shmem;
85
86 private:
87 /*!
88 * \brief Run function
89 *
90 * Reimplemented from Thread.
91 *
92 */
93 void Run(void);
94
95 /*!
96 * \brief Update using provided datas
97 *
98 * Reimplemented from IODevice.
99 *
100 * \param data data from the parent to process
101 */
102 void UpdateFrom(const core::io_data *data){};
103
104 gui::SpinBox *data_rate;
105 size_t buf_size;
106 IplImage* img;
107 };
108} // end namespace sensor
109} // end namespace flair
110#endif // SIMUCAMERA_H
Note: See TracBrowser for help on using the repository browser.