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

Last change on this file since 158 was 158, checked in by Sanahuja Guillaume, 7 years ago

corrected simu/device id for sensors

File size: 2.2 KB
RevLine 
[3]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[3]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
[15]20namespace flair {
[144]21 namespace core {
22 class SharedMem;
23 }
[3]24}
25
[15]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.
[137]38 * It will be child of the FrameworkManager.
[15]39 *
40 * \param name name
41 * \param width width
42 * \param height height
43 * \param channels number of channels
[158]44 * \param modelId Model id
45 * \param deviceId Camera id of the Model
[15]46 * \param priority priority of the Thread
47 */
[137]48 SimuCamera(std::string name,
[158]49 uint16_t width, uint16_t height, uint8_t channels, uint32_t modelId,uint32_t deviceId,
[15]50 uint8_t priority);
[3]51
[15]52 /*!
53 * \brief Constructor
54 *
55 * Construct a SimuCamera. Simulation part.\n
56 * The Thread of this class should not be run.
57 *
58 * \param parent parent
59 * \param name name
60 * \param width width
61 * \param height height
62 * \param channels number of channels
[158]63 * \param modelId Model id
64 * \param deviceId Camera id of the Model
[15]65 */
66 SimuCamera(const core::IODevice *parent, std::string name, uint16_t width,
[158]67 uint16_t height, uint8_t channels, uint32_t modelId,uint32_t deviceId);
[3]68
[15]69 /*!
70 * \brief Destructor
71 *
72 */
73 ~SimuCamera();
[3]74
[15]75protected:
76 /*!
77 * \brief SharedMem to access datas
78 *
79 */
80 core::SharedMem *shmem;
[3]81
[15]82private:
83 /*!
84 * \brief Run function
85 *
86 * Reimplemented from Thread.
87 *
88 */
89 void Run(void);
[3]90
[15]91 /*!
92 * \brief Update using provided datas
93 *
94 * Reimplemented from IODevice.
95 *
96 * \param data data from the parent to process
97 */
98 void UpdateFrom(const core::io_data *data){};
[158]99
100 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
[3]101
[15]102 size_t buf_size;
[151]103 char* shmemReadBuf;
[15]104};
[3]105} // end namespace sensor
106} // end namespace flair
107#endif // SIMUCAMERA_H
Note: See TracBrowser for help on using the repository browser.