SatCat5
satcat5::poll::TimerAdapter Class Reference

Detailed Description

Connect a Timer to any OnDemand object.

SatCat5 event-loop concepts.

This object calls request_poll() whenever the timer_event() fires.

Definition at line 256 of file polling.h.

#include <polling.h>

Inheritance diagram for satcat5::poll::TimerAdapter:
[legend]
Collaboration diagram for satcat5::poll::TimerAdapter:
[legend]

Public Member Functions

 TimerAdapter (satcat5::poll::OnDemand *target)
 
void timer_once (unsigned msec)
 Configure a one-time notification after X milliseconds.
 
void timer_every (unsigned msec)
 Configure a repeating notification every X milliseconds.
 
void timer_stop ()
 Stop all future notifications.
 
unsigned timer_interval () const
 Accessor for recurring timer interval, if one is set.
 
unsigned timer_remaining () const
 Accessor for time to next event, if one is set.
 

Static Public Member Functions

static unsigned count_timer ()
 Count all objects of this type, including idle timers.
 

Protected Member Functions

void timer_event () override
 Child class MUST override this method.
 

Protected Attributes

satcat5::poll::OnDemand *const m_target
 

Private Member Functions

void query (unsigned elapsed_msec)
 

Private Attributes

satcat5::poll::Timerm_next
 
unsigned m_trem
 
unsigned m_tnext
 

The documentation for this class was generated from the following files: