Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
OpenRTM_aist.RingBuffer.RingBuffer Class Reference
Inheritance diagram for OpenRTM_aist.RingBuffer.RingBuffer:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, length=RINGBUFFER_DEFAULT_LENGTH)
 Constructor. More...
 
def advanceRptr (self, n=1)
 Get the buffer length. More...
 
def advanceWptr (self, n=1)
 Get the buffer length. More...
 
def empty (self)
 Check on whether the buffer is empty. More...
 
def full (self)
 Check on whether the buffer is full. More...
 
def get (self, value=None)
 Write data into the buffer. More...
 
def init (self, prop)
 void init(const coil::Properties& prop) More...
 
def length (self, n=None)
 Get the buffer length. More...
 
def put (self, value)
 Write data into the buffer. More...
 
def read (self, value, sec=-1, nsec=0)
 Readout data from the buffer. More...
 
def readable (self)
 Write data into the buffer. More...
 
def reset (self)
 Get the buffer length. More...
 
def rptr (self, n=0)
 Get the buffer length. More...
 
def wptr (self, n=0)
 Get the buffer length. More...
 
def writable (self)
 Write data into the buffer. More...
 
def write (self, value, sec=-1, nsec=0)
 Write data into the buffer. More...
 
- Public Member Functions inherited from OpenRTM_aist.BufferBase.BufferBase
def advanceRptr (self, n=1)
 Get the buffer length. More...
 
def advanceWptr (self, n=1)
 Get the buffer length. More...
 
def empty (self)
 Check on whether the buffer is empty. More...
 
def full (self)
 Check on whether the buffer is full. More...
 
def get (self)
 Get data from the buffer. More...
 
def init (self, prop)
 
def length (self)
 Get the buffer length. More...
 
def put (self, data)
 Write data into the buffer. More...
 
def read (self, value, sec=-1, nsec=-1)
 Read data from the buffer. More...
 
def readable (self)
 Write data into the buffer. More...
 
def reset (self)
 Get the buffer length. More...
 
def rptr (self, n=0)
 Get the buffer length. More...
 
def wptr (self, n=0)
 Get the buffer length. More...
 
def writable (self)
 Write data into the buffer. More...
 
def write (self, value, sec=-1, nsec=-1)
 Write data into the buffer. More...
 
- Public Member Functions inherited from OpenRTM_aist.BufferStatus.BufferStatus
def toString (self, status)
 

Static Public Attributes

int RINGBUFFER_DEFAULT_LENGTH = 8
 
- Static Public Attributes inherited from OpenRTM_aist.BufferStatus.BufferStatus
int BUFFER_EMPTY = 3
 
int BUFFER_ERROR = 1
 
int BUFFER_FULL = 2
 
int BUFFER_OK = 0
 
int NOT_SUPPORTED = 4
 
int PRECONDITION_NOT_MET = 6
 
int TIMEOUT = 5
 

Private Member Functions

def __initLength (self, prop)
 void initLength(const coil::Properties& prop) More...
 
def __initReadPolicy (self, prop)
 void initReadPolicy(const coil::Properties& prop) More...
 
def __initWritePolicy (self, prop)
 void initWritePolicy(const coil::Properties& prop) More...
 

Private Attributes

 _buffer
 
 _empty_cond
 
 _empty_mutex
 
 _fillcount
 
 _full_cond
 
 _full_mutex
 
 _length
 
 _overwrite
 
 _pos_mutex
 
 _readback
 
 _rpos
 
 _rtimeout
 
 _timedread
 
 _timedwrite
 
 _wcount
 
 _wpos
 
 _wtimeout
 

Detailed Description

 

Definition at line 41 of file RingBuffer.py.

Constructor & Destructor Documentation

def OpenRTM_aist.RingBuffer.RingBuffer.__init__ (   self,
  length = RINGBUFFER_DEFAULT_LENGTH 
)

Constructor.

Constructor. 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.

Parameters
lengthBuffer length

Definition at line 71 of file RingBuffer.py.

Member Function Documentation

def OpenRTM_aist.RingBuffer.RingBuffer.__initLength (   self,
  prop 
)
private

void initLength(const coil::Properties& prop)

Definition at line 708 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.__initReadPolicy (   self,
  prop 
)
private

void initReadPolicy(const coil::Properties& prop)

Definition at line 741 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.__initWritePolicy (   self,
  prop 
)
private

void initWritePolicy(const coil::Properties& prop)

Definition at line 718 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.advanceRptr (   self,
  n = 1 
)

Get the buffer length.

Pure virtual function to get the buffer length.

Returns
buffer length

DataType* rptr(long int n = 0)

Definition at line 497 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.advanceWptr (   self,
  n = 1 
)

Get the buffer length.

Pure virtual function to get the buffer length.

Returns
buffer length

ReturnCode advanceWptr(long int n = 1)

Definition at line 254 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.empty (   self)

Check on whether the buffer is empty.

Pure virtual function to check on whether the buffer is empty.

Returns
True if the buffer is empty, else false.

bool empty(void) const

Definition at line 702 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.full (   self)

Check on whether the buffer is full.

Pure virtual function to check on whether the buffer is full.

Returns
True if the buffer is full, else false.

bool full(void) const

Definition at line 446 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.get (   self,
  value = None 
)

Write data into the buffer.

Pure virtual function to write data into the buffer.

Parameters
valueTarget data to write.
Returns
Result of having written in data (true:Successful, false:Failed)

ReturnCode get(DataType& value)

Definition at line 540 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.init (   self,
  prop 
)

void init(const coil::Properties& prop)

Definition at line 134 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.length (   self,
  n = None 
)

Get the buffer length.

size_t length(void) const

Definition at line 158 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.put (   self,
  value 
)

Write data into the buffer.

Pure virtual function to write data into the buffer.

Definition at line 300 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.read (   self,
  value,
  sec = -1,
  nsec = 0 
)

Readout data from the buffer.

Readout data stored into the buffer.

Parameters
value(list)Readout data
Returns
Readout result (Always true: readout success is returned)

ReturnCode read(DataType& value, long int sec = -1, long int nsec = 0)

Definition at line 592 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.readable (   self)

Write data into the buffer.

Pure virtual function to write data into the buffer.

Parameters
valueTarget data to write.
Returns
Result of having written in data (true:Successful, false:Failed)

size_t readable() const

Definition at line 677 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.reset (   self)

Get the buffer length.

Pure virtual function to get the buffer length.

Returns
buffer length

ReturnCode reset()

Definition at line 195 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.rptr (   self,
  n = 0 
)

Get the buffer length.

Pure virtual function to get the buffer length.

Returns
buffer length

Definition at line 470 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.wptr (   self,
  n = 0 
)

Get the buffer length.

Pure virtual function to get the buffer length.

Returns
buffer length

DataType* wptr(long int n = 0)

Definition at line 225 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.writable (   self)

Write data into the buffer.

Pure virtual function to write data into the buffer.

Parameters
valueTarget data to write.
Returns
Result of having written in data (true:Successful, false:Failed)

size_t writable() const

Definition at line 421 of file RingBuffer.py.

def OpenRTM_aist.RingBuffer.RingBuffer.write (   self,
  value,
  sec = -1,
  nsec = 0 
)

Write data into the buffer.

Write data which is given argument into the buffer.

Parameters
valueTarget data for writing
Returns
Writing result (Always true: writing success is returned)

ReturnCode write(const DataType& value, long int sec = -1, long int nsec = 0)

Definition at line 348 of file RingBuffer.py.

Member Data Documentation

OpenRTM_aist.RingBuffer.RingBuffer._buffer
private

Definition at line 83 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._empty_cond
private

Definition at line 88 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._empty_mutex
private

Definition at line 86 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._fillcount
private

Definition at line 81 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._full_cond
private

Definition at line 87 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._full_mutex
private

Definition at line 85 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._length
private

Definition at line 78 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._overwrite
private

Definition at line 72 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._pos_mutex
private

Definition at line 84 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._readback
private

Definition at line 73 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._rpos
private

Definition at line 80 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._rtimeout
private

Definition at line 77 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._timedread
private

Definition at line 75 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._timedwrite
private

Definition at line 74 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._wcount
private

Definition at line 82 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._wpos
private

Definition at line 79 of file RingBuffer.py.

OpenRTM_aist.RingBuffer.RingBuffer._wtimeout
private

Definition at line 76 of file RingBuffer.py.

int OpenRTM_aist.RingBuffer.RingBuffer.RINGBUFFER_DEFAULT_LENGTH = 8
static

Definition at line 45 of file RingBuffer.py.


The documentation for this class was generated from the following file:


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Jun 6 2019 19:11:38