MotorControlModuleSDFM_TMS3.../Projects/EFC_Communication/UMLibrary/schematic/CallBackReversCounter.hh
2024-06-07 11:12:56 +03:00

27 lines
871 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* CallBackReversCounter.hh
*
* Created on: 19 мая 2021 г.
* Author: sozonov
*/
#ifndef UMLIBRARY_SCHEMATIC_CALLBACKREVERSCOUNTER_HH_
#define UMLIBRARY_SCHEMATIC_CALLBACKREVERSCOUNTER_HH_
#include "../systemic/IFunctor.hh"
#include "ReversCounter.hh"
namespace application { namespace schematic {
class CallBackReversCounter : public ReversCounter {
systemic::IFunctor<void> & b_cross; //! колбэк о пересечении счётчиком границы
virtual void border_crossing() {
b_cross();
}
public:
CallBackReversCounter(systemic::IFunctor<void> & _cb_b_cross, unsigned int _dir, unsigned int _mod, unsigned int _r_v):b_cross(_cb_b_cross),ReversCounter(_dir, _mod,_r_v){}
float getCountf() const {return (static_cast<float>(getCount()));}
};
}}
#endif /* UMLIBRARY_SCHEMATIC_CALLBACKREVERSCOUNTER_HH_ */