FastArduino  v1.9
C++ library to build fast but small Arduino/AVR projects
future::FutureOutputListener< F > Class Template Referenceabstract

Listener is the interface allowing to listen to changes of a Future output buffer (while being fed by a producer). More...

#include <fastarduino/future.h>

Protected Member Functions

virtual void on_output_change (const F &future, uint8_t *output_data, uint8_t *output_current)=0
 Called whenever a listened-to Future has its output buffer changed. More...
 

Protected Attributes

friend F
 

Detailed Description

template<typename F>
class future::FutureOutputListener< F >

Listener is the interface allowing to listen to changes of a Future output buffer (while being fed by a producer).

This may be added to any Future at construction time.

Template Parameters
Fthe type of Future to listen to; this may be AbstractFuture, AbstractFakeFuture, or any subclass of these.
See also
Future
FutureStatus
FutureStatusListener

Definition at line 199 of file future.h.

Member Function Documentation

◆ on_output_change()

template<typename F >
virtual void future::FutureOutputListener< F >::on_output_change ( const F &  future,
uint8_t *  output_data,
uint8_t *  output_current 
)
protectedpure virtual

Called whenever a listened-to Future has its output buffer changed.

This is called for every byte added to the output buffer.

Parameters
futurea reference to the Future which output has been updated
output_datapointer to the beginning of future output buffer; will be null if future is an AbstractFakeFuture or subclass.
output_currentpointer to the next byte to be written to future output buffer; *(9)output_current - 1) points to the byte newly added.

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