source: flair-src/trunk/lib/FlairSensorActuator/src/SimulatedServos.h@ 459

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

update plane

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 SimulatedServos.h
7 * \brief Class for a simulation servos
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2019/11/28
10 * \version 4.0
11 */
12
13#ifndef SIMULATEDSERVOS_H
14#define SIMULATEDSERVOS_H
15
16#include <Servos.h>
17
18namespace flair {
19namespace core {
20class SharedMem;
21class IODevice;
22}
23}
24
25namespace flair {
26namespace actuator {
27/*! \class SimulatedServos
28*
29* \brief Class for a simulation bldc
30*
31*/
32class SimulatedServos : public Servos {
33public:
34 /*!
35 * \brief Constructor
36 *
37 * Construct a SimulatedServos
38 *
39 * \param parent parent
40 * \param layout layout
41 * \param name name
42 * \param servos_count number of servos
43 * \param modelId Model id
44 * \param deviceId Bldc id of the Model
45 */
46 SimulatedServos(const core::IODevice *parent, gui::Layout *layout, std::string name,
47 uint8_t servos_count, uint32_t modelId,uint32_t deviceId);
48
49 /*!
50 * \brief Destructor
51 *
52 */
53 ~SimulatedServos();
54
55private:
56 /*!
57 * \brief Set servos positions
58 *
59 * Reimplemented from Servos. \n
60 * Values size must be the same as ServosCount()
61 *
62 * \param positions positions values in radians
63 */
64 void SetServos(float *positions);
65
66 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
67 core::SharedMem *shmem;
68 char *buf;
69
70};
71} // end namespace actuator
72} // end namespace flair
73#endif // SIMULATEDSERVOS_H
Note: See TracBrowser for help on using the repository browser.