[4] | 1 | // %flair:license{
|
---|
[13] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[4] | 4 | // %flair:license}
|
---|
| 5 | /*!
|
---|
| 6 | * \file SimuUs.h
|
---|
| 7 | * \brief Class for a simulation UsRangeFinder
|
---|
| 8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 9 | * \date 2014/02/07
|
---|
| 10 | * \version 4.0
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef SIMULASER_H
|
---|
| 14 | #define SIMULASER_H
|
---|
| 15 |
|
---|
| 16 | #include <LaserRangeFinder.h>
|
---|
| 17 | #include <Thread.h>
|
---|
| 18 |
|
---|
[13] | 19 | namespace flair {
|
---|
| 20 | namespace core {
|
---|
| 21 | class SharedMem;
|
---|
[4] | 22 | }
|
---|
[13] | 23 | namespace gui {
|
---|
| 24 | class SpinBox;
|
---|
| 25 | }
|
---|
| 26 | }
|
---|
[4] | 27 |
|
---|
[13] | 28 | namespace flair {
|
---|
| 29 | namespace sensor {
|
---|
| 30 | /*! \class SimuUs
|
---|
| 31 | *
|
---|
| 32 | * \brief Class for a simulation UsRangeFinder
|
---|
| 33 | */
|
---|
| 34 | class SimuLaser : public core::Thread, public LaserRangeFinder {
|
---|
| 35 | public:
|
---|
| 36 | /*!
|
---|
| 37 | * \brief Constructor
|
---|
| 38 | *
|
---|
| 39 | * Construct a SimuUs. Control part.
|
---|
| 40 | *
|
---|
| 41 | * \param parent parent
|
---|
| 42 | * \param name name
|
---|
| 43 | * \param dev_id device id
|
---|
| 44 | * \param priority priority of the Thread
|
---|
| 45 | */
|
---|
| 46 | SimuLaser(const core::FrameworkManager *parent, std::string name,
|
---|
| 47 | uint32_t dev_id, uint8_t priority);
|
---|
[4] | 48 |
|
---|
[13] | 49 | /*!
|
---|
| 50 | * \brief Constructor
|
---|
| 51 | *
|
---|
| 52 | * Construct a SimuUs. Simulation part.\n
|
---|
| 53 | * The Thread of this class should not be run.
|
---|
| 54 | *
|
---|
| 55 | * \param parent parent
|
---|
| 56 | * \param name name
|
---|
| 57 | * \param dev_id device id
|
---|
| 58 | */
|
---|
| 59 | SimuLaser(const core::IODevice *parent, std::string name, uint32_t dev_id);
|
---|
[4] | 60 |
|
---|
[13] | 61 | /*!
|
---|
| 62 | * \brief Destructor
|
---|
| 63 | *
|
---|
| 64 | */
|
---|
| 65 | ~SimuLaser();
|
---|
[4] | 66 |
|
---|
[13] | 67 | protected:
|
---|
| 68 | /*!
|
---|
| 69 | * \brief SharedMem to access datas
|
---|
| 70 | *
|
---|
| 71 | */
|
---|
| 72 | core::SharedMem *shmem;
|
---|
[4] | 73 |
|
---|
[13] | 74 | private:
|
---|
| 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){};
|
---|
[4] | 83 |
|
---|
[13] | 84 | /*!
|
---|
| 85 | * \brief Run function
|
---|
| 86 | *
|
---|
| 87 | * Reimplemented from Thread.
|
---|
| 88 | *
|
---|
| 89 | */
|
---|
| 90 | void Run(void);
|
---|
[4] | 91 |
|
---|
[13] | 92 | gui::SpinBox *data_rate;
|
---|
| 93 | };
|
---|
[4] | 94 | } // end namespace sensor
|
---|
| 95 | } // end namespace flair
|
---|
| 96 | #endif // SIMULASER_H
|
---|