|
| Rb2Sock (std::string rbuf, std::string dest, int port) |
| Constuctor and Destructor.
|
|
int | SendEvent (void) |
| Event function.
|
|
Definition at line 23 of file Rb2Sock.h.
◆ Rb2Sock()
Rb2Sock |
( |
std::string |
rbuf, |
|
|
std::string |
dest, |
|
|
int |
port |
|
) |
| |
Constuctor and Destructor.
Definition at line 16 of file Rb2Sock.cc.
17{
18
21 m_evtbuf = new char[MAXEVTSIZE];
22
23}
Class to manage a Ring Buffer placed in an IPC shared memory.
◆ ~Rb2Sock()
Definition at line 25 of file Rb2Sock.cc.
26{
27 delete m_sock;
28 delete m_rbuf;
29}
◆ SendEvent()
Event function.
Definition at line 31 of file Rb2Sock.cc.
32{
33
34 int size;
35 while ((size = m_rbuf->
remq((
int*)m_evtbuf)) == 0) {
36
37
38 usleep(20);
39 }
40
42
43 if (msg->
type() == MSG_TERMINATE) {
44 printf("EoF found. Exitting.....\n");
45 m_sock->send(msg);
46 delete msg;
47 return -1;
48 } else {
49 int is = m_sock->send(msg);
50 delete msg;
51 return is;
52
53 }
54}
Class to manage streamed object.
ERecordType type() const
Get record type.
int remq(int *buf)
Pick up a buffer from the RingBuffer.
◆ m_evtbuf
◆ m_rbuf
◆ m_sock
The documentation for this class was generated from the following files: