|
| Sock2Rb (std::string rbuf, int port) |
| Constuctor and Destructor.
|
|
int | ReceiveEvent (void) |
| Event function.
|
|
Definition at line 23 of file Sock2Rb.h.
◆ Sock2Rb()
Sock2Rb |
( |
std::string |
rbuf, |
|
|
int |
port |
|
) |
| |
Constuctor and Destructor.
Definition at line 16 of file Sock2Rb.cc.
17{
18
21 m_evtbuf = new char[MAXEVTSIZE];
22
23}
Class to manage a Ring Buffer placed in an IPC shared memory.
◆ ~Sock2Rb()
Definition at line 25 of file Sock2Rb.cc.
26{
27 delete m_sock;
28 delete m_rbuf;
29}
◆ ReceiveEvent()
int ReceiveEvent |
( |
void |
| ) |
|
Event function.
Definition at line 31 of file Sock2Rb.cc.
32{
33
35 if (msg == NULL) {
36 return 0;
37 }
38
39 if (msg->
type() == MSG_TERMINATE) {
40 return 0;
41
42
43 }
44
45
46 int stat = 0;
47 for (;;) {
49 if (stat >= 0) break;
50
51 usleep(20);
52 }
53 delete msg;
54 return stat;
55}
Class to manage streamed object.
int paddedSize() const
Same as size(), but as size of an integer array.
ERecordType type() const
Get record type.
char * buffer()
Get buffer address.
int insq(const int *buf, int size, bool checkTx=false)
Append a buffer to the RingBuffer.
◆ m_evtbuf
◆ m_rbuf
◆ m_sock
The documentation for this class was generated from the following files: