BayEOSArduino Library
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
BayEOSBuffer Class Referenceabstract
Inheritance diagram for BayEOSBuffer:
Inheritance graph
[legend]
Collaboration diagram for BayEOSBuffer:
Collaboration graph
[legend]

Public Member Functions

unsigned long available (void)
 
uint8_t freeSpace (uint16_t length)
 
void makeFreeSpace (uint16_t length)
 
unsigned long freeSpace (void)
 
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)
 
void skip (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, uint8_t timeType=RTC_ABSOLUTE_SECONDS)
 
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

uint8_t _timeType
 
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
 
RTC_rtc
 
unsigned long _read_pos
 
unsigned long _write_pos
 
unsigned long _pos
 
unsigned long _end
 

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

◆ 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

◆ freeSpace() [1/2]

uint8_t BayEOSBuffer::freeSpace ( uint16_t  length)

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

◆ freeSpace() [2/2]

unsigned long BayEOSBuffer::freeSpace ( void  )

Gives free space left in buffer

◆ initNextPacket()

uint8_t BayEOSBuffer::initNextPacket ( void  )

Initialize next packet at read pointer

◆ initPacket()

uint8_t BayEOSBuffer::initPacket ( unsigned long  pos)

Initialize packet

◆ makeFreeSpace()

void BayEOSBuffer::makeFreeSpace ( uint16_t  length)

Free length space

◆ next()

void BayEOSBuffer::next ( void  )

Set read pointer to next packet

◆ packetLength()

uint8_t BayEOSBuffer::packetLength ( void  )

Get length of packet (call after initNextPacket()

◆ packetMillis()

unsigned long BayEOSBuffer::packetMillis ( void  )

Get millis of packet (call after initNextPacket()

◆ readBinary() [1/2]

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

Read packet to dest

◆ 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

◆ readPacket()

int BayEOSBuffer::readPacket ( uint8_t *  dest)

Read packet to dest

◆ reset()

void BayEOSBuffer::reset ( void  )

reset buffer to zero

◆ rtc()

uint8_t BayEOSBuffer::rtc ( void  )

check existance of rtc return true if there is a rtc

◆ seekReadPointer()

void BayEOSBuffer::seekReadPointer ( unsigned long  pos)

Set read pointer to pos

◆ set()

void BayEOSBuffer::set ( unsigned long  pos)

Set all pointers to pos

◆ setRTC()

void BayEOSBuffer::setRTC ( RTC rtc,
uint8_t  timeType = RTC_ABSOLUTE_SECONDS 
)

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

◆ skip()

void BayEOSBuffer::skip ( void  )

skips unsent frames and moves read pointer to write pointer


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