_PR2GripperReleaseFeedback.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_gripper_sensor_msgs/PR2GripperReleaseFeedback.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import pr2_gripper_sensor_msgs.msg
00008 
00009 class PR2GripperReleaseFeedback(genpy.Message):
00010   _md5sum = "b4b68d48ac7d07bdb11b7f3badfa9266"
00011   _type = "pr2_gripper_sensor_msgs/PR2GripperReleaseFeedback"
00012   _has_header = False #flag to mark the presence of a Header object
00013   _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00014 
00015 #feedback
00016 PR2GripperReleaseData data
00017 
00018 
00019 ================================================================================
00020 MSG: pr2_gripper_sensor_msgs/PR2GripperReleaseData
00021 # the control state of our realtime controller
00022 PR2GripperSensorRTState rtstate
00023 ================================================================================
00024 MSG: pr2_gripper_sensor_msgs/PR2GripperSensorRTState
00025 # the control state of our realtime controller
00026 int8 realtime_controller_state
00027 
00028 # predefined values to indicate our realtime_controller_state
00029 int8 DISABLED = 0
00030 int8 POSITION_SERVO = 3
00031 int8 FORCE_SERVO = 4
00032 int8 FIND_CONTACT = 5
00033 int8 SLIP_SERVO = 6
00034 """
00035   __slots__ = ['data']
00036   _slot_types = ['pr2_gripper_sensor_msgs/PR2GripperReleaseData']
00037 
00038   def __init__(self, *args, **kwds):
00039     """
00040     Constructor. Any message fields that are implicitly/explicitly
00041     set to None will be assigned a default value. The recommend
00042     use is keyword arguments as this is more robust to future message
00043     changes.  You cannot mix in-order arguments and keyword arguments.
00044 
00045     The available fields are:
00046        data
00047 
00048     :param args: complete set of field values, in .msg order
00049     :param kwds: use keyword arguments corresponding to message field names
00050     to set specific fields.
00051     """
00052     if args or kwds:
00053       super(PR2GripperReleaseFeedback, self).__init__(*args, **kwds)
00054       #message fields cannot be None, assign default values for those that are
00055       if self.data is None:
00056         self.data = pr2_gripper_sensor_msgs.msg.PR2GripperReleaseData()
00057     else:
00058       self.data = pr2_gripper_sensor_msgs.msg.PR2GripperReleaseData()
00059 
00060   def _get_types(self):
00061     """
00062     internal API method
00063     """
00064     return self._slot_types
00065 
00066   def serialize(self, buff):
00067     """
00068     serialize message into buffer
00069     :param buff: buffer, ``StringIO``
00070     """
00071     try:
00072       buff.write(_struct_b.pack(self.data.rtstate.realtime_controller_state))
00073     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00074     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00075 
00076   def deserialize(self, str):
00077     """
00078     unpack serialized message in str into this message instance
00079     :param str: byte array of serialized message, ``str``
00080     """
00081     try:
00082       if self.data is None:
00083         self.data = pr2_gripper_sensor_msgs.msg.PR2GripperReleaseData()
00084       end = 0
00085       start = end
00086       end += 1
00087       (self.data.rtstate.realtime_controller_state,) = _struct_b.unpack(str[start:end])
00088       return self
00089     except struct.error as e:
00090       raise genpy.DeserializationError(e) #most likely buffer underfill
00091 
00092 
00093   def serialize_numpy(self, buff, numpy):
00094     """
00095     serialize message with numpy array types into buffer
00096     :param buff: buffer, ``StringIO``
00097     :param numpy: numpy python module
00098     """
00099     try:
00100       buff.write(_struct_b.pack(self.data.rtstate.realtime_controller_state))
00101     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00102     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00103 
00104   def deserialize_numpy(self, str, numpy):
00105     """
00106     unpack serialized message in str into this message instance using numpy for array types
00107     :param str: byte array of serialized message, ``str``
00108     :param numpy: numpy python module
00109     """
00110     try:
00111       if self.data is None:
00112         self.data = pr2_gripper_sensor_msgs.msg.PR2GripperReleaseData()
00113       end = 0
00114       start = end
00115       end += 1
00116       (self.data.rtstate.realtime_controller_state,) = _struct_b.unpack(str[start:end])
00117       return self
00118     except struct.error as e:
00119       raise genpy.DeserializationError(e) #most likely buffer underfill
00120 
00121 _struct_I = genpy.struct_I
00122 _struct_b = struct.Struct("<b")


pr2_gripper_sensor_msgs
Author(s): Joe Romano
autogenerated on Mon Oct 6 2014 12:17:32