OpenRTM-aist 2.0.2
|
Concrete buffer class for dummy. More...
#include <BufferBase.h>
Public Member Functions | |
NullBuffer (long int size=1) | |
Constructer. | |
virtual | ~NullBuffer ()=default |
Destructor. | |
virtual long int | length () const |
Get the buffer length (always 1) | |
virtual bool | write (const DataType &value) |
Write data into the buffer. | |
virtual bool | read (DataType &value) |
Read data from the buffer. | |
virtual bool | isFull () const |
Check on whether the buffer is full. | |
virtual bool | isEmpty () const |
Check on whether the buffer is empty. | |
![]() | |
virtual | ~BufferBase ()=default |
Virtual destructor. | |
virtual void | init (const coil::Properties &prop)=0 |
Set the buffer. | |
virtual BufferStatus | length (size_t n)=0 |
Set the buffer length. | |
virtual BufferStatus | reset ()=0 |
Reset the buffer status. | |
virtual DataType * | wptr (long int n=0)=0 |
Get the writing pointer. | |
virtual BufferStatus | advanceWptr (long int n=1, bool unlock_enable=true)=0 |
Forward n writing pointers. | |
virtual BufferStatus | write (const DataType &value, std::chrono::nanoseconds timeout=std::chrono::nanoseconds(-1))=0 |
Write data into the buffer. | |
virtual size_t | writable () const =0 |
Get a writable number. | |
virtual bool | full () const =0 |
Check on whether the buffer is full. | |
virtual DataType * | rptr (long int n=0)=0 |
Get the reading pointer. | |
virtual BufferStatus | advanceRptr (long int n=1, bool unlock_enable=true)=0 |
Forward n reading pointers. | |
virtual BufferStatus | get (DataType &value)=0 |
Read data from the buffer. | |
virtual BufferStatus | read (DataType &value, std::chrono::nanoseconds nsec=std::chrono::nanoseconds(-1))=0 |
Read data from the buffer. | |
virtual size_t | readable () const =0 |
Write data into the buffer. | |
virtual bool | empty () const =0 |
Check on whether the buffer is empty. | |
Protected Member Functions | |
virtual void | put (const DataType &data) |
Store data into the buffer. | |
virtual const DataType & | get () |
Get data from the buffer. | |
virtual DataType & | getRef () |
Get the buffer's reference to be written the next. | |
Concrete buffer class for dummy.
Concrete buffer class for dummy. Buffer length is fixed to 1. The users specify data type to hold it in a buffer as <DataType>.
DataType | Data type to hold in a buffer |
|
inlineexplicit |
Constructer.
Constructer. Initialize buffer length to always 1.
size | Buffer length(Not use) |
|
virtualdefault |
Destructor.
Destractor
|
inlineprotectedvirtual |
Get data from the buffer.
Get data from the buffer.
Implements RTC::BufferBase< DataType >.
|
inlineprotectedvirtual |
Get the buffer's reference to be written the next.
Get the reference to be written buffer. Return always same position because this buffer's length is always 1.
|
inlinevirtual |
Check on whether the buffer is empty.
Check on whether the buffer is empty. (Always false.)
|
inlinevirtual |
Check on whether the buffer is full.
Check on whether the buffer is full. (Always false.)
|
inlinevirtual |
Get the buffer length (always 1)
Get the buffer length. (Return always 1.)
Implements RTC::BufferBase< DataType >.
|
inlineprotectedvirtual |
Store data into the buffer.
Store data which were given with an argument into the buffer.
data | Target data to store. |
Implements RTC::BufferBase< DataType >.
|
inlinevirtual |
Read data from the buffer.
Read data stored in the buffer.
value | Read data. |
|
inlinevirtual |
Write data into the buffer.
Write data which were given with an argument into the buffer.
value | Target data to write. |