mergCanBus
 All Classes Functions Typedefs
CircularBuffer Class Reference

#include <CircularBuffer.h>

Public Member Functions

 CircularBuffer ()
 Constructor Basically set the initial values of the internal variables.
 
virtual ~CircularBuffer ()
 Destructor. More...
 
bool put (byte *buffer)
 Add a message of the _msgSize size to the buffer. More...
 
bool get (byte *buffer)
 Put the next message to the buffer. More...
 
int getPos ()
 

Detailed Description

CircularBuffer class is responsible for keeping the cbus messages in a circular buffer way.

Constructor & Destructor Documentation

CircularBuffer::~CircularBuffer ( )
virtual

Destructor.

<

Member Function Documentation

bool CircularBuffer::get ( byte *  buffer)

Put the next message to the buffer.

Parameters
buffer.Buffer that will receive the message.
Returns
Return False if the buffer is being reading or if the buffer is empty. Else returns True.
bool CircularBuffer::put ( byte *  buffer)

Add a message of the _msgSize size to the buffer.

Parameters
buffer
Returns
False in case the buffer is being writing else return True.

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