_PoseStampedScriptedResult.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_object_manipulation_msgs/PoseStampedScriptedResult.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 PoseStampedScriptedResult(genpy.Message):
00009   _md5sum = "c22f2a1ed8654a0b365f1bb3f7ff2c0f"
00010   _type = "pr2_object_manipulation_msgs/PoseStampedScriptedResult"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 
00014 string result
00015 
00016 
00017 """
00018   __slots__ = ['result']
00019   _slot_types = ['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        result
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(PoseStampedScriptedResult, self).__init__(*args, **kwds)
00037       #message fields cannot be None, assign default values for those that are
00038       if self.result is None:
00039         self.result = ''
00040     else:
00041       self.result = ''
00042 
00043   def _get_types(self):
00044     """
00045     internal API method
00046     """
00047     return self._slot_types
00048 
00049   def serialize(self, buff):
00050     """
00051     serialize message into buffer
00052     :param buff: buffer, ``StringIO``
00053     """
00054     try:
00055       _x = self.result
00056       length = len(_x)
00057       if python3 or type(_x) == unicode:
00058         _x = _x.encode('utf-8')
00059         length = len(_x)
00060       buff.write(struct.pack('<I%ss'%length, length, _x))
00061     except struct.error as se: self._check_types(se)
00062     except TypeError as te: self._check_types(te)
00063 
00064   def deserialize(self, str):
00065     """
00066     unpack serialized message in str into this message instance
00067     :param str: byte array of serialized message, ``str``
00068     """
00069     try:
00070       end = 0
00071       start = end
00072       end += 4
00073       (length,) = _struct_I.unpack(str[start:end])
00074       start = end
00075       end += length
00076       if python3:
00077         self.result = str[start:end].decode('utf-8')
00078       else:
00079         self.result = str[start:end]
00080       return self
00081     except struct.error as e:
00082       raise genpy.DeserializationError(e) #most likely buffer underfill
00083 
00084 
00085   def serialize_numpy(self, buff, numpy):
00086     """
00087     serialize message with numpy array types into buffer
00088     :param buff: buffer, ``StringIO``
00089     :param numpy: numpy python module
00090     """
00091     try:
00092       _x = self.result
00093       length = len(_x)
00094       if python3 or type(_x) == unicode:
00095         _x = _x.encode('utf-8')
00096         length = len(_x)
00097       buff.write(struct.pack('<I%ss'%length, length, _x))
00098     except struct.error as se: self._check_types(se)
00099     except TypeError as te: self._check_types(te)
00100 
00101   def deserialize_numpy(self, str, numpy):
00102     """
00103     unpack serialized message in str into this message instance using numpy for array types
00104     :param str: byte array of serialized message, ``str``
00105     :param numpy: numpy python module
00106     """
00107     try:
00108       end = 0
00109       start = end
00110       end += 4
00111       (length,) = _struct_I.unpack(str[start:end])
00112       start = end
00113       end += length
00114       if python3:
00115         self.result = str[start:end].decode('utf-8')
00116       else:
00117         self.result = str[start:end]
00118       return self
00119     except struct.error as e:
00120       raise genpy.DeserializationError(e) #most likely buffer underfill
00121 
00122 _struct_I = genpy.struct_I


pr2_object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Fri Jan 3 2014 11:59:13