15#include "framework/pcore/RingBuffer.h"
16#include "framework/pcore/EvtMessage.h"
18#define RBUFSIZE 100000000
19#define MAXEVTSIZE 400000000
24int main(
int argc,
char** argv)
27 printf(
"file2rb : inrbufname outrbufname\n");
35 char* evbuf =
new char[MAXEVTSIZE];
41 while ((bsize = rbufin->
remq((
int*)evbuf)) == 0) {
47 if (msg->
type() == MSG_TERMINATE) {
48 printf(
"EoF found. Exitting.....\n");
54 int irb = rbufout->
insq((
int*)evbuf, bsize);
Class to manage streamed object.
ERecordType type() const
Get record type.
Class to manage a Ring Buffer placed in an IPC shared memory.
int insq(const int *buf, int size, bool checkTx=false)
Append a buffer to the RingBuffer.
int remq(int *buf)
Pick up a buffer from the RingBuffer.
Abstract base class for different kinds of events.