$search
00001 """autogenerated by genmsg_py from UI_DMresp.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class UI_DMresp(roslib.message.Message): 00007 _md5sum = "8a6185ebbeac9cd1ebbaa1b88e853b6f" 00008 _type = "srs_msgs/UI_DMresp" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# this message contains information to define the comunication between the Decision making (DM) and UI_Pri when an unexpected error has occured in the execution of an previously issued command 00011 00012 string solution # currently supported comands from the user are: continue,give_up,move 00013 string parameter # used when the command is move to carry the position. Possible vaues are:kitchen, home, order, [1.2, 3.4, 0.8] which are the coordinates from user click on the map 00014 uint32 responseID # the uniqie ID used by DM to distinguish which responce corresponds to which command. Note: the responceID MUST be the same as the requestID of the corresponding command 00015 00016 """ 00017 __slots__ = ['solution','parameter','responseID'] 00018 _slot_types = ['string','string','uint32'] 00019 00020 def __init__(self, *args, **kwds): 00021 """ 00022 Constructor. Any message fields that are implicitly/explicitly 00023 set to None will be assigned a default value. The recommend 00024 use is keyword arguments as this is more robust to future message 00025 changes. You cannot mix in-order arguments and keyword arguments. 00026 00027 The available fields are: 00028 solution,parameter,responseID 00029 00030 @param args: complete set of field values, in .msg order 00031 @param kwds: use keyword arguments corresponding to message field names 00032 to set specific fields. 00033 """ 00034 if args or kwds: 00035 super(UI_DMresp, self).__init__(*args, **kwds) 00036 #message fields cannot be None, assign default values for those that are 00037 if self.solution is None: 00038 self.solution = '' 00039 if self.parameter is None: 00040 self.parameter = '' 00041 if self.responseID is None: 00042 self.responseID = 0 00043 else: 00044 self.solution = '' 00045 self.parameter = '' 00046 self.responseID = 0 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.solution 00062 length = len(_x) 00063 buff.write(struct.pack('<I%ss'%length, length, _x)) 00064 _x = self.parameter 00065 length = len(_x) 00066 buff.write(struct.pack('<I%ss'%length, length, _x)) 00067 buff.write(_struct_I.pack(self.responseID)) 00068 except struct.error as se: self._check_types(se) 00069 except TypeError as te: self._check_types(te) 00070 00071 def deserialize(self, str): 00072 """ 00073 unpack serialized message in str into this message instance 00074 @param str: byte array of serialized message 00075 @type str: str 00076 """ 00077 try: 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.solution = str[start:end] 00085 start = end 00086 end += 4 00087 (length,) = _struct_I.unpack(str[start:end]) 00088 start = end 00089 end += length 00090 self.parameter = str[start:end] 00091 start = end 00092 end += 4 00093 (self.responseID,) = _struct_I.unpack(str[start:end]) 00094 return self 00095 except struct.error as e: 00096 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00097 00098 00099 def serialize_numpy(self, buff, numpy): 00100 """ 00101 serialize message with numpy array types into buffer 00102 @param buff: buffer 00103 @type buff: StringIO 00104 @param numpy: numpy python module 00105 @type numpy module 00106 """ 00107 try: 00108 _x = self.solution 00109 length = len(_x) 00110 buff.write(struct.pack('<I%ss'%length, length, _x)) 00111 _x = self.parameter 00112 length = len(_x) 00113 buff.write(struct.pack('<I%ss'%length, length, _x)) 00114 buff.write(_struct_I.pack(self.responseID)) 00115 except struct.error as se: self._check_types(se) 00116 except TypeError as te: self._check_types(te) 00117 00118 def deserialize_numpy(self, str, numpy): 00119 """ 00120 unpack serialized message in str into this message instance using numpy for array types 00121 @param str: byte array of serialized message 00122 @type str: str 00123 @param numpy: numpy python module 00124 @type numpy: module 00125 """ 00126 try: 00127 end = 0 00128 start = end 00129 end += 4 00130 (length,) = _struct_I.unpack(str[start:end]) 00131 start = end 00132 end += length 00133 self.solution = str[start:end] 00134 start = end 00135 end += 4 00136 (length,) = _struct_I.unpack(str[start:end]) 00137 start = end 00138 end += length 00139 self.parameter = str[start:end] 00140 start = end 00141 end += 4 00142 (self.responseID,) = _struct_I.unpack(str[start:end]) 00143 return self 00144 except struct.error as e: 00145 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00146 00147 _struct_I = roslib.message.struct_I