source: flair-src/trunk/lib/FlairSensorActuator/src/SimuCamera.h@ 63

Last change on this file since 63 was 15, checked in by Bayard Gildas, 9 years ago

sources reformatted with flair-format-dir script

File size: 2.1 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 {
21namespace core {
22class SharedMem;
23}
24namespace gui {
25class SpinBox;
26}
27}
28
29namespace flair {
30namespace sensor {
31/*! \class SimuCamera
32*
33* \brief Class for a simulation camera
34*/
35class SimuCamera : public core::Thread, public Camera {
36public:
37 /*!
38 * \brief Constructor
39 *
40 * Construct a SimuCamera. Control part.
41 *
42 * \param parent parent
43 * \param name name
44 * \param width width
45 * \param height height
46 * \param channels number of channels
47 * \param dev_id device id
48 * \param priority priority of the Thread
49 */
50 SimuCamera(const core::FrameworkManager *parent, std::string name,
51 uint16_t width, uint16_t height, uint8_t channels, uint32_t dev_id,
52 uint8_t priority);
53
54 /*!
55 * \brief Constructor
56 *
57 * Construct a SimuCamera. Simulation part.\n
58 * The Thread of this class should not be run.
59 *
60 * \param parent parent
61 * \param name name
62 * \param width width
63 * \param height height
64 * \param channels number of channels
65 * \param dev_id device id
66 */
67 SimuCamera(const core::IODevice *parent, std::string name, uint16_t width,
68 uint16_t height, uint8_t channels, uint32_t dev_id);
69
70 /*!
71 * \brief Destructor
72 *
73 */
74 ~SimuCamera();
75
76protected:
77 /*!
78 * \brief SharedMem to access datas
79 *
80 */
81 core::SharedMem *shmem;
82
83private:
84 /*!
85 * \brief Run function
86 *
87 * Reimplemented from Thread.
88 *
89 */
90 void Run(void);
91
92 /*!
93 * \brief Update using provided datas
94 *
95 * Reimplemented from IODevice.
96 *
97 * \param data data from the parent to process
98 */
99 void UpdateFrom(const core::io_data *data){};
100
101 gui::SpinBox *data_rate;
102 size_t buf_size;
103 IplImage *img;
104};
105} // end namespace sensor
106} // end namespace flair
107#endif // SIMUCAMERA_H
Note: See TracBrowser for help on using the repository browser.