Go to the documentation of this file.00001
00002 #ifndef SHARED_SERIAL_SERVICE_SENDRECV_H
00003 #define SHARED_SERIAL_SERVICE_SENDRECV_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 "ros/service_traits.h"
00018
00019
00020
00021
00022 namespace shared_serial
00023 {
00024 template <class ContainerAllocator>
00025 struct SendRecvRequest_ {
00026 typedef SendRecvRequest_<ContainerAllocator> Type;
00027
00028 SendRecvRequest_()
00029 : socket(0)
00030 , send_data()
00031 , length(0)
00032 , recv_timeout(0.0)
00033 , sock_timeout(0.0)
00034 {
00035 }
00036
00037 SendRecvRequest_(const ContainerAllocator& _alloc)
00038 : socket(0)
00039 , send_data(_alloc)
00040 , length(0)
00041 , recv_timeout(0.0)
00042 , sock_timeout(0.0)
00043 {
00044 }
00045
00046 typedef uint32_t _socket_type;
00047 uint32_t socket;
00048
00049 typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _send_data_type;
00050 std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > send_data;
00051
00052 typedef uint32_t _length_type;
00053 uint32_t length;
00054
00055 typedef float _recv_timeout_type;
00056 float recv_timeout;
00057
00058 typedef float _sock_timeout_type;
00059 float sock_timeout;
00060
00061
00062 typedef boost::shared_ptr< ::shared_serial::SendRecvRequest_<ContainerAllocator> > Ptr;
00063 typedef boost::shared_ptr< ::shared_serial::SendRecvRequest_<ContainerAllocator> const> ConstPtr;
00064 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00065 };
00066 typedef ::shared_serial::SendRecvRequest_<std::allocator<void> > SendRecvRequest;
00067
00068 typedef boost::shared_ptr< ::shared_serial::SendRecvRequest> SendRecvRequestPtr;
00069 typedef boost::shared_ptr< ::shared_serial::SendRecvRequest const> SendRecvRequestConstPtr;
00070
00071
00072 template <class ContainerAllocator>
00073 struct SendRecvResponse_ {
00074 typedef SendRecvResponse_<ContainerAllocator> Type;
00075
00076 SendRecvResponse_()
00077 : socket(0)
00078 , recv_data()
00079 {
00080 }
00081
00082 SendRecvResponse_(const ContainerAllocator& _alloc)
00083 : socket(0)
00084 , recv_data(_alloc)
00085 {
00086 }
00087
00088 typedef uint32_t _socket_type;
00089 uint32_t socket;
00090
00091 typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _recv_data_type;
00092 std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > recv_data;
00093
00094
00095 typedef boost::shared_ptr< ::shared_serial::SendRecvResponse_<ContainerAllocator> > Ptr;
00096 typedef boost::shared_ptr< ::shared_serial::SendRecvResponse_<ContainerAllocator> const> ConstPtr;
00097 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00098 };
00099 typedef ::shared_serial::SendRecvResponse_<std::allocator<void> > SendRecvResponse;
00100
00101 typedef boost::shared_ptr< ::shared_serial::SendRecvResponse> SendRecvResponsePtr;
00102 typedef boost::shared_ptr< ::shared_serial::SendRecvResponse const> SendRecvResponseConstPtr;
00103
00104 struct SendRecv
00105 {
00106
00107 typedef SendRecvRequest Request;
00108 typedef SendRecvResponse Response;
00109 Request request;
00110 Response response;
00111
00112 typedef Request RequestType;
00113 typedef Response ResponseType;
00114 };
00115 }
00116
00117 namespace ros
00118 {
00119 namespace message_traits
00120 {
00121 template<class ContainerAllocator> struct IsMessage< ::shared_serial::SendRecvRequest_<ContainerAllocator> > : public TrueType {};
00122 template<class ContainerAllocator> struct IsMessage< ::shared_serial::SendRecvRequest_<ContainerAllocator> const> : public TrueType {};
00123 template<class ContainerAllocator>
00124 struct MD5Sum< ::shared_serial::SendRecvRequest_<ContainerAllocator> > {
00125 static const char* value()
00126 {
00127 return "3fa8cb9d9b17970f1ef94f8b72f437be";
00128 }
00129
00130 static const char* value(const ::shared_serial::SendRecvRequest_<ContainerAllocator> &) { return value(); }
00131 static const uint64_t static_value1 = 0x3fa8cb9d9b17970fULL;
00132 static const uint64_t static_value2 = 0x1ef94f8b72f437beULL;
00133 };
00134
00135 template<class ContainerAllocator>
00136 struct DataType< ::shared_serial::SendRecvRequest_<ContainerAllocator> > {
00137 static const char* value()
00138 {
00139 return "shared_serial/SendRecvRequest";
00140 }
00141
00142 static const char* value(const ::shared_serial::SendRecvRequest_<ContainerAllocator> &) { return value(); }
00143 };
00144
00145 template<class ContainerAllocator>
00146 struct Definition< ::shared_serial::SendRecvRequest_<ContainerAllocator> > {
00147 static const char* value()
00148 {
00149 return "\n\
00150 \n\
00151 \n\
00152 \n\
00153 uint32 socket\n\
00154 \n\
00155 \n\
00156 uint8[] send_data\n\
00157 \n\
00158 \n\
00159 uint32 length\n\
00160 \n\
00161 \n\
00162 float32 recv_timeout\n\
00163 \n\
00164 \n\
00165 float32 sock_timeout\n\
00166 \n\
00167 \n\
00168 ";
00169 }
00170
00171 static const char* value(const ::shared_serial::SendRecvRequest_<ContainerAllocator> &) { return value(); }
00172 };
00173
00174 }
00175 }
00176
00177
00178 namespace ros
00179 {
00180 namespace message_traits
00181 {
00182 template<class ContainerAllocator> struct IsMessage< ::shared_serial::SendRecvResponse_<ContainerAllocator> > : public TrueType {};
00183 template<class ContainerAllocator> struct IsMessage< ::shared_serial::SendRecvResponse_<ContainerAllocator> const> : public TrueType {};
00184 template<class ContainerAllocator>
00185 struct MD5Sum< ::shared_serial::SendRecvResponse_<ContainerAllocator> > {
00186 static const char* value()
00187 {
00188 return "85c9ca63788ec2863d436bf470432137";
00189 }
00190
00191 static const char* value(const ::shared_serial::SendRecvResponse_<ContainerAllocator> &) { return value(); }
00192 static const uint64_t static_value1 = 0x85c9ca63788ec286ULL;
00193 static const uint64_t static_value2 = 0x3d436bf470432137ULL;
00194 };
00195
00196 template<class ContainerAllocator>
00197 struct DataType< ::shared_serial::SendRecvResponse_<ContainerAllocator> > {
00198 static const char* value()
00199 {
00200 return "shared_serial/SendRecvResponse";
00201 }
00202
00203 static const char* value(const ::shared_serial::SendRecvResponse_<ContainerAllocator> &) { return value(); }
00204 };
00205
00206 template<class ContainerAllocator>
00207 struct Definition< ::shared_serial::SendRecvResponse_<ContainerAllocator> > {
00208 static const char* value()
00209 {
00210 return "\n\
00211 \n\
00212 uint32 socket\n\
00213 \n\
00214 \n\
00215 uint8[] recv_data\n\
00216 \n\
00217 \n\
00218 ";
00219 }
00220
00221 static const char* value(const ::shared_serial::SendRecvResponse_<ContainerAllocator> &) { return value(); }
00222 };
00223
00224 }
00225 }
00226
00227 namespace ros
00228 {
00229 namespace serialization
00230 {
00231
00232 template<class ContainerAllocator> struct Serializer< ::shared_serial::SendRecvRequest_<ContainerAllocator> >
00233 {
00234 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00235 {
00236 stream.next(m.socket);
00237 stream.next(m.send_data);
00238 stream.next(m.length);
00239 stream.next(m.recv_timeout);
00240 stream.next(m.sock_timeout);
00241 }
00242
00243 ROS_DECLARE_ALLINONE_SERIALIZER;
00244 };
00245 }
00246 }
00247
00248
00249 namespace ros
00250 {
00251 namespace serialization
00252 {
00253
00254 template<class ContainerAllocator> struct Serializer< ::shared_serial::SendRecvResponse_<ContainerAllocator> >
00255 {
00256 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00257 {
00258 stream.next(m.socket);
00259 stream.next(m.recv_data);
00260 }
00261
00262 ROS_DECLARE_ALLINONE_SERIALIZER;
00263 };
00264 }
00265 }
00266
00267 namespace ros
00268 {
00269 namespace service_traits
00270 {
00271 template<>
00272 struct MD5Sum<shared_serial::SendRecv> {
00273 static const char* value()
00274 {
00275 return "4e5eaed6bdc293cf0a00d420ba4ecbb2";
00276 }
00277
00278 static const char* value(const shared_serial::SendRecv&) { return value(); }
00279 };
00280
00281 template<>
00282 struct DataType<shared_serial::SendRecv> {
00283 static const char* value()
00284 {
00285 return "shared_serial/SendRecv";
00286 }
00287
00288 static const char* value(const shared_serial::SendRecv&) { return value(); }
00289 };
00290
00291 template<class ContainerAllocator>
00292 struct MD5Sum<shared_serial::SendRecvRequest_<ContainerAllocator> > {
00293 static const char* value()
00294 {
00295 return "4e5eaed6bdc293cf0a00d420ba4ecbb2";
00296 }
00297
00298 static const char* value(const shared_serial::SendRecvRequest_<ContainerAllocator> &) { return value(); }
00299 };
00300
00301 template<class ContainerAllocator>
00302 struct DataType<shared_serial::SendRecvRequest_<ContainerAllocator> > {
00303 static const char* value()
00304 {
00305 return "shared_serial/SendRecv";
00306 }
00307
00308 static const char* value(const shared_serial::SendRecvRequest_<ContainerAllocator> &) { return value(); }
00309 };
00310
00311 template<class ContainerAllocator>
00312 struct MD5Sum<shared_serial::SendRecvResponse_<ContainerAllocator> > {
00313 static const char* value()
00314 {
00315 return "4e5eaed6bdc293cf0a00d420ba4ecbb2";
00316 }
00317
00318 static const char* value(const shared_serial::SendRecvResponse_<ContainerAllocator> &) { return value(); }
00319 };
00320
00321 template<class ContainerAllocator>
00322 struct DataType<shared_serial::SendRecvResponse_<ContainerAllocator> > {
00323 static const char* value()
00324 {
00325 return "shared_serial/SendRecv";
00326 }
00327
00328 static const char* value(const shared_serial::SendRecvResponse_<ContainerAllocator> &) { return value(); }
00329 };
00330
00331 }
00332 }
00333
00334 #endif // SHARED_SERIAL_SERVICE_SENDRECV_H
00335