_ConfirmConf.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_self_test_msgs/ConfirmConfRequest.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 ConfirmConfRequest(genpy.Message):
00009   _md5sum = "ab7d78a02a011c0bafd39410f9f234b3"
00010   _type = "pr2_self_test_msgs/ConfirmConfRequest"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """string message
00013 string details
00014 
00015 """
00016   __slots__ = ['message','details']
00017   _slot_types = ['string','string']
00018 
00019   def __init__(self, *args, **kwds):
00020     """
00021     Constructor. Any message fields that are implicitly/explicitly
00022     set to None will be assigned a default value. The recommend
00023     use is keyword arguments as this is more robust to future message
00024     changes.  You cannot mix in-order arguments and keyword arguments.
00025 
00026     The available fields are:
00027        message,details
00028 
00029     :param args: complete set of field values, in .msg order
00030     :param kwds: use keyword arguments corresponding to message field names
00031     to set specific fields.
00032     """
00033     if args or kwds:
00034       super(ConfirmConfRequest, self).__init__(*args, **kwds)
00035       #message fields cannot be None, assign default values for those that are
00036       if self.message is None:
00037         self.message = ''
00038       if self.details is None:
00039         self.details = ''
00040     else:
00041       self.message = ''
00042       self.details = ''
00043 
00044   def _get_types(self):
00045     """
00046     internal API method
00047     """
00048     return self._slot_types
00049 
00050   def serialize(self, buff):
00051     """
00052     serialize message into buffer
00053     :param buff: buffer, ``StringIO``
00054     """
00055     try:
00056       _x = self.message
00057       length = len(_x)
00058       if python3 or type(_x) == unicode:
00059         _x = _x.encode('utf-8')
00060         length = len(_x)
00061       buff.write(struct.pack('<I%ss'%length, length, _x))
00062       _x = self.details
00063       length = len(_x)
00064       if python3 or type(_x) == unicode:
00065         _x = _x.encode('utf-8')
00066         length = len(_x)
00067       buff.write(struct.pack('<I%ss'%length, length, _x))
00068     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00069     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00070 
00071   def deserialize(self, str):
00072     """
00073     unpack serialized message in str into this message instance
00074     :param str: byte array of serialized message, ``str``
00075     """
00076     try:
00077       end = 0
00078       start = end
00079       end += 4
00080       (length,) = _struct_I.unpack(str[start:end])
00081       start = end
00082       end += length
00083       if python3:
00084         self.message = str[start:end].decode('utf-8')
00085       else:
00086         self.message = str[start:end]
00087       start = end
00088       end += 4
00089       (length,) = _struct_I.unpack(str[start:end])
00090       start = end
00091       end += length
00092       if python3:
00093         self.details = str[start:end].decode('utf-8')
00094       else:
00095         self.details = str[start:end]
00096       return self
00097     except struct.error as e:
00098       raise genpy.DeserializationError(e) #most likely buffer underfill
00099 
00100 
00101   def serialize_numpy(self, buff, numpy):
00102     """
00103     serialize message with numpy array types into buffer
00104     :param buff: buffer, ``StringIO``
00105     :param numpy: numpy python module
00106     """
00107     try:
00108       _x = self.message
00109       length = len(_x)
00110       if python3 or type(_x) == unicode:
00111         _x = _x.encode('utf-8')
00112         length = len(_x)
00113       buff.write(struct.pack('<I%ss'%length, length, _x))
00114       _x = self.details
00115       length = len(_x)
00116       if python3 or type(_x) == unicode:
00117         _x = _x.encode('utf-8')
00118         length = len(_x)
00119       buff.write(struct.pack('<I%ss'%length, length, _x))
00120     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00121     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00122 
00123   def deserialize_numpy(self, str, numpy):
00124     """
00125     unpack serialized message in str into this message instance using numpy for array types
00126     :param str: byte array of serialized message, ``str``
00127     :param numpy: numpy python module
00128     """
00129     try:
00130       end = 0
00131       start = end
00132       end += 4
00133       (length,) = _struct_I.unpack(str[start:end])
00134       start = end
00135       end += length
00136       if python3:
00137         self.message = str[start:end].decode('utf-8')
00138       else:
00139         self.message = str[start:end]
00140       start = end
00141       end += 4
00142       (length,) = _struct_I.unpack(str[start:end])
00143       start = end
00144       end += length
00145       if python3:
00146         self.details = str[start:end].decode('utf-8')
00147       else:
00148         self.details = str[start:end]
00149       return self
00150     except struct.error as e:
00151       raise genpy.DeserializationError(e) #most likely buffer underfill
00152 
00153 _struct_I = genpy.struct_I
00154 """autogenerated by genpy from pr2_self_test_msgs/ConfirmConfResponse.msg. Do not edit."""
00155 import sys
00156 python3 = True if sys.hexversion > 0x03000000 else False
00157 import genpy
00158 import struct
00159 
00160 
00161 class ConfirmConfResponse(genpy.Message):
00162   _md5sum = "07d0ea23359e60111f462db0c7458414"
00163   _type = "pr2_self_test_msgs/ConfirmConfResponse"
00164   _has_header = False #flag to mark the presence of a Header object
00165   _full_text = """byte RETRY = 0
00166 byte FAIL = 1
00167 
00168 byte retry
00169 
00170 """
00171   # Pseudo-constants
00172   RETRY = 0
00173   FAIL = 1
00174 
00175   __slots__ = ['retry']
00176   _slot_types = ['byte']
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        retry
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(ConfirmConfResponse, self).__init__(*args, **kwds)
00194       #message fields cannot be None, assign default values for those that are
00195       if self.retry is None:
00196         self.retry = 0
00197     else:
00198       self.retry = 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_b.pack(self.retry))
00213     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00214     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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 += 1
00225       (self.retry,) = _struct_b.unpack(str[start:end])
00226       return self
00227     except struct.error as e:
00228       raise genpy.DeserializationError(e) #most likely buffer underfill
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_b.pack(self.retry))
00239     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00240     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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 += 1
00252       (self.retry,) = _struct_b.unpack(str[start:end])
00253       return self
00254     except struct.error as e:
00255       raise genpy.DeserializationError(e) #most likely buffer underfill
00256 
00257 _struct_I = genpy.struct_I
00258 _struct_b = struct.Struct("<b")
00259 class ConfirmConf(object):
00260   _type          = 'pr2_self_test_msgs/ConfirmConf'
00261   _md5sum = '442889679903251e2b796370dada2b07'
00262   _request_class  = ConfirmConfRequest
00263   _response_class = ConfirmConfResponse


pr2_self_test_msgs
Author(s): Kevin Watts
autogenerated on Tue Apr 22 2014 19:38:25