#include <modm/processing/timer/timeout.hpp>
|  | 
| using | clock = Clock | 
|  | 
| using | period = typename Duration::period | 
|  | 
| using | rep = typename Duration::rep | 
|  | 
| using | time_point = std::chrono::time_point< Clock, Duration > | 
|  | 
| using | duration = Duration | 
|  | 
| using | wide_signed_duration = std::chrono::duration< modm::WideType< std::make_signed_t< rep > >, period > | 
|  | 
|  | 
| enum | InternalState : uint8_t { STOPPED = int(TimerState::Stopped), 
EXPIRED = int(TimerState::Expired), 
ARMED = int(TimerState::Armed), 
EXECUTED = 0b1000,
 STATUS_MASK = (EXPIRED | ARMED | STOPPED)
 }
 | 
|  | 
|  | 
| bool | checkExpiration () const | 
|  | 
| time_point | now () const | 
|  | 
|  | 
| time_point | _start {duration{0}} | 
|  | 
| duration | _interval {0} | 
|  | 
| uint8_t | _state {STOPPED} | 
|  | 
|  | 
| class | GenericPeriodicTimer< Clock, Duration > | 
|  | 
template<class Clock, class Duration>
class modm::GenericTimeout< Clock, Duration >
Generic software timeout class for variable timebase and timestamp width.
- See also
- GenericPeriodicTimer
- Template Parameters
- 
  
    | Clock | Used clock which inherits from modm::Clock, may have a variable timebase. |  | DurationType | Used timestamp which is compatible with the chosen Clock. |  
 
- Author
- Fabian Greif 
- 
Niklas Hauser 
template<class Clock , class Duration > 
      
 
- Returns
- trueexactly once, after the timeout expired
 
 
template<class Clock , class Duration > 
      
        
          | duration modm::GenericTimeout< Clock, Duration >::interval | ( |  | ) | const | 
      
 
- Returns
- the currently set interval 
 
 
template<class Clock , class Duration > 
      
 
- Returns
- trueif the timeout is armed (not stopped and not expired),- falseotherwise
 
 
template<class Clock , class Duration > 
      
        
          | bool modm::GenericTimeout< Clock, Duration >::isExpired | ( |  | ) | const | 
      
 
- Returns
- trueif the timeout has expired,- falseotherwise
 
 
template<class Clock , class Duration > 
      
        
          | bool modm::GenericTimeout< Clock, Duration >::isStopped | ( |  | ) | const | 
      
 
- Returns
- trueif the timeout is stopped,- falseotherwise
 
 
template<class Clock , class Duration > 
      
        
          | wide_signed_duration modm::GenericTimeout< Clock, Duration >::remaining | ( |  | ) | const | 
      
 
- Returns
- the time until (positive time) or since (negative time) expiration, or 0 if stopped 
 
 
template<class Clock , class Duration > 
      
 
- Returns
- the current state of the timeout 
 
 
template<class Clock , class Duration > 
      
 
Wait until the timeout expired. 
- Warning
- This is a blocking call! Inside a fiber, this function yields. 
 
 
The documentation for this class was generated from the following file: