8 status_(0), occup_(0), pidOfLastSend_(0), pidOfLastReceive_(0) {
13 std::ostringstream ost;
14 ost <<
"failed to get message queue:" << strerror(errno);
30 std::cout <<
"snd::Master failed to post message - error:" << strerror(
40 std::cout <<
"snd::Master failed to post message - error:" << strerror(
59 unsigned long msg_type = ptr->mtype;
61 if (rc == -1 && errno != ENOMSG) {
63 "rcv::Master failed to get message from queue - error:";
64 serr += strerror(errno);
66 }
else if (rc == -1 && errno == ENOMSG)
76 if (rc == -1 && errno != ENOMSG) {
83 unsigned long msg_type = ptr->mtype;
85 if (rc == -1 && errno != ENOMSG) {
87 "rcvnb::Master failed to get message from queue - error:";
88 serr += strerror(errno);
90 }
else if (rc == -1 && errno == ENOMSG)
106 char cbuf[
sizeof(
struct msqid_ds)];
107 struct msqid_ds *buf = (
struct msqid_ds*) cbuf;
131 <<
"leftover messages, going to drain " << std::endl;
154 if (lastReceiver == 0)
int postLength(MsgBuf &ptr, unsigned int length)
pid_t pidOfLastSend() const
#define MSGQ_MESSAGE_TYPE_RANGE
MasterQueue(unsigned int ind)
unsigned long rcv(MsgBuf &ptr)
unsigned long rcvNonBlocking(MsgBuf &ptr)
pid_t pidOfLastReceive() const
bool rcvQuiet(MsgBuf &ptr)
std::vector< int > receivers_