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

Last change on this file since 157 was 151, checked in by Sanahuja Guillaume, 5 years ago

add timestamp to simucamera producer

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