_env_createrobot.py
Go to the documentation of this file.
00001 """autogenerated by genpy from openraveros/env_createrobotRequest.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 env_createrobotRequest(genpy.Message):
00009   _md5sum = "6df21077c6010e7bb39bf8b17fae1f51"
00010   _type = "openraveros/env_createrobotRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 
00014 
00015 string name
00016 
00017 
00018 string file
00019 
00020 
00021 string type
00022 
00023 """
00024   __slots__ = ['name','file','type']
00025   _slot_types = ['string','string','string']
00026 
00027   def __init__(self, *args, **kwds):
00028     """
00029     Constructor. Any message fields that are implicitly/explicitly
00030     set to None will be assigned a default value. The recommend
00031     use is keyword arguments as this is more robust to future message
00032     changes.  You cannot mix in-order arguments and keyword arguments.
00033 
00034     The available fields are:
00035        name,file,type
00036 
00037     :param args: complete set of field values, in .msg order
00038     :param kwds: use keyword arguments corresponding to message field names
00039     to set specific fields.
00040     """
00041     if args or kwds:
00042       super(env_createrobotRequest, self).__init__(*args, **kwds)
00043       #message fields cannot be None, assign default values for those that are
00044       if self.name is None:
00045         self.name = ''
00046       if self.file is None:
00047         self.file = ''
00048       if self.type is None:
00049         self.type = ''
00050     else:
00051       self.name = ''
00052       self.file = ''
00053       self.type = ''
00054 
00055   def _get_types(self):
00056     """
00057     internal API method
00058     """
00059     return self._slot_types
00060 
00061   def serialize(self, buff):
00062     """
00063     serialize message into buffer
00064     :param buff: buffer, ``StringIO``
00065     """
00066     try:
00067       _x = self.name
00068       length = len(_x)
00069       if python3 or type(_x) == unicode:
00070         _x = _x.encode('utf-8')
00071         length = len(_x)
00072       buff.write(struct.pack('<I%ss'%length, length, _x))
00073       _x = self.file
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     except struct.error as se: self._check_types(se)
00086     except TypeError as te: self._check_types(te)
00087 
00088   def deserialize(self, str):
00089     """
00090     unpack serialized message in str into this message instance
00091     :param str: byte array of serialized message, ``str``
00092     """
00093     try:
00094       end = 0
00095       start = end
00096       end += 4
00097       (length,) = _struct_I.unpack(str[start:end])
00098       start = end
00099       end += length
00100       if python3:
00101         self.name = str[start:end].decode('utf-8')
00102       else:
00103         self.name = str[start:end]
00104       start = end
00105       end += 4
00106       (length,) = _struct_I.unpack(str[start:end])
00107       start = end
00108       end += length
00109       if python3:
00110         self.file = str[start:end].decode('utf-8')
00111       else:
00112         self.file = str[start:end]
00113       start = end
00114       end += 4
00115       (length,) = _struct_I.unpack(str[start:end])
00116       start = end
00117       end += length
00118       if python3:
00119         self.type = str[start:end].decode('utf-8')
00120       else:
00121         self.type = str[start:end]
00122       return self
00123     except struct.error as e:
00124       raise genpy.DeserializationError(e) #most likely buffer underfill
00125 
00126 
00127   def serialize_numpy(self, buff, numpy):
00128     """
00129     serialize message with numpy array types into buffer
00130     :param buff: buffer, ``StringIO``
00131     :param numpy: numpy python module
00132     """
00133     try:
00134       _x = self.name
00135       length = len(_x)
00136       if python3 or type(_x) == unicode:
00137         _x = _x.encode('utf-8')
00138         length = len(_x)
00139       buff.write(struct.pack('<I%ss'%length, length, _x))
00140       _x = self.file
00141       length = len(_x)
00142       if python3 or type(_x) == unicode:
00143         _x = _x.encode('utf-8')
00144         length = len(_x)
00145       buff.write(struct.pack('<I%ss'%length, length, _x))
00146       _x = self.type
00147       length = len(_x)
00148       if python3 or type(_x) == unicode:
00149         _x = _x.encode('utf-8')
00150         length = len(_x)
00151       buff.write(struct.pack('<I%ss'%length, length, _x))
00152     except struct.error as se: self._check_types(se)
00153     except TypeError as 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, ``str``
00159     :param numpy: numpy python module
00160     """
00161     try:
00162       end = 0
00163       start = end
00164       end += 4
00165       (length,) = _struct_I.unpack(str[start:end])
00166       start = end
00167       end += length
00168       if python3:
00169         self.name = str[start:end].decode('utf-8')
00170       else:
00171         self.name = str[start:end]
00172       start = end
00173       end += 4
00174       (length,) = _struct_I.unpack(str[start:end])
00175       start = end
00176       end += length
00177       if python3:
00178         self.file = str[start:end].decode('utf-8')
00179       else:
00180         self.file = str[start:end]
00181       start = end
00182       end += 4
00183       (length,) = _struct_I.unpack(str[start:end])
00184       start = end
00185       end += length
00186       if python3:
00187         self.type = str[start:end].decode('utf-8')
00188       else:
00189         self.type = str[start:end]
00190       return self
00191     except struct.error as e:
00192       raise genpy.DeserializationError(e) #most likely buffer underfill
00193 
00194 _struct_I = genpy.struct_I
00195 """autogenerated by genpy from openraveros/env_createrobotResponse.msg. Do not edit."""
00196 import sys
00197 python3 = True if sys.hexversion > 0x03000000 else False
00198 import genpy
00199 import struct
00200 
00201 
00202 class env_createrobotResponse(genpy.Message):
00203   _md5sum = "10fe673987681b8f34c92bca56d3c517"
00204   _type = "openraveros/env_createrobotResponse"
00205   _has_header = False #flag to mark the presence of a Header object
00206   _full_text = """int32 bodyid
00207 
00208 
00209 """
00210   __slots__ = ['bodyid']
00211   _slot_types = ['int32']
00212 
00213   def __init__(self, *args, **kwds):
00214     """
00215     Constructor. Any message fields that are implicitly/explicitly
00216     set to None will be assigned a default value. The recommend
00217     use is keyword arguments as this is more robust to future message
00218     changes.  You cannot mix in-order arguments and keyword arguments.
00219 
00220     The available fields are:
00221        bodyid
00222 
00223     :param args: complete set of field values, in .msg order
00224     :param kwds: use keyword arguments corresponding to message field names
00225     to set specific fields.
00226     """
00227     if args or kwds:
00228       super(env_createrobotResponse, self).__init__(*args, **kwds)
00229       #message fields cannot be None, assign default values for those that are
00230       if self.bodyid is None:
00231         self.bodyid = 0
00232     else:
00233       self.bodyid = 0
00234 
00235   def _get_types(self):
00236     """
00237     internal API method
00238     """
00239     return self._slot_types
00240 
00241   def serialize(self, buff):
00242     """
00243     serialize message into buffer
00244     :param buff: buffer, ``StringIO``
00245     """
00246     try:
00247       buff.write(_struct_i.pack(self.bodyid))
00248     except struct.error as se: self._check_types(se)
00249     except TypeError as te: self._check_types(te)
00250 
00251   def deserialize(self, str):
00252     """
00253     unpack serialized message in str into this message instance
00254     :param str: byte array of serialized message, ``str``
00255     """
00256     try:
00257       end = 0
00258       start = end
00259       end += 4
00260       (self.bodyid,) = _struct_i.unpack(str[start:end])
00261       return self
00262     except struct.error as e:
00263       raise genpy.DeserializationError(e) #most likely buffer underfill
00264 
00265 
00266   def serialize_numpy(self, buff, numpy):
00267     """
00268     serialize message with numpy array types into buffer
00269     :param buff: buffer, ``StringIO``
00270     :param numpy: numpy python module
00271     """
00272     try:
00273       buff.write(_struct_i.pack(self.bodyid))
00274     except struct.error as se: self._check_types(se)
00275     except TypeError as te: self._check_types(te)
00276 
00277   def deserialize_numpy(self, str, numpy):
00278     """
00279     unpack serialized message in str into this message instance using numpy for array types
00280     :param str: byte array of serialized message, ``str``
00281     :param numpy: numpy python module
00282     """
00283     try:
00284       end = 0
00285       start = end
00286       end += 4
00287       (self.bodyid,) = _struct_i.unpack(str[start:end])
00288       return self
00289     except struct.error as e:
00290       raise genpy.DeserializationError(e) #most likely buffer underfill
00291 
00292 _struct_I = genpy.struct_I
00293 _struct_i = struct.Struct("<i")
00294 class env_createrobot(object):
00295   _type          = 'openraveros/env_createrobot'
00296   _md5sum = 'c0f4b0da0dd4b122340b9785bdf9b747'
00297   _request_class  = env_createrobotRequest
00298   _response_class = env_createrobotResponse
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


openraveros
Author(s): Rosen Diankov (rosen.diankov@gmail.com)
autogenerated on Sat Mar 23 2013 22:15:38