$search
00001 """autogenerated by genmsg_py from AssociateAction.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import wpa_supplicant_node.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class AssociateAction(roslib.message.Message): 00011 _md5sum = "a191fc92a2b7d1d79b09a5ee17360450" 00012 _type = "wpa_supplicant_node/AssociateAction" 00013 _has_header = False #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 AssociateActionGoal action_goal 00017 AssociateActionResult action_result 00018 AssociateActionFeedback action_feedback 00019 00020 ================================================================================ 00021 MSG: wpa_supplicant_node/AssociateActionGoal 00022 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00023 00024 Header header 00025 actionlib_msgs/GoalID goal_id 00026 AssociateGoal goal 00027 00028 ================================================================================ 00029 MSG: std_msgs/Header 00030 # Standard metadata for higher-level stamped data types. 00031 # This is generally used to communicate timestamped data 00032 # in a particular coordinate frame. 00033 # 00034 # sequence ID: consecutively increasing ID 00035 uint32 seq 00036 #Two-integer timestamp that is expressed as: 00037 # * stamp.secs: seconds (stamp_secs) since epoch 00038 # * stamp.nsecs: nanoseconds since stamp_secs 00039 # time-handling sugar is provided by the client library 00040 time stamp 00041 #Frame this data is associated with 00042 # 0: no frame 00043 # 1: global frame 00044 string frame_id 00045 00046 ================================================================================ 00047 MSG: actionlib_msgs/GoalID 00048 # The stamp should store the time at which this goal was requested. 00049 # It is used by an action server when it tries to preempt all 00050 # goals that were requested before a certain time 00051 time stamp 00052 00053 # The id provides a way to associate feedback and 00054 # result message with specific goal requests. The id 00055 # specified must be unique. 00056 string id 00057 00058 00059 ================================================================================ 00060 MSG: wpa_supplicant_node/AssociateGoal 00061 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00062 string ssid 00063 uint8[6] bssid 00064 #Bss bss 00065 00066 ================================================================================ 00067 MSG: wpa_supplicant_node/AssociateActionResult 00068 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00069 00070 Header header 00071 actionlib_msgs/GoalStatus status 00072 AssociateResult result 00073 00074 ================================================================================ 00075 MSG: actionlib_msgs/GoalStatus 00076 GoalID goal_id 00077 uint8 status 00078 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00079 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00080 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00081 # and has since completed its execution (Terminal State) 00082 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00083 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00084 # to some failure (Terminal State) 00085 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00086 # because the goal was unattainable or invalid (Terminal State) 00087 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00088 # and has not yet completed execution 00089 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00090 # but the action server has not yet confirmed that the goal is canceled 00091 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00092 # and was successfully cancelled (Terminal State) 00093 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00094 # sent over the wire by an action server 00095 00096 #Allow for the user to associate a string with GoalStatus for debugging 00097 string text 00098 00099 00100 ================================================================================ 00101 MSG: wpa_supplicant_node/AssociateResult 00102 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00103 00104 ================================================================================ 00105 MSG: wpa_supplicant_node/AssociateActionFeedback 00106 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00107 00108 Header header 00109 actionlib_msgs/GoalStatus status 00110 AssociateFeedback feedback 00111 00112 ================================================================================ 00113 MSG: wpa_supplicant_node/AssociateFeedback 00114 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00115 bool associated 00116 Bss bss 00117 00118 00119 ================================================================================ 00120 MSG: wpa_supplicant_node/Bss 00121 time stamp 00122 string ssid 00123 uint8[6] bssid 00124 int32 frequency # In MHz 00125 int16 beacon_interval 00126 int16 capabilities 00127 int32 quality 00128 int32 noise 00129 int32 level 00130 SecurityProperties wpa 00131 SecurityProperties rsn 00132 00133 #InformationElement []ies 00134 #InformationElement []beacon_ies 00135 # flags 00136 # tsf 00137 # age 00138 00139 ================================================================================ 00140 MSG: wpa_supplicant_node/SecurityProperties 00141 string[] key_mgmt 00142 string[] group 00143 string[] pairwise 00144 00145 """ 00146 __slots__ = ['action_goal','action_result','action_feedback'] 00147 _slot_types = ['wpa_supplicant_node/AssociateActionGoal','wpa_supplicant_node/AssociateActionResult','wpa_supplicant_node/AssociateActionFeedback'] 00148 00149 def __init__(self, *args, **kwds): 00150 """ 00151 Constructor. Any message fields that are implicitly/explicitly 00152 set to None will be assigned a default value. The recommend 00153 use is keyword arguments as this is more robust to future message 00154 changes. You cannot mix in-order arguments and keyword arguments. 00155 00156 The available fields are: 00157 action_goal,action_result,action_feedback 00158 00159 @param args: complete set of field values, in .msg order 00160 @param kwds: use keyword arguments corresponding to message field names 00161 to set specific fields. 00162 """ 00163 if args or kwds: 00164 super(AssociateAction, self).__init__(*args, **kwds) 00165 #message fields cannot be None, assign default values for those that are 00166 if self.action_goal is None: 00167 self.action_goal = wpa_supplicant_node.msg.AssociateActionGoal() 00168 if self.action_result is None: 00169 self.action_result = wpa_supplicant_node.msg.AssociateActionResult() 00170 if self.action_feedback is None: 00171 self.action_feedback = wpa_supplicant_node.msg.AssociateActionFeedback() 00172 else: 00173 self.action_goal = wpa_supplicant_node.msg.AssociateActionGoal() 00174 self.action_result = wpa_supplicant_node.msg.AssociateActionResult() 00175 self.action_feedback = wpa_supplicant_node.msg.AssociateActionFeedback() 00176 00177 def _get_types(self): 00178 """ 00179 internal API method 00180 """ 00181 return self._slot_types 00182 00183 def serialize(self, buff): 00184 """ 00185 serialize message into buffer 00186 @param buff: buffer 00187 @type buff: StringIO 00188 """ 00189 try: 00190 _x = self 00191 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00192 _x = self.action_goal.header.frame_id 00193 length = len(_x) 00194 buff.write(struct.pack('<I%ss'%length, length, _x)) 00195 _x = self 00196 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00197 _x = self.action_goal.goal_id.id 00198 length = len(_x) 00199 buff.write(struct.pack('<I%ss'%length, length, _x)) 00200 _x = self.action_goal.goal.ssid 00201 length = len(_x) 00202 buff.write(struct.pack('<I%ss'%length, length, _x)) 00203 _x = self.action_goal.goal.bssid 00204 # - if encoded as a list instead, serialize as bytes instead of string 00205 if type(_x) in [list, tuple]: 00206 buff.write(_struct_6B.pack(*_x)) 00207 else: 00208 buff.write(_struct_6s.pack(_x)) 00209 _x = self 00210 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00211 _x = self.action_result.header.frame_id 00212 length = len(_x) 00213 buff.write(struct.pack('<I%ss'%length, length, _x)) 00214 _x = self 00215 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00216 _x = self.action_result.status.goal_id.id 00217 length = len(_x) 00218 buff.write(struct.pack('<I%ss'%length, length, _x)) 00219 buff.write(_struct_B.pack(self.action_result.status.status)) 00220 _x = self.action_result.status.text 00221 length = len(_x) 00222 buff.write(struct.pack('<I%ss'%length, length, _x)) 00223 _x = self 00224 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00225 _x = self.action_feedback.header.frame_id 00226 length = len(_x) 00227 buff.write(struct.pack('<I%ss'%length, length, _x)) 00228 _x = self 00229 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00230 _x = self.action_feedback.status.goal_id.id 00231 length = len(_x) 00232 buff.write(struct.pack('<I%ss'%length, length, _x)) 00233 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00234 _x = self.action_feedback.status.text 00235 length = len(_x) 00236 buff.write(struct.pack('<I%ss'%length, length, _x)) 00237 _x = self 00238 buff.write(_struct_B2I.pack(_x.action_feedback.feedback.associated, _x.action_feedback.feedback.bss.stamp.secs, _x.action_feedback.feedback.bss.stamp.nsecs)) 00239 _x = self.action_feedback.feedback.bss.ssid 00240 length = len(_x) 00241 buff.write(struct.pack('<I%ss'%length, length, _x)) 00242 _x = self.action_feedback.feedback.bss.bssid 00243 # - if encoded as a list instead, serialize as bytes instead of string 00244 if type(_x) in [list, tuple]: 00245 buff.write(_struct_6B.pack(*_x)) 00246 else: 00247 buff.write(_struct_6s.pack(_x)) 00248 _x = self 00249 buff.write(_struct_i2h3i.pack(_x.action_feedback.feedback.bss.frequency, _x.action_feedback.feedback.bss.beacon_interval, _x.action_feedback.feedback.bss.capabilities, _x.action_feedback.feedback.bss.quality, _x.action_feedback.feedback.bss.noise, _x.action_feedback.feedback.bss.level)) 00250 length = len(self.action_feedback.feedback.bss.wpa.key_mgmt) 00251 buff.write(_struct_I.pack(length)) 00252 for val1 in self.action_feedback.feedback.bss.wpa.key_mgmt: 00253 length = len(val1) 00254 buff.write(struct.pack('<I%ss'%length, length, val1)) 00255 length = len(self.action_feedback.feedback.bss.wpa.group) 00256 buff.write(_struct_I.pack(length)) 00257 for val1 in self.action_feedback.feedback.bss.wpa.group: 00258 length = len(val1) 00259 buff.write(struct.pack('<I%ss'%length, length, val1)) 00260 length = len(self.action_feedback.feedback.bss.wpa.pairwise) 00261 buff.write(_struct_I.pack(length)) 00262 for val1 in self.action_feedback.feedback.bss.wpa.pairwise: 00263 length = len(val1) 00264 buff.write(struct.pack('<I%ss'%length, length, val1)) 00265 length = len(self.action_feedback.feedback.bss.rsn.key_mgmt) 00266 buff.write(_struct_I.pack(length)) 00267 for val1 in self.action_feedback.feedback.bss.rsn.key_mgmt: 00268 length = len(val1) 00269 buff.write(struct.pack('<I%ss'%length, length, val1)) 00270 length = len(self.action_feedback.feedback.bss.rsn.group) 00271 buff.write(_struct_I.pack(length)) 00272 for val1 in self.action_feedback.feedback.bss.rsn.group: 00273 length = len(val1) 00274 buff.write(struct.pack('<I%ss'%length, length, val1)) 00275 length = len(self.action_feedback.feedback.bss.rsn.pairwise) 00276 buff.write(_struct_I.pack(length)) 00277 for val1 in self.action_feedback.feedback.bss.rsn.pairwise: 00278 length = len(val1) 00279 buff.write(struct.pack('<I%ss'%length, length, val1)) 00280 except struct.error as se: self._check_types(se) 00281 except TypeError as te: self._check_types(te) 00282 00283 def deserialize(self, str): 00284 """ 00285 unpack serialized message in str into this message instance 00286 @param str: byte array of serialized message 00287 @type str: str 00288 """ 00289 try: 00290 if self.action_goal is None: 00291 self.action_goal = wpa_supplicant_node.msg.AssociateActionGoal() 00292 if self.action_result is None: 00293 self.action_result = wpa_supplicant_node.msg.AssociateActionResult() 00294 if self.action_feedback is None: 00295 self.action_feedback = wpa_supplicant_node.msg.AssociateActionFeedback() 00296 end = 0 00297 _x = self 00298 start = end 00299 end += 12 00300 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00301 start = end 00302 end += 4 00303 (length,) = _struct_I.unpack(str[start:end]) 00304 start = end 00305 end += length 00306 self.action_goal.header.frame_id = str[start:end] 00307 _x = self 00308 start = end 00309 end += 8 00310 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00311 start = end 00312 end += 4 00313 (length,) = _struct_I.unpack(str[start:end]) 00314 start = end 00315 end += length 00316 self.action_goal.goal_id.id = str[start:end] 00317 start = end 00318 end += 4 00319 (length,) = _struct_I.unpack(str[start:end]) 00320 start = end 00321 end += length 00322 self.action_goal.goal.ssid = str[start:end] 00323 start = end 00324 end += 6 00325 self.action_goal.goal.bssid = str[start:end] 00326 _x = self 00327 start = end 00328 end += 12 00329 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00330 start = end 00331 end += 4 00332 (length,) = _struct_I.unpack(str[start:end]) 00333 start = end 00334 end += length 00335 self.action_result.header.frame_id = str[start:end] 00336 _x = self 00337 start = end 00338 end += 8 00339 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00340 start = end 00341 end += 4 00342 (length,) = _struct_I.unpack(str[start:end]) 00343 start = end 00344 end += length 00345 self.action_result.status.goal_id.id = str[start:end] 00346 start = end 00347 end += 1 00348 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00349 start = end 00350 end += 4 00351 (length,) = _struct_I.unpack(str[start:end]) 00352 start = end 00353 end += length 00354 self.action_result.status.text = str[start:end] 00355 _x = self 00356 start = end 00357 end += 12 00358 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00359 start = end 00360 end += 4 00361 (length,) = _struct_I.unpack(str[start:end]) 00362 start = end 00363 end += length 00364 self.action_feedback.header.frame_id = str[start:end] 00365 _x = self 00366 start = end 00367 end += 8 00368 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00369 start = end 00370 end += 4 00371 (length,) = _struct_I.unpack(str[start:end]) 00372 start = end 00373 end += length 00374 self.action_feedback.status.goal_id.id = str[start:end] 00375 start = end 00376 end += 1 00377 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00378 start = end 00379 end += 4 00380 (length,) = _struct_I.unpack(str[start:end]) 00381 start = end 00382 end += length 00383 self.action_feedback.status.text = str[start:end] 00384 _x = self 00385 start = end 00386 end += 9 00387 (_x.action_feedback.feedback.associated, _x.action_feedback.feedback.bss.stamp.secs, _x.action_feedback.feedback.bss.stamp.nsecs,) = _struct_B2I.unpack(str[start:end]) 00388 self.action_feedback.feedback.associated = bool(self.action_feedback.feedback.associated) 00389 start = end 00390 end += 4 00391 (length,) = _struct_I.unpack(str[start:end]) 00392 start = end 00393 end += length 00394 self.action_feedback.feedback.bss.ssid = str[start:end] 00395 start = end 00396 end += 6 00397 self.action_feedback.feedback.bss.bssid = str[start:end] 00398 _x = self 00399 start = end 00400 end += 20 00401 (_x.action_feedback.feedback.bss.frequency, _x.action_feedback.feedback.bss.beacon_interval, _x.action_feedback.feedback.bss.capabilities, _x.action_feedback.feedback.bss.quality, _x.action_feedback.feedback.bss.noise, _x.action_feedback.feedback.bss.level,) = _struct_i2h3i.unpack(str[start:end]) 00402 start = end 00403 end += 4 00404 (length,) = _struct_I.unpack(str[start:end]) 00405 self.action_feedback.feedback.bss.wpa.key_mgmt = [] 00406 for i in range(0, length): 00407 start = end 00408 end += 4 00409 (length,) = _struct_I.unpack(str[start:end]) 00410 start = end 00411 end += length 00412 val1 = str[start:end] 00413 self.action_feedback.feedback.bss.wpa.key_mgmt.append(val1) 00414 start = end 00415 end += 4 00416 (length,) = _struct_I.unpack(str[start:end]) 00417 self.action_feedback.feedback.bss.wpa.group = [] 00418 for i in range(0, length): 00419 start = end 00420 end += 4 00421 (length,) = _struct_I.unpack(str[start:end]) 00422 start = end 00423 end += length 00424 val1 = str[start:end] 00425 self.action_feedback.feedback.bss.wpa.group.append(val1) 00426 start = end 00427 end += 4 00428 (length,) = _struct_I.unpack(str[start:end]) 00429 self.action_feedback.feedback.bss.wpa.pairwise = [] 00430 for i in range(0, length): 00431 start = end 00432 end += 4 00433 (length,) = _struct_I.unpack(str[start:end]) 00434 start = end 00435 end += length 00436 val1 = str[start:end] 00437 self.action_feedback.feedback.bss.wpa.pairwise.append(val1) 00438 start = end 00439 end += 4 00440 (length,) = _struct_I.unpack(str[start:end]) 00441 self.action_feedback.feedback.bss.rsn.key_mgmt = [] 00442 for i in range(0, length): 00443 start = end 00444 end += 4 00445 (length,) = _struct_I.unpack(str[start:end]) 00446 start = end 00447 end += length 00448 val1 = str[start:end] 00449 self.action_feedback.feedback.bss.rsn.key_mgmt.append(val1) 00450 start = end 00451 end += 4 00452 (length,) = _struct_I.unpack(str[start:end]) 00453 self.action_feedback.feedback.bss.rsn.group = [] 00454 for i in range(0, length): 00455 start = end 00456 end += 4 00457 (length,) = _struct_I.unpack(str[start:end]) 00458 start = end 00459 end += length 00460 val1 = str[start:end] 00461 self.action_feedback.feedback.bss.rsn.group.append(val1) 00462 start = end 00463 end += 4 00464 (length,) = _struct_I.unpack(str[start:end]) 00465 self.action_feedback.feedback.bss.rsn.pairwise = [] 00466 for i in range(0, length): 00467 start = end 00468 end += 4 00469 (length,) = _struct_I.unpack(str[start:end]) 00470 start = end 00471 end += length 00472 val1 = str[start:end] 00473 self.action_feedback.feedback.bss.rsn.pairwise.append(val1) 00474 return self 00475 except struct.error as e: 00476 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00477 00478 00479 def serialize_numpy(self, buff, numpy): 00480 """ 00481 serialize message with numpy array types into buffer 00482 @param buff: buffer 00483 @type buff: StringIO 00484 @param numpy: numpy python module 00485 @type numpy module 00486 """ 00487 try: 00488 _x = self 00489 buff.write(_struct_3I.pack(_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs)) 00490 _x = self.action_goal.header.frame_id 00491 length = len(_x) 00492 buff.write(struct.pack('<I%ss'%length, length, _x)) 00493 _x = self 00494 buff.write(_struct_2I.pack(_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs)) 00495 _x = self.action_goal.goal_id.id 00496 length = len(_x) 00497 buff.write(struct.pack('<I%ss'%length, length, _x)) 00498 _x = self.action_goal.goal.ssid 00499 length = len(_x) 00500 buff.write(struct.pack('<I%ss'%length, length, _x)) 00501 _x = self.action_goal.goal.bssid 00502 # - if encoded as a list instead, serialize as bytes instead of string 00503 if type(_x) in [list, tuple]: 00504 buff.write(_struct_6B.pack(*_x)) 00505 else: 00506 buff.write(_struct_6s.pack(_x)) 00507 _x = self 00508 buff.write(_struct_3I.pack(_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs)) 00509 _x = self.action_result.header.frame_id 00510 length = len(_x) 00511 buff.write(struct.pack('<I%ss'%length, length, _x)) 00512 _x = self 00513 buff.write(_struct_2I.pack(_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs)) 00514 _x = self.action_result.status.goal_id.id 00515 length = len(_x) 00516 buff.write(struct.pack('<I%ss'%length, length, _x)) 00517 buff.write(_struct_B.pack(self.action_result.status.status)) 00518 _x = self.action_result.status.text 00519 length = len(_x) 00520 buff.write(struct.pack('<I%ss'%length, length, _x)) 00521 _x = self 00522 buff.write(_struct_3I.pack(_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs)) 00523 _x = self.action_feedback.header.frame_id 00524 length = len(_x) 00525 buff.write(struct.pack('<I%ss'%length, length, _x)) 00526 _x = self 00527 buff.write(_struct_2I.pack(_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs)) 00528 _x = self.action_feedback.status.goal_id.id 00529 length = len(_x) 00530 buff.write(struct.pack('<I%ss'%length, length, _x)) 00531 buff.write(_struct_B.pack(self.action_feedback.status.status)) 00532 _x = self.action_feedback.status.text 00533 length = len(_x) 00534 buff.write(struct.pack('<I%ss'%length, length, _x)) 00535 _x = self 00536 buff.write(_struct_B2I.pack(_x.action_feedback.feedback.associated, _x.action_feedback.feedback.bss.stamp.secs, _x.action_feedback.feedback.bss.stamp.nsecs)) 00537 _x = self.action_feedback.feedback.bss.ssid 00538 length = len(_x) 00539 buff.write(struct.pack('<I%ss'%length, length, _x)) 00540 _x = self.action_feedback.feedback.bss.bssid 00541 # - if encoded as a list instead, serialize as bytes instead of string 00542 if type(_x) in [list, tuple]: 00543 buff.write(_struct_6B.pack(*_x)) 00544 else: 00545 buff.write(_struct_6s.pack(_x)) 00546 _x = self 00547 buff.write(_struct_i2h3i.pack(_x.action_feedback.feedback.bss.frequency, _x.action_feedback.feedback.bss.beacon_interval, _x.action_feedback.feedback.bss.capabilities, _x.action_feedback.feedback.bss.quality, _x.action_feedback.feedback.bss.noise, _x.action_feedback.feedback.bss.level)) 00548 length = len(self.action_feedback.feedback.bss.wpa.key_mgmt) 00549 buff.write(_struct_I.pack(length)) 00550 for val1 in self.action_feedback.feedback.bss.wpa.key_mgmt: 00551 length = len(val1) 00552 buff.write(struct.pack('<I%ss'%length, length, val1)) 00553 length = len(self.action_feedback.feedback.bss.wpa.group) 00554 buff.write(_struct_I.pack(length)) 00555 for val1 in self.action_feedback.feedback.bss.wpa.group: 00556 length = len(val1) 00557 buff.write(struct.pack('<I%ss'%length, length, val1)) 00558 length = len(self.action_feedback.feedback.bss.wpa.pairwise) 00559 buff.write(_struct_I.pack(length)) 00560 for val1 in self.action_feedback.feedback.bss.wpa.pairwise: 00561 length = len(val1) 00562 buff.write(struct.pack('<I%ss'%length, length, val1)) 00563 length = len(self.action_feedback.feedback.bss.rsn.key_mgmt) 00564 buff.write(_struct_I.pack(length)) 00565 for val1 in self.action_feedback.feedback.bss.rsn.key_mgmt: 00566 length = len(val1) 00567 buff.write(struct.pack('<I%ss'%length, length, val1)) 00568 length = len(self.action_feedback.feedback.bss.rsn.group) 00569 buff.write(_struct_I.pack(length)) 00570 for val1 in self.action_feedback.feedback.bss.rsn.group: 00571 length = len(val1) 00572 buff.write(struct.pack('<I%ss'%length, length, val1)) 00573 length = len(self.action_feedback.feedback.bss.rsn.pairwise) 00574 buff.write(_struct_I.pack(length)) 00575 for val1 in self.action_feedback.feedback.bss.rsn.pairwise: 00576 length = len(val1) 00577 buff.write(struct.pack('<I%ss'%length, length, val1)) 00578 except struct.error as se: self._check_types(se) 00579 except TypeError as te: self._check_types(te) 00580 00581 def deserialize_numpy(self, str, numpy): 00582 """ 00583 unpack serialized message in str into this message instance using numpy for array types 00584 @param str: byte array of serialized message 00585 @type str: str 00586 @param numpy: numpy python module 00587 @type numpy: module 00588 """ 00589 try: 00590 if self.action_goal is None: 00591 self.action_goal = wpa_supplicant_node.msg.AssociateActionGoal() 00592 if self.action_result is None: 00593 self.action_result = wpa_supplicant_node.msg.AssociateActionResult() 00594 if self.action_feedback is None: 00595 self.action_feedback = wpa_supplicant_node.msg.AssociateActionFeedback() 00596 end = 0 00597 _x = self 00598 start = end 00599 end += 12 00600 (_x.action_goal.header.seq, _x.action_goal.header.stamp.secs, _x.action_goal.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00601 start = end 00602 end += 4 00603 (length,) = _struct_I.unpack(str[start:end]) 00604 start = end 00605 end += length 00606 self.action_goal.header.frame_id = str[start:end] 00607 _x = self 00608 start = end 00609 end += 8 00610 (_x.action_goal.goal_id.stamp.secs, _x.action_goal.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00611 start = end 00612 end += 4 00613 (length,) = _struct_I.unpack(str[start:end]) 00614 start = end 00615 end += length 00616 self.action_goal.goal_id.id = str[start:end] 00617 start = end 00618 end += 4 00619 (length,) = _struct_I.unpack(str[start:end]) 00620 start = end 00621 end += length 00622 self.action_goal.goal.ssid = str[start:end] 00623 start = end 00624 end += 6 00625 self.action_goal.goal.bssid = str[start:end] 00626 _x = self 00627 start = end 00628 end += 12 00629 (_x.action_result.header.seq, _x.action_result.header.stamp.secs, _x.action_result.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00630 start = end 00631 end += 4 00632 (length,) = _struct_I.unpack(str[start:end]) 00633 start = end 00634 end += length 00635 self.action_result.header.frame_id = str[start:end] 00636 _x = self 00637 start = end 00638 end += 8 00639 (_x.action_result.status.goal_id.stamp.secs, _x.action_result.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00640 start = end 00641 end += 4 00642 (length,) = _struct_I.unpack(str[start:end]) 00643 start = end 00644 end += length 00645 self.action_result.status.goal_id.id = str[start:end] 00646 start = end 00647 end += 1 00648 (self.action_result.status.status,) = _struct_B.unpack(str[start:end]) 00649 start = end 00650 end += 4 00651 (length,) = _struct_I.unpack(str[start:end]) 00652 start = end 00653 end += length 00654 self.action_result.status.text = str[start:end] 00655 _x = self 00656 start = end 00657 end += 12 00658 (_x.action_feedback.header.seq, _x.action_feedback.header.stamp.secs, _x.action_feedback.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00659 start = end 00660 end += 4 00661 (length,) = _struct_I.unpack(str[start:end]) 00662 start = end 00663 end += length 00664 self.action_feedback.header.frame_id = str[start:end] 00665 _x = self 00666 start = end 00667 end += 8 00668 (_x.action_feedback.status.goal_id.stamp.secs, _x.action_feedback.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00669 start = end 00670 end += 4 00671 (length,) = _struct_I.unpack(str[start:end]) 00672 start = end 00673 end += length 00674 self.action_feedback.status.goal_id.id = str[start:end] 00675 start = end 00676 end += 1 00677 (self.action_feedback.status.status,) = _struct_B.unpack(str[start:end]) 00678 start = end 00679 end += 4 00680 (length,) = _struct_I.unpack(str[start:end]) 00681 start = end 00682 end += length 00683 self.action_feedback.status.text = str[start:end] 00684 _x = self 00685 start = end 00686 end += 9 00687 (_x.action_feedback.feedback.associated, _x.action_feedback.feedback.bss.stamp.secs, _x.action_feedback.feedback.bss.stamp.nsecs,) = _struct_B2I.unpack(str[start:end]) 00688 self.action_feedback.feedback.associated = bool(self.action_feedback.feedback.associated) 00689 start = end 00690 end += 4 00691 (length,) = _struct_I.unpack(str[start:end]) 00692 start = end 00693 end += length 00694 self.action_feedback.feedback.bss.ssid = str[start:end] 00695 start = end 00696 end += 6 00697 self.action_feedback.feedback.bss.bssid = str[start:end] 00698 _x = self 00699 start = end 00700 end += 20 00701 (_x.action_feedback.feedback.bss.frequency, _x.action_feedback.feedback.bss.beacon_interval, _x.action_feedback.feedback.bss.capabilities, _x.action_feedback.feedback.bss.quality, _x.action_feedback.feedback.bss.noise, _x.action_feedback.feedback.bss.level,) = _struct_i2h3i.unpack(str[start:end]) 00702 start = end 00703 end += 4 00704 (length,) = _struct_I.unpack(str[start:end]) 00705 self.action_feedback.feedback.bss.wpa.key_mgmt = [] 00706 for i in range(0, length): 00707 start = end 00708 end += 4 00709 (length,) = _struct_I.unpack(str[start:end]) 00710 start = end 00711 end += length 00712 val1 = str[start:end] 00713 self.action_feedback.feedback.bss.wpa.key_mgmt.append(val1) 00714 start = end 00715 end += 4 00716 (length,) = _struct_I.unpack(str[start:end]) 00717 self.action_feedback.feedback.bss.wpa.group = [] 00718 for i in range(0, length): 00719 start = end 00720 end += 4 00721 (length,) = _struct_I.unpack(str[start:end]) 00722 start = end 00723 end += length 00724 val1 = str[start:end] 00725 self.action_feedback.feedback.bss.wpa.group.append(val1) 00726 start = end 00727 end += 4 00728 (length,) = _struct_I.unpack(str[start:end]) 00729 self.action_feedback.feedback.bss.wpa.pairwise = [] 00730 for i in range(0, length): 00731 start = end 00732 end += 4 00733 (length,) = _struct_I.unpack(str[start:end]) 00734 start = end 00735 end += length 00736 val1 = str[start:end] 00737 self.action_feedback.feedback.bss.wpa.pairwise.append(val1) 00738 start = end 00739 end += 4 00740 (length,) = _struct_I.unpack(str[start:end]) 00741 self.action_feedback.feedback.bss.rsn.key_mgmt = [] 00742 for i in range(0, length): 00743 start = end 00744 end += 4 00745 (length,) = _struct_I.unpack(str[start:end]) 00746 start = end 00747 end += length 00748 val1 = str[start:end] 00749 self.action_feedback.feedback.bss.rsn.key_mgmt.append(val1) 00750 start = end 00751 end += 4 00752 (length,) = _struct_I.unpack(str[start:end]) 00753 self.action_feedback.feedback.bss.rsn.group = [] 00754 for i in range(0, length): 00755 start = end 00756 end += 4 00757 (length,) = _struct_I.unpack(str[start:end]) 00758 start = end 00759 end += length 00760 val1 = str[start:end] 00761 self.action_feedback.feedback.bss.rsn.group.append(val1) 00762 start = end 00763 end += 4 00764 (length,) = _struct_I.unpack(str[start:end]) 00765 self.action_feedback.feedback.bss.rsn.pairwise = [] 00766 for i in range(0, length): 00767 start = end 00768 end += 4 00769 (length,) = _struct_I.unpack(str[start:end]) 00770 start = end 00771 end += length 00772 val1 = str[start:end] 00773 self.action_feedback.feedback.bss.rsn.pairwise.append(val1) 00774 return self 00775 except struct.error as e: 00776 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00777 00778 _struct_I = roslib.message.struct_I 00779 _struct_6B = struct.Struct("<6B") 00780 _struct_B = struct.Struct("<B") 00781 _struct_i2h3i = struct.Struct("<i2h3i") 00782 _struct_3I = struct.Struct("<3I") 00783 _struct_6s = struct.Struct("<6s") 00784 _struct_B2I = struct.Struct("<B2I") 00785 _struct_2I = struct.Struct("<2I")