#include <buffer.h>
Inheritance diagram for SMP::SMPBuffer:


Public Member Functions | |
| SMPBuffer (void) | |
| SMPBuffer (size_t buf_size) | |
| constructor, initialize the buffer with user-defined size | |
| ~SMPBuffer (void) | |
| void | initialize () |
| void | set_status (int b_status) |
| set buffer status | |
| int | get_status (void) |
| get buffer status | |
| size_t | available (void) |
| Return the remaining spaces of the buffer. | |
| ssize_t | read_space (int fid) |
| size_t | occuppied (void) |
| Return the occuppied spaces of the buffer. | |
| size_t | occuppied (int fid) |
| return the occuppied spaces of the buffer, whose destination is filter of id = fid | |
| int | write (const void *buff, size_t nbytes) |
| write data to this buffer | |
| int | read (void *buff, size_t nbytes, int fid=0) |
| read data from this buffer | |
| void | print_status (int nbytes=0) |
| print buffer status to stdout | |
Friends | |
| class | SMPKernel |
| SMP::SMPBuffer::SMPBuffer | ( | void | ) |
default constructor
| SMP::SMPBuffer::SMPBuffer | ( | size_t | buf_size | ) |
constructor, initialize the buffer with user-defined size
| buf_size | user-defined buffer size, in bytes |
| SMP::SMPBuffer::~SMPBuffer | ( | void | ) |
destructor
| void SMP::SMPBuffer::initialize | ( | ) |
initialize this data channel
| void SMP::SMPBuffer::set_status | ( | int | b_status | ) | [inline] |
set buffer status
| b_status | the status to set |
| size_t SMP::SMPBuffer::available | ( | void | ) | [inline] |
Return the remaining spaces of the buffer.
| ssize_t SMP::SMPBuffer::read_space | ( | int | fid | ) |
return the available space for filter fid to read
| size_t SMP::SMPBuffer::occuppied | ( | void | ) | [inline] |
Return the occuppied spaces of the buffer.
| size_t SMP::SMPBuffer::occuppied | ( | int | fid | ) | [inline] |
return the occuppied spaces of the buffer, whose destination is filter of id = fid
| int SMP::SMPBuffer::write | ( | const void * | buff, | |
| size_t | nbytes | |||
| ) |
write data to this buffer
| buff | the data to write | |
| nbytes | number of bytes to write |
| int SMP::SMPBuffer::read | ( | void * | buff, | |
| size_t | nbytes, | |||
| int | fid = 0 | |||
| ) |
read data from this buffer
| buff | the data to place read data | |
| nbytes | number of bytes to read | |
| fid | read data, whose destination filter's id = fid |
| void SMP::SMPBuffer::print_status | ( | int | nbytes = 0 |
) |
print buffer status to stdout
| nbytes | number of bytes written to from read from this buffer if not specified, it simply doesn't print it. |
friend class SMPKernel [friend] |
SMPKernel is a friend of SMPBuffer, so SMP kernel can directly access all members defined here
Reimplemented from SMP::SMPBufferBase.
1.5.1