source: flair-src/tags/latest/lib/FlairSimulator/src/SimuUgvControls.h

Last change on this file was 375, checked in by Sanahuja Guillaume, 3 years ago

update ugv

  • Property svn:eol-style set to native
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 SimuUgvControls.h
7 * \brief Class for a simulation ugv
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2020/12/07
10 * \version 4.0
11 */
12
13#ifndef SIMUUGVCONTROLS_H
14#define SIMUUGVCONTROLS_H
15
16#include <IODevice.h>
17
18namespace flair {
19namespace core {
20class SharedMem;
21}
22}
23
24namespace flair {
25namespace actuator {
26/*! \class SimuUgvControls
27*
28* \brief Class for a simulation ugv
29*
30*/
31class SimuUgvControls : public core::IODevice {
32public:
33 /*!
34 * \brief Constructor
35 *
36 * Construct a SimuUgvControls
37 *
38 * \param parent parent
39 * \param name name
40 * \param modelId Model id
41 * \param deviceId UgvControls id of the Model
42 */
43 SimuUgvControls(const core::Object *parent, std::string name,
44 uint32_t modelId,uint32_t deviceId);
45
46 /*!
47 * \brief Destructor
48 *
49 */
50 ~SimuUgvControls();
51
52 /*!
53 * \brief Get motors speeds.
54 *
55 *
56 * \param value array to store motors speeds
57 * \param time time when shared memory was written
58 */
59 void GetControls(float *speed,float *turn,core::Time* time) const;
60
61
62private:
63 /*!
64 * \brief Update using provided datas
65 *
66 * Reimplemented from IODevice.
67 *
68 * \param data data from the parent to process
69 */
70 void UpdateFrom(const core::io_data *data){};
71 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
72 core::SharedMem *shmem;
73 char *buf;
74};
75} // end namespace actuator
76} // end namespace flair
77#endif // SIMUUGVCONTROLS_H
Note: See TracBrowser for help on using the repository browser.