Changeset 13 in flair-dev for trunk/include/FlairSensorActuator/SimuBldc.h
- Timestamp:
- Apr 8, 2016, 3:39:24 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairSensorActuator/SimuBldc.h
r4 r13 16 16 #include <Bldc.h> 17 17 18 namespace flair 19 { 20 namespace core 21 { 22 class SharedMem; 23 class IODevice; 24 class cvmatrix; 25 } 26 namespace gui 27 { 28 class DoubleSpinBox; 29 class Layout; 30 } 18 namespace flair { 19 namespace core { 20 class SharedMem; 21 class IODevice; 22 class cvmatrix; 23 } 24 namespace gui { 25 class DoubleSpinBox; 26 class Layout; 27 } 31 28 } 32 29 33 namespace flair 34 { 35 namespace actuator 36 { 37 /*! \class SimuBldc 38 * 39 * \brief Class for a simulation bldc 40 * 41 */ 42 class SimuBldc : public Bldc 43 { 44 public: 45 /*! 46 * \brief Constructor 47 * 48 * Construct a SimuBldc. Control part. 49 * 50 * \param parent parent 51 * \param layout layout 52 * \param name name 53 * \param motors_count number of motors 54 * \param dev_id device id 55 */ 56 SimuBldc(const core::IODevice* parent,gui::Layout* layout,std::string name,uint8_t motors_count,uint32_t dev_id); 30 namespace flair { 31 namespace actuator { 32 /*! \class SimuBldc 33 * 34 * \brief Class for a simulation bldc 35 * 36 */ 37 class SimuBldc : public Bldc { 38 public: 39 /*! 40 * \brief Constructor 41 * 42 * Construct a SimuBldc. Control part. 43 * 44 * \param parent parent 45 * \param layout layout 46 * \param name name 47 * \param motors_count number of motors 48 * \param dev_id device id 49 */ 50 SimuBldc(const core::IODevice *parent, gui::Layout *layout, std::string name, 51 uint8_t motors_count, uint32_t dev_id); 57 52 58 /*! 59 * \brief Constructor 60 * 61 * Construct a SimuBldc. Simulation part. 62 * 63 * \param parent parent 64 * \param name name 65 * \param motors_count number of motors 66 * \param dev_id device id 67 */ 68 SimuBldc(const core::Object* parent,std::string name,uint8_t motors_count,uint32_t dev_id); 53 /*! 54 * \brief Constructor 55 * 56 * Construct a SimuBldc. Simulation part. 57 * 58 * \param parent parent 59 * \param name name 60 * \param motors_count number of motors 61 * \param dev_id device id 62 */ 63 SimuBldc(const core::Object *parent, std::string name, uint8_t motors_count, 64 uint32_t dev_id); 69 65 70 71 72 73 74 66 /*! 67 * \brief Destructor 68 * 69 */ 70 ~SimuBldc(); 75 71 76 77 78 79 80 81 82 83 void GetSpeeds(float*value) const;72 /*! 73 * \brief Get motors speeds. 74 * 75 * This function should only be used for the simulation part. 76 * 77 * \param value array to store motors speeds 78 */ 79 void GetSpeeds(float *value) const; 84 80 85 86 87 88 89 90 91 92 bool HasSpeedMeasurement(void) const{return false;};81 /*! 82 * \brief Has speed measurement 83 * 84 * Reimplemented from Bldc. \n 85 * 86 * \return true if it has speed measurement 87 */ 88 bool HasSpeedMeasurement(void) const { return false; }; 93 89 94 95 96 97 98 99 100 101 bool HasCurrentMeasurement(void) const{return false;};90 /*! 91 * \brief Has current measurement 92 * 93 * Reimplemented from Bldc. \n 94 * 95 * \return true if it has current measurement 96 */ 97 bool HasCurrentMeasurement(void) const { return false; }; 102 98 103 104 105 106 107 108 109 110 111 112 void SetMotors(float*value);99 private: 100 /*! 101 * \brief Set motors values 102 * 103 * Reimplemented from Bldc. \n 104 * Values size must be the same as MotorsCount() 105 * 106 * \param values motor values 107 */ 108 void SetMotors(float *value); 113 109 114 115 116 110 core::SharedMem *shmem; 111 gui::DoubleSpinBox *k; 112 }; 117 113 } // end namespace actuator 118 114 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.