source: flair-src/trunk/lib/FlairSensorActuator/src/SimuBldc.h@ 9

Last change on this file since 9 was 3, checked in by Sanahuja Guillaume, 9 years ago

sensoractuator

File size: 2.9 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 SimuBldc.h
7 * \brief Class for a simulation bldc
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/02/07
10 * \version 4.0
11 */
12
13#ifndef SIMUBLDC_H
14#define SIMUBLDC_H
15
16#include <Bldc.h>
17
18namespace flair
19{
20 namespace core
21 {
22 class SharedMem;
23 class IODevice;
24 class cvmatrix;
25 }
26 namespace gui
27 {
28 class DoubleSpinBox;
29 class Layout;
30 }
31}
32
33namespace flair
34{
35namespace actuator
36{
37 /*! \class SimuBldc
38 *
39 * \brief Class for a simulation bldc
40 *
41 */
42 class SimuBldc : public Bldc
43 {
44 public:
45 /*!
46 * \brief Constructor
47 *
48 * Construct a SimuBldc. Control part.
49 *
50 * \param parent parent
51 * \param layout layout
52 * \param name name
53 * \param motors_count number of motors
54 * \param dev_id device id
55 */
56 SimuBldc(const core::IODevice* parent,gui::Layout* layout,std::string name,uint8_t motors_count,uint32_t dev_id);
57
58 /*!
59 * \brief Constructor
60 *
61 * Construct a SimuBldc. Simulation part.
62 *
63 * \param parent parent
64 * \param name name
65 * \param motors_count number of motors
66 * \param dev_id device id
67 */
68 SimuBldc(const core::Object* parent,std::string name,uint8_t motors_count,uint32_t dev_id);
69
70 /*!
71 * \brief Destructor
72 *
73 */
74 ~SimuBldc();
75
76 /*!
77 * \brief Get motors speeds.
78 *
79 * This function should only be used for the simulation part.
80 *
81 * \param value array to store motors speeds
82 */
83 void GetSpeeds(float* value) const;
84
85 /*!
86 * \brief Has speed measurement
87 *
88 * Reimplemented from Bldc. \n
89 *
90 * \return true if it has speed measurement
91 */
92 bool HasSpeedMeasurement(void) const{return false;};
93
94 /*!
95 * \brief Has current measurement
96 *
97 * Reimplemented from Bldc. \n
98 *
99 * \return true if it has current measurement
100 */
101 bool HasCurrentMeasurement(void) const{return false;};
102
103 private:
104 /*!
105 * \brief Set motors values
106 *
107 * Reimplemented from Bldc. \n
108 * Values size must be the same as MotorsCount()
109 *
110 * \param values motor values
111 */
112 void SetMotors(float* value);
113
114 core::SharedMem *shmem;
115 gui::DoubleSpinBox *k;
116 };
117} // end namespace actuator
118} // end namespace flair
119#endif // SIMUBLDC_H
Note: See TracBrowser for help on using the repository browser.