ISIX-RTOS - small operating system for ARM microcontrollers 1.2
Public Member Functions | Private Member Functions

isix::fifo< T > Class Template Reference

The C++ class wrapper for the queue. More...

#include <fifo.h>

Inheritance diagram for isix::fifo< T >:
Inheritance graph
[legend]
Collaboration diagram for isix::fifo< T >:
Collaboration graph
[legend]

Public Member Functions

 fifo (std::size_t n_elem)
 ~fifo ()
 Destruct fifo object.
bool is_valid ()
int push (const T &c, tick_t timeout=0)
int push_isr (const T &c)
int size () const
int pop (T &c, tick_t timeout=0)
int pop_isr (T &c)

Private Member Functions

 fifo (const fifo &)
fifooperator= (const fifo &)

Detailed Description

template<typename T>
class isix::fifo< T >

The C++ class wrapper for the queue.

Definition at line 98 of file isix/fifo.h.


Constructor & Destructor Documentation

template<typename T >
isix::fifo< T >::fifo ( std::size_t  n_elem) [inline, explicit]

Construct fifo object with the selected elements

Parameters:
n_elemNumber of elements in the fifo

Definition at line 104 of file isix/fifo.h.

template<typename T >
isix::fifo< T >::~fifo ( ) [inline]

Destruct fifo object.

Definition at line 109 of file isix/fifo.h.

References isix::fifo_base::hwnd, and isix::isix_fifo_destroy().

template<typename T >
isix::fifo< T >::fifo ( const fifo< T > &  ) [private]

Member Function Documentation

template<typename T >
bool isix::fifo< T >::is_valid ( ) [inline]

Check if the fifo object is in valid state

Returns:
true if object is ok else return false

Definition at line 116 of file isix/fifo.h.

References isix::fifo_base::hwnd.

template<typename T >
fifo& isix::fifo< T >::operator= ( const fifo< T > &  ) [private]
template<typename T >
int isix::fifo< T >::pop ( T &  c,
tick_t  timeout = 0 
) [inline]

Pop the element from the queue

Parameters:
[in]cReference to the buffer
[in]timeoutMax waiting time
Returns:
ISIX_EOK if success else return an error

Definition at line 147 of file isix/fifo.h.

References isix::fifo_base::hwnd, and isix::isix_fifo_read().

template<typename T >
int isix::fifo< T >::pop_isr ( T &  c) [inline]

Pop the element from the queue. Called from the ISR

Parameters:
[in]cReference to the buffer
[in]timeoutMax waiting time
Returns:
ISIX_EOK if success else return an error

Definition at line 156 of file isix/fifo.h.

References isix::fifo_base::hwnd, and isix::isix_fifo_read_isr().

template<typename T >
int isix::fifo< T >::push ( const T &  c,
tick_t  timeout = 0 
) [inline]

Definition at line 122 of file isix/fifo.h.

References isix::fifo_base::hwnd, and isix::isix_fifo_write().

template<typename T >
int isix::fifo< T >::push_isr ( const T &  c) [inline]

Definition at line 131 of file isix/fifo.h.

References isix::fifo_base::hwnd, and isix::isix_fifo_write_isr().

template<typename T >
int isix::fifo< T >::size ( ) const [inline]

Get available elements in the fifo

Returns:
available elements in the fifo

Definition at line 138 of file isix/fifo.h.

References isix::fifo_base::hwnd, and isix::isix_fifo_count().


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines