arduino-audio-tools
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BaseStream Class Referenceabstract

Base class for all Streams. It relies on write(const uint8_t *buffer, size_t size) and readBytes(uint8_t *buffer, size_t length). More...

#include <BaseStream.h>

Inheritance diagram for BaseStream:
Stream Print FileLoopT< File > QueueStream< uint8_t > AudioStream CatStream DynamicMemoryStream ESPNowStream FileLoopT< FileType > HammingFEC< bytecount, block_t > HttpRequest NullStream QueueStream< T > ReedSolomonFEC< bytecount, additional_bytes > StdioStream UDPStream

Public Member Functions

 BaseStream (BaseStream const &)=delete
 
virtual int available () override
 
virtual int availableForWrite () override
 
virtual bool begin ()
 
virtual void end ()
 
virtual void flush () override
 
 operator bool ()
 
BaseStreamoperator= (BaseStream const &)=delete
 
virtual size_t readBytes (uint8_t *data, size_t len)=0
 
virtual size_t write (const uint8_t *data, size_t len) override=0
 
virtual size_t write (uint8_t ch) override
 

Protected Member Functions

void refillReadBuffer ()
 

Protected Attributes

int _timeout = 10
 
RingBuffer< uint8_t > tmp_in {0}
 
RingBuffer< uint8_t > tmp_out {0}
 

Detailed Description

Base class for all Streams. It relies on write(const uint8_t *buffer, size_t size) and readBytes(uint8_t *buffer, size_t length).

Author
Phil Schatzmann

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