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