Public Member Functions | Protected Attributes
netft_ethercat_hardware::ThreadSafeDoubleBuffer< T > Class Template Reference

#include <thread_safe_double_buffer.h>

List of all members.

Public Member Functions

void get (T &value)
 Copies newest data from interval buffer to argument, Thread safe, unlikely to block.
void put (const T &value)
 Copies value into internal buffer. Thread safe, may block.
 ThreadSafeDoubleBuffer ()
 ThreadSafeDoubleBuffer (const T &initial_value)

Protected Attributes

unsigned blocked_counter_
boost::mutex mutex1_
boost::mutex mutex2_
v1_
v2_

Detailed Description

template<class T>
class netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >

Definition at line 44 of file thread_safe_double_buffer.h.


Constructor & Destructor Documentation

Definition at line 62 of file thread_safe_double_buffer.h.

template<class T >
netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::ThreadSafeDoubleBuffer ( const T &  initial_value)

Definition at line 68 of file thread_safe_double_buffer.h.


Member Function Documentation

template<class T >
void netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::get ( T &  value)

Copies newest data from interval buffer to argument, Thread safe, unlikely to block.

Definition at line 87 of file thread_safe_double_buffer.h.

template<class T >
void netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::put ( const T &  value)

Copies value into internal buffer. Thread safe, may block.

Definition at line 75 of file thread_safe_double_buffer.h.


Member Data Documentation

template<class T >
unsigned netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::blocked_counter_ [protected]

Definition at line 57 of file thread_safe_double_buffer.h.

template<class T >
boost::mutex netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::mutex1_ [protected]

Definition at line 55 of file thread_safe_double_buffer.h.

template<class T >
boost::mutex netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::mutex2_ [protected]

Definition at line 56 of file thread_safe_double_buffer.h.

template<class T >
T netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::v1_ [protected]

Definition at line 54 of file thread_safe_double_buffer.h.

template<class T >
T netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::v2_ [protected]

Definition at line 54 of file thread_safe_double_buffer.h.


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


netft_ethercat_hardware
Author(s): Derek King
autogenerated on Fri Jan 3 2014 11:34:45