00001 """autogenerated by genpy from vrep_common/simRosEnableSubscriberRequest.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 simRosEnableSubscriberRequest(genpy.Message):
00009 _md5sum = "e7df7c248dc5801f9f5b98f61f3741b8"
00010 _type = "vrep_common/simRosEnableSubscriberRequest"
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(simRosEnableSubscriberRequest, 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/simRosEnableSubscriberResponse.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 simRosEnableSubscriberResponse(genpy.Message):
00195 _md5sum = "62d69ecf284a2ca70f446f9db0533ca8"
00196 _type = "vrep_common/simRosEnableSubscriberResponse"
00197 _has_header = False
00198 _full_text = """int32 subscriberID
00199
00200
00201 """
00202 __slots__ = ['subscriberID']
00203 _slot_types = ['int32']
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 subscriberID
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(simRosEnableSubscriberResponse, self).__init__(*args, **kwds)
00221
00222 if self.subscriberID is None:
00223 self.subscriberID = 0
00224 else:
00225 self.subscriberID = 0
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 buff.write(_struct_i.pack(self.subscriberID))
00240 except struct.error as se: self._check_types(se)
00241 except TypeError as te: self._check_types(te)
00242
00243 def deserialize(self, str):
00244 """
00245 unpack serialized message in str into this message instance
00246 :param str: byte array of serialized message, ``str``
00247 """
00248 try:
00249 end = 0
00250 start = end
00251 end += 4
00252 (self.subscriberID,) = _struct_i.unpack(str[start:end])
00253 return self
00254 except struct.error as e:
00255 raise genpy.DeserializationError(e)
00256
00257
00258 def serialize_numpy(self, buff, numpy):
00259 """
00260 serialize message with numpy array types into buffer
00261 :param buff: buffer, ``StringIO``
00262 :param numpy: numpy python module
00263 """
00264 try:
00265 buff.write(_struct_i.pack(self.subscriberID))
00266 except struct.error as se: self._check_types(se)
00267 except TypeError as te: self._check_types(te)
00268
00269 def deserialize_numpy(self, str, numpy):
00270 """
00271 unpack serialized message in str into this message instance using numpy for array types
00272 :param str: byte array of serialized message, ``str``
00273 :param numpy: numpy python module
00274 """
00275 try:
00276 end = 0
00277 start = end
00278 end += 4
00279 (self.subscriberID,) = _struct_i.unpack(str[start:end])
00280 return self
00281 except struct.error as e:
00282 raise genpy.DeserializationError(e)
00283
00284 _struct_I = genpy.struct_I
00285 _struct_i = struct.Struct("<i")
00286 class simRosEnableSubscriber(object):
00287 _type = 'vrep_common/simRosEnableSubscriber'
00288 _md5sum = '61a23a6c623cfe11fb9eae842a1893b7'
00289 _request_class = simRosEnableSubscriberRequest
00290 _response_class = simRosEnableSubscriberResponse