_PickupFeedback.py
Go to the documentation of this file.
00001 """autogenerated by genpy from object_manipulation_msgs/PickupFeedback.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 PickupFeedback(genpy.Message):
00009   _md5sum = "864c83eb233aaa8fcbe0d88caed02501"
00010   _type = "object_manipulation_msgs/PickupFeedback"
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 # The number of the grasp currently being attempted
00015 int32 current_grasp
00016 
00017 # The total number of grasps that will be attempted
00018 int32 total_grasps
00019 
00020 
00021 """
00022   __slots__ = ['current_grasp','total_grasps']
00023   _slot_types = ['int32','int32']
00024 
00025   def __init__(self, *args, **kwds):
00026     """
00027     Constructor. Any message fields that are implicitly/explicitly
00028     set to None will be assigned a default value. The recommend
00029     use is keyword arguments as this is more robust to future message
00030     changes.  You cannot mix in-order arguments and keyword arguments.
00031 
00032     The available fields are:
00033        current_grasp,total_grasps
00034 
00035     :param args: complete set of field values, in .msg order
00036     :param kwds: use keyword arguments corresponding to message field names
00037     to set specific fields.
00038     """
00039     if args or kwds:
00040       super(PickupFeedback, self).__init__(*args, **kwds)
00041       #message fields cannot be None, assign default values for those that are
00042       if self.current_grasp is None:
00043         self.current_grasp = 0
00044       if self.total_grasps is None:
00045         self.total_grasps = 0
00046     else:
00047       self.current_grasp = 0
00048       self.total_grasps = 0
00049 
00050   def _get_types(self):
00051     """
00052     internal API method
00053     """
00054     return self._slot_types
00055 
00056   def serialize(self, buff):
00057     """
00058     serialize message into buffer
00059     :param buff: buffer, ``StringIO``
00060     """
00061     try:
00062       _x = self
00063       buff.write(_struct_2i.pack(_x.current_grasp, _x.total_grasps))
00064     except struct.error as se: self._check_types(se)
00065     except TypeError as te: self._check_types(te)
00066 
00067   def deserialize(self, str):
00068     """
00069     unpack serialized message in str into this message instance
00070     :param str: byte array of serialized message, ``str``
00071     """
00072     try:
00073       end = 0
00074       _x = self
00075       start = end
00076       end += 8
00077       (_x.current_grasp, _x.total_grasps,) = _struct_2i.unpack(str[start:end])
00078       return self
00079     except struct.error as e:
00080       raise genpy.DeserializationError(e) #most likely buffer underfill
00081 
00082 
00083   def serialize_numpy(self, buff, numpy):
00084     """
00085     serialize message with numpy array types into buffer
00086     :param buff: buffer, ``StringIO``
00087     :param numpy: numpy python module
00088     """
00089     try:
00090       _x = self
00091       buff.write(_struct_2i.pack(_x.current_grasp, _x.total_grasps))
00092     except struct.error as se: self._check_types(se)
00093     except TypeError as te: self._check_types(te)
00094 
00095   def deserialize_numpy(self, str, numpy):
00096     """
00097     unpack serialized message in str into this message instance using numpy for array types
00098     :param str: byte array of serialized message, ``str``
00099     :param numpy: numpy python module
00100     """
00101     try:
00102       end = 0
00103       _x = self
00104       start = end
00105       end += 8
00106       (_x.current_grasp, _x.total_grasps,) = _struct_2i.unpack(str[start:end])
00107       return self
00108     except struct.error as e:
00109       raise genpy.DeserializationError(e) #most likely buffer underfill
00110 
00111 _struct_I = genpy.struct_I
00112 _struct_2i = struct.Struct("<2i")


object_manipulation_msgs
Author(s): Matei Ciocarlie
autogenerated on Thu Jan 2 2014 11:38:11