_env_createbody.py
Go to the documentation of this file.
00001 """autogenerated by genpy from openraveros/env_createbodyRequest.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_createbodyRequest(genpy.Message):
00009   _md5sum = "cc4250990f07b451e449d447ad0bacd0"
00010   _type = "openraveros/env_createbodyRequest"
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   __slots__ = ['name','file']
00022   _slot_types = ['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,file
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(env_createbodyRequest, 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.file is None:
00044         self.file = ''
00045     else:
00046       self.name = ''
00047       self.file = ''
00048 
00049   def _get_types(self):
00050     """
00051     internal API method
00052     """
00053     return self._slot_types
00054 
00055   def serialize(self, buff):
00056     """
00057     serialize message into buffer
00058     :param buff: buffer, ``StringIO``
00059     """
00060     try:
00061       _x = self.name
00062       length = len(_x)
00063       if python3 or type(_x) == unicode:
00064         _x = _x.encode('utf-8')
00065         length = len(_x)
00066       buff.write(struct.pack('<I%ss'%length, length, _x))
00067       _x = self.file
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     except struct.error as se: self._check_types(se)
00074     except TypeError as te: self._check_types(te)
00075 
00076   def deserialize(self, str):
00077     """
00078     unpack serialized message in str into this message instance
00079     :param str: byte array of serialized message, ``str``
00080     """
00081     try:
00082       end = 0
00083       start = end
00084       end += 4
00085       (length,) = _struct_I.unpack(str[start:end])
00086       start = end
00087       end += length
00088       if python3:
00089         self.name = str[start:end].decode('utf-8')
00090       else:
00091         self.name = str[start:end]
00092       start = end
00093       end += 4
00094       (length,) = _struct_I.unpack(str[start:end])
00095       start = end
00096       end += length
00097       if python3:
00098         self.file = str[start:end].decode('utf-8')
00099       else:
00100         self.file = str[start:end]
00101       return self
00102     except struct.error as e:
00103       raise genpy.DeserializationError(e) #most likely buffer underfill
00104 
00105 
00106   def serialize_numpy(self, buff, numpy):
00107     """
00108     serialize message with numpy array types into buffer
00109     :param buff: buffer, ``StringIO``
00110     :param numpy: numpy python module
00111     """
00112     try:
00113       _x = self.name
00114       length = len(_x)
00115       if python3 or type(_x) == unicode:
00116         _x = _x.encode('utf-8')
00117         length = len(_x)
00118       buff.write(struct.pack('<I%ss'%length, length, _x))
00119       _x = self.file
00120       length = len(_x)
00121       if python3 or type(_x) == unicode:
00122         _x = _x.encode('utf-8')
00123         length = len(_x)
00124       buff.write(struct.pack('<I%ss'%length, length, _x))
00125     except struct.error as se: self._check_types(se)
00126     except TypeError as te: self._check_types(te)
00127 
00128   def deserialize_numpy(self, str, numpy):
00129     """
00130     unpack serialized message in str into this message instance using numpy for array types
00131     :param str: byte array of serialized message, ``str``
00132     :param numpy: numpy python module
00133     """
00134     try:
00135       end = 0
00136       start = end
00137       end += 4
00138       (length,) = _struct_I.unpack(str[start:end])
00139       start = end
00140       end += length
00141       if python3:
00142         self.name = str[start:end].decode('utf-8')
00143       else:
00144         self.name = str[start:end]
00145       start = end
00146       end += 4
00147       (length,) = _struct_I.unpack(str[start:end])
00148       start = end
00149       end += length
00150       if python3:
00151         self.file = str[start:end].decode('utf-8')
00152       else:
00153         self.file = str[start:end]
00154       return self
00155     except struct.error as e:
00156       raise genpy.DeserializationError(e) #most likely buffer underfill
00157 
00158 _struct_I = genpy.struct_I
00159 """autogenerated by genpy from openraveros/env_createbodyResponse.msg. Do not edit."""
00160 import sys
00161 python3 = True if sys.hexversion > 0x03000000 else False
00162 import genpy
00163 import struct
00164 
00165 
00166 class env_createbodyResponse(genpy.Message):
00167   _md5sum = "10fe673987681b8f34c92bca56d3c517"
00168   _type = "openraveros/env_createbodyResponse"
00169   _has_header = False #flag to mark the presence of a Header object
00170   _full_text = """int32 bodyid
00171 
00172 
00173 """
00174   __slots__ = ['bodyid']
00175   _slot_types = ['int32']
00176 
00177   def __init__(self, *args, **kwds):
00178     """
00179     Constructor. Any message fields that are implicitly/explicitly
00180     set to None will be assigned a default value. The recommend
00181     use is keyword arguments as this is more robust to future message
00182     changes.  You cannot mix in-order arguments and keyword arguments.
00183 
00184     The available fields are:
00185        bodyid
00186 
00187     :param args: complete set of field values, in .msg order
00188     :param kwds: use keyword arguments corresponding to message field names
00189     to set specific fields.
00190     """
00191     if args or kwds:
00192       super(env_createbodyResponse, self).__init__(*args, **kwds)
00193       #message fields cannot be None, assign default values for those that are
00194       if self.bodyid is None:
00195         self.bodyid = 0
00196     else:
00197       self.bodyid = 0
00198 
00199   def _get_types(self):
00200     """
00201     internal API method
00202     """
00203     return self._slot_types
00204 
00205   def serialize(self, buff):
00206     """
00207     serialize message into buffer
00208     :param buff: buffer, ``StringIO``
00209     """
00210     try:
00211       buff.write(_struct_i.pack(self.bodyid))
00212     except struct.error as se: self._check_types(se)
00213     except TypeError as te: self._check_types(te)
00214 
00215   def deserialize(self, str):
00216     """
00217     unpack serialized message in str into this message instance
00218     :param str: byte array of serialized message, ``str``
00219     """
00220     try:
00221       end = 0
00222       start = end
00223       end += 4
00224       (self.bodyid,) = _struct_i.unpack(str[start:end])
00225       return self
00226     except struct.error as e:
00227       raise genpy.DeserializationError(e) #most likely buffer underfill
00228 
00229 
00230   def serialize_numpy(self, buff, numpy):
00231     """
00232     serialize message with numpy array types into buffer
00233     :param buff: buffer, ``StringIO``
00234     :param numpy: numpy python module
00235     """
00236     try:
00237       buff.write(_struct_i.pack(self.bodyid))
00238     except struct.error as se: self._check_types(se)
00239     except TypeError as te: self._check_types(te)
00240 
00241   def deserialize_numpy(self, str, numpy):
00242     """
00243     unpack serialized message in str into this message instance using numpy for array types
00244     :param str: byte array of serialized message, ``str``
00245     :param numpy: numpy python module
00246     """
00247     try:
00248       end = 0
00249       start = end
00250       end += 4
00251       (self.bodyid,) = _struct_i.unpack(str[start:end])
00252       return self
00253     except struct.error as e:
00254       raise genpy.DeserializationError(e) #most likely buffer underfill
00255 
00256 _struct_I = genpy.struct_I
00257 _struct_i = struct.Struct("<i")
00258 class env_createbody(object):
00259   _type          = 'openraveros/env_createbody'
00260   _md5sum = '2cefb51059cf75fa4b293cb4943a4e3d'
00261   _request_class  = env_createbodyRequest
00262   _response_class = env_createbodyResponse
 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