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

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

use less bandwidth in vprnlite

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