Flair
Framework Libre Air
SimuBldc.h
Go to the documentation of this file.
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}
13 #ifndef SIMUBLDC_H
14 #define SIMUBLDC_H
15 
16 #include <IODevice.h>
17 
18 namespace flair {
19 namespace core {
20 class SharedMem;
21 }
22 }
23 
24 namespace flair {
25 namespace actuator {
31 class SimuBldc : public core::IODevice {
32 public:
44  SimuBldc(const core::Object *parent, std::string name, uint8_t motors_count,
45  uint32_t modelId,uint32_t deviceId);
46 
51  ~SimuBldc();
52 
60  void GetSpeeds(float *value,core::Time* time) const;
61 
62 
63 private:
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
Abstract class for data types.
Definition: io_data.h:94
void GetSpeeds(float *value, core::Time *time) const
Get motors speeds.
SimuBldc(const core::Object *parent, std::string name, uint8_t motors_count, uint32_t modelId, uint32_t deviceId)
Constructor.
Base class for all Framework's classes.
Definition: Object.h:83
Abstract class for input/ouput system.
Definition: IODevice.h:45
namespace of the flair Framework
Definition: Ahrs.h:19
unsigned long long Time
Time definition, in ns.
Definition: Object.h:55
Abstract class for input/ouput system.
Class for a simulation bldc.
Definition: SimuBldc.h:31
Class defining a shared memory.
Definition: SharedMem.h:32