Changeset 15 in flair-src for trunk/lib/FlairSensorActuator/src/SimuImu.h
- Timestamp:
- Apr 8, 2016, 3:40:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/SimuImu.h
r3 r15 18 18 19 19 namespace flair { 20 namespace core{21 22 23 24 25 26 20 namespace core { 21 class SharedMem; 22 class AhrsData; 23 } 24 namespace gui { 25 class SpinBox; 26 } 27 27 } 28 28 29 namespace flair { namespace sensor { 30 /*! \class SimuImu 31 * 32 * \brief Class for a simulation Imu 33 */ 34 class SimuImu : public Imu, public core::Thread { 35 public: 36 /*! 37 * \brief Constructor 38 * 39 * Construct a SimuImu. Control part. 40 * 41 * \param parent parent 42 * \param name name 43 * \param dev_id device id 44 * \param priority priority of the Thread 45 */ 46 SimuImu(const core::FrameworkManager* parent,std::string name,uint32_t dev_id,uint8_t priority); 29 namespace flair { 30 namespace sensor { 31 /*! \class SimuImu 32 * 33 * \brief Class for a simulation Imu 34 */ 35 class SimuImu : public Imu, public core::Thread { 36 public: 37 /*! 38 * \brief Constructor 39 * 40 * Construct a SimuImu. Control part. 41 * 42 * \param parent parent 43 * \param name name 44 * \param dev_id device id 45 * \param priority priority of the Thread 46 */ 47 SimuImu(const core::FrameworkManager *parent, std::string name, 48 uint32_t dev_id, uint8_t priority); 47 49 48 49 50 51 52 53 54 55 56 57 58 SimuImu(const core::IODevice* parent,std::string name,uint32_t dev_id);50 /*! 51 * \brief Constructor 52 * 53 * Construct a SimuImu. Simulation part.\n 54 * The Thread of this class should not be run. 55 * 56 * \param parent parent 57 * \param name name 58 * \param dev_id device id 59 */ 60 SimuImu(const core::IODevice *parent, std::string name, uint32_t dev_id); 59 61 60 61 62 63 64 62 /*! 63 * \brief Destructor 64 * 65 */ 66 ~SimuImu(); 65 67 66 67 68 69 70 71 72 73 68 private: 69 /*! 70 * \brief Run function 71 * 72 * Reimplemented from Thread. 73 * 74 */ 75 void Run(void); 74 76 75 76 77 78 79 80 81 82 77 /*! 78 * \brief Update using provided datas 79 * 80 * Reimplemented from IODevice. 81 * 82 * \param data data from the parent to process 83 */ 84 void UpdateFrom(const core::io_data *data); 83 85 84 85 86 87 88 89 90 91 92 93 94 95 96 86 typedef struct { 87 float q0; 88 float q1; 89 float q2; 90 float q3; 91 float wx; 92 float wy; 93 float wz; 94 } imu_states_t; 95 gui::SpinBox *data_rate; 96 core::SharedMem *shmem; 97 core::AhrsData *ahrsData; 98 }; 97 99 } // end namespace sensor 98 100 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.