_StartController.py
Go to the documentation of this file.
00001 """autogenerated by genpy from dynamixel_controllers/StartControllerRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 
00008 class StartControllerRequest(genpy.Message):
00009   _md5sum = "7785d708c83a180befd2fe3450dd9d41"
00010   _type = "dynamixel_controllers/StartControllerRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string port_name
00013 string package_path
00014 string module_name
00015 string class_name
00016 string controller_name
00017 string[] dependencies
00018 
00019 """
00020   __slots__ = ['port_name','package_path','module_name','class_name','controller_name','dependencies']
00021   _slot_types = ['string','string','string','string','string','string[]']
00022 
00023   def __init__(self, *args, **kwds):
00024     """
00025     Constructor. Any message fields that are implicitly/explicitly
00026     set to None will be assigned a default value. The recommend
00027     use is keyword arguments as this is more robust to future message
00028     changes.  You cannot mix in-order arguments and keyword arguments.
00029 
00030     The available fields are:
00031        port_name,package_path,module_name,class_name,controller_name,dependencies
00032 
00033     :param args: complete set of field values, in .msg order
00034     :param kwds: use keyword arguments corresponding to message field names
00035     to set specific fields.
00036     """
00037     if args or kwds:
00038       super(StartControllerRequest, self).__init__(*args, **kwds)
00039       #message fields cannot be None, assign default values for those that are
00040       if self.port_name is None:
00041         self.port_name = ''
00042       if self.package_path is None:
00043         self.package_path = ''
00044       if self.module_name is None:
00045         self.module_name = ''
00046       if self.class_name is None:
00047         self.class_name = ''
00048       if self.controller_name is None:
00049         self.controller_name = ''
00050       if self.dependencies is None:
00051         self.dependencies = []
00052     else:
00053       self.port_name = ''
00054       self.package_path = ''
00055       self.module_name = ''
00056       self.class_name = ''
00057       self.controller_name = ''
00058       self.dependencies = []
00059 
00060   def _get_types(self):
00061     """
00062     internal API method
00063     """
00064     return self._slot_types
00065 
00066   def serialize(self, buff):
00067     """
00068     serialize message into buffer
00069     :param buff: buffer, ``StringIO``
00070     """
00071     try:
00072       _x = self.port_name
00073       length = len(_x)
00074       if python3 or type(_x) == unicode:
00075         _x = _x.encode('utf-8')
00076         length = len(_x)
00077       buff.write(struct.pack('<I%ss'%length, length, _x))
00078       _x = self.package_path
00079       length = len(_x)
00080       if python3 or type(_x) == unicode:
00081         _x = _x.encode('utf-8')
00082         length = len(_x)
00083       buff.write(struct.pack('<I%ss'%length, length, _x))
00084       _x = self.module_name
00085       length = len(_x)
00086       if python3 or type(_x) == unicode:
00087         _x = _x.encode('utf-8')
00088         length = len(_x)
00089       buff.write(struct.pack('<I%ss'%length, length, _x))
00090       _x = self.class_name
00091       length = len(_x)
00092       if python3 or type(_x) == unicode:
00093         _x = _x.encode('utf-8')
00094         length = len(_x)
00095       buff.write(struct.pack('<I%ss'%length, length, _x))
00096       _x = self.controller_name
00097       length = len(_x)
00098       if python3 or type(_x) == unicode:
00099         _x = _x.encode('utf-8')
00100         length = len(_x)
00101       buff.write(struct.pack('<I%ss'%length, length, _x))
00102       length = len(self.dependencies)
00103       buff.write(_struct_I.pack(length))
00104       for val1 in self.dependencies:
00105         length = len(val1)
00106         if python3 or type(val1) == unicode:
00107           val1 = val1.encode('utf-8')
00108           length = len(val1)
00109         buff.write(struct.pack('<I%ss'%length, length, val1))
00110     except struct.error as se: self._check_types(se)
00111     except TypeError as te: self._check_types(te)
00112 
00113   def deserialize(self, str):
00114     """
00115     unpack serialized message in str into this message instance
00116     :param str: byte array of serialized message, ``str``
00117     """
00118     try:
00119       end = 0
00120       start = end
00121       end += 4
00122       (length,) = _struct_I.unpack(str[start:end])
00123       start = end
00124       end += length
00125       if python3:
00126         self.port_name = str[start:end].decode('utf-8')
00127       else:
00128         self.port_name = str[start:end]
00129       start = end
00130       end += 4
00131       (length,) = _struct_I.unpack(str[start:end])
00132       start = end
00133       end += length
00134       if python3:
00135         self.package_path = str[start:end].decode('utf-8')
00136       else:
00137         self.package_path = str[start:end]
00138       start = end
00139       end += 4
00140       (length,) = _struct_I.unpack(str[start:end])
00141       start = end
00142       end += length
00143       if python3:
00144         self.module_name = str[start:end].decode('utf-8')
00145       else:
00146         self.module_name = str[start:end]
00147       start = end
00148       end += 4
00149       (length,) = _struct_I.unpack(str[start:end])
00150       start = end
00151       end += length
00152       if python3:
00153         self.class_name = str[start:end].decode('utf-8')
00154       else:
00155         self.class_name = str[start:end]
00156       start = end
00157       end += 4
00158       (length,) = _struct_I.unpack(str[start:end])
00159       start = end
00160       end += length
00161       if python3:
00162         self.controller_name = str[start:end].decode('utf-8')
00163       else:
00164         self.controller_name = str[start:end]
00165       start = end
00166       end += 4
00167       (length,) = _struct_I.unpack(str[start:end])
00168       self.dependencies = []
00169       for i in range(0, length):
00170         start = end
00171         end += 4
00172         (length,) = _struct_I.unpack(str[start:end])
00173         start = end
00174         end += length
00175         if python3:
00176           val1 = str[start:end].decode('utf-8')
00177         else:
00178           val1 = str[start:end]
00179         self.dependencies.append(val1)
00180       return self
00181     except struct.error as e:
00182       raise genpy.DeserializationError(e) #most likely buffer underfill
00183 
00184 
00185   def serialize_numpy(self, buff, numpy):
00186     """
00187     serialize message with numpy array types into buffer
00188     :param buff: buffer, ``StringIO``
00189     :param numpy: numpy python module
00190     """
00191     try:
00192       _x = self.port_name
00193       length = len(_x)
00194       if python3 or type(_x) == unicode:
00195         _x = _x.encode('utf-8')
00196         length = len(_x)
00197       buff.write(struct.pack('<I%ss'%length, length, _x))
00198       _x = self.package_path
00199       length = len(_x)
00200       if python3 or type(_x) == unicode:
00201         _x = _x.encode('utf-8')
00202         length = len(_x)
00203       buff.write(struct.pack('<I%ss'%length, length, _x))
00204       _x = self.module_name
00205       length = len(_x)
00206       if python3 or type(_x) == unicode:
00207         _x = _x.encode('utf-8')
00208         length = len(_x)
00209       buff.write(struct.pack('<I%ss'%length, length, _x))
00210       _x = self.class_name
00211       length = len(_x)
00212       if python3 or type(_x) == unicode:
00213         _x = _x.encode('utf-8')
00214         length = len(_x)
00215       buff.write(struct.pack('<I%ss'%length, length, _x))
00216       _x = self.controller_name
00217       length = len(_x)
00218       if python3 or type(_x) == unicode:
00219         _x = _x.encode('utf-8')
00220         length = len(_x)
00221       buff.write(struct.pack('<I%ss'%length, length, _x))
00222       length = len(self.dependencies)
00223       buff.write(_struct_I.pack(length))
00224       for val1 in self.dependencies:
00225         length = len(val1)
00226         if python3 or type(val1) == unicode:
00227           val1 = val1.encode('utf-8')
00228           length = len(val1)
00229         buff.write(struct.pack('<I%ss'%length, length, val1))
00230     except struct.error as se: self._check_types(se)
00231     except TypeError as te: self._check_types(te)
00232 
00233   def deserialize_numpy(self, str, numpy):
00234     """
00235     unpack serialized message in str into this message instance using numpy for array types
00236     :param str: byte array of serialized message, ``str``
00237     :param numpy: numpy python module
00238     """
00239     try:
00240       end = 0
00241       start = end
00242       end += 4
00243       (length,) = _struct_I.unpack(str[start:end])
00244       start = end
00245       end += length
00246       if python3:
00247         self.port_name = str[start:end].decode('utf-8')
00248       else:
00249         self.port_name = str[start:end]
00250       start = end
00251       end += 4
00252       (length,) = _struct_I.unpack(str[start:end])
00253       start = end
00254       end += length
00255       if python3:
00256         self.package_path = str[start:end].decode('utf-8')
00257       else:
00258         self.package_path = str[start:end]
00259       start = end
00260       end += 4
00261       (length,) = _struct_I.unpack(str[start:end])
00262       start = end
00263       end += length
00264       if python3:
00265         self.module_name = str[start:end].decode('utf-8')
00266       else:
00267         self.module_name = str[start:end]
00268       start = end
00269       end += 4
00270       (length,) = _struct_I.unpack(str[start:end])
00271       start = end
00272       end += length
00273       if python3:
00274         self.class_name = str[start:end].decode('utf-8')
00275       else:
00276         self.class_name = str[start:end]
00277       start = end
00278       end += 4
00279       (length,) = _struct_I.unpack(str[start:end])
00280       start = end
00281       end += length
00282       if python3:
00283         self.controller_name = str[start:end].decode('utf-8')
00284       else:
00285         self.controller_name = str[start:end]
00286       start = end
00287       end += 4
00288       (length,) = _struct_I.unpack(str[start:end])
00289       self.dependencies = []
00290       for i in range(0, length):
00291         start = end
00292         end += 4
00293         (length,) = _struct_I.unpack(str[start:end])
00294         start = end
00295         end += length
00296         if python3:
00297           val1 = str[start:end].decode('utf-8')
00298         else:
00299           val1 = str[start:end]
00300         self.dependencies.append(val1)
00301       return self
00302     except struct.error as e:
00303       raise genpy.DeserializationError(e) #most likely buffer underfill
00304 
00305 _struct_I = genpy.struct_I
00306 """autogenerated by genpy from dynamixel_controllers/StartControllerResponse.msg. Do not edit."""
00307 import sys
00308 python3 = True if sys.hexversion > 0x03000000 else False
00309 import genpy
00310 import struct
00311 
00312 
00313 class StartControllerResponse(genpy.Message):
00314   _md5sum = "a4d50a34d34f18de48e2436ff1472594"
00315   _type = "dynamixel_controllers/StartControllerResponse"
00316   _has_header = False #flag to mark the presence of a Header object
00317   _full_text = """bool success
00318 string reason
00319 
00320 
00321 """
00322   __slots__ = ['success','reason']
00323   _slot_types = ['bool','string']
00324 
00325   def __init__(self, *args, **kwds):
00326     """
00327     Constructor. Any message fields that are implicitly/explicitly
00328     set to None will be assigned a default value. The recommend
00329     use is keyword arguments as this is more robust to future message
00330     changes.  You cannot mix in-order arguments and keyword arguments.
00331 
00332     The available fields are:
00333        success,reason
00334 
00335     :param args: complete set of field values, in .msg order
00336     :param kwds: use keyword arguments corresponding to message field names
00337     to set specific fields.
00338     """
00339     if args or kwds:
00340       super(StartControllerResponse, self).__init__(*args, **kwds)
00341       #message fields cannot be None, assign default values for those that are
00342       if self.success is None:
00343         self.success = False
00344       if self.reason is None:
00345         self.reason = ''
00346     else:
00347       self.success = False
00348       self.reason = ''
00349 
00350   def _get_types(self):
00351     """
00352     internal API method
00353     """
00354     return self._slot_types
00355 
00356   def serialize(self, buff):
00357     """
00358     serialize message into buffer
00359     :param buff: buffer, ``StringIO``
00360     """
00361     try:
00362       buff.write(_struct_B.pack(self.success))
00363       _x = self.reason
00364       length = len(_x)
00365       if python3 or type(_x) == unicode:
00366         _x = _x.encode('utf-8')
00367         length = len(_x)
00368       buff.write(struct.pack('<I%ss'%length, length, _x))
00369     except struct.error as se: self._check_types(se)
00370     except TypeError as te: self._check_types(te)
00371 
00372   def deserialize(self, str):
00373     """
00374     unpack serialized message in str into this message instance
00375     :param str: byte array of serialized message, ``str``
00376     """
00377     try:
00378       end = 0
00379       start = end
00380       end += 1
00381       (self.success,) = _struct_B.unpack(str[start:end])
00382       self.success = bool(self.success)
00383       start = end
00384       end += 4
00385       (length,) = _struct_I.unpack(str[start:end])
00386       start = end
00387       end += length
00388       if python3:
00389         self.reason = str[start:end].decode('utf-8')
00390       else:
00391         self.reason = str[start:end]
00392       return self
00393     except struct.error as e:
00394       raise genpy.DeserializationError(e) #most likely buffer underfill
00395 
00396 
00397   def serialize_numpy(self, buff, numpy):
00398     """
00399     serialize message with numpy array types into buffer
00400     :param buff: buffer, ``StringIO``
00401     :param numpy: numpy python module
00402     """
00403     try:
00404       buff.write(_struct_B.pack(self.success))
00405       _x = self.reason
00406       length = len(_x)
00407       if python3 or type(_x) == unicode:
00408         _x = _x.encode('utf-8')
00409         length = len(_x)
00410       buff.write(struct.pack('<I%ss'%length, length, _x))
00411     except struct.error as se: self._check_types(se)
00412     except TypeError as te: self._check_types(te)
00413 
00414   def deserialize_numpy(self, str, numpy):
00415     """
00416     unpack serialized message in str into this message instance using numpy for array types
00417     :param str: byte array of serialized message, ``str``
00418     :param numpy: numpy python module
00419     """
00420     try:
00421       end = 0
00422       start = end
00423       end += 1
00424       (self.success,) = _struct_B.unpack(str[start:end])
00425       self.success = bool(self.success)
00426       start = end
00427       end += 4
00428       (length,) = _struct_I.unpack(str[start:end])
00429       start = end
00430       end += length
00431       if python3:
00432         self.reason = str[start:end].decode('utf-8')
00433       else:
00434         self.reason = str[start:end]
00435       return self
00436     except struct.error as e:
00437       raise genpy.DeserializationError(e) #most likely buffer underfill
00438 
00439 _struct_I = genpy.struct_I
00440 _struct_B = struct.Struct("<B")
00441 class StartController(object):
00442   _type          = 'dynamixel_controllers/StartController'
00443   _md5sum = '94c76c2df56346fcaa2611bdac54f434'
00444   _request_class  = StartControllerRequest
00445   _response_class = StartControllerResponse


dynamixel_controllers
Author(s): Antons Rebguns, Cody Jorgensen, Cara Slutter
autogenerated on Fri Jan 3 2014 11:19:47