SatCat5
satcat5::test::IoEventCounter Class Referencefinal

Detailed Description

Count calls to data_rcvd().

See also
io::EventListener

Definition at line 216 of file sim_utils.h.

#include <sim_utils.h>

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

Public Member Functions

unsigned count () const
 Returns the current counter value.
 
void count_reset ()
 Reset the counter to zero.
 
virtual void data_unlink (satcat5::io::Readable *src)
 Unlink this EventListener from the designated source, because the designated Readable object is being destroyed. More...
 

Protected Member Functions

void data_rcvd (satcat5::io::Readable *src)
 The data_rcvd() callback is polled whenever data is available. More...
 

Protected Attributes

unsigned m_count
 

Member Function Documentation

◆ data_rcvd()

void satcat5::test::IoEventCounter::data_rcvd ( satcat5::io::Readable src)
inlineprotectedvirtual

The data_rcvd() callback is polled whenever data is available.

A pointer is provided to assist handlers with multiple sources. Child objects of io::EventListener MUST override this method.

Implements satcat5::io::EventListener.

Definition at line 221 of file sim_utils.h.

◆ data_unlink()

virtual void satcat5::io::EventListener::data_unlink ( satcat5::io::Readable src)
inlinevirtualinherited

Unlink this EventListener from the designated source, because the designated Readable object is being destroyed.

Child objects of io::EventListener MAY override this method if action is required.

Reimplemented in satcat5::io::Override, satcat5::io::MuxUp, satcat5::io::MuxDown, satcat5::io::BufferedPackets, satcat5::io::BufferedStream, satcat5::io::BufferedCopy, satcat5::eth::SwitchLogReader, satcat5::eth::Dispatch, satcat5::ccsds_spp::Dispatch, satcat5::ccsds_aos::Dispatch, satcat5::ccsds_aos::Channel, satcat5::test::MockOffload::Port, and satcat5::freertos::MessageCopy.

Definition at line 54 of file io_readable.h.


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