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