00001
00002 #ifndef GATEWAY_COMMS_MESSAGE_REMOTEGATEWAY_H
00003 #define GATEWAY_COMMS_MESSAGE_REMOTEGATEWAY_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017 #include "gateway_comms/Rule.h"
00018 #include "gateway_comms/RemoteRule.h"
00019 #include "gateway_comms/RemoteRule.h"
00020
00021 namespace gateway_comms
00022 {
00023 template <class ContainerAllocator>
00024 struct RemoteGateway_ {
00025 typedef RemoteGateway_<ContainerAllocator> Type;
00026
00027 RemoteGateway_()
00028 : name()
00029 , firewall(false)
00030 , public_interface()
00031 , flipped_interface()
00032 , pulled_interface()
00033 {
00034 }
00035
00036 RemoteGateway_(const ContainerAllocator& _alloc)
00037 : name(_alloc)
00038 , firewall(false)
00039 , public_interface(_alloc)
00040 , flipped_interface(_alloc)
00041 , pulled_interface(_alloc)
00042 {
00043 }
00044
00045 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00046 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00047
00048 typedef uint8_t _firewall_type;
00049 uint8_t firewall;
00050
00051 typedef std::vector< ::gateway_comms::Rule_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::gateway_comms::Rule_<ContainerAllocator> >::other > _public_interface_type;
00052 std::vector< ::gateway_comms::Rule_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::gateway_comms::Rule_<ContainerAllocator> >::other > public_interface;
00053
00054 typedef std::vector< ::gateway_comms::RemoteRule_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::gateway_comms::RemoteRule_<ContainerAllocator> >::other > _flipped_interface_type;
00055 std::vector< ::gateway_comms::RemoteRule_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::gateway_comms::RemoteRule_<ContainerAllocator> >::other > flipped_interface;
00056
00057 typedef std::vector< ::gateway_comms::RemoteRule_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::gateway_comms::RemoteRule_<ContainerAllocator> >::other > _pulled_interface_type;
00058 std::vector< ::gateway_comms::RemoteRule_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::gateway_comms::RemoteRule_<ContainerAllocator> >::other > pulled_interface;
00059
00060
00061 typedef boost::shared_ptr< ::gateway_comms::RemoteGateway_<ContainerAllocator> > Ptr;
00062 typedef boost::shared_ptr< ::gateway_comms::RemoteGateway_<ContainerAllocator> const> ConstPtr;
00063 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00064 };
00065 typedef ::gateway_comms::RemoteGateway_<std::allocator<void> > RemoteGateway;
00066
00067 typedef boost::shared_ptr< ::gateway_comms::RemoteGateway> RemoteGatewayPtr;
00068 typedef boost::shared_ptr< ::gateway_comms::RemoteGateway const> RemoteGatewayConstPtr;
00069
00070
00071 template<typename ContainerAllocator>
00072 std::ostream& operator<<(std::ostream& s, const ::gateway_comms::RemoteGateway_<ContainerAllocator> & v)
00073 {
00074 ros::message_operations::Printer< ::gateway_comms::RemoteGateway_<ContainerAllocator> >::stream(s, "", v);
00075 return s;}
00076
00077 }
00078
00079 namespace ros
00080 {
00081 namespace message_traits
00082 {
00083 template<class ContainerAllocator> struct IsMessage< ::gateway_comms::RemoteGateway_<ContainerAllocator> > : public TrueType {};
00084 template<class ContainerAllocator> struct IsMessage< ::gateway_comms::RemoteGateway_<ContainerAllocator> const> : public TrueType {};
00085 template<class ContainerAllocator>
00086 struct MD5Sum< ::gateway_comms::RemoteGateway_<ContainerAllocator> > {
00087 static const char* value()
00088 {
00089 return "e075b15de0c80ceb285a855a8ea763c5";
00090 }
00091
00092 static const char* value(const ::gateway_comms::RemoteGateway_<ContainerAllocator> &) { return value(); }
00093 static const uint64_t static_value1 = 0xe075b15de0c80cebULL;
00094 static const uint64_t static_value2 = 0x285a855a8ea763c5ULL;
00095 };
00096
00097 template<class ContainerAllocator>
00098 struct DataType< ::gateway_comms::RemoteGateway_<ContainerAllocator> > {
00099 static const char* value()
00100 {
00101 return "gateway_comms/RemoteGateway";
00102 }
00103
00104 static const char* value(const ::gateway_comms::RemoteGateway_<ContainerAllocator> &) { return value(); }
00105 };
00106
00107 template<class ContainerAllocator>
00108 struct Definition< ::gateway_comms::RemoteGateway_<ContainerAllocator> > {
00109 static const char* value()
00110 {
00111 return "###### Gateway information ######\n\
00112 string name\n\
00113 #TODO blocking status,health\n\
00114 bool firewall\n\
00115 \n\
00116 ###### Public Interface ######\n\
00117 \n\
00118 Rule[] public_interface\n\
00119 \n\
00120 \n\
00121 ###### Flipped Interface ######\n\
00122 \n\
00123 # Flipped and pulled interfaces would be useful for debugging \n\
00124 # https://github.com/robotics-in-concert/rocon_multimaster/issues/84\n\
00125 \n\
00126 RemoteRule[] flipped_interface\n\
00127 RemoteRule[] pulled_interface\n\
00128 \n\
00129 ###### Foreign Interface ######\n\
00130 \n\
00131 # Q) Should we show these?\n\
00132 # A) Probably not, in the overall scheme of things, \n\
00133 # it doubles up the information from above\n\
00134 \n\
00135 # RemoteRule[] flipped_in_connections\n\
00136 # RemoteRule[] pulled_connections\n\
00137 \n\
00138 ================================================================================\n\
00139 MSG: gateway_comms/Rule\n\
00140 # Standard gateway connection rule\n\
00141 \n\
00142 # type of connection (from gateway_comms.msg.Connection)\n\
00143 string type\n\
00144 \n\
00145 # this is the topic/service name or the action base name (a regex is supported)\n\
00146 string name \n\
00147 \n\
00148 # (optional) an optional node name can be provided. if node name is not provided\n\
00149 # then all nodes are matched (also supports regex)\n\
00150 string node\n\
00151 \n\
00152 ================================================================================\n\
00153 MSG: gateway_comms/RemoteRule\n\
00154 # Definition for a flip. It represents either:\n\
00155 #\n\
00156 # 1) an existing flipped connection (from the local gateway)\n\
00157 # 2) a rule that is put on a watchlist\n\
00158 \n\
00159 # The target recipient of the flip\n\
00160 string gateway\n\
00161 \n\
00162 # Connection has the following parameters that need setting\n\
00163 # - name : fully qualified name of the connection (str)\n\
00164 # - type : connection type (str)\n\
00165 # \n\
00166 # Use one of the types defined in Connection string constants:\n\
00167 # (publisher, subscriber, service, action_client, action_server)\n\
00168 #\n\
00169 # - node : name of the node it originates from (str)(optional)\n\
00170 #\n\
00171 # Node name is necessary, for instance, if you have multiple subscribers\n\
00172 # publishing to a single topic. Most of the time it is not necessary,\n\
00173 # but in some cases it helps refine the rule. It helps refine the rule.\n\
00174 #\n\
00175 Rule rule\n\
00176 \n\
00177 ";
00178 }
00179
00180 static const char* value(const ::gateway_comms::RemoteGateway_<ContainerAllocator> &) { return value(); }
00181 };
00182
00183 }
00184 }
00185
00186 namespace ros
00187 {
00188 namespace serialization
00189 {
00190
00191 template<class ContainerAllocator> struct Serializer< ::gateway_comms::RemoteGateway_<ContainerAllocator> >
00192 {
00193 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00194 {
00195 stream.next(m.name);
00196 stream.next(m.firewall);
00197 stream.next(m.public_interface);
00198 stream.next(m.flipped_interface);
00199 stream.next(m.pulled_interface);
00200 }
00201
00202 ROS_DECLARE_ALLINONE_SERIALIZER;
00203 };
00204 }
00205 }
00206
00207 namespace ros
00208 {
00209 namespace message_operations
00210 {
00211
00212 template<class ContainerAllocator>
00213 struct Printer< ::gateway_comms::RemoteGateway_<ContainerAllocator> >
00214 {
00215 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::gateway_comms::RemoteGateway_<ContainerAllocator> & v)
00216 {
00217 s << indent << "name: ";
00218 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00219 s << indent << "firewall: ";
00220 Printer<uint8_t>::stream(s, indent + " ", v.firewall);
00221 s << indent << "public_interface[]" << std::endl;
00222 for (size_t i = 0; i < v.public_interface.size(); ++i)
00223 {
00224 s << indent << " public_interface[" << i << "]: ";
00225 s << std::endl;
00226 s << indent;
00227 Printer< ::gateway_comms::Rule_<ContainerAllocator> >::stream(s, indent + " ", v.public_interface[i]);
00228 }
00229 s << indent << "flipped_interface[]" << std::endl;
00230 for (size_t i = 0; i < v.flipped_interface.size(); ++i)
00231 {
00232 s << indent << " flipped_interface[" << i << "]: ";
00233 s << std::endl;
00234 s << indent;
00235 Printer< ::gateway_comms::RemoteRule_<ContainerAllocator> >::stream(s, indent + " ", v.flipped_interface[i]);
00236 }
00237 s << indent << "pulled_interface[]" << std::endl;
00238 for (size_t i = 0; i < v.pulled_interface.size(); ++i)
00239 {
00240 s << indent << " pulled_interface[" << i << "]: ";
00241 s << std::endl;
00242 s << indent;
00243 Printer< ::gateway_comms::RemoteRule_<ContainerAllocator> >::stream(s, indent + " ", v.pulled_interface[i]);
00244 }
00245 }
00246 };
00247
00248
00249 }
00250 }
00251
00252 #endif // GATEWAY_COMMS_MESSAGE_REMOTEGATEWAY_H
00253