Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
DifferentialBuffer< T > Class Template Reference

Differential Buffer implementation. More...

#include <cs_DifferentialBuffer.h>

Public Member Functions

 DifferentialBuffer (uint16_t capacity)
 
virtual ~DifferentialBuffer ()
 
uint16_t getMaxByteSize (uint16_t capacity)
 
uint16_t getMaxByteSize ()
 
uint16_t getMaxSize (uint16_t byteSize)
 
bool init ()
 
bool deinit ()
 
bool assign (buffer_ptr_t buffer, uint16_t bufferSize)
 
bool release ()
 
differential_buffer_t< T > * getBuffer ()
 
void clear ()
 
uint16_t size () const
 
uint16_t capacity () const
 
bool empty () const
 
bool full () const
 
bool push (T value)
 
pop ()
 
peekBack () const
 
peekFront () const
 
bool getValue (T &value, const uint16_t index) const
 

Private Attributes

differential_buffer_t< T > * _buffer
 
uint16_t _capacity
 
bool _allocatedSelf
 

Detailed Description

template<typename T>
class DifferentialBuffer< T >

Differential Buffer implementation.

Parameters
Tprimitive type such as uint8_t

Elements are added at the back and removed from the front.

Constructor & Destructor Documentation

◆ DifferentialBuffer()

template<typename T >
DifferentialBuffer< T >::DifferentialBuffer ( uint16_t  capacity)
inline

◆ ~DifferentialBuffer()

template<typename T >
virtual DifferentialBuffer< T >::~DifferentialBuffer ( )
inlinevirtual

Member Function Documentation

◆ assign()

template<typename T >
bool DifferentialBuffer< T >::assign ( buffer_ptr_t  buffer,
uint16_t  bufferSize 
)
inline

◆ capacity()

template<typename T >
uint16_t DifferentialBuffer< T >::capacity ( ) const
inline

◆ clear()

template<typename T >
void DifferentialBuffer< T >::clear ( )
inline

◆ deinit()

template<typename T >
bool DifferentialBuffer< T >::deinit ( )
inline

◆ empty()

template<typename T >
bool DifferentialBuffer< T >::empty ( ) const
inline

◆ full()

template<typename T >
bool DifferentialBuffer< T >::full ( ) const
inline

◆ getBuffer()

template<typename T >
differential_buffer_t< T > * DifferentialBuffer< T >::getBuffer ( )
inline

◆ getMaxByteSize() [1/2]

template<typename T >
uint16_t DifferentialBuffer< T >::getMaxByteSize ( )
inline

◆ getMaxByteSize() [2/2]

template<typename T >
uint16_t DifferentialBuffer< T >::getMaxByteSize ( uint16_t  capacity)
inline

◆ getMaxSize()

template<typename T >
uint16_t DifferentialBuffer< T >::getMaxSize ( uint16_t  byteSize)
inline

◆ getValue()

template<typename T >
bool DifferentialBuffer< T >::getValue ( T &  value,
const uint16_t  index 
) const
inline

◆ init()

template<typename T >
bool DifferentialBuffer< T >::init ( )
inline

◆ peekBack()

template<typename T >
T DifferentialBuffer< T >::peekBack ( ) const
inline

◆ peekFront()

template<typename T >
T DifferentialBuffer< T >::peekFront ( ) const
inline

◆ pop()

template<typename T >
T DifferentialBuffer< T >::pop ( )
inline

◆ push()

template<typename T >
bool DifferentialBuffer< T >::push ( value)
inline

◆ release()

template<typename T >
bool DifferentialBuffer< T >::release ( )
inline

◆ size()

template<typename T >
uint16_t DifferentialBuffer< T >::size ( ) const
inline

Member Data Documentation

◆ _allocatedSelf

template<typename T >
bool DifferentialBuffer< T >::_allocatedSelf
private

◆ _buffer

template<typename T >
differential_buffer_t<T>* DifferentialBuffer< T >::_buffer
private

◆ _capacity

template<typename T >
uint16_t DifferentialBuffer< T >::_capacity
private

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