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


rfid_behaviors
Author(s): Travis Deyle
autogenerated on Wed Nov 27 2013 11:50:14