ADTF
3.14.3
|
Class that wraps a kernel timer to call a method at specified intervals. More...
Classes | |
struct | Impl |
struct | ImplBase |
Public Member Functions | |
kernel_timer () | |
Default constructor. | |
kernel_timer (const kernel_timer &)=delete | |
kernel_timer (kernel_timer &&) | |
Move constructor. | |
template<typename Callable , typename ... Args> | |
kernel_timer (adtf::services::IKernel::tTimerClock eClock, const adtf::services::IKernel::tSchedulingInfo &sScheduling, const char *strName, tTimeStamp tmPeriod, tTimeStamp tmInitialDelay, Callable &&pFunc, Args &&... args) | |
Constructor that creates a new timer with a given clock and scheduling parameters. | |
template<typename Callable , typename ... Args> | |
kernel_timer (const char *strName, tTimeStamp tmPeriod, tTimeStamp tmInitialDelay, Callable &&pFunc, Args &&... args) | |
Constructor that creates a new timer. | |
~kernel_timer () | |
Destructor. More... | |
kernel_timer & | operator= (kernel_timer &&oOther) |
Move assignment operator. More... | |
void | Swap (kernel_timer &oOther) |
Swaps two timers. More... | |
bool | Stoppable () const |
Whether or not the timer is stoppable, i.e. More... | |
tResult | Stop () |
Stop the timer. More... | |
tResult | SetScheduling (const adtf::services::IKernel::tSchedulingInfo &sScheduling) |
Changes the scheduling parameters of the timer. More... | |
tResult | GetScheduling (adtf::services::IKernel::tSchedulingInfo &sScheduling) const |
Retrieves the scheduling parameters of the thread. More... | |
Private Types | |
typedef std::shared_ptr< ImplBase > | shared_base_type |
Private Member Functions | |
template<typename Callable > | |
std::shared_ptr< Impl< Callable > > | MakeCallable (Callable &&pFunc) |
tResult | Create (const char *strName, const adtf::services::IKernel::tSchedulingInfo &sScheduling, adtf::services::IKernel::tTimerClock eClock, tTimeStamp tmPeriod, tTimeStamp tmInitialDelay) |
Private Attributes | |
shared_base_type | m_pCallable |
Class that wraps a kernel timer to call a method at specified intervals.
Definition at line 19 of file kernel_timer.h.
~kernel_timer | ( | ) |
Destructor.
This will stop the timer.
tResult GetScheduling | ( | adtf::services::IKernel::tSchedulingInfo & | sScheduling | ) | const |
Retrieves the scheduling parameters of the thread.
[in] | sScheduling | The scheduling parameters. |
kernel_timer& operator= | ( | kernel_timer && | oOther | ) |
Move assignment operator.
[in,out] | oOther | The object that should be moved. |
tResult SetScheduling | ( | const adtf::services::IKernel::tSchedulingInfo & | sScheduling | ) |
Changes the scheduling parameters of the timer.
[in] | sScheduling | The new scheduling parameters. |
tResult Stop | ( | ) |
Stop the timer.
Mind that the destructor calls this method, so there is no need to call this method directly.
bool Stoppable | ( | ) | const |
Whether or not the timer is stoppable, i.e.
currently running.
Referenced by kernel_timeout::Start().
void Swap | ( | kernel_timer & | oOther | ) |
Swaps two timers.
[in,out] | oOther | The second timer. |