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