Arduino LibHelix

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CommonHelix Class Referenceabstract

Common Simple Arduino API. More...

`#include <CommonHelix.h>`

Inheritance diagram for CommonHelix:

## Public Member Functions
virtual void | begin ()
| Starts the processing.
virtual void | end ()
| Releases the reserved memory.
virtual size_t | write (const void *in_ptr, size_t in_size)
| decodes the next segments from the intput. The data can be provided in one short or in small incremental pieces. It is suggested to be called in the Arduino Loop. If the provided data does not fit into the buffer it is split up into small pieces that fit
| operator bool ()
| returns true if active

## Protected Member Functions
virtual size_t | maxFrameSize ()=0
| Provides the maximum frame size - this is allocated on the heap and you can reduce the heap size my minimizing this value.
void | setMaxFrameSize (size_t len)
| Define your optimized maximum frame size.
virtual size_t | maxPCMSize ()=0
| Provides the maximum pcm buffer size - this is allocated on the heap and you can reduce the heap size my minimizing this value.
void | setMaxPWMSize (size_t len)
| Define your optimized maximum pcm buffer size.
virtual int | findSynchWord (int offset=0)=0
| Finds the synchronization word in the frame buffer (starting from the indicated offset)
virtual void | decode (Range r)=0
| Decodes a frame.
size_t | appendToBuffer (const void *in_ptr, int in_size)
| we add the data to the buffer until it is full
size_t | writeFrame (const void *in_ptr, size_t in_size)
| appends the data to the frame buffer and decodes
Range | synchronizeFrame ()
| returns true if we have a valid start and end synch word.
Range | frameRange ()
| determines the next start and end synch word in the buffer
virtual void | checkMemory ()
void | advanceFrameBuffer (int offset)

## Protected Attributes
bool | active = false
Print * | out = nullptr
Stream * | in = nullptr
uint32_t | buffer_size = 0
uint8_t * | frame_buffer = nullptr
short * | pcm_buffer = nullptr
size_t | max_frame_size = 0
size_t | max_pcm_size = 0
size_t | frame_counter = 0

## Detailed Description

Common Simple Arduino API.

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

- src/CommonHelix.h