![]() |
semf
|
Class for measuring the frequency on a capture input. More...
#include <frequencyin.h>
Public Member Functions | |
FrequencyIn (InputCapture &inputCapture) | |
Constructor. More... | |
FrequencyIn (const FrequencyIn &other)=delete | |
void | start () override |
void | stop () override |
void | reset () override |
uint32_t | periodTicks () const override |
Returns the measured ticks of a signal period (directly after capturing it and emitted dataAvailable signal). More... | |
uint32_t | periodInMs () const override |
Returns the measured time in milliseconds of 2 successive captured signals. More... | |
uint32_t | frequency () const override |
Returns the measured frequency. More... | |
![]() | |
virtual | ~FrequencyIn ()=default |
virtual void | start ()=0 |
virtual void | stop ()=0 |
virtual void | reset ()=0 |
virtual uint32_t | periodTicks () const =0 |
Returns the measured ticks of a signal period (directly after capturing it and emitted dataAvailable signal). More... | |
virtual uint32_t | periodInMs () const =0 |
Returns the measured time in milliseconds of 2 successive captured signals. More... | |
virtual uint32_t | frequency () const =0 |
Returns the measured frequency. More... | |
Protected Member Functions | |
virtual void | onDataAvailable () |
Additional Inherited Members | |
![]() | |
Signal | dataAvailable |
Class for measuring the frequency on a capture input.
Definition at line 21 of file frequencyin.h.
|
explicit |
Constructor.
inputCapture | Reference to a hardware interface. |
Definition at line 16 of file frequencyin.cpp.
|
explicitdelete |
|
overridevirtual |
Returns the measured frequency.
Implements semf::app::FrequencyIn.
Definition at line 57 of file frequencyin.cpp.
|
protectedvirtual |
This method must be called from the interrupt routine to update the frequency.
Definition at line 65 of file frequencyin.cpp.
|
overridevirtual |
Returns the measured time in milliseconds of 2 successive captured signals.
Implements semf::app::FrequencyIn.
Definition at line 48 of file frequencyin.cpp.
|
overridevirtual |
Returns the measured ticks of a signal period (directly after capturing it and emitted dataAvailable
signal).
Implements semf::app::FrequencyIn.
Definition at line 40 of file frequencyin.cpp.
|
overridevirtual |
Reset the last measured period (counter).
Implements semf::app::FrequencyIn.
Definition at line 34 of file frequencyin.cpp.
|
overridevirtual |
Start reading the input frequency.
Implements semf::app::FrequencyIn.
Definition at line 22 of file frequencyin.cpp.
|
overridevirtual |
Stop reading the input frequency.
Implements semf::app::FrequencyIn.
Definition at line 28 of file frequencyin.cpp.