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


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:33:19