|
|
|
@ -33,9 +33,7 @@ public:
|
|
|
|
|
virtual void process_pdu(uint8_t* buff, uint32_t len, channel_t channel) = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
pdu_queue(srslog::basic_logger& logger, uint32_t pool_size = DEFAULT_POOL_SIZE) :
|
|
|
|
|
pool(pool_size), callback(NULL), logger(logger), pdu_q(pool_size)
|
|
|
|
|
{}
|
|
|
|
|
pdu_queue(srslog::basic_logger& logger) : pool(DEFAULT_POOL_SIZE), callback(NULL), logger(logger) {}
|
|
|
|
|
void init(process_callback* callback);
|
|
|
|
|
|
|
|
|
|
uint8_t* request(uint32_t len);
|
|
|
|
@ -47,7 +45,7 @@ public:
|
|
|
|
|
void reset();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
const static int DEFAULT_POOL_SIZE = 64; // Number of PDU buffers in total
|
|
|
|
|
const static int DEFAULT_POOL_SIZE = 128; // Number of PDU buffers in total
|
|
|
|
|
const static int MAX_PDU_LEN = 150 * 1024 / 8; // ~ 150 Mbps
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
@ -60,8 +58,8 @@ private:
|
|
|
|
|
|
|
|
|
|
} pdu_t;
|
|
|
|
|
|
|
|
|
|
dyn_blocking_queue<pdu_t*> pdu_q;
|
|
|
|
|
buffer_pool<pdu_t> pool;
|
|
|
|
|
static_blocking_queue<pdu_t*, DEFAULT_POOL_SIZE> pdu_q;
|
|
|
|
|
buffer_pool<pdu_t> pool;
|
|
|
|
|
|
|
|
|
|
process_callback* callback;
|
|
|
|
|
srslog::basic_logger& logger;
|
|
|
|
|