source: flair-src/trunk/lib/FlairSimulator/src/SimuBldc.h@ 352

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

maj for armv5te

File size: 1.5 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 <IODevice.h>
17
18namespace flair {
19namespace core {
20class SharedMem;
21}
22}
23
24namespace flair {
25namespace actuator {
26/*! \class SimuBldc
27*
28* \brief Class for a simulation bldc
29*
30*/
31class SimuBldc : public core::IODevice {
32public:
33 /*!
34 * \brief Constructor
35 *
36 * Construct a SimuBldc
37 *
38 * \param parent parent
39 * \param name name
40 * \param motors_count number of motors
41 * \param modelId Model id
42 * \param deviceId Bldc id of the Model
43 */
44 SimuBldc(const core::Object *parent, std::string name, uint8_t motors_count,
45 uint32_t modelId,uint32_t deviceId);
46
47 /*!
48 * \brief Destructor
49 *
50 */
51 ~SimuBldc();
52
53 /*!
54 * \brief Get motors speeds.
55 *
56 *
57 * \param value array to store motors speeds
58 * \param time time when shared memory was written
59 */
60 void GetSpeeds(float *value,core::Time* time) const;
61
62
63private:
64 /*!
65 * \brief Update using provided datas
66 *
67 * Reimplemented from IODevice.
68 *
69 * \param data data from the parent to process
70 */
71 void UpdateFrom(const core::io_data *data){};
72 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
73 core::SharedMem *shmem;
74 char *buf;
75 uint8_t motors_count;
76
77};
78} // end namespace actuator
79} // end namespace flair
80#endif // SIMUBLDC_H
Note: See TracBrowser for help on using the repository browser.