[397] | 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 IpcBldc.h
|
---|
| 7 | * \brief Class for a ipc bldc
|
---|
| 8 | * \author Sébastien Ambroziak, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 9 | * \date 2021/03/03
|
---|
| 10 | * \version 4.0
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef IPCBLDC_H
|
---|
| 14 | #define IPCBLDC_H
|
---|
| 15 |
|
---|
| 16 | #include <Bldc.h>
|
---|
| 17 |
|
---|
| 18 | namespace flair {
|
---|
| 19 | namespace core {
|
---|
| 20 | class IODevice;
|
---|
| 21 | }
|
---|
| 22 | namespace gui {
|
---|
| 23 | class Layout;
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | template <typename T>
|
---|
| 28 | class ShmSenderTab;
|
---|
| 29 |
|
---|
| 30 | namespace flair {
|
---|
| 31 | namespace actuator {
|
---|
| 32 | /*! \class IpcBldc
|
---|
| 33 | *
|
---|
| 34 | * \brief Class for an ipc bldc
|
---|
| 35 | *
|
---|
| 36 | */
|
---|
| 37 | class IpcBldc : public Bldc {
|
---|
| 38 | public:
|
---|
| 39 | /*!
|
---|
| 40 | * \brief Constructor
|
---|
| 41 | *
|
---|
| 42 | * Construct an IpcBldc
|
---|
| 43 | *
|
---|
| 44 | * \param parent parent
|
---|
| 45 | * \param layout layout
|
---|
| 46 | * \param name name
|
---|
| 47 | * \param motors_count number of motors
|
---|
| 48 | * \param ipc_name name of the ipc
|
---|
| 49 | * \param ipc_channel ipc channel number
|
---|
| 50 | */
|
---|
| 51 | IpcBldc(const core::IODevice *parent, gui::Layout *layout, std::string name,
|
---|
| 52 | uint8_t motors_count, const char* ipc_name, int ipc_channel);
|
---|
| 53 |
|
---|
| 54 | /*!
|
---|
| 55 | * \brief Destructor
|
---|
| 56 | *
|
---|
| 57 | */
|
---|
| 58 | ~IpcBldc();
|
---|
| 59 |
|
---|
| 60 | /*!
|
---|
| 61 | * \brief Has speed measurement
|
---|
| 62 | *
|
---|
| 63 | * Reimplemented from Bldc. \n
|
---|
| 64 | *
|
---|
| 65 | * \return true if it has speed measurement
|
---|
| 66 | */
|
---|
| 67 | bool HasSpeedMeasurement(void) const { return false; };
|
---|
| 68 |
|
---|
| 69 | /*!
|
---|
| 70 | * \brief Has current measurement
|
---|
| 71 | *
|
---|
| 72 | * Reimplemented from Bldc. \n
|
---|
| 73 | *
|
---|
| 74 | * \return true if it has current measurement
|
---|
| 75 | */
|
---|
| 76 | bool HasCurrentMeasurement(void) const { return false; };
|
---|
| 77 |
|
---|
| 78 | private:
|
---|
| 79 | /*!
|
---|
| 80 | * \brief Set motors values
|
---|
| 81 | *
|
---|
| 82 | * Reimplemented from Bldc. \n
|
---|
| 83 | * Values size must be the same as MotorsCount()
|
---|
| 84 | *
|
---|
| 85 | * \param values motor values
|
---|
| 86 | */
|
---|
| 87 | void SetMotors(float *value);
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 | //IpcSenderTab<uint16_t> *sender;
|
---|
| 91 | ShmSenderTab<float> *sender;
|
---|
| 92 |
|
---|
| 93 | };
|
---|
| 94 | } // end namespace actuator
|
---|
| 95 | } // end namespace flair
|
---|
| 96 | #endif // IPCBLDC_H
|
---|