20 #ifndef RTC_BUFFERBASE_H 21 #define RTC_BUFFERBASE_H 24 #include <coil/Properties.h> 103 template <
class DataType>
157 virtual size_t length(
void)
const = 0;
233 virtual DataType*
wptr(
long int n = 0) = 0;
312 long int sec = -1,
long int nsec = -1) = 0;
335 virtual size_t writable()
const = 0;
356 virtual bool full(
void)
const = 0;
379 virtual DataType*
rptr(
long int n = 0) = 0;
451 virtual DataType&
get() = 0;
477 long int sec = -1,
long int nsec = -1) = 0;
500 virtual size_t readable()
const = 0;
521 virtual bool empty(
void)
const = 0;
551 template <
class DataType>
648 virtual bool write(
const DataType& value)
677 virtual bool read(DataType& value)
775 virtual const DataType&
get(void)
812 #endif // BufferBase_h virtual bool isEmpty(void) const
Check on whether the buffer is empty.
virtual ReturnCode advanceWptr(long int n=1)=0
Forward n writing pointers.
Concrete buffer class for dummy.
virtual size_t writable() const =0
Get a writable number.
NullBuffer(long int size=1)
Constructer.
virtual bool read(DataType &value)
Read data from the buffer.
virtual BUFFERSTATUS_ENUM ~BufferBase(void)
Virtual destructor.
virtual ReturnCode put(const DataType &value)=0
Write data into the buffer.
BufferStatus mixin class.
Enum
DataPortStatus return codes.
virtual ReturnCode reset()=0
Reset the buffer status.
virtual long int length(void) const
Get the buffer length (always 1)
virtual DataType * wptr(long int n=0)=0
Get the writing pointer.
#define BUFFERSTATUS_ENUM
Importing RTC::BufferStatus macro.
Buffer status enum definition.
virtual bool full(void) const =0
Check on whether the buffer is full.
virtual DataType * rptr(long int n=0)=0
Get the reading pointer.
virtual DataType & getRef(void)
Get the buffer's reference to be written the next.
prop
Organization::get_organization_property ();.
virtual ReturnCode read(DataType &value, long int sec=-1, long int nsec=-1)=0
Read data from the buffer.
Class represents a set of properties.
virtual ReturnCode advanceRptr(long int n=1)=0
Forward n reading pointers.
virtual size_t readable() const =0
Write data into the buffer.
virtual ReturnCode write(const DataType &value, long int sec=-1, long int nsec=-1)=0
Write data into the buffer.
virtual bool isFull(void) const
Check on whether the buffer is full.
virtual void put(const DataType &data)
Store data into the buffer.
virtual void init(const coil::Properties &prop)=0
Set the buffer.
BufferBase abstract class.
virtual bool write(const DataType &value)
Write data into the buffer.
virtual ~NullBuffer(void)
Destructor.
virtual bool empty(void) const =0
Check on whether the buffer is empty.
virtual size_t length(void) const =0
Get the buffer length.