00001 """autogenerated by genmsg_py from StringStringRequest.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import test_rospy.msg
00006 import std_msgs.msg
00007
00008 class StringStringRequest(roslib.message.Message):
00009 _md5sum = "1546156fedebbd48201e9764f27ae3e2"
00010 _type = "test_rospy/StringStringRequest"
00011 _has_header = False
00012 _full_text = """std_msgs/String str
00013 Val str2
00014
00015 ================================================================================
00016 MSG: std_msgs/String
00017 string data
00018
00019 ================================================================================
00020 MSG: test_rospy/Val
00021 string val
00022 """
00023 __slots__ = ['str','str2']
00024 _slot_types = ['std_msgs/String','test_rospy/Val']
00025
00026 def __init__(self, *args, **kwds):
00027 """
00028 Constructor. Any message fields that are implicitly/explicitly
00029 set to None will be assigned a default value. The recommend
00030 use is keyword arguments as this is more robust to future message
00031 changes. You cannot mix in-order arguments and keyword arguments.
00032
00033 The available fields are:
00034 str,str2
00035
00036 @param args: complete set of field values, in .msg order
00037 @param kwds: use keyword arguments corresponding to message field names
00038 to set specific fields.
00039 """
00040 if args or kwds:
00041 super(StringStringRequest, self).__init__(*args, **kwds)
00042
00043 if self.str is None:
00044 self.str = std_msgs.msg.String()
00045 if self.str2 is None:
00046 self.str2 = test_rospy.msg.Val()
00047 else:
00048 self.str = std_msgs.msg.String()
00049 self.str2 = test_rospy.msg.Val()
00050
00051 def _get_types(self):
00052 """
00053 internal API method
00054 """
00055 return self._slot_types
00056
00057 def serialize(self, buff):
00058 """
00059 serialize message into buffer
00060 @param buff: buffer
00061 @type buff: StringIO
00062 """
00063 try:
00064 _x = self.str.data
00065 length = len(_x)
00066 buff.write(struct.pack('<I%ss'%length, length, _x))
00067 _x = self.str2.val
00068 length = len(_x)
00069 buff.write(struct.pack('<I%ss'%length, length, _x))
00070 except struct.error, se: self._check_types(se)
00071 except TypeError, te: self._check_types(te)
00072
00073 def deserialize(self, str):
00074 """
00075 unpack serialized message in str into this message instance
00076 @param str: byte array of serialized message
00077 @type str: str
00078 """
00079 try:
00080 if self.str is None:
00081 self.str = std_msgs.msg.String()
00082 if self.str2 is None:
00083 self.str2 = test_rospy.msg.Val()
00084 end = 0
00085 start = end
00086 end += 4
00087 (length,) = _struct_I.unpack(str[start:end])
00088 start = end
00089 end += length
00090 self.str.data = str[start:end]
00091 start = end
00092 end += 4
00093 (length,) = _struct_I.unpack(str[start:end])
00094 start = end
00095 end += length
00096 self.str2.val = str[start:end]
00097 return self
00098 except struct.error, e:
00099 raise roslib.message.DeserializationError(e)
00100
00101
00102 def serialize_numpy(self, buff, numpy):
00103 """
00104 serialize message with numpy array types into buffer
00105 @param buff: buffer
00106 @type buff: StringIO
00107 @param numpy: numpy python module
00108 @type numpy module
00109 """
00110 try:
00111 _x = self.str.data
00112 length = len(_x)
00113 buff.write(struct.pack('<I%ss'%length, length, _x))
00114 _x = self.str2.val
00115 length = len(_x)
00116 buff.write(struct.pack('<I%ss'%length, length, _x))
00117 except struct.error, se: self._check_types(se)
00118 except TypeError, te: self._check_types(te)
00119
00120 def deserialize_numpy(self, str, numpy):
00121 """
00122 unpack serialized message in str into this message instance using numpy for array types
00123 @param str: byte array of serialized message
00124 @type str: str
00125 @param numpy: numpy python module
00126 @type numpy: module
00127 """
00128 try:
00129 if self.str is None:
00130 self.str = std_msgs.msg.String()
00131 if self.str2 is None:
00132 self.str2 = test_rospy.msg.Val()
00133 end = 0
00134 start = end
00135 end += 4
00136 (length,) = _struct_I.unpack(str[start:end])
00137 start = end
00138 end += length
00139 self.str.data = str[start:end]
00140 start = end
00141 end += 4
00142 (length,) = _struct_I.unpack(str[start:end])
00143 start = end
00144 end += length
00145 self.str2.val = str[start:end]
00146 return self
00147 except struct.error, e:
00148 raise roslib.message.DeserializationError(e)
00149
00150 _struct_I = roslib.message.struct_I
00151 """autogenerated by genmsg_py from StringStringResponse.msg. Do not edit."""
00152 import roslib.message
00153 import struct
00154
00155 import std_msgs.msg
00156
00157 class StringStringResponse(roslib.message.Message):
00158 _md5sum = "32224c1636e75e68745b61629dfa07c5"
00159 _type = "test_rospy/StringStringResponse"
00160 _has_header = False
00161 _full_text = """std_msgs/String str
00162
00163
00164 ================================================================================
00165 MSG: std_msgs/String
00166 string data
00167
00168 """
00169 __slots__ = ['str']
00170 _slot_types = ['std_msgs/String']
00171
00172 def __init__(self, *args, **kwds):
00173 """
00174 Constructor. Any message fields that are implicitly/explicitly
00175 set to None will be assigned a default value. The recommend
00176 use is keyword arguments as this is more robust to future message
00177 changes. You cannot mix in-order arguments and keyword arguments.
00178
00179 The available fields are:
00180 str
00181
00182 @param args: complete set of field values, in .msg order
00183 @param kwds: use keyword arguments corresponding to message field names
00184 to set specific fields.
00185 """
00186 if args or kwds:
00187 super(StringStringResponse, self).__init__(*args, **kwds)
00188
00189 if self.str is None:
00190 self.str = std_msgs.msg.String()
00191 else:
00192 self.str = std_msgs.msg.String()
00193
00194 def _get_types(self):
00195 """
00196 internal API method
00197 """
00198 return self._slot_types
00199
00200 def serialize(self, buff):
00201 """
00202 serialize message into buffer
00203 @param buff: buffer
00204 @type buff: StringIO
00205 """
00206 try:
00207 _x = self.str.data
00208 length = len(_x)
00209 buff.write(struct.pack('<I%ss'%length, length, _x))
00210 except struct.error, se: self._check_types(se)
00211 except TypeError, te: self._check_types(te)
00212
00213 def deserialize(self, str):
00214 """
00215 unpack serialized message in str into this message instance
00216 @param str: byte array of serialized message
00217 @type str: str
00218 """
00219 try:
00220 if self.str is None:
00221 self.str = std_msgs.msg.String()
00222 end = 0
00223 start = end
00224 end += 4
00225 (length,) = _struct_I.unpack(str[start:end])
00226 start = end
00227 end += length
00228 self.str.data = str[start:end]
00229 return self
00230 except struct.error, e:
00231 raise roslib.message.DeserializationError(e)
00232
00233
00234 def serialize_numpy(self, buff, numpy):
00235 """
00236 serialize message with numpy array types into buffer
00237 @param buff: buffer
00238 @type buff: StringIO
00239 @param numpy: numpy python module
00240 @type numpy module
00241 """
00242 try:
00243 _x = self.str.data
00244 length = len(_x)
00245 buff.write(struct.pack('<I%ss'%length, length, _x))
00246 except struct.error, se: self._check_types(se)
00247 except TypeError, te: self._check_types(te)
00248
00249 def deserialize_numpy(self, str, numpy):
00250 """
00251 unpack serialized message in str into this message instance using numpy for array types
00252 @param str: byte array of serialized message
00253 @type str: str
00254 @param numpy: numpy python module
00255 @type numpy: module
00256 """
00257 try:
00258 if self.str is None:
00259 self.str = std_msgs.msg.String()
00260 end = 0
00261 start = end
00262 end += 4
00263 (length,) = _struct_I.unpack(str[start:end])
00264 start = end
00265 end += length
00266 self.str.data = str[start:end]
00267 return self
00268 except struct.error, e:
00269 raise roslib.message.DeserializationError(e)
00270
00271 _struct_I = roslib.message.struct_I
00272 class StringString(roslib.message.ServiceDefinition):
00273 _type = 'test_rospy/StringString'
00274 _md5sum = '37bf11bf0378473e105b4a52f61d1a75'
00275 _request_class = StringStringRequest
00276 _response_class = StringStringResponse