arduino-audio-tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ObjectStream Class Reference

A Arduino Stream which makes sure that we read back the same size as we wrote. It adds a size prefix to the data stream. More...

#include <ObjectStream.h>

Inheritance diagram for ObjectStream:
BaseStream Stream Print

Public Member Functions

virtual bool begin ()
 
virtual void end ()
 
virtual void flush () override
 
 operator bool ()
 

Protected Member Functions

void refillReadBuffer ()
 

Protected Attributes

int _timeout = 10
 
bool is_complete = true
 
int max_object_size = 0
 
int n_open_read = -1
 
Streamp_in = nullptr
 
Printp_out = nullptr
 
RingBuffer< uint8_t > tmp_in {0}
 
RingBuffer< uint8_t > tmp_out {0}
 

Detailed Description

A Arduino Stream which makes sure that we read back the same size as we wrote. It adds a size prefix to the data stream.

Author
Phil Schatzmann

Member Function Documentation

◆ begin()

virtual bool begin ( )
inlinevirtualinherited

◆ end()

virtual void end ( )
inlinevirtualinherited

◆ flush()

virtual void flush ( )
inlineoverridevirtualinherited

Reimplemented from Print.

Reimplemented in ResampleStream, BufferedTaskStream, and BufferedStream.


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