source: flair-src/trunk/lib/FlairSensorActuator/src/SimulatedBldc.h@ 384

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

add servos

File size: 1.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 SimulatedBldc.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 SIMULATEDBLDC_H
14#define SIMULATEDBLDC_H
15
16#include <Bldc.h>
17
18namespace flair {
19namespace core {
20class SharedMem;
21class IODevice;
22}
23namespace gui {
24class DoubleSpinBox;
25class Layout;
26}
27}
28
29namespace flair {
30namespace actuator {
31/*! \class SimulatedBldc
32*
33* \brief Class for a simulation bldc
34*
35*/
36class SimulatedBldc : public Bldc {
37public:
38 /*!
39 * \brief Constructor
40 *
41 * Construct a SimulatedBldc
42 *
43 * \param parent parent
44 * \param layout layout
45 * \param name name
46 * \param motors_count number of motors
47 * \param modelId Model id
48 * \param deviceId Bldc id of the Model
49 */
50 SimulatedBldc(const core::IODevice *parent, gui::Layout *layout, std::string name,
51 uint8_t motors_count, uint32_t modelId,uint32_t deviceId);
52
53 /*!
54 * \brief Destructor
55 *
56 */
57 ~SimulatedBldc();
58
59 /*!
60 * \brief Has speed measurement
61 *
62 * Reimplemented from Bldc. \n
63 *
64 * \return true if it has speed measurement
65 */
66 bool HasSpeedMeasurement(void) const { return false; };
67
68 /*!
69 * \brief Has current measurement
70 *
71 * Reimplemented from Bldc. \n
72 *
73 * \return true if it has current measurement
74 */
75 bool HasCurrentMeasurement(void) const { return false; };
76
77private:
78 /*!
79 * \brief Set motors values
80 *
81 * Reimplemented from Bldc. \n
82 * Values size must be the same as MotorsCount()
83 *
84 * \param values motor values
85 */
86 void SetMotors(float *value);
87
88 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
89 core::SharedMem *shmem;
90 gui::DoubleSpinBox *k;
91 char *buf;
92
93};
94} // end namespace actuator
95} // end namespace flair
96#endif // SIMULATEDBLDC_H
Note: See TracBrowser for help on using the repository browser.