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

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

add servos

File size: 1.9 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/*!
[286]6 * \file SimulatedBldc.h
[3]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
[286]13#ifndef SIMULATEDBLDC_H
14#define SIMULATEDBLDC_H
[3]15
16#include <Bldc.h>
17
[15]18namespace flair {
19namespace core {
20class SharedMem;
21class IODevice;
[3]22}
[15]23namespace gui {
24class DoubleSpinBox;
25class Layout;
26}
27}
[3]28
[15]29namespace flair {
30namespace actuator {
[286]31/*! \class SimulatedBldc
[15]32*
33* \brief Class for a simulation bldc
34*
35*/
[286]36class SimulatedBldc : public Bldc {
[15]37public:
38 /*!
39 * \brief Constructor
40 *
[286]41 * Construct a SimulatedBldc
[15]42 *
43 * \param parent parent
44 * \param layout layout
45 * \param name name
46 * \param motors_count number of motors
[158]47 * \param modelId Model id
48 * \param deviceId Bldc id of the Model
[15]49 */
[286]50 SimulatedBldc(const core::IODevice *parent, gui::Layout *layout, std::string name,
[158]51 uint8_t motors_count, uint32_t modelId,uint32_t deviceId);
[3]52
[15]53 /*!
54 * \brief Destructor
55 *
56 */
[286]57 ~SimulatedBldc();
[3]58
[15]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; };
[3]67
[15]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; };
[3]76
[15]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);
[158]87
88 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
[15]89 core::SharedMem *shmem;
90 gui::DoubleSpinBox *k;
[214]91 char *buf;
92
[15]93};
[3]94} // end namespace actuator
95} // end namespace flair
[286]96#endif // SIMULATEDBLDC_H
Note: See TracBrowser for help on using the repository browser.