14#include "framework/pcore/RingBuffer.h"
15#include "framework/pcore/EvtMessage.h"
17#define RBUFSIZE 100000000
18#define MAXEVTSIZE 400000000
23int main(
int argc,
char** argv)
26 printf(
"file2rb : rbufname sleeptime(us)\n");
31 char* evbuf =
new char[MAXEVTSIZE];
33 int sltime = atoi(argv[2]);
39 while ((size = rbuf->
remq((
int*)evbuf)) == 0) {
44 if (size < 0) exit(-1);
46 if (msg->
type() == MSG_TERMINATE) {
47 printf(
"EoF found. Exitting.....\n");
50 if (nevt % 1000 == 0) printf(
"readrb : event = %d (size=%d)\n", nevt, *((
int*)evbuf));
Class to manage streamed object.
ERecordType type() const
Get record type.
Class to manage a Ring Buffer placed in an IPC shared memory.
int remq(int *buf)
Pick up a buffer from the RingBuffer.
Abstract base class for different kinds of events.