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