DataType
-
DataType Data type to be stored to the buffer.public interface BufferBase<DataType>
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 \
This class provides protected interface as follows.
Modifier and Type | Method and Description |
---|---|
ReturnCode |
advanceRptr()
Forward n reading pointers.
|
ReturnCode |
advanceRptr(int n)
Forward n reading pointers.
|
ReturnCode |
advanceWptr()
Forward n writing pointers.
|
ReturnCode |
advanceWptr(int n)
Forward n writing pointers.
|
boolean |
empty()
Check on whether the buffer is empty.
|
boolean |
full()
Check on whether the buffer is full.
|
DataType |
get()
Read data from the buffer
|
ReturnCode |
get(DataRef<DataType> value)
Read data from the buffer
|
void |
init(Properties prop)
Set the buffer
|
int |
length()
Get the buffer length
|
ReturnCode |
length(int n)
Set the buffer length
|
ReturnCode |
put(DataType data)
Write data into the buffer
|
ReturnCode |
read(DataRef<DataType> valueRef)
Read data from the buffer
|
ReturnCode |
read(DataRef<DataType> valueRef,
int sec,
int nsec)
Read data from the buffer
|
int |
readable()
Write data into the buffer
|
ReturnCode |
reset()
Reset the buffer status
|
DataType |
rptr()
Get the reading pointer
|
DataType |
rptr(int n)
Get the reading pointer
|
DataType |
wptr()
Get the writing pointer
|
DataType |
wptr(int n)
Get the writing pointer
|
int |
writable()
Get a writable number.
|
ReturnCode |
write(DataType value)
Write data into the buffer
|
ReturnCode |
write(DataType value,
int sec,
int nsec)
Write data into the buffer
|
void init(Properties prop)
prop
-
PropertiesReturnCode reset()
Pure virtual function to reset the buffer status.
DataType wptr(int n)
Pure virtual function to get the writing pointer.
n
-
writeing pinter + n previous pointerDataType wptr()
Pure virtual function to get the writing pointer.
ReturnCode advanceWptr(int n)
Pure virtual function to forward n writing pointers.
n
-
writeing pinter + n previous pointerReturnCode advanceWptr()
Pure virtual function to forward 1 writing pointers.
int writable()
Pure virtual function to get a writable number.
boolean full()
Pure virtual function to check on whether the buffer is full.
DataType rptr(int n)
Pure virtual function to get the reading pointer.
n
-
reading pinter + n previous pointerDataType rptr()
Pure virtual function to get the reading pointer.
ReturnCode advanceRptr()
Pure virtual function to forward 1 reading pointers.
ReturnCode advanceRptr(int n)
Pure virtual function to forward n reading pointers.
n
-
reading pinter + n previous pointerint readable()
Pure virtual function to get a reading number.
boolean empty()
Pure virtual function to check on whether the buffer is empty.
int length()
Pure virtual function to get the buffer length.
ReturnCode length(int n)
Pure virtual function to set the buffer length.
ReturnCode write(DataType value)
Pure virtual function to write data into the buffer.
value
-
value Target data to write.ReturnCode write(DataType value, int sec, int nsec)
Pure virtual function to write data into the buffer.
value
-
value Target data to write.sec
-
TimeOut sec ordernsec
-
TimeOut nsec orderReturnCode read(DataRef<DataType> valueRef)
Pure virtual function to read data from the buffer.
valueRef
-
Readout data stored into the buffer.ReturnCode read(DataRef<DataType> valueRef, int sec, int nsec)
Pure virtual function to read data from the buffer.
valueRef
-
Readout data stored into the buffer.sec
-
TimeOut sec ordernsec
-
TimeOut nsec orderReturnCode put(DataType data)
Pure virtual function to write data into the buffer.
data
-
value Target data to write.DataType get()
Pure virtual function to read data form the buffer.
ReturnCode get(DataRef<DataType> value)
Pure virtual function to read data form the buffer.
value
-
value Data to read.