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