#include <SingleConsumerQ.h>
Classes | |
struct | Buffer |
struct | ConsumerType |
class | OperateBuffer |
struct | ProducerType |
Public Types | |
using | ConsumerBuffer = OperateBuffer< ConsumerType > |
using | ProducerBuffer = OperateBuffer< ProducerType > |
Public Member Functions | |
SingleConsumerQ (int const max_event_size, int const max_queue_depth) | |
Buffer | getProducerBuffer () |
void | releaseProducerBuffer (void *) |
void | commitProducerBuffer (void *, int) |
Buffer | getConsumerBuffer () |
void | releaseConsumerBuffer (void *) |
void | commitConsumerBuffer (void *, int) |
int | maxEventSize () const |
int | maxQueueDepth () const |
SingleConsumerQ (SingleConsumerQ const &)=delete | |
SingleConsumerQ | operator= (SingleConsumerQ const &)=delete |
Private Types | |
using | ByteArray = std::vector< char > |
using | Pool = std::vector< void * > |
using | Queue = std::vector< Buffer > |
Private Attributes | |
int | max_event_size_ |
int | max_queue_depth_ |
int | pos_ |
ByteArray | mem_ |
Pool | buffer_pool_ {} |
Queue | queue_ |
unsigned int | fpos_ {} |
unsigned int | bpos_ {} |
std::mutex | pool_mutex_ {} |
std::mutex | queue_mutex_ {} |
std::condition_variable | pool_cond_ {} |
std::condition_variable | pop_cond_ {} |
std::condition_variable | push_cond_ {} |
Definition at line 39 of file SingleConsumerQ.h.
|
private |
Definition at line 149 of file SingleConsumerQ.h.
Definition at line 122 of file SingleConsumerQ.h.
|
private |
Definition at line 151 of file SingleConsumerQ.h.
Definition at line 123 of file SingleConsumerQ.h.
|
private |
Definition at line 153 of file SingleConsumerQ.h.
mf::SingleConsumerQ::SingleConsumerQ | ( | int const | max_event_size, |
int const | max_queue_depth | ||
) |
Definition at line 5 of file SingleConsumerQ.cc.
|
delete |
void mf::SingleConsumerQ::commitConsumerBuffer | ( | void * | v, |
int | |||
) |
Definition at line 89 of file SingleConsumerQ.cc.
void mf::SingleConsumerQ::commitProducerBuffer | ( | void * | v, |
int | len | ||
) |
Definition at line 43 of file SingleConsumerQ.cc.
SingleConsumerQ::Buffer mf::SingleConsumerQ::getConsumerBuffer | ( | ) |
Definition at line 60 of file SingleConsumerQ.cc.
SingleConsumerQ::Buffer mf::SingleConsumerQ::getProducerBuffer | ( | ) |
Definition at line 19 of file SingleConsumerQ.cc.
|
inline |
Definition at line 134 of file SingleConsumerQ.h.
|
inline |
Definition at line 139 of file SingleConsumerQ.h.
|
delete |
void mf::SingleConsumerQ::releaseConsumerBuffer | ( | void * | v | ) |
Definition at line 78 of file SingleConsumerQ.cc.
void mf::SingleConsumerQ::releaseProducerBuffer | ( | void * | v | ) |
Definition at line 33 of file SingleConsumerQ.cc.
|
private |
Definition at line 161 of file SingleConsumerQ.h.
|
private |
Definition at line 159 of file SingleConsumerQ.h.
|
private |
Definition at line 161 of file SingleConsumerQ.h.
|
private |
Definition at line 155 of file SingleConsumerQ.h.
|
private |
Definition at line 156 of file SingleConsumerQ.h.
|
private |
Definition at line 158 of file SingleConsumerQ.h.
|
private |
Definition at line 165 of file SingleConsumerQ.h.
|
private |
Definition at line 163 of file SingleConsumerQ.h.
|
private |
Definition at line 166 of file SingleConsumerQ.h.
|
private |
Definition at line 157 of file SingleConsumerQ.h.
|
private |
Definition at line 167 of file SingleConsumerQ.h.
|
private |
Definition at line 160 of file SingleConsumerQ.h.
|
private |
Definition at line 164 of file SingleConsumerQ.h.