arduino-audio-tools
Loading...
Searching...
No Matches
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 ()
 
void setWriteBufferSize (int size)
 

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_ttmp_in {0}
 
RingBuffer< uint8_ttmp_out {0}
 
int write_buffer_size = MAX_SINGLE_CHARS
 

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

◆ operator bool()

operator bool ( )
inlineinherited

◆ refillReadBuffer()

void refillReadBuffer ( )
inlineprotectedinherited

◆ setWriteBufferSize()

void setWriteBufferSize ( int  size)
inlineinherited

Member Data Documentation

◆ _timeout

int _timeout = 10
protectedinherited

◆ is_complete

bool is_complete = true
protected

◆ max_object_size

int max_object_size = 0
protected

◆ n_open_read

int n_open_read = -1
protected

◆ p_in

Stream* p_in = nullptr
protected

◆ p_out

Print* p_out = nullptr
protected

◆ tmp_in

RingBuffer<uint8_t> tmp_in {0}
protectedinherited

◆ tmp_out

RingBuffer<uint8_t> tmp_out {0}
protectedinherited

◆ write_buffer_size

int write_buffer_size = MAX_SINGLE_CHARS
protectedinherited

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