BayEOS-Arduino
1.8.0_0.0.4
|
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 |
RTC * | _rtc |
unsigned long | _read_pos |
unsigned long | _write_pos |
unsigned long | _pos |
unsigned long | _end |
Definition at line 62 of file BayEOSBuffer.h.
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.
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.
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.
uint8_t BayEOSBuffer::initNextPacket | ( | void | ) |
Initialize next packet at read pointer
Definition at line 145 of file BayEOSBuffer.cpp.
uint8_t BayEOSBuffer::initPacket | ( | unsigned long | pos | ) |
Initialize packet
Definition at line 149 of file BayEOSBuffer.cpp.
void BayEOSBuffer::next | ( | void | ) |
Set read pointer to next packet
Definition at line 168 of file BayEOSBuffer.cpp.
uint8_t BayEOSBuffer::packetLength | ( | void | ) |
Get length of packet (call after initNextPacket()
Definition at line 240 of file BayEOSBuffer.cpp.
unsigned long BayEOSBuffer::packetMillis | ( | void | ) |
Get millis of packet (call after initNextPacket()
Definition at line 244 of file BayEOSBuffer.cpp.
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.
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.
int BayEOSBuffer::readPacket | ( | uint8_t * | dest | ) |
Read packet to dest
Definition at line 98 of file BayEOSBuffer.cpp.
void BayEOSBuffer::reset | ( | void | ) |
reset buffer to zero
Definition at line 140 of file BayEOSBuffer.cpp.
uint8_t BayEOSBuffer::rtc | ( | void | ) |
check existance of rtc return true if there is a rtc
Definition at line 254 of file BayEOSBuffer.cpp.
void BayEOSBuffer::seekReadPointer | ( | unsigned long | pos | ) |
Set read pointer to pos
Definition at line 136 of file BayEOSBuffer.cpp.
void BayEOSBuffer::set | ( | unsigned long | pos | ) |
Set all pointers to pos
Definition at line 117 of file BayEOSBuffer.cpp.
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.