BayEOS-Arduino  1.8.0_0.0.4
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
BayEOSBuffer Class Referenceabstract
Inheritance diagram for BayEOSBuffer:
BayEOSBufferEEPROM BayEOSBufferMultiEEPROM BayEOSBufferRAM BayEOSBufferSD BayEOSBufferSDFat BayEOSBufferSPIFlash

Public Member Functions

unsigned long available (void)
uint8_t freeSpace (uint8_t length)
int readPacket (uint8_t *dest)
uint8_t readBinary (unsigned long pos, uint8_t length, uint8_t *dest)
uint8_t readBinary (unsigned long pos, unsigned long end, uint8_t length, uint8_t *dest)
void next (void)
void set (unsigned long pos)
void seekReadPointer (unsigned long pos)
void reset (void)
uint8_t addPacket (const uint8_t *payload, uint8_t length)
uint8_t initPacket (unsigned long pos)
uint8_t initNextPacket (void)
uint8_t packetLength (void)
unsigned long packetMillis (void)
void setRTC (RTC &rtc, boolean absolute_time=true)
uint8_t rtc (void)
unsigned long getTime (void)
unsigned long writePos (void)
unsigned long readPos (void)
unsigned long endPos (void)
unsigned long length (void)

Public Attributes

boolean _absoluteTime
boolean _framesDiscarded

Protected Member Functions

uint8_t b_write (const uint8_t b)
uint8_t b_write (const uint8_t *b, uint8_t length)
int b_read ()
int b_read (uint8_t *dest, int length)
uint8_t b_seek (unsigned long pos)

Protected Attributes

unsigned long _max_length
unsigned long _read_pos
unsigned long _write_pos
unsigned long _pos
unsigned long _end

Detailed Description

Definition at line 62 of file BayEOSBuffer.h.

Member Function Documentation

◆ addPacket()

uint8_t BayEOSBuffer::addPacket ( const uint8_t *  payload,
uint8_t  length 

Add BayEOS frame packet to buffer returns number of bytes written

Definition at line 196 of file BayEOSBuffer.cpp.

◆ available()

unsigned long BayEOSBuffer::available ( void  )

Check if there are any bytes available for reading from the buffer. returns number of bytes available for reed

Definition at line 78 of file BayEOSBuffer.cpp.

◆ freeSpace()

uint8_t BayEOSBuffer::freeSpace ( uint8_t  length)

Checks if there is "length" space left return 0 if not

Definition at line 83 of file BayEOSBuffer.cpp.

◆ initNextPacket()

uint8_t BayEOSBuffer::initNextPacket ( void  )

Initialize next packet at read pointer

Definition at line 145 of file BayEOSBuffer.cpp.

◆ initPacket()

uint8_t BayEOSBuffer::initPacket ( unsigned long  pos)

Initialize packet

Definition at line 149 of file BayEOSBuffer.cpp.

◆ next()

void BayEOSBuffer::next ( void  )

Set read pointer to next packet

Definition at line 168 of file BayEOSBuffer.cpp.

◆ packetLength()

uint8_t BayEOSBuffer::packetLength ( void  )

Get length of packet (call after initNextPacket()

Definition at line 240 of file BayEOSBuffer.cpp.

◆ packetMillis()

unsigned long BayEOSBuffer::packetMillis ( void  )

Get millis of packet (call after initNextPacket()

Definition at line 244 of file BayEOSBuffer.cpp.

◆ readBinary() [1/2]

uint8_t BayEOSBuffer::readBinary ( unsigned long  pos,
uint8_t  length,
uint8_t *  dest 

Read packet to dest

Definition at line 102 of file BayEOSBuffer.cpp.

◆ readBinary() [2/2]

uint8_t BayEOSBuffer::readBinary ( unsigned long  pos,
unsigned long  end,
uint8_t  length,
uint8_t *  dest 

Read packet to dest but stop at end

Definition at line 108 of file BayEOSBuffer.cpp.

◆ readPacket()

int BayEOSBuffer::readPacket ( uint8_t *  dest)

Read packet to dest

Definition at line 98 of file BayEOSBuffer.cpp.

◆ reset()

void BayEOSBuffer::reset ( void  )

reset buffer to zero

Definition at line 140 of file BayEOSBuffer.cpp.

◆ rtc()

uint8_t BayEOSBuffer::rtc ( void  )

check existance of rtc return true if there is a rtc

Definition at line 254 of file BayEOSBuffer.cpp.

◆ seekReadPointer()

void BayEOSBuffer::seekReadPointer ( unsigned long  pos)

Set read pointer to pos

Definition at line 136 of file BayEOSBuffer.cpp.

◆ set()

void BayEOSBuffer::set ( unsigned long  pos)

Set all pointers to pos

Definition at line 117 of file BayEOSBuffer.cpp.

◆ setRTC()

void BayEOSBuffer::setRTC ( RTC rtc,
boolean  absolute_time = true 

set rtc pointer to a RTC instance NOTE: setting absolute_time to false will result in relative time delayed frames...

Definition at line 249 of file BayEOSBuffer.cpp.

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