$search
00001 """autogenerated by genmsg_py from ActionMsgMapperGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class ActionMsgMapperGoal(roslib.message.Message): 00007 _md5sum = "9c97ba579bcd822e978741dfc338d44b" 00008 _type = "turtlebot_actions/ActionMsgMapperGoal" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00011 #goal definition 00012 string input_topic 00013 string output_topic 00014 string input_type 00015 string output_type 00016 string[] input_list 00017 string[] output_list 00018 00019 00020 00021 """ 00022 __slots__ = ['input_topic','output_topic','input_type','output_type','input_list','output_list'] 00023 _slot_types = ['string','string','string','string','string[]','string[]'] 00024 00025 def __init__(self, *args, **kwds): 00026 """ 00027 Constructor. Any message fields that are implicitly/explicitly 00028 set to None will be assigned a default value. The recommend 00029 use is keyword arguments as this is more robust to future message 00030 changes. You cannot mix in-order arguments and keyword arguments. 00031 00032 The available fields are: 00033 input_topic,output_topic,input_type,output_type,input_list,output_list 00034 00035 @param args: complete set of field values, in .msg order 00036 @param kwds: use keyword arguments corresponding to message field names 00037 to set specific fields. 00038 """ 00039 if args or kwds: 00040 super(ActionMsgMapperGoal, self).__init__(*args, **kwds) 00041 #message fields cannot be None, assign default values for those that are 00042 if self.input_topic is None: 00043 self.input_topic = '' 00044 if self.output_topic is None: 00045 self.output_topic = '' 00046 if self.input_type is None: 00047 self.input_type = '' 00048 if self.output_type is None: 00049 self.output_type = '' 00050 if self.input_list is None: 00051 self.input_list = [] 00052 if self.output_list is None: 00053 self.output_list = [] 00054 else: 00055 self.input_topic = '' 00056 self.output_topic = '' 00057 self.input_type = '' 00058 self.output_type = '' 00059 self.input_list = [] 00060 self.output_list = [] 00061 00062 def _get_types(self): 00063 """ 00064 internal API method 00065 """ 00066 return self._slot_types 00067 00068 def serialize(self, buff): 00069 """ 00070 serialize message into buffer 00071 @param buff: buffer 00072 @type buff: StringIO 00073 """ 00074 try: 00075 _x = self.input_topic 00076 length = len(_x) 00077 buff.write(struct.pack('<I%ss'%length, length, _x)) 00078 _x = self.output_topic 00079 length = len(_x) 00080 buff.write(struct.pack('<I%ss'%length, length, _x)) 00081 _x = self.input_type 00082 length = len(_x) 00083 buff.write(struct.pack('<I%ss'%length, length, _x)) 00084 _x = self.output_type 00085 length = len(_x) 00086 buff.write(struct.pack('<I%ss'%length, length, _x)) 00087 length = len(self.input_list) 00088 buff.write(_struct_I.pack(length)) 00089 for val1 in self.input_list: 00090 length = len(val1) 00091 buff.write(struct.pack('<I%ss'%length, length, val1)) 00092 length = len(self.output_list) 00093 buff.write(_struct_I.pack(length)) 00094 for val1 in self.output_list: 00095 length = len(val1) 00096 buff.write(struct.pack('<I%ss'%length, length, val1)) 00097 except struct.error as se: self._check_types(se) 00098 except TypeError as te: self._check_types(te) 00099 00100 def deserialize(self, str): 00101 """ 00102 unpack serialized message in str into this message instance 00103 @param str: byte array of serialized message 00104 @type str: str 00105 """ 00106 try: 00107 end = 0 00108 start = end 00109 end += 4 00110 (length,) = _struct_I.unpack(str[start:end]) 00111 start = end 00112 end += length 00113 self.input_topic = str[start:end] 00114 start = end 00115 end += 4 00116 (length,) = _struct_I.unpack(str[start:end]) 00117 start = end 00118 end += length 00119 self.output_topic = str[start:end] 00120 start = end 00121 end += 4 00122 (length,) = _struct_I.unpack(str[start:end]) 00123 start = end 00124 end += length 00125 self.input_type = str[start:end] 00126 start = end 00127 end += 4 00128 (length,) = _struct_I.unpack(str[start:end]) 00129 start = end 00130 end += length 00131 self.output_type = str[start:end] 00132 start = end 00133 end += 4 00134 (length,) = _struct_I.unpack(str[start:end]) 00135 self.input_list = [] 00136 for i in range(0, length): 00137 start = end 00138 end += 4 00139 (length,) = _struct_I.unpack(str[start:end]) 00140 start = end 00141 end += length 00142 val1 = str[start:end] 00143 self.input_list.append(val1) 00144 start = end 00145 end += 4 00146 (length,) = _struct_I.unpack(str[start:end]) 00147 self.output_list = [] 00148 for i in range(0, length): 00149 start = end 00150 end += 4 00151 (length,) = _struct_I.unpack(str[start:end]) 00152 start = end 00153 end += length 00154 val1 = str[start:end] 00155 self.output_list.append(val1) 00156 return self 00157 except struct.error as e: 00158 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00159 00160 00161 def serialize_numpy(self, buff, numpy): 00162 """ 00163 serialize message with numpy array types into buffer 00164 @param buff: buffer 00165 @type buff: StringIO 00166 @param numpy: numpy python module 00167 @type numpy module 00168 """ 00169 try: 00170 _x = self.input_topic 00171 length = len(_x) 00172 buff.write(struct.pack('<I%ss'%length, length, _x)) 00173 _x = self.output_topic 00174 length = len(_x) 00175 buff.write(struct.pack('<I%ss'%length, length, _x)) 00176 _x = self.input_type 00177 length = len(_x) 00178 buff.write(struct.pack('<I%ss'%length, length, _x)) 00179 _x = self.output_type 00180 length = len(_x) 00181 buff.write(struct.pack('<I%ss'%length, length, _x)) 00182 length = len(self.input_list) 00183 buff.write(_struct_I.pack(length)) 00184 for val1 in self.input_list: 00185 length = len(val1) 00186 buff.write(struct.pack('<I%ss'%length, length, val1)) 00187 length = len(self.output_list) 00188 buff.write(_struct_I.pack(length)) 00189 for val1 in self.output_list: 00190 length = len(val1) 00191 buff.write(struct.pack('<I%ss'%length, length, val1)) 00192 except struct.error as se: self._check_types(se) 00193 except TypeError as te: self._check_types(te) 00194 00195 def deserialize_numpy(self, str, numpy): 00196 """ 00197 unpack serialized message in str into this message instance using numpy for array types 00198 @param str: byte array of serialized message 00199 @type str: str 00200 @param numpy: numpy python module 00201 @type numpy: module 00202 """ 00203 try: 00204 end = 0 00205 start = end 00206 end += 4 00207 (length,) = _struct_I.unpack(str[start:end]) 00208 start = end 00209 end += length 00210 self.input_topic = str[start:end] 00211 start = end 00212 end += 4 00213 (length,) = _struct_I.unpack(str[start:end]) 00214 start = end 00215 end += length 00216 self.output_topic = str[start:end] 00217 start = end 00218 end += 4 00219 (length,) = _struct_I.unpack(str[start:end]) 00220 start = end 00221 end += length 00222 self.input_type = str[start:end] 00223 start = end 00224 end += 4 00225 (length,) = _struct_I.unpack(str[start:end]) 00226 start = end 00227 end += length 00228 self.output_type = str[start:end] 00229 start = end 00230 end += 4 00231 (length,) = _struct_I.unpack(str[start:end]) 00232 self.input_list = [] 00233 for i in range(0, length): 00234 start = end 00235 end += 4 00236 (length,) = _struct_I.unpack(str[start:end]) 00237 start = end 00238 end += length 00239 val1 = str[start:end] 00240 self.input_list.append(val1) 00241 start = end 00242 end += 4 00243 (length,) = _struct_I.unpack(str[start:end]) 00244 self.output_list = [] 00245 for i in range(0, length): 00246 start = end 00247 end += 4 00248 (length,) = _struct_I.unpack(str[start:end]) 00249 start = end 00250 end += length 00251 val1 = str[start:end] 00252 self.output_list.append(val1) 00253 return self 00254 except struct.error as e: 00255 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00256 00257 _struct_I = roslib.message.struct_I