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

Last change on this file since 218 was 214, checked in by Sanahuja Guillaume, 6 years ago

matrix

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