|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectjp.go.aist.rtm.RTC.buffer.RingBuffer<DataType>
DataType
- バッファ内のデータ型を指定します。public class RingBuffer<DataType>
リング状のバッファを持つバッファ実装です。 バッファ全体がデータで埋まった場合、以降のデータは古いデータから順次上書きされていきます。 これにより、直近のバッファ長分のデータのみが残ります。
入れ子のクラスの概要 | |
---|---|
protected class |
RingBuffer.condition
|
フィールドの概要 | |
---|---|
(package private) int |
m_wcount
Counter for writing |
コンストラクタの概要 | |
---|---|
RingBuffer()
Constructor |
|
RingBuffer(int length)
Constructor |
メソッドの概要 | |
---|---|
ReturnCode |
advanceRptr()
advanceRptr |
ReturnCode |
advanceRptr(int n)
advanceRptr |
ReturnCode |
advanceWptr()
advanceWptr |
ReturnCode |
advanceWptr(int n)
Get the buffer length |
boolean |
empty()
empty |
boolean |
full()
full |
DataType |
get()
バッファからデータを読み込みます。 |
ReturnCode |
get(DataRef<DataType> value)
get |
void |
init(Properties prop)
init |
boolean |
isFull()
バッファがフルかどうか判定します。 |
int |
length()
バッファ長を取得します。 |
ReturnCode |
length(int n)
sets the length of the buffer. |
ReturnCode |
put(DataType data)
バッファにデータを書き込みます。 |
ReturnCode |
read(DataRef<DataType> valueRef)
バッファからデータを読み込みます。 |
ReturnCode |
read(DataRef<DataType> valueRef,
int sec)
|
ReturnCode |
read(DataRef<DataType> valueRef,
int sec,
int nsec)
Readout data from the buffer |
int |
readable()
readable |
ReturnCode |
reset()
Get the buffer length |
DataType |
rptr()
rptr |
DataType |
rptr(int n)
rptr |
DataType |
wptr()
wptr |
DataType |
wptr(int n)
wptr |
int |
writable()
writable |
ReturnCode |
write(DataType value)
バッファにデータを書き込みます。 |
ReturnCode |
write(DataType value,
int sec)
|
ReturnCode |
write(DataType value,
int sec,
int nsec)
|
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
---|
int m_wcount
コンストラクタの詳細 |
---|
public RingBuffer()
public RingBuffer(int length)
Initialize the buffer by specified buffer length. However, if the specified length is less than two, the buffer should be initialized by two in length.
length
-
Buffer lengthメソッドの詳細 |
---|
public int length()
バッファ長を取得します。
BufferBase<DataType>
内の length
public ReturnCode length(int n)
sets the length of the buffer.
BufferBase<DataType>
内の length
n
- length
public ReturnCode write(DataType value)
バッファにデータを書き込みます。
BufferBase<DataType>
内の write
value
- 書き込むデータ
public ReturnCode write(DataType value, int sec)
public ReturnCode write(DataType value, int sec, int nsec)
BufferBase<DataType>
内の write
public ReturnCode read(DataRef<DataType> valueRef)
バッファからデータを読み込みます。
BufferBase<DataType>
内の read
valueRef
- 読み込んだデータを受け取るためのDataRefオブジェクト
public ReturnCode read(DataRef<DataType> valueRef, int sec)
public ReturnCode read(DataRef<DataType> valueRef, int sec, int nsec)
Readout data stored into the buffer.
BufferBase<DataType>
内の read
valueRef
-
Readout datasec
-
TimeOut sec ordernsec
-
TimeOut nsec order
public boolean isFull()
バッファがフルかどうか判定します。
public ReturnCode put(DataType data)
バッファにデータを書き込みます。
BufferBase<DataType>
内の put
data
- 書き込むデータ
public DataType get()
バッファからデータを読み込みます。
BufferBase<DataType>
内の get
public ReturnCode get(DataRef<DataType> value)
get
BufferBase<DataType>
内の get
value
-
public void init(Properties prop)
init
BufferBase<DataType>
内の init
prop
- public ReturnCode reset()
Pure virtual function to get the buffer length.
BufferBase<DataType>
内の reset
public DataType wptr(int n)
wptr
This function returns the object of a present writing element of the buffer.
BufferBase<DataType>
内の wptr
n
-
public DataType wptr()
wptr
This function returns the pointer of a present writing element of the buffer.
BufferBase<DataType>
内の wptr
public ReturnCode advanceWptr(int n)
This function advances the writing pointer.
BufferBase<DataType>
内の advanceWptr
n
-
write pinter + n pointer
public ReturnCode advanceWptr()
advanceWptr
This function advances the writing pointer.
BufferBase<DataType>
内の advanceWptr
public int writable()
writable
This function returns the number of elements that can be written in the buffer.
BufferBase<DataType>
内の writable
public boolean full()
full
Check on whether the buffer is full
BufferBase<DataType>
内の full
public DataType rptr(int n)
rptr
This function returns the pointer of a present reading element of the buffer.
BufferBase<DataType>
内の rptr
n
-
public DataType rptr()
rptr
This function returns the pointer of a present reading element of the buffer.
BufferBase<DataType>
内の rptr
public ReturnCode advanceRptr(int n)
advanceRptr
This function advances the reading pointer.
BufferBase<DataType>
内の advanceRptr
n
-
public ReturnCode advanceRptr()
advanceRptr
This function advances the reading pointer.
BufferBase<DataType>
内の advanceRptr
public int readable()
readable
This function returns the number of elements that can be read from the buffer.
BufferBase<DataType>
内の readable
public boolean empty()
empty
Check on whether the buffer is empty.
BufferBase<DataType>
内の empty
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |