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