BufferBase abstract class. More...
#include <BufferBase.h>
Public Member Functions | |
virtual ReturnCode | advanceRptr (long int n=1)=0 |
Forward n reading pointers. More... | |
virtual ReturnCode | advanceWptr (long int n=1)=0 |
Forward n writing pointers. More... | |
virtual bool | empty (void) const =0 |
Check on whether the buffer is empty. More... | |
virtual bool | full (void) const =0 |
Check on whether the buffer is full. More... | |
virtual ReturnCode | get (DataType &value)=0 |
Read data from the buffer. More... | |
virtual DataType & | get ()=0 |
Read data from the buffer. More... | |
virtual void | init (const coil::Properties &prop)=0 |
Set the buffer. More... | |
virtual size_t | length (void) const =0 |
Get the buffer length. More... | |
virtual ReturnCode | length (size_t n)=0 |
Set the buffer length. More... | |
virtual ReturnCode | put (const DataType &value)=0 |
Write data into the buffer. More... | |
virtual ReturnCode | read (DataType &value, long int sec=-1, long int nsec=-1)=0 |
Read data from the buffer. More... | |
virtual size_t | readable () const =0 |
Write data into the buffer. More... | |
virtual ReturnCode | reset ()=0 |
Reset the buffer status. More... | |
virtual DataType * | rptr (long int n=0)=0 |
Get the reading pointer. More... | |
virtual DataType * | wptr (long int n=0)=0 |
Get the writing pointer. More... | |
virtual size_t | writable () const =0 |
Get a writable number. More... | |
virtual ReturnCode | write (const DataType &value, long int sec=-1, long int nsec=-1)=0 |
Write data into the buffer. More... | |
virtual BUFFERSTATUS_ENUM | ~BufferBase (void) |
Virtual destructor. More... | |
Additional Inherited Members | |
Public Types inherited from RTC::BufferStatus | |
enum | Enum { BUFFER_OK = 0, BUFFER_ERROR, BUFFER_FULL, BUFFER_EMPTY, NOT_SUPPORTED, TIMEOUT, PRECONDITION_NOT_MET } |
DataPortStatus return codes. More... | |
Static Public Member Functions inherited from RTC::BufferStatus | |
static const char * | toString (Enum status) |
Convert BufferStatus into the string. More... | |
BufferBase abstract class.
This is the abstract interface class for various Buffer. Concrete buffer classes must implement the following pure virtual functions. The users specify data type to hold it in a buffer as <DataType>.
This class provides public interface as follows.
This class provides protected interface as follows.
DataType | Data type to be stored to the buffer. |
Definition at line 104 of file BufferBase.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 121 of file BufferBase.h.
|
pure virtual |
Forward n reading pointers.
Pure virtual function to forward n reading pointers.
Implemented in RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Forward n writing pointers.
Pure virtual function to forward n writing pointers.
Implemented in InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Check on whether the buffer is empty.
Pure virtual function to check on whether the buffer is empty.
Implemented in RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Check on whether the buffer is full.
Pure virtual function to check on whether the buffer is full.
Implemented in InPort::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Read data from the buffer.
Pure virtual function to read data form the buffer.
value | Data to read. |
Implemented in RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Read data from the buffer.
Pure virtual function to read data from the buffer.
Implemented in RTC::NullBuffer< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Set the buffer.
Implemented in InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Get the buffer length.
Pure virtual function to get the buffer length.
Implemented in RTC::NullBuffer< DataType >, InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Set the buffer length.
Pure virtual function to set the buffer length.
Implemented in InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Write data into the buffer.
Pure virtual function to write data into the buffer.
value | Target data to write. |
Implemented in RTC::NullBuffer< DataType >, InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Read data from the buffer.
Pure virtual function to read data from the buffer.
value | Read data. |
Implemented in RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Write data into the buffer.
Pure virtual function to get a reading number.
Implemented in RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Reset the buffer status.
Pure virtual function to reset the buffer status.
Implemented in InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Get the reading pointer.
Pure virtual function to get the reading pointer.
Implemented in InPort::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Get the writing pointer.
Pure virtual function to get the writing pointer.
writeing | pinter or n previous pointer |
Implemented in InPort::RingBufferMock< DataType >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Get a writable number.
Pure virtual function to get a writable number.
Implemented in InPort::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.
|
pure virtual |
Write data into the buffer.
Pure virtual function to write data into the buffer.
value | Target data to write. |
Implemented in InPort::RingBufferMock< DataType >, RTC::RingBuffer< DataType >, RTC::RingBuffer< int >, OutPort::RingBufferMock< DataType >, OutPortBase::RingBufferMock< DataType >, InPortBase::RingBufferMock< DataType >, InPortPullConnector::RingBufferMock< DataType >, InPortPushConnector::RingBufferMock< DataType >, and OutPortPullConnector::RingBufferMock< DataType >.