00001 """autogenerated by genpy from openraveros/openrave_sessionRequest.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 openrave_sessionRequest(genpy.Message):
00009 _md5sum = "dfaa44068825bd1df4b20f7cf73ca45b"
00010 _type = "openraveros/openrave_sessionRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016
00017
00018 int32 sessionid
00019
00020
00021
00022 int32 clone_sessionid
00023
00024
00025 uint8 clone_options
00026
00027 uint8 CloneBodies=1
00028 uint8 CloneViewer=2
00029 uint8 CloneSimulation=4
00030 uint8 CloneRealControllers=8
00031
00032
00033
00034 string physicsengine
00035 string collisionchecker
00036 string viewer
00037
00038
00039 """
00040
00041 CloneBodies = 1
00042 CloneViewer = 2
00043 CloneSimulation = 4
00044 CloneRealControllers = 8
00045
00046 __slots__ = ['sessionid','clone_sessionid','clone_options','physicsengine','collisionchecker','viewer']
00047 _slot_types = ['int32','int32','uint8','string','string','string']
00048
00049 def __init__(self, *args, **kwds):
00050 """
00051 Constructor. Any message fields that are implicitly/explicitly
00052 set to None will be assigned a default value. The recommend
00053 use is keyword arguments as this is more robust to future message
00054 changes. You cannot mix in-order arguments and keyword arguments.
00055
00056 The available fields are:
00057 sessionid,clone_sessionid,clone_options,physicsengine,collisionchecker,viewer
00058
00059 :param args: complete set of field values, in .msg order
00060 :param kwds: use keyword arguments corresponding to message field names
00061 to set specific fields.
00062 """
00063 if args or kwds:
00064 super(openrave_sessionRequest, self).__init__(*args, **kwds)
00065
00066 if self.sessionid is None:
00067 self.sessionid = 0
00068 if self.clone_sessionid is None:
00069 self.clone_sessionid = 0
00070 if self.clone_options is None:
00071 self.clone_options = 0
00072 if self.physicsengine is None:
00073 self.physicsengine = ''
00074 if self.collisionchecker is None:
00075 self.collisionchecker = ''
00076 if self.viewer is None:
00077 self.viewer = ''
00078 else:
00079 self.sessionid = 0
00080 self.clone_sessionid = 0
00081 self.clone_options = 0
00082 self.physicsengine = ''
00083 self.collisionchecker = ''
00084 self.viewer = ''
00085
00086 def _get_types(self):
00087 """
00088 internal API method
00089 """
00090 return self._slot_types
00091
00092 def serialize(self, buff):
00093 """
00094 serialize message into buffer
00095 :param buff: buffer, ``StringIO``
00096 """
00097 try:
00098 _x = self
00099 buff.write(_struct_2iB.pack(_x.sessionid, _x.clone_sessionid, _x.clone_options))
00100 _x = self.physicsengine
00101 length = len(_x)
00102 if python3 or type(_x) == unicode:
00103 _x = _x.encode('utf-8')
00104 length = len(_x)
00105 buff.write(struct.pack('<I%ss'%length, length, _x))
00106 _x = self.collisionchecker
00107 length = len(_x)
00108 if python3 or type(_x) == unicode:
00109 _x = _x.encode('utf-8')
00110 length = len(_x)
00111 buff.write(struct.pack('<I%ss'%length, length, _x))
00112 _x = self.viewer
00113 length = len(_x)
00114 if python3 or type(_x) == unicode:
00115 _x = _x.encode('utf-8')
00116 length = len(_x)
00117 buff.write(struct.pack('<I%ss'%length, length, _x))
00118 except struct.error as se: self._check_types(se)
00119 except TypeError as te: self._check_types(te)
00120
00121 def deserialize(self, str):
00122 """
00123 unpack serialized message in str into this message instance
00124 :param str: byte array of serialized message, ``str``
00125 """
00126 try:
00127 end = 0
00128 _x = self
00129 start = end
00130 end += 9
00131 (_x.sessionid, _x.clone_sessionid, _x.clone_options,) = _struct_2iB.unpack(str[start:end])
00132 start = end
00133 end += 4
00134 (length,) = _struct_I.unpack(str[start:end])
00135 start = end
00136 end += length
00137 if python3:
00138 self.physicsengine = str[start:end].decode('utf-8')
00139 else:
00140 self.physicsengine = str[start:end]
00141 start = end
00142 end += 4
00143 (length,) = _struct_I.unpack(str[start:end])
00144 start = end
00145 end += length
00146 if python3:
00147 self.collisionchecker = str[start:end].decode('utf-8')
00148 else:
00149 self.collisionchecker = str[start:end]
00150 start = end
00151 end += 4
00152 (length,) = _struct_I.unpack(str[start:end])
00153 start = end
00154 end += length
00155 if python3:
00156 self.viewer = str[start:end].decode('utf-8')
00157 else:
00158 self.viewer = str[start:end]
00159 return self
00160 except struct.error as e:
00161 raise genpy.DeserializationError(e)
00162
00163
00164 def serialize_numpy(self, buff, numpy):
00165 """
00166 serialize message with numpy array types into buffer
00167 :param buff: buffer, ``StringIO``
00168 :param numpy: numpy python module
00169 """
00170 try:
00171 _x = self
00172 buff.write(_struct_2iB.pack(_x.sessionid, _x.clone_sessionid, _x.clone_options))
00173 _x = self.physicsengine
00174 length = len(_x)
00175 if python3 or type(_x) == unicode:
00176 _x = _x.encode('utf-8')
00177 length = len(_x)
00178 buff.write(struct.pack('<I%ss'%length, length, _x))
00179 _x = self.collisionchecker
00180 length = len(_x)
00181 if python3 or type(_x) == unicode:
00182 _x = _x.encode('utf-8')
00183 length = len(_x)
00184 buff.write(struct.pack('<I%ss'%length, length, _x))
00185 _x = self.viewer
00186 length = len(_x)
00187 if python3 or type(_x) == unicode:
00188 _x = _x.encode('utf-8')
00189 length = len(_x)
00190 buff.write(struct.pack('<I%ss'%length, length, _x))
00191 except struct.error as se: self._check_types(se)
00192 except TypeError as te: self._check_types(te)
00193
00194 def deserialize_numpy(self, str, numpy):
00195 """
00196 unpack serialized message in str into this message instance using numpy for array types
00197 :param str: byte array of serialized message, ``str``
00198 :param numpy: numpy python module
00199 """
00200 try:
00201 end = 0
00202 _x = self
00203 start = end
00204 end += 9
00205 (_x.sessionid, _x.clone_sessionid, _x.clone_options,) = _struct_2iB.unpack(str[start:end])
00206 start = end
00207 end += 4
00208 (length,) = _struct_I.unpack(str[start:end])
00209 start = end
00210 end += length
00211 if python3:
00212 self.physicsengine = str[start:end].decode('utf-8')
00213 else:
00214 self.physicsengine = str[start:end]
00215 start = end
00216 end += 4
00217 (length,) = _struct_I.unpack(str[start:end])
00218 start = end
00219 end += length
00220 if python3:
00221 self.collisionchecker = str[start:end].decode('utf-8')
00222 else:
00223 self.collisionchecker = str[start:end]
00224 start = end
00225 end += 4
00226 (length,) = _struct_I.unpack(str[start:end])
00227 start = end
00228 end += length
00229 if python3:
00230 self.viewer = str[start:end].decode('utf-8')
00231 else:
00232 self.viewer = str[start:end]
00233 return self
00234 except struct.error as e:
00235 raise genpy.DeserializationError(e)
00236
00237 _struct_I = genpy.struct_I
00238 _struct_2iB = struct.Struct("<2iB")
00239 """autogenerated by genpy from openraveros/openrave_sessionResponse.msg. Do not edit."""
00240 import sys
00241 python3 = True if sys.hexversion > 0x03000000 else False
00242 import genpy
00243 import struct
00244
00245
00246 class openrave_sessionResponse(genpy.Message):
00247 _md5sum = "8e5dc427c491661ad151bd29bea23253"
00248 _type = "openraveros/openrave_sessionResponse"
00249 _has_header = False
00250 _full_text = """int32 sessionid
00251
00252
00253 """
00254 __slots__ = ['sessionid']
00255 _slot_types = ['int32']
00256
00257 def __init__(self, *args, **kwds):
00258 """
00259 Constructor. Any message fields that are implicitly/explicitly
00260 set to None will be assigned a default value. The recommend
00261 use is keyword arguments as this is more robust to future message
00262 changes. You cannot mix in-order arguments and keyword arguments.
00263
00264 The available fields are:
00265 sessionid
00266
00267 :param args: complete set of field values, in .msg order
00268 :param kwds: use keyword arguments corresponding to message field names
00269 to set specific fields.
00270 """
00271 if args or kwds:
00272 super(openrave_sessionResponse, self).__init__(*args, **kwds)
00273
00274 if self.sessionid is None:
00275 self.sessionid = 0
00276 else:
00277 self.sessionid = 0
00278
00279 def _get_types(self):
00280 """
00281 internal API method
00282 """
00283 return self._slot_types
00284
00285 def serialize(self, buff):
00286 """
00287 serialize message into buffer
00288 :param buff: buffer, ``StringIO``
00289 """
00290 try:
00291 buff.write(_struct_i.pack(self.sessionid))
00292 except struct.error as se: self._check_types(se)
00293 except TypeError as te: self._check_types(te)
00294
00295 def deserialize(self, str):
00296 """
00297 unpack serialized message in str into this message instance
00298 :param str: byte array of serialized message, ``str``
00299 """
00300 try:
00301 end = 0
00302 start = end
00303 end += 4
00304 (self.sessionid,) = _struct_i.unpack(str[start:end])
00305 return self
00306 except struct.error as e:
00307 raise genpy.DeserializationError(e)
00308
00309
00310 def serialize_numpy(self, buff, numpy):
00311 """
00312 serialize message with numpy array types into buffer
00313 :param buff: buffer, ``StringIO``
00314 :param numpy: numpy python module
00315 """
00316 try:
00317 buff.write(_struct_i.pack(self.sessionid))
00318 except struct.error as se: self._check_types(se)
00319 except TypeError as te: self._check_types(te)
00320
00321 def deserialize_numpy(self, str, numpy):
00322 """
00323 unpack serialized message in str into this message instance using numpy for array types
00324 :param str: byte array of serialized message, ``str``
00325 :param numpy: numpy python module
00326 """
00327 try:
00328 end = 0
00329 start = end
00330 end += 4
00331 (self.sessionid,) = _struct_i.unpack(str[start:end])
00332 return self
00333 except struct.error as e:
00334 raise genpy.DeserializationError(e)
00335
00336 _struct_I = genpy.struct_I
00337 _struct_i = struct.Struct("<i")
00338 class openrave_session(object):
00339 _type = 'openraveros/openrave_session'
00340 _md5sum = '8e5ae5945eaae04a0a7641c7ec603ee0'
00341 _request_class = openrave_sessionRequest
00342 _response_class = openrave_sessionResponse