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


nodelet
Author(s): Tully Foote, Radu Bogdan Rusu
autogenerated on Sat Dec 28 2013 17:14:39