00001 """autogenerated by genmsg_py from reverseKinematics.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005
00006 class reverseKinematics(roslib.message.Message):
00007 _md5sum = "db455ae8ce3e770363971b1e8e35fac4"
00008 _type = "sr_robot_msgs/reverseKinematics"
00009 _has_header = False
00010 _full_text = """string finger_name
00011
00012
00013 """
00014 __slots__ = ['finger_name']
00015 _slot_types = ['string']
00016
00017 def __init__(self, *args, **kwds):
00018 """
00019 Constructor. Any message fields that are implicitly/explicitly
00020 set to None will be assigned a default value. The recommend
00021 use is keyword arguments as this is more robust to future message
00022 changes. You cannot mix in-order arguments and keyword arguments.
00023
00024 The available fields are:
00025 finger_name
00026
00027 @param args: complete set of field values, in .msg order
00028 @param kwds: use keyword arguments corresponding to message field names
00029 to set specific fields.
00030 """
00031 if args or kwds:
00032 super(reverseKinematics, self).__init__(*args, **kwds)
00033
00034 if self.finger_name is None:
00035 self.finger_name = ''
00036 else:
00037 self.finger_name = ''
00038
00039 def _get_types(self):
00040 """
00041 internal API method
00042 """
00043 return self._slot_types
00044
00045 def serialize(self, buff):
00046 """
00047 serialize message into buffer
00048 @param buff: buffer
00049 @type buff: StringIO
00050 """
00051 try:
00052 _x = self.finger_name
00053 length = len(_x)
00054 buff.write(struct.pack('<I%ss'%length, length, _x))
00055 except struct.error, se: self._check_types(se)
00056 except TypeError, te: self._check_types(te)
00057
00058 def deserialize(self, str):
00059 """
00060 unpack serialized message in str into this message instance
00061 @param str: byte array of serialized message
00062 @type str: str
00063 """
00064 try:
00065 end = 0
00066 start = end
00067 end += 4
00068 (length,) = _struct_I.unpack(str[start:end])
00069 start = end
00070 end += length
00071 self.finger_name = str[start:end]
00072 return self
00073 except struct.error, e:
00074 raise roslib.message.DeserializationError(e)
00075
00076
00077 def serialize_numpy(self, buff, numpy):
00078 """
00079 serialize message with numpy array types into buffer
00080 @param buff: buffer
00081 @type buff: StringIO
00082 @param numpy: numpy python module
00083 @type numpy module
00084 """
00085 try:
00086 _x = self.finger_name
00087 length = len(_x)
00088 buff.write(struct.pack('<I%ss'%length, length, _x))
00089 except struct.error, se: self._check_types(se)
00090 except TypeError, te: self._check_types(te)
00091
00092 def deserialize_numpy(self, str, numpy):
00093 """
00094 unpack serialized message in str into this message instance using numpy for array types
00095 @param str: byte array of serialized message
00096 @type str: str
00097 @param numpy: numpy python module
00098 @type numpy: module
00099 """
00100 try:
00101 end = 0
00102 start = end
00103 end += 4
00104 (length,) = _struct_I.unpack(str[start:end])
00105 start = end
00106 end += length
00107 self.finger_name = str[start:end]
00108 return self
00109 except struct.error, e:
00110 raise roslib.message.DeserializationError(e)
00111
00112 _struct_I = roslib.message.struct_I