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 = "arm_navigation_msgs/MoveArmFeedback"
00010 _has_header = False
00011 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00012 # The internal state that the move arm action currently is in
00013 string state
00014
00015 # Time to completion - this is a combination of requested planning time and trajectory completion time
00016 duration time_to_completion
00017
00018
00019 """
00020 __slots__ = ['state','time_to_completion']
00021 _slot_types = ['string','duration']
00022
00023 def __init__(self, *args, **kwds):
00024 """
00025 Constructor. Any message fields that are implicitly/explicitly
00026 set to None will be assigned a default value. The recommend
00027 use is keyword arguments as this is more robust to future message
00028 changes. You cannot mix in-order arguments and keyword arguments.
00029
00030 The available fields are:
00031 state,time_to_completion
00032
00033 @param args: complete set of field values, in .msg order
00034 @param kwds: use keyword arguments corresponding to message field names
00035 to set specific fields.
00036 """
00037 if args or kwds:
00038 super(MoveArmFeedback, self).__init__(*args, **kwds)
00039
00040 if self.state is None:
00041 self.state = ''
00042 if self.time_to_completion is None:
00043 self.time_to_completion = roslib.rostime.Duration()
00044 else:
00045 self.state = ''
00046 self.time_to_completion = roslib.rostime.Duration()
00047
00048 def _get_types(self):
00049 """
00050 internal API method
00051 """
00052 return self._slot_types
00053
00054 def serialize(self, buff):
00055 """
00056 serialize message into buffer
00057 @param buff: buffer
00058 @type buff: StringIO
00059 """
00060 try:
00061 _x = self.state
00062 length = len(_x)
00063 buff.write(struct.pack('<I%ss'%length, length, _x))
00064 _x = self
00065 buff.write(_struct_2i.pack(_x.time_to_completion.secs, _x.time_to_completion.nsecs))
00066 except struct.error as se: self._check_types(se)
00067 except TypeError as te: self._check_types(te)
00068
00069 def deserialize(self, str):
00070 """
00071 unpack serialized message in str into this message instance
00072 @param str: byte array of serialized message
00073 @type str: str
00074 """
00075 try:
00076 if self.time_to_completion is None:
00077 self.time_to_completion = roslib.rostime.Duration()
00078 end = 0
00079 start = end
00080 end += 4
00081 (length,) = _struct_I.unpack(str[start:end])
00082 start = end
00083 end += length
00084 self.state = str[start:end]
00085 _x = self
00086 start = end
00087 end += 8
00088 (_x.time_to_completion.secs, _x.time_to_completion.nsecs,) = _struct_2i.unpack(str[start:end])
00089 self.time_to_completion.canon()
00090 return self
00091 except struct.error as e:
00092 raise roslib.message.DeserializationError(e)
00093
00094
00095 def serialize_numpy(self, buff, numpy):
00096 """
00097 serialize message with numpy array types into buffer
00098 @param buff: buffer
00099 @type buff: StringIO
00100 @param numpy: numpy python module
00101 @type numpy module
00102 """
00103 try:
00104 _x = self.state
00105 length = len(_x)
00106 buff.write(struct.pack('<I%ss'%length, length, _x))
00107 _x = self
00108 buff.write(_struct_2i.pack(_x.time_to_completion.secs, _x.time_to_completion.nsecs))
00109 except struct.error as se: self._check_types(se)
00110 except TypeError as te: self._check_types(te)
00111
00112 def deserialize_numpy(self, str, numpy):
00113 """
00114 unpack serialized message in str into this message instance using numpy for array types
00115 @param str: byte array of serialized message
00116 @type str: str
00117 @param numpy: numpy python module
00118 @type numpy: module
00119 """
00120 try:
00121 if self.time_to_completion is None:
00122 self.time_to_completion = roslib.rostime.Duration()
00123 end = 0
00124 start = end
00125 end += 4
00126 (length,) = _struct_I.unpack(str[start:end])
00127 start = end
00128 end += length
00129 self.state = str[start:end]
00130 _x = self
00131 start = end
00132 end += 8
00133 (_x.time_to_completion.secs, _x.time_to_completion.nsecs,) = _struct_2i.unpack(str[start:end])
00134 self.time_to_completion.canon()
00135 return self
00136 except struct.error as e:
00137 raise roslib.message.DeserializationError(e)
00138
00139 _struct_I = roslib.message.struct_I
00140 _struct_2i = struct.Struct("<2i")