Public Member Functions | Static Public Attributes | Private Attributes
InPort::RingBufferMock< DataType > Class Template Reference
Inheritance diagram for InPort::RingBufferMock< DataType >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ReturnCode advanceRptr (long int n=1)
 Forward n reading pointers.
virtual ReturnCode advanceWptr (long int n=1)
 Forward n writing pointers.
virtual bool empty (void) const
 Check on whether the buffer is empty.
virtual bool full (void) const
 Check on whether the buffer is full.
virtual ReturnCode get (DataType &value)
 Read data from the buffer.
virtual DataType & get ()
 Read data from the buffer.
virtual void init (const coil::Properties &prop)
 Set the buffer.
virtual size_t length (void) const
 Get the buffer length.
virtual ReturnCode length (size_t n)
 Set the buffer length.
virtual ReturnCode put (const DataType &value)
 Write data into the buffer.
virtual ReturnCode read (DataType &value, long int sec=-1, long int nsec=-1)
 Read data from the buffer.
virtual size_t readable () const
 Write data into the buffer.
virtual ReturnCode reset ()
 Reset the buffer status.
BUFFERSTATUS_ENUM RingBufferMock (long int length=8)
virtual DataType * rptr (long int n=0)
 Get the reading pointer.
void set_read_return_value (::RTC::BufferStatus::Enum value)
void set_readable_return_value (size_t value)
void setLogger (Logger *logger)
virtual DataType * wptr (long int n=0)
 Get the writing pointer.
virtual size_t writable () const
 Get a writable number.
virtual ReturnCode write (const DataType &value, long int sec=-1, long int nsec=-1)
 Write data into the buffer.
virtual ~RingBufferMock (void)

Static Public Attributes

static Logger logger

Private Attributes

std::vector< DataType > m_buffer
DataType m_data
Loggerm_logger
::RTC::BufferStatus::Enum m_read_return_value
size_t m_readable_return_value

Detailed Description

template<class DataType>
class InPort::RingBufferMock< DataType >

Definition at line 459 of file InPortTests.cpp.


Constructor & Destructor Documentation

template<class DataType >
BUFFERSTATUS_ENUM InPort::RingBufferMock< DataType >::RingBufferMock ( long int  length = 8) [inline]

Definition at line 464 of file InPortTests.cpp.

template<class DataType >
virtual InPort::RingBufferMock< DataType >::~RingBufferMock ( void  ) [inline, virtual]

Definition at line 472 of file InPortTests.cpp.


Member Function Documentation

template<class DataType >
virtual ReturnCode InPort::RingBufferMock< DataType >::advanceRptr ( long int  n = 1) [inline, virtual]

Forward n reading pointers.

Pure virtual function to forward n reading pointers.

Returns:
BUFFER_OK: Successful BUFFER_ERROR: Failed

Implements RTC::BufferBase< DataType >.

Definition at line 577 of file InPortTests.cpp.

template<class DataType >
virtual ReturnCode InPort::RingBufferMock< DataType >::advanceWptr ( long int  n = 1) [inline, virtual]

Forward n writing pointers.

Pure virtual function to forward n writing pointers.

Returns:
BUFFER_OK: Successful BUFFER_ERROR: Failed

Implements RTC::BufferBase< DataType >.

Definition at line 528 of file InPortTests.cpp.

template<class DataType >
virtual bool InPort::RingBufferMock< DataType >::empty ( void  ) const [inline, virtual]

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.

Implements RTC::BufferBase< DataType >.

Definition at line 631 of file InPortTests.cpp.

template<class DataType >
virtual bool InPort::RingBufferMock< DataType >::full ( void  ) const [inline, virtual]

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.

Implements RTC::BufferBase< DataType >.

Definition at line 561 of file InPortTests.cpp.

template<class DataType >
virtual ReturnCode InPort::RingBufferMock< DataType >::get ( DataType &  value) [inline, virtual]

Read data from the buffer.

Pure virtual function to read data form the buffer.

Parameters:
valueData to read.
Returns:
BUFFER_OK: Successful BUFFER_ERROR: Failed

Implements RTC::BufferBase< DataType >.

Definition at line 585 of file InPortTests.cpp.

template<class DataType >
virtual DataType& InPort::RingBufferMock< DataType >::get ( ) [inline, virtual]

Read data from the buffer.

Pure virtual function to read data from the buffer.

Returns:
Data got from buffer.

Implements RTC::BufferBase< DataType >.

Definition at line 593 of file InPortTests.cpp.

template<class DataType >
virtual void InPort::RingBufferMock< DataType >::init ( const coil::Properties prop) [inline, virtual]

Set the buffer.

Implements RTC::BufferBase< DataType >.

Definition at line 489 of file InPortTests.cpp.

template<class DataType >
virtual size_t InPort::RingBufferMock< DataType >::length ( void  ) const [inline, virtual]

Get the buffer length.

Pure virtual function to get the buffer length.

Returns:
buffer length

Implements RTC::BufferBase< DataType >.

Definition at line 496 of file InPortTests.cpp.

template<class DataType >
virtual ReturnCode InPort::RingBufferMock< DataType >::length ( size_t  n) [inline, virtual]

Set the buffer length.

Pure virtual function to set the buffer length.

Returns:
BUFFER_OK: Successful NOT_SUPPORTED: The buffer length cannot be set. BUFFER_ERROR: Failed

Implements RTC::BufferBase< DataType >.

Definition at line 504 of file InPortTests.cpp.

template<class DataType >
virtual ReturnCode InPort::RingBufferMock< DataType >::put ( const DataType &  value) [inline, virtual]

Write data into the buffer.

Pure virtual function to write data into the buffer.

Parameters:
valueTarget data to write.
Returns:
BUFFER_OK: Successful BUFFER_ERROR: Failed

Implements RTC::BufferBase< DataType >.

Definition at line 536 of file InPortTests.cpp.

template<class DataType >
virtual ReturnCode InPort::RingBufferMock< DataType >::read ( DataType &  value,
long int  sec = -1,
long int  nsec = -1 
) [inline, virtual]

Read data from the buffer.

Pure virtual function to read data from the buffer.

Parameters:
valueRead data.
Returns:
Result of having read (true:Successful, false:Failed)

Implements RTC::BufferBase< DataType >.

Definition at line 601 of file InPortTests.cpp.

template<class DataType >
virtual size_t InPort::RingBufferMock< DataType >::readable ( ) const [inline, virtual]

Write data into the buffer.

Pure virtual function to get a reading number.

Returns:
readable number

Implements RTC::BufferBase< DataType >.

Definition at line 615 of file InPortTests.cpp.

template<class DataType >
virtual ReturnCode InPort::RingBufferMock< DataType >::reset ( ) [inline, virtual]

Reset the buffer status.

Pure virtual function to reset the buffer status.

Returns:
BUFFER_OK: Successful NOT_SUPPORTED: The buffer status cannot be reset. BUFFER_ERROR: Failed

Implements RTC::BufferBase< DataType >.

Definition at line 512 of file InPortTests.cpp.

template<class DataType >
virtual DataType* InPort::RingBufferMock< DataType >::rptr ( long int  n = 0) [inline, virtual]

Get the reading pointer.

Pure virtual function to get the reading pointer.

Returns:
reading pointer

Implements RTC::BufferBase< DataType >.

Definition at line 569 of file InPortTests.cpp.

template<class DataType >
void InPort::RingBufferMock< DataType >::set_read_return_value ( ::RTC::BufferStatus::Enum  value) [inline]

Definition at line 481 of file InPortTests.cpp.

template<class DataType >
void InPort::RingBufferMock< DataType >::set_readable_return_value ( size_t  value) [inline]

Definition at line 623 of file InPortTests.cpp.

template<class DataType >
void InPort::RingBufferMock< DataType >::setLogger ( Logger logger) [inline]

Definition at line 639 of file InPortTests.cpp.

template<class DataType >
virtual DataType* InPort::RingBufferMock< DataType >::wptr ( long int  n = 0) [inline, virtual]

Get the writing pointer.

Pure virtual function to get the writing pointer.

Parameters:
writeingpinter or n previous pointer
Returns:
writing pointer

Implements RTC::BufferBase< DataType >.

Definition at line 520 of file InPortTests.cpp.

template<class DataType >
virtual size_t InPort::RingBufferMock< DataType >::writable ( ) const [inline, virtual]

Get a writable number.

Pure virtual function to get a writable number.

Returns:
value writable number

Implements RTC::BufferBase< DataType >.

Definition at line 553 of file InPortTests.cpp.

template<class DataType >
virtual ReturnCode InPort::RingBufferMock< DataType >::write ( const DataType &  value,
long int  sec = -1,
long int  nsec = -1 
) [inline, virtual]

Write data into the buffer.

Pure virtual function to write data into the buffer.

Parameters:
valueTarget data to write.
Returns:
BUFFER_OK: Successful BUFFER_ERROR: Failed

Implements RTC::BufferBase< DataType >.

Definition at line 544 of file InPortTests.cpp.


Member Data Documentation

template<class DataType >
Logger InPort::RingBufferMock< DataType >::logger [static]

Definition at line 644 of file InPortTests.cpp.

template<class DataType >
std::vector<DataType> InPort::RingBufferMock< DataType >::m_buffer [private]

Definition at line 647 of file InPortTests.cpp.

template<class DataType >
DataType InPort::RingBufferMock< DataType >::m_data [private]

Definition at line 646 of file InPortTests.cpp.

template<class DataType >
Logger* InPort::RingBufferMock< DataType >::m_logger [private]

Definition at line 648 of file InPortTests.cpp.

template<class DataType >
::RTC::BufferStatus::Enum InPort::RingBufferMock< DataType >::m_read_return_value [private]

Definition at line 649 of file InPortTests.cpp.

template<class DataType >
size_t InPort::RingBufferMock< DataType >::m_readable_return_value [private]

Definition at line 650 of file InPortTests.cpp.


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


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Sat Jun 8 2019 18:49:12