00001 """autogenerated by genpy from vrep_common/simRosEnablePublisherRequest.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 simRosEnablePublisherRequest(genpy.Message):
00009 _md5sum = "e7df7c248dc5801f9f5b98f61f3741b8"
00010 _type = "vrep_common/simRosEnablePublisherRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014
00015
00016 string topicName
00017 int32 queueSize
00018 int32 streamCmd
00019 int32 auxInt1
00020 int32 auxInt2
00021 string auxString
00022
00023 """
00024 __slots__ = ['topicName','queueSize','streamCmd','auxInt1','auxInt2','auxString']
00025 _slot_types = ['string','int32','int32','int32','int32','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 topicName,queueSize,streamCmd,auxInt1,auxInt2,auxString
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(simRosEnablePublisherRequest, self).__init__(*args, **kwds)
00043
00044 if self.topicName is None:
00045 self.topicName = ''
00046 if self.queueSize is None:
00047 self.queueSize = 0
00048 if self.streamCmd is None:
00049 self.streamCmd = 0
00050 if self.auxInt1 is None:
00051 self.auxInt1 = 0
00052 if self.auxInt2 is None:
00053 self.auxInt2 = 0
00054 if self.auxString is None:
00055 self.auxString = ''
00056 else:
00057 self.topicName = ''
00058 self.queueSize = 0
00059 self.streamCmd = 0
00060 self.auxInt1 = 0
00061 self.auxInt2 = 0
00062 self.auxString = ''
00063
00064 def _get_types(self):
00065 """
00066 internal API method
00067 """
00068 return self._slot_types
00069
00070 def serialize(self, buff):
00071 """
00072 serialize message into buffer
00073 :param buff: buffer, ``StringIO``
00074 """
00075 try:
00076 _x = self.topicName
00077 length = len(_x)
00078 if python3 or type(_x) == unicode:
00079 _x = _x.encode('utf-8')
00080 length = len(_x)
00081 buff.write(struct.pack('<I%ss'%length, length, _x))
00082 _x = self
00083 buff.write(_struct_4i.pack(_x.queueSize, _x.streamCmd, _x.auxInt1, _x.auxInt2))
00084 _x = self.auxString
00085 length = len(_x)
00086 if python3 or type(_x) == unicode:
00087 _x = _x.encode('utf-8')
00088 length = len(_x)
00089 buff.write(struct.pack('<I%ss'%length, length, _x))
00090 except struct.error as se: self._check_types(se)
00091 except TypeError as te: self._check_types(te)
00092
00093 def deserialize(self, str):
00094 """
00095 unpack serialized message in str into this message instance
00096 :param str: byte array of serialized message, ``str``
00097 """
00098 try:
00099 end = 0
00100 start = end
00101 end += 4
00102 (length,) = _struct_I.unpack(str[start:end])
00103 start = end
00104 end += length
00105 if python3:
00106 self.topicName = str[start:end].decode('utf-8')
00107 else:
00108 self.topicName = str[start:end]
00109 _x = self
00110 start = end
00111 end += 16
00112 (_x.queueSize, _x.streamCmd, _x.auxInt1, _x.auxInt2,) = _struct_4i.unpack(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.auxString = str[start:end].decode('utf-8')
00120 else:
00121 self.auxString = str[start:end]
00122 return self
00123 except struct.error as e:
00124 raise genpy.DeserializationError(e)
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.topicName
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
00141 buff.write(_struct_4i.pack(_x.queueSize, _x.streamCmd, _x.auxInt1, _x.auxInt2))
00142 _x = self.auxString
00143 length = len(_x)
00144 if python3 or type(_x) == unicode:
00145 _x = _x.encode('utf-8')
00146 length = len(_x)
00147 buff.write(struct.pack('<I%ss'%length, length, _x))
00148 except struct.error as se: self._check_types(se)
00149 except TypeError as te: self._check_types(te)
00150
00151 def deserialize_numpy(self, str, numpy):
00152 """
00153 unpack serialized message in str into this message instance using numpy for array types
00154 :param str: byte array of serialized message, ``str``
00155 :param numpy: numpy python module
00156 """
00157 try:
00158 end = 0
00159 start = end
00160 end += 4
00161 (length,) = _struct_I.unpack(str[start:end])
00162 start = end
00163 end += length
00164 if python3:
00165 self.topicName = str[start:end].decode('utf-8')
00166 else:
00167 self.topicName = str[start:end]
00168 _x = self
00169 start = end
00170 end += 16
00171 (_x.queueSize, _x.streamCmd, _x.auxInt1, _x.auxInt2,) = _struct_4i.unpack(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.auxString = str[start:end].decode('utf-8')
00179 else:
00180 self.auxString = str[start:end]
00181 return self
00182 except struct.error as e:
00183 raise genpy.DeserializationError(e)
00184
00185 _struct_I = genpy.struct_I
00186 _struct_4i = struct.Struct("<4i")
00187 """autogenerated by genpy from vrep_common/simRosEnablePublisherResponse.msg. Do not edit."""
00188 import sys
00189 python3 = True if sys.hexversion > 0x03000000 else False
00190 import genpy
00191 import struct
00192
00193
00194 class simRosEnablePublisherResponse(genpy.Message):
00195 _md5sum = "8280ce6c5ec203a92c1559486bea2e2e"
00196 _type = "vrep_common/simRosEnablePublisherResponse"
00197 _has_header = False
00198 _full_text = """string effectiveTopicName
00199
00200
00201 """
00202 __slots__ = ['effectiveTopicName']
00203 _slot_types = ['string']
00204
00205 def __init__(self, *args, **kwds):
00206 """
00207 Constructor. Any message fields that are implicitly/explicitly
00208 set to None will be assigned a default value. The recommend
00209 use is keyword arguments as this is more robust to future message
00210 changes. You cannot mix in-order arguments and keyword arguments.
00211
00212 The available fields are:
00213 effectiveTopicName
00214
00215 :param args: complete set of field values, in .msg order
00216 :param kwds: use keyword arguments corresponding to message field names
00217 to set specific fields.
00218 """
00219 if args or kwds:
00220 super(simRosEnablePublisherResponse, self).__init__(*args, **kwds)
00221
00222 if self.effectiveTopicName is None:
00223 self.effectiveTopicName = ''
00224 else:
00225 self.effectiveTopicName = ''
00226
00227 def _get_types(self):
00228 """
00229 internal API method
00230 """
00231 return self._slot_types
00232
00233 def serialize(self, buff):
00234 """
00235 serialize message into buffer
00236 :param buff: buffer, ``StringIO``
00237 """
00238 try:
00239 _x = self.effectiveTopicName
00240 length = len(_x)
00241 if python3 or type(_x) == unicode:
00242 _x = _x.encode('utf-8')
00243 length = len(_x)
00244 buff.write(struct.pack('<I%ss'%length, length, _x))
00245 except struct.error as se: self._check_types(se)
00246 except TypeError as te: self._check_types(te)
00247
00248 def deserialize(self, str):
00249 """
00250 unpack serialized message in str into this message instance
00251 :param str: byte array of serialized message, ``str``
00252 """
00253 try:
00254 end = 0
00255 start = end
00256 end += 4
00257 (length,) = _struct_I.unpack(str[start:end])
00258 start = end
00259 end += length
00260 if python3:
00261 self.effectiveTopicName = str[start:end].decode('utf-8')
00262 else:
00263 self.effectiveTopicName = str[start:end]
00264 return self
00265 except struct.error as e:
00266 raise genpy.DeserializationError(e)
00267
00268
00269 def serialize_numpy(self, buff, numpy):
00270 """
00271 serialize message with numpy array types into buffer
00272 :param buff: buffer, ``StringIO``
00273 :param numpy: numpy python module
00274 """
00275 try:
00276 _x = self.effectiveTopicName
00277 length = len(_x)
00278 if python3 or type(_x) == unicode:
00279 _x = _x.encode('utf-8')
00280 length = len(_x)
00281 buff.write(struct.pack('<I%ss'%length, length, _x))
00282 except struct.error as se: self._check_types(se)
00283 except TypeError as te: self._check_types(te)
00284
00285 def deserialize_numpy(self, str, numpy):
00286 """
00287 unpack serialized message in str into this message instance using numpy for array types
00288 :param str: byte array of serialized message, ``str``
00289 :param numpy: numpy python module
00290 """
00291 try:
00292 end = 0
00293 start = end
00294 end += 4
00295 (length,) = _struct_I.unpack(str[start:end])
00296 start = end
00297 end += length
00298 if python3:
00299 self.effectiveTopicName = str[start:end].decode('utf-8')
00300 else:
00301 self.effectiveTopicName = str[start:end]
00302 return self
00303 except struct.error as e:
00304 raise genpy.DeserializationError(e)
00305
00306 _struct_I = genpy.struct_I
00307 class simRosEnablePublisher(object):
00308 _type = 'vrep_common/simRosEnablePublisher'
00309 _md5sum = '1656daea9e4b58b53b650fa39f39e74e'
00310 _request_class = simRosEnablePublisherRequest
00311 _response_class = simRosEnablePublisherResponse