_StringArr_Int32.py
Go to the documentation of this file.
00001 """autogenerated by genpy from rfid_people_following/StringArr_Int32Request.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 StringArr_Int32Request(genpy.Message):
00009   _md5sum = "cce5a364f3a3be12c9722c6dcad2fa94"
00010   _type = "rfid_people_following/StringArr_Int32Request"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string[] data
00013 
00014 """
00015   __slots__ = ['data']
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        data
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(StringArr_Int32Request, self).__init__(*args, **kwds)
00034       #message fields cannot be None, assign default values for those that are
00035       if self.data is None:
00036         self.data = []
00037     else:
00038       self.data = []
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.data)
00053       buff.write(_struct_I.pack(length))
00054       for val1 in self.data:
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.data = []
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.data.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.data)
00098       buff.write(_struct_I.pack(length))
00099       for val1 in self.data:
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.data = []
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.data.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_people_following/StringArr_Int32Response.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 StringArr_Int32Response(genpy.Message):
00144   _md5sum = "b3087778e93fcd34cc8d65bc54e850d1"
00145   _type = "rfid_people_following/StringArr_Int32Response"
00146   _has_header = False #flag to mark the presence of a Header object
00147   _full_text = """int32 value
00148 
00149 
00150 """
00151   __slots__ = ['value']
00152   _slot_types = ['int32']
00153 
00154   def __init__(self, *args, **kwds):
00155     """
00156     Constructor. Any message fields that are implicitly/explicitly
00157     set to None will be assigned a default value. The recommend
00158     use is keyword arguments as this is more robust to future message
00159     changes.  You cannot mix in-order arguments and keyword arguments.
00160 
00161     The available fields are:
00162        value
00163 
00164     :param args: complete set of field values, in .msg order
00165     :param kwds: use keyword arguments corresponding to message field names
00166     to set specific fields.
00167     """
00168     if args or kwds:
00169       super(StringArr_Int32Response, self).__init__(*args, **kwds)
00170       #message fields cannot be None, assign default values for those that are
00171       if self.value is None:
00172         self.value = 0
00173     else:
00174       self.value = 0
00175 
00176   def _get_types(self):
00177     """
00178     internal API method
00179     """
00180     return self._slot_types
00181 
00182   def serialize(self, buff):
00183     """
00184     serialize message into buffer
00185     :param buff: buffer, ``StringIO``
00186     """
00187     try:
00188       buff.write(_struct_i.pack(self.value))
00189     except struct.error as se: self._check_types(se)
00190     except TypeError as te: self._check_types(te)
00191 
00192   def deserialize(self, str):
00193     """
00194     unpack serialized message in str into this message instance
00195     :param str: byte array of serialized message, ``str``
00196     """
00197     try:
00198       end = 0
00199       start = end
00200       end += 4
00201       (self.value,) = _struct_i.unpack(str[start:end])
00202       return self
00203     except struct.error as e:
00204       raise genpy.DeserializationError(e) #most likely buffer underfill
00205 
00206 
00207   def serialize_numpy(self, buff, numpy):
00208     """
00209     serialize message with numpy array types into buffer
00210     :param buff: buffer, ``StringIO``
00211     :param numpy: numpy python module
00212     """
00213     try:
00214       buff.write(_struct_i.pack(self.value))
00215     except struct.error as se: self._check_types(se)
00216     except TypeError as te: self._check_types(te)
00217 
00218   def deserialize_numpy(self, str, numpy):
00219     """
00220     unpack serialized message in str into this message instance using numpy for array types
00221     :param str: byte array of serialized message, ``str``
00222     :param numpy: numpy python module
00223     """
00224     try:
00225       end = 0
00226       start = end
00227       end += 4
00228       (self.value,) = _struct_i.unpack(str[start:end])
00229       return self
00230     except struct.error as e:
00231       raise genpy.DeserializationError(e) #most likely buffer underfill
00232 
00233 _struct_I = genpy.struct_I
00234 _struct_i = struct.Struct("<i")
00235 class StringArr_Int32(object):
00236   _type          = 'rfid_people_following/StringArr_Int32'
00237   _md5sum = '139fc1e7d0050009060f53da1cf8bf92'
00238   _request_class  = StringArr_Int32Request
00239   _response_class = StringArr_Int32Response


rfid_people_following
Author(s): Travis Deyle (Healthcare Robotics Lab, Georgia Tech)
autogenerated on Wed Nov 27 2013 11:38:30