SatCat5
satcat5::test::CountOnDemand Class Referencefinal

Detailed Description

Count calls to poll_demand().

See also
poll::OnDemand

Definition at line 152 of file sim_utils.h.

#include <sim_utils.h>

Inheritance diagram for satcat5::test::CountOnDemand:
[legend]
Collaboration diagram for satcat5::test::CountOnDemand:
[legend]

Public Member Functions

unsigned count () const
 Returns the current counter value.
 
void count_reset ()
 Reset the counter to zero.
 
void request_poll ()
 Call this method to request polling at a later time. More...
 
void request_cancel ()
 Call this method to cancel a previous request_poll().
 

Static Public Member Functions

static unsigned count_ondemand ()
 Count queued objects of this type (i.e., non-idle).
 

Protected Member Functions

void poll_demand () override
 Deferred event handler, called after request(). More...
 

Protected Attributes

unsigned m_count
 

Private Attributes

satcat5::poll::OnDemandm_next
 
bool m_idle
 

Member Function Documentation

◆ poll_demand()

void satcat5::test::CountOnDemand::poll_demand ( )
inlineoverrideprotectedvirtual

Deferred event handler, called after request().

Child class MUST override this method. (Call "request_poll" to enqueue a callback to this method.)

Implements satcat5::poll::OnDemand.

Definition at line 157 of file sim_utils.h.

◆ request_poll()

void satcat5::poll::OnDemand::request_poll ( )
inherited

Call this method to request polling at a later time.

Safe to stack requests, but only one call to poll().

Definition at line 208 of file polling.cc.


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