source: flair-src/trunk/lib/FlairSensorActuator/src/SimulatedCamera.h@ 315

Last change on this file since 315 was 286, checked in by Sanahuja Guillaume, 6 years ago

draw vrpn axis in simulator

File size: 1.8 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 SimulatedCamera.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 SIMULATEDCAMERA_H
14#define SIMULATEDCAMERA_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 SimulatedCamera
29*
30* \brief Class for a simulation camera
31*/
32class SimulatedCamera : public core::Thread, public Camera {
33public:
34 /*!
35 * \brief Constructor
36 *
37 * Construct a SimulatedCamera.
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 modelId Model id
45 * \param deviceId Camera id of the Model
46 * \param priority priority of the Thread
47 */
48 SimulatedCamera(std::string name,
49 uint16_t width, uint16_t height, uint8_t channels, uint32_t modelId,uint32_t deviceId,
50 uint8_t priority);
51
52
53 /*!
54 * \brief Destructor
55 *
56 */
57 ~SimulatedCamera();
58
59protected:
60 /*!
61 * \brief SharedMem to access datas
62 *
63 */
64 core::SharedMem *shmem;
65
66private:
67 /*!
68 * \brief Run function
69 *
70 * Reimplemented from Thread.
71 *
72 */
73 void Run(void);
74
75 /*!
76 * \brief Update using provided datas
77 *
78 * Reimplemented from IODevice.
79 *
80 * \param data data from the parent to process
81 */
82 void UpdateFrom(const core::io_data *data){};
83
84 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
85
86 size_t buf_size;
87 char* shmemReadBuf;
88};
89} // end namespace sensor
90} // end namespace flair
91#endif // SIMULATEDCAMERA_H
Note: See TracBrowser for help on using the repository browser.