00001 """autogenerated by genmsg_py from MoveArmFeedback.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import roslib.rostime
00006
00007 class MoveArmFeedback(roslib.message.Message):
00008 _md5sum = "321f3feadd0d5c1b7d7135738e673560"
00009 _type = "move_arm_msgs/MoveArmFeedback"
00010 _has_header = False
00011 _full_text = """# The internal state that the move arm action currently is in
00012 string state
00013
00014 # Time to completion - this is a combination of requested planning time and trajectory completion time
00015 duration time_to_completion
00016
00017 """
00018 __slots__ = ['state','time_to_completion']
00019 _slot_types = ['string','duration']
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 state,time_to_completion
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(MoveArmFeedback, self).__init__(*args, **kwds)
00037
00038 if self.state is None:
00039 self.state = ''
00040 if self.time_to_completion is None:
00041 self.time_to_completion = roslib.rostime.Duration()
00042 else:
00043 self.state = ''
00044 self.time_to_completion = roslib.rostime.Duration()
00045
00046 def _get_types(self):
00047 """
00048 internal API method
00049 """
00050 return self._slot_types
00051
00052 def serialize(self, buff):
00053 """
00054 serialize message into buffer
00055 @param buff: buffer
00056 @type buff: StringIO
00057 """
00058 try:
00059 _x = self.state
00060 length = len(_x)
00061 buff.write(struct.pack('<I%ss'%length, length, _x))
00062 _x = self
00063 buff.write(_struct_2i.pack(_x.time_to_completion.secs, _x.time_to_completion.nsecs))
00064 except struct.error, se: self._check_types(se)
00065 except TypeError, 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
00071 @type str: str
00072 """
00073 try:
00074 if self.time_to_completion is None:
00075 self.time_to_completion = roslib.rostime.Duration()
00076 end = 0
00077 start = end
00078 end += 4
00079 (length,) = _struct_I.unpack(str[start:end])
00080 start = end
00081 end += length
00082 self.state = str[start:end]
00083 _x = self
00084 start = end
00085 end += 8
00086 (_x.time_to_completion.secs, _x.time_to_completion.nsecs,) = _struct_2i.unpack(str[start:end])
00087 self.time_to_completion.canon()
00088 return self
00089 except struct.error, e:
00090 raise roslib.message.DeserializationError(e)
00091
00092
00093 def serialize_numpy(self, buff, numpy):
00094 """
00095 serialize message with numpy array types into buffer
00096 @param buff: buffer
00097 @type buff: StringIO
00098 @param numpy: numpy python module
00099 @type numpy module
00100 """
00101 try:
00102 _x = self.state
00103 length = len(_x)
00104 buff.write(struct.pack('<I%ss'%length, length, _x))
00105 _x = self
00106 buff.write(_struct_2i.pack(_x.time_to_completion.secs, _x.time_to_completion.nsecs))
00107 except struct.error, se: self._check_types(se)
00108 except TypeError, te: self._check_types(te)
00109
00110 def deserialize_numpy(self, str, numpy):
00111 """
00112 unpack serialized message in str into this message instance using numpy for array types
00113 @param str: byte array of serialized message
00114 @type str: str
00115 @param numpy: numpy python module
00116 @type numpy: module
00117 """
00118 try:
00119 if self.time_to_completion is None:
00120 self.time_to_completion = roslib.rostime.Duration()
00121 end = 0
00122 start = end
00123 end += 4
00124 (length,) = _struct_I.unpack(str[start:end])
00125 start = end
00126 end += length
00127 self.state = str[start:end]
00128 _x = self
00129 start = end
00130 end += 8
00131 (_x.time_to_completion.secs, _x.time_to_completion.nsecs,) = _struct_2i.unpack(str[start:end])
00132 self.time_to_completion.canon()
00133 return self
00134 except struct.error, e:
00135 raise roslib.message.DeserializationError(e)
00136
00137 _struct_I = roslib.message.struct_I
00138 _struct_2i = struct.Struct("<2i")