Alex Pirciu
/
BFMC
a
Diff: include/Encoders/encoderinterface.hpp
- Revision:
- 1:ceee5a608e7c
diff -r c3e774091195 -r ceee5a608e7c include/Encoders/encoderinterface.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/include/Encoders/encoderinterface.hpp Thu Mar 28 07:44:42 2019 +0000 @@ -0,0 +1,43 @@ +/** + * @file encoderinterface.hpp + * @author RBRO/PJ-IU + * @brief + * @version 0.1 + * @date 2018-10-24 + * + * @copyright Copyright (c) 2018 + * + */ +#ifndef ENDOCER_INTERFACE_HPP +#define ENDOCER_INTERFACE_HPP + +#include <stdint.h> +namespace encoders{ + /** + * @brief Rotary encoder interface class + * + */ + class IEncoderGetter{ + public: + /** + * @brief Get the Count value + * + * @return int16_t + */ + virtual int16_t getCount() = 0; + /** + * @brief Get the Speed Rps + * + * @return float + */ + virtual float getSpeedRps() = 0; + /** + * @brief Get the encoder capability. If it's true, than the encoder can give the oriantation, else it returns the absolute value of the rotation without the oriantation. + * + * @return bool + */ + virtual bool isAbs() = 0; + }; +}; // namepsace encoders; + +#endif