APM:Libraries
Public Member Functions | Private Attributes | List of all members
ObjectBuffer< T > Class Template Reference

#include <RingBuffer.h>

Collaboration diagram for ObjectBuffer< T >:
[legend]

Public Member Functions

 ObjectBuffer (uint32_t _size)
 
 ~ObjectBuffer (void)
 
void clear (void)
 
uint32_t available (void) const
 
uint32_t space (void) const
 
bool empty (void) const
 
bool push (const T &object)
 
bool push (const T *object, uint32_t n)
 
bool pop (void)
 
bool pop (T &object)
 
bool push_force (const T &object)
 
bool push_force (const T *object, uint32_t n)
 
bool peek (T &object)
 
bool update (const T &object)
 

Private Attributes

ByteBufferbuffer = nullptr
 

Detailed Description

template<class T>
class ObjectBuffer< T >

Definition at line 98 of file RingBuffer.h.

Constructor & Destructor Documentation

◆ ObjectBuffer()

template<class T>
ObjectBuffer< T >::ObjectBuffer ( uint32_t  _size)
inline

Definition at line 100 of file RingBuffer.h.

◆ ~ObjectBuffer()

template<class T>
ObjectBuffer< T >::~ObjectBuffer ( void  )
inline

Definition at line 103 of file RingBuffer.h.

Member Function Documentation

◆ available()

template<class T>
uint32_t ObjectBuffer< T >::available ( void  ) const
inline

Definition at line 114 of file RingBuffer.h.

Referenced by ChibiOS::SoftSigReaderInt::read().

Here is the caller graph for this function:

◆ clear()

template<class T>
void ObjectBuffer< T >::clear ( void  )
inline

Definition at line 108 of file RingBuffer.h.

◆ empty()

template<class T>
bool ObjectBuffer< T >::empty ( void  ) const
inline

Definition at line 124 of file RingBuffer.h.

◆ peek()

template<class T>
bool ObjectBuffer< T >::peek ( T &  object)
inline

Definition at line 187 of file RingBuffer.h.

◆ pop() [1/2]

template<class T>
bool ObjectBuffer< T >::pop ( void  )
inline

Definition at line 147 of file RingBuffer.h.

Referenced by ChibiOS::SoftSigReader::read(), and ChibiOS::SoftSigReaderInt::read().

Here is the caller graph for this function:

◆ pop() [2/2]

template<class T>
bool ObjectBuffer< T >::pop ( T &  object)
inline

Definition at line 154 of file RingBuffer.h.

◆ push() [1/2]

template<class T>
bool ObjectBuffer< T >::push ( const T &  object)
inline

Definition at line 129 of file RingBuffer.h.

Referenced by ChibiOS::SoftSigReader::_irq_handler(), and ChibiOS::SoftSigReaderInt::_irq_handler().

Here is the caller graph for this function:

◆ push() [2/2]

template<class T>
bool ObjectBuffer< T >::push ( const T *  object,
uint32_t  n 
)
inline

Definition at line 137 of file RingBuffer.h.

◆ push_force() [1/2]

template<class T>
bool ObjectBuffer< T >::push_force ( const T &  object)
inline

Definition at line 166 of file RingBuffer.h.

◆ push_force() [2/2]

template<class T>
bool ObjectBuffer< T >::push_force ( const T *  object,
uint32_t  n 
)
inline

Definition at line 176 of file RingBuffer.h.

◆ space()

template<class T>
uint32_t ObjectBuffer< T >::space ( void  ) const
inline

Definition at line 119 of file RingBuffer.h.

◆ update()

template<class T>
bool ObjectBuffer< T >::update ( const T &  object)
inline

Definition at line 193 of file RingBuffer.h.

Member Data Documentation

◆ buffer

template<class T>
ByteBuffer* ObjectBuffer< T >::buffer = nullptr
private

Definition at line 198 of file RingBuffer.h.


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