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


re_srvs
Author(s): Alexander Perzylo
autogenerated on Sun Jan 5 2014 11:28:42