_env_createmodule.py
Go to the documentation of this file.
00001 """autogenerated by genpy from openraveros/env_createmoduleRequest.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_createmoduleRequest(genpy.Message):
00009   _md5sum = "de375886ef07749604e5d3b1a00459a7"
00010   _type = "openraveros/env_createmoduleRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """
00013 string xmlid
00014 
00015 
00016 string args
00017 
00018 
00019 uint8 destroyduplicates
00020 
00021 """
00022   __slots__ = ['xmlid','args','destroyduplicates']
00023   _slot_types = ['string','string','uint8']
00024 
00025   def __init__(self, *args, **kwds):
00026     """
00027     Constructor. Any message fields that are implicitly/explicitly
00028     set to None will be assigned a default value. The recommend
00029     use is keyword arguments as this is more robust to future message
00030     changes.  You cannot mix in-order arguments and keyword arguments.
00031 
00032     The available fields are:
00033        xmlid,args,destroyduplicates
00034 
00035     :param args: complete set of field values, in .msg order
00036     :param kwds: use keyword arguments corresponding to message field names
00037     to set specific fields.
00038     """
00039     if args or kwds:
00040       super(env_createmoduleRequest, self).__init__(*args, **kwds)
00041       #message fields cannot be None, assign default values for those that are
00042       if self.xmlid is None:
00043         self.xmlid = ''
00044       if self.args is None:
00045         self.args = ''
00046       if self.destroyduplicates is None:
00047         self.destroyduplicates = 0
00048     else:
00049       self.xmlid = ''
00050       self.args = ''
00051       self.destroyduplicates = 0
00052 
00053   def _get_types(self):
00054     """
00055     internal API method
00056     """
00057     return self._slot_types
00058 
00059   def serialize(self, buff):
00060     """
00061     serialize message into buffer
00062     :param buff: buffer, ``StringIO``
00063     """
00064     try:
00065       _x = self.xmlid
00066       length = len(_x)
00067       if python3 or type(_x) == unicode:
00068         _x = _x.encode('utf-8')
00069         length = len(_x)
00070       buff.write(struct.pack('<I%ss'%length, length, _x))
00071       _x = self.args
00072       length = len(_x)
00073       if python3 or type(_x) == unicode:
00074         _x = _x.encode('utf-8')
00075         length = len(_x)
00076       buff.write(struct.pack('<I%ss'%length, length, _x))
00077       buff.write(_struct_B.pack(self.destroyduplicates))
00078     except struct.error as se: self._check_types(se)
00079     except TypeError as te: self._check_types(te)
00080 
00081   def deserialize(self, str):
00082     """
00083     unpack serialized message in str into this message instance
00084     :param str: byte array of serialized message, ``str``
00085     """
00086     try:
00087       end = 0
00088       start = end
00089       end += 4
00090       (length,) = _struct_I.unpack(str[start:end])
00091       start = end
00092       end += length
00093       if python3:
00094         self.xmlid = str[start:end].decode('utf-8')
00095       else:
00096         self.xmlid = str[start:end]
00097       start = end
00098       end += 4
00099       (length,) = _struct_I.unpack(str[start:end])
00100       start = end
00101       end += length
00102       if python3:
00103         self.args = str[start:end].decode('utf-8')
00104       else:
00105         self.args = str[start:end]
00106       start = end
00107       end += 1
00108       (self.destroyduplicates,) = _struct_B.unpack(str[start:end])
00109       return self
00110     except struct.error as e:
00111       raise genpy.DeserializationError(e) #most likely buffer underfill
00112 
00113 
00114   def serialize_numpy(self, buff, numpy):
00115     """
00116     serialize message with numpy array types into buffer
00117     :param buff: buffer, ``StringIO``
00118     :param numpy: numpy python module
00119     """
00120     try:
00121       _x = self.xmlid
00122       length = len(_x)
00123       if python3 or type(_x) == unicode:
00124         _x = _x.encode('utf-8')
00125         length = len(_x)
00126       buff.write(struct.pack('<I%ss'%length, length, _x))
00127       _x = self.args
00128       length = len(_x)
00129       if python3 or type(_x) == unicode:
00130         _x = _x.encode('utf-8')
00131         length = len(_x)
00132       buff.write(struct.pack('<I%ss'%length, length, _x))
00133       buff.write(_struct_B.pack(self.destroyduplicates))
00134     except struct.error as se: self._check_types(se)
00135     except TypeError as te: self._check_types(te)
00136 
00137   def deserialize_numpy(self, str, numpy):
00138     """
00139     unpack serialized message in str into this message instance using numpy for array types
00140     :param str: byte array of serialized message, ``str``
00141     :param numpy: numpy python module
00142     """
00143     try:
00144       end = 0
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.xmlid = str[start:end].decode('utf-8')
00152       else:
00153         self.xmlid = str[start:end]
00154       start = end
00155       end += 4
00156       (length,) = _struct_I.unpack(str[start:end])
00157       start = end
00158       end += length
00159       if python3:
00160         self.args = str[start:end].decode('utf-8')
00161       else:
00162         self.args = str[start:end]
00163       start = end
00164       end += 1
00165       (self.destroyduplicates,) = _struct_B.unpack(str[start:end])
00166       return self
00167     except struct.error as e:
00168       raise genpy.DeserializationError(e) #most likely buffer underfill
00169 
00170 _struct_I = genpy.struct_I
00171 _struct_B = struct.Struct("<B")
00172 """autogenerated by genpy from openraveros/env_createmoduleResponse.msg. Do not edit."""
00173 import sys
00174 python3 = True if sys.hexversion > 0x03000000 else False
00175 import genpy
00176 import struct
00177 
00178 
00179 class env_createmoduleResponse(genpy.Message):
00180   _md5sum = "309d4b30834b338cced19e5622a97a03"
00181   _type = "openraveros/env_createmoduleResponse"
00182   _has_header = False #flag to mark the presence of a Header object
00183   _full_text = """uint32 id
00184 
00185 
00186 """
00187   __slots__ = ['id']
00188   _slot_types = ['uint32']
00189 
00190   def __init__(self, *args, **kwds):
00191     """
00192     Constructor. Any message fields that are implicitly/explicitly
00193     set to None will be assigned a default value. The recommend
00194     use is keyword arguments as this is more robust to future message
00195     changes.  You cannot mix in-order arguments and keyword arguments.
00196 
00197     The available fields are:
00198        id
00199 
00200     :param args: complete set of field values, in .msg order
00201     :param kwds: use keyword arguments corresponding to message field names
00202     to set specific fields.
00203     """
00204     if args or kwds:
00205       super(env_createmoduleResponse, self).__init__(*args, **kwds)
00206       #message fields cannot be None, assign default values for those that are
00207       if self.id is None:
00208         self.id = 0
00209     else:
00210       self.id = 0
00211 
00212   def _get_types(self):
00213     """
00214     internal API method
00215     """
00216     return self._slot_types
00217 
00218   def serialize(self, buff):
00219     """
00220     serialize message into buffer
00221     :param buff: buffer, ``StringIO``
00222     """
00223     try:
00224       buff.write(_struct_I.pack(self.id))
00225     except struct.error as se: self._check_types(se)
00226     except TypeError as te: self._check_types(te)
00227 
00228   def deserialize(self, str):
00229     """
00230     unpack serialized message in str into this message instance
00231     :param str: byte array of serialized message, ``str``
00232     """
00233     try:
00234       end = 0
00235       start = end
00236       end += 4
00237       (self.id,) = _struct_I.unpack(str[start:end])
00238       return self
00239     except struct.error as e:
00240       raise genpy.DeserializationError(e) #most likely buffer underfill
00241 
00242 
00243   def serialize_numpy(self, buff, numpy):
00244     """
00245     serialize message with numpy array types into buffer
00246     :param buff: buffer, ``StringIO``
00247     :param numpy: numpy python module
00248     """
00249     try:
00250       buff.write(_struct_I.pack(self.id))
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       (self.id,) = _struct_I.unpack(str[start:end])
00265       return self
00266     except struct.error as e:
00267       raise genpy.DeserializationError(e) #most likely buffer underfill
00268 
00269 _struct_I = genpy.struct_I
00270 class env_createmodule(object):
00271   _type          = 'openraveros/env_createmodule'
00272   _md5sum = '69bbc2cabdbf9811a94b1aef89399a0b'
00273   _request_class  = env_createmoduleRequest
00274   _response_class = env_createmoduleResponse
 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