|
| RawRevRb2Sock (std::string rbuf, int port, std::string shmname, int id) |
| Constuctor and Destructor.
|
|
int | SendEvent (void) |
| Event function.
|
|
int | Reconnect (void) |
| Reconnect.
|
|
Definition at line 35 of file RawRevRb2Sock.h.
◆ RawRevRb2Sock()
RawRevRb2Sock |
( |
std::string |
rbuf, |
|
|
int |
port, |
|
|
std::string |
shmname, |
|
|
int |
id |
|
) |
| |
Constuctor and Destructor.
Definition at line 14 of file RawRevRb2Sock.cc.
15{
16
19 m_evtbuf = new int[MAXEVTSIZE];
20 m_flow =
new RFFlowStat((
char*)shmname.c_str(),
id, m_rbuf);
21
22 m_sock->accept();
23}
Class to manage a Ring Buffer placed in an IPC shared memory.
◆ ~RawRevRb2Sock()
Definition at line 25 of file RawRevRb2Sock.cc.
26{
27 delete m_sock;
28 delete m_rbuf;
29}
◆ Reconnect()
Reconnect.
Definition at line 47 of file RawRevRb2Sock.cc.
48{
49 int port = m_sock->port();
50 delete m_sock;
52 m_sock->accept();
53 return 0;
54}
◆ SendEvent()
Event function.
Definition at line 31 of file RawRevRb2Sock.cc.
32{
33
34 int size;
35 while ((size = m_rbuf->
remq(m_evtbuf)) == 0) {
36
37
38 usleep(20);
39 }
40 m_flow->log(size * 4);
41
42 int is = m_sock->put_wordbuf(m_evtbuf, size);
43
44 return is;
45}
int remq(int *buf)
Pick up a buffer from the RingBuffer.
◆ m_evtbuf
◆ m_flow
◆ m_rbuf
◆ m_sock
The documentation for this class was generated from the following files: