#include <thread_safe_double_buffer.h>
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_ |
T | v1_ |
T | v2_ |
Definition at line 44 of file thread_safe_double_buffer.h.
netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::ThreadSafeDoubleBuffer | ( | ) |
Definition at line 62 of file thread_safe_double_buffer.h.
netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::ThreadSafeDoubleBuffer | ( | const T & | initial_value | ) |
Definition at line 68 of file thread_safe_double_buffer.h.
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.
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.
unsigned netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::blocked_counter_ [protected] |
Definition at line 57 of file thread_safe_double_buffer.h.
boost::mutex netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::mutex1_ [protected] |
Definition at line 55 of file thread_safe_double_buffer.h.
boost::mutex netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::mutex2_ [protected] |
Definition at line 56 of file thread_safe_double_buffer.h.
T netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::v1_ [protected] |
Definition at line 54 of file thread_safe_double_buffer.h.
T netft_ethercat_hardware::ThreadSafeDoubleBuffer< T >::v2_ [protected] |
Definition at line 54 of file thread_safe_double_buffer.h.