FastArduino
v1.9
C++ library to build fast but small Arduino/AVR projects
|
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 |
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.
F | the type of Future to listen to; this may be AbstractFuture , AbstractFakeFuture , or any subclass of these. |
|
protectedpure virtual |
Called whenever a listened-to Future has its output buffer changed.
This is called for every byte added to the output buffer.
future | a reference to the Future which output has been updated |
output_data | pointer to the beginning of future output buffer; will be null if future is an AbstractFakeFuture or subclass. |
output_current | pointer to the next byte to be written to future output buffer; *(9)output_current - 1) points to the byte newly added. |