BoundFunctionCycleTimer< C > Class Template Reference
|
yasimavr
|
Loading...
Searching...
No Matches
BoundFunctionCycleTimer< C > Class Template Reference
#include <sim_cycle_timer.h>
Inheritance diagram for BoundFunctionCycleTimer< C >:
Public Types | |
| using | bound_full_fct_t = cycle_count_t(C::*)(cycle_count_t) |
| using | bound_noret_fct_t = void(C::*)(cycle_count_t) |
| using | bound_noarg_fct_t = void(C::*)(void) |
Public Member Functions | |
| constexpr | BoundFunctionCycleTimer (C &_c, bound_full_fct_t _f) |
| constexpr | BoundFunctionCycleTimer (C &_c, bound_noret_fct_t _f) |
| constexpr | BoundFunctionCycleTimer (C &_c, bound_noarg_fct_t _f) |
| virtual cycle_count_t | next (cycle_count_t when) override final |
| Callback from the cycle loop. | |
Public Member Functions inherited from CycleTimer | |
| CycleTimer () | |
| CycleTimer (const CycleTimer &other) | |
| virtual | ~CycleTimer () |
| bool | scheduled () const |
| Returns true if this timer is scheduled with a manager. | |
| bool | paused () const |
| cycle_count_t | remaining_delay () const |
| CycleTimer & | operator= (const CycleTimer &other) |
Member Typedef Documentation
◆ bound_full_fct_t
template<class C >
| using BoundFunctionCycleTimer< C >::bound_full_fct_t = cycle_count_t(C::*)(cycle_count_t) |
◆ bound_noarg_fct_t
template<class C >
| using BoundFunctionCycleTimer< C >::bound_noarg_fct_t = void(C::*)(void) |
◆ bound_noret_fct_t
template<class C >
| using BoundFunctionCycleTimer< C >::bound_noret_fct_t = void(C::*)(cycle_count_t) |
Constructor & Destructor Documentation
◆ BoundFunctionCycleTimer() [1/3]
template<class C >
|
inlineconstexpr |
◆ BoundFunctionCycleTimer() [2/3]
template<class C >
|
inlineconstexpr |
◆ BoundFunctionCycleTimer() [3/3]
template<class C >
|
inlineconstexpr |
Member Function Documentation
◆ next()
template<class C >
|
inlinefinaloverridevirtual |
Callback from the cycle loop.
- Note
- there's no guarantee the method will be called exactly on the required 'when' cycle. The only guarantee is "called 'when' <= 'current cycle'", the implementations must account for this.
- Parameters
-
when current 'when' cycle, at which the timer was scheduled
- Returns
- the next 'when' the timer requires to be called at.
- Note
- The next 'when' can be in the 'past' (i.e. <= 'current cycle'). In this case, the timer will be called again within the same cycle with the given next 'when'. The only constraint is that it must be greater than the previous 'when'. If it's negative or zero, the timer is removed from the queue.
Implements CycleTimer.
Member Data Documentation
◆ f_full
template<class C >
| const bound_full_fct_t BoundFunctionCycleTimer< C >::f_full |
◆ f_noarg
template<class C >
| const bound_noarg_fct_t BoundFunctionCycleTimer< C >::f_noarg |
◆ f_noret
template<class C >
| const bound_noret_fct_t BoundFunctionCycleTimer< C >::f_noret |
The documentation for this class was generated from the following file:
Generated by
Public Member Functions inherited from