35 msgs::Discovery::Type result = msgs::Discovery::UNINITIALIZED;
37 if (_str ==
"UNINITIALIZED")
39 result = msgs::Discovery::UNINITIALIZED;
41 else if (_str ==
"ADVERTISE")
43 result = msgs::Discovery::ADVERTISE;
45 else if (_str ==
"SUBSCRIBE")
47 result = msgs::Discovery::SUBSCRIBE;
49 else if (_str ==
"UNADVERTISE")
51 result = msgs::Discovery::UNADVERTISE;
53 else if (_str ==
"HEARTBEAT")
55 result = msgs::Discovery::HEARTBEAT;
57 else if (_str ==
"BYE")
59 result = msgs::Discovery::BYE;
61 else if (_str ==
"NEW_CONNECTION")
63 result = msgs::Discovery::NEW_CONNECTION;
65 else if (_str ==
"END_CONNECTION")
67 result = msgs::Discovery::END_CONNECTION;
69 else if (_str ==
"SUBSCRIBERS_REQ")
71 result = msgs::Discovery::SUBSCRIBERS_REQ;
73 else if (_str ==
"SUBSCRIBERS_REP")
75 result = msgs::Discovery::SUBSCRIBERS_REP;
79 std::cerr <<
"Unrecognized DiscoveryType["
81 <<
"], returning msgs::Discovery::UNINITIALIZED"
93 case msgs::Discovery::UNINITIALIZED:
94 return "UNINITIALIZED";
95 case msgs::Discovery::ADVERTISE:
97 case msgs::Discovery::SUBSCRIBE:
99 case msgs::Discovery::UNADVERTISE:
100 return "UNADVERTISE";
101 case msgs::Discovery::HEARTBEAT:
103 case msgs::Discovery::BYE:
105 case msgs::Discovery::NEW_CONNECTION:
106 return "NEW_CONNECTION";
107 case msgs::Discovery::END_CONNECTION:
108 return "END_CONNECTION";
109 case msgs::Discovery::SUBSCRIBERS_REQ:
110 return "SUBSCRIBERS_REQ";
111 case msgs::Discovery::SUBSCRIBERS_REP:
112 return "SUBSCRIBERS_REP";