00001 """autogenerated by genmsg_py from ScanActionResult.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 ScanActionResult(roslib.message.Message):
00011 _md5sum = "2fb5dec6f417e7da36e3ce9b05a1d8a2"
00012 _type = "wpa_supplicant_node/ScanActionResult"
00013 _has_header = True
00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00015
00016 Header header
00017 actionlib_msgs/GoalStatus status
00018 ScanResult result
00019
00020 ================================================================================
00021 MSG: std_msgs/Header
00022 # Standard metadata for higher-level stamped data types.
00023 # This is generally used to communicate timestamped data
00024 # in a particular coordinate frame.
00025 #
00026 # sequence ID: consecutively increasing ID
00027 uint32 seq
00028 #Two-integer timestamp that is expressed as:
00029 # * stamp.secs: seconds (stamp_secs) since epoch
00030 # * stamp.nsecs: nanoseconds since stamp_secs
00031 # time-handling sugar is provided by the client library
00032 time stamp
00033 #Frame this data is associated with
00034 # 0: no frame
00035 # 1: global frame
00036 string frame_id
00037
00038 ================================================================================
00039 MSG: actionlib_msgs/GoalStatus
00040 GoalID goal_id
00041 uint8 status
00042 uint8 PENDING = 0 # The goal has yet to be processed by the action server
00043 uint8 ACTIVE = 1 # The goal is currently being processed by the action server
00044 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing
00045 # and has since completed its execution (Terminal State)
00046 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State)
00047 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due
00048 # to some failure (Terminal State)
00049 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed,
00050 # because the goal was unattainable or invalid (Terminal State)
00051 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing
00052 # and has not yet completed execution
00053 uint8 RECALLING = 7 # The goal received a cancel request before it started executing,
00054 # but the action server has not yet confirmed that the goal is canceled
00055 uint8 RECALLED = 8 # The goal received a cancel request before it started executing
00056 # and was successfully cancelled (Terminal State)
00057 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be
00058 # sent over the wire by an action server
00059
00060 #Allow for the user to associate a string with GoalStatus for debugging
00061 string text
00062
00063
00064 ================================================================================
00065 MSG: actionlib_msgs/GoalID
00066 # The stamp should store the time at which this goal was requested.
00067 # It is used by an action server when it tries to preempt all
00068 # goals that were requested before a certain time
00069 time stamp
00070
00071 # The id provides a way to associate feedback and
00072 # result message with specific goal requests. The id
00073 # specified must be unique.
00074 string id
00075
00076
00077 ================================================================================
00078 MSG: wpa_supplicant_node/ScanResult
00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00080 #int32 SUCCESS = 0
00081 #int32 TOO_MANY_SSIDS = 1
00082 #int32 TOO_MANY_CHANNELS = 2
00083 #int32 SCAN_REQUEST_FAILED = 3
00084 #int32 SCAN_REQUEST_TIMED_OUT = 4
00085 #
00086 bool success
00087 Bss[] bss
00088
00089 ================================================================================
00090 MSG: wpa_supplicant_node/Bss
00091 time stamp
00092 string ssid
00093 uint8[6] bssid
00094 int32 frequency # In MHz
00095 int16 beacon_interval
00096 int16 capabilities
00097 int32 quality
00098 int32 noise
00099 int32 level
00100
00101 #InformationElement []ies
00102 #InformationElement []beacon_ies
00103 # flags
00104 # tsf
00105 # age
00106
00107 """
00108 __slots__ = ['header','status','result']
00109 _slot_types = ['Header','actionlib_msgs/GoalStatus','wpa_supplicant_node/ScanResult']
00110
00111 def __init__(self, *args, **kwds):
00112 """
00113 Constructor. Any message fields that are implicitly/explicitly
00114 set to None will be assigned a default value. The recommend
00115 use is keyword arguments as this is more robust to future message
00116 changes. You cannot mix in-order arguments and keyword arguments.
00117
00118 The available fields are:
00119 header,status,result
00120
00121 @param args: complete set of field values, in .msg order
00122 @param kwds: use keyword arguments corresponding to message field names
00123 to set specific fields.
00124 """
00125 if args or kwds:
00126 super(ScanActionResult, self).__init__(*args, **kwds)
00127
00128 if self.header is None:
00129 self.header = std_msgs.msg._Header.Header()
00130 if self.status is None:
00131 self.status = actionlib_msgs.msg.GoalStatus()
00132 if self.result is None:
00133 self.result = wpa_supplicant_node.msg.ScanResult()
00134 else:
00135 self.header = std_msgs.msg._Header.Header()
00136 self.status = actionlib_msgs.msg.GoalStatus()
00137 self.result = wpa_supplicant_node.msg.ScanResult()
00138
00139 def _get_types(self):
00140 """
00141 internal API method
00142 """
00143 return self._slot_types
00144
00145 def serialize(self, buff):
00146 """
00147 serialize message into buffer
00148 @param buff: buffer
00149 @type buff: StringIO
00150 """
00151 try:
00152 _x = self
00153 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00154 _x = self.header.frame_id
00155 length = len(_x)
00156 buff.write(struct.pack('<I%ss'%length, length, _x))
00157 _x = self
00158 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00159 _x = self.status.goal_id.id
00160 length = len(_x)
00161 buff.write(struct.pack('<I%ss'%length, length, _x))
00162 buff.write(_struct_B.pack(self.status.status))
00163 _x = self.status.text
00164 length = len(_x)
00165 buff.write(struct.pack('<I%ss'%length, length, _x))
00166 buff.write(_struct_B.pack(self.result.success))
00167 length = len(self.result.bss)
00168 buff.write(_struct_I.pack(length))
00169 for val1 in self.result.bss:
00170 _v1 = val1.stamp
00171 _x = _v1
00172 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00173 _x = val1.ssid
00174 length = len(_x)
00175 buff.write(struct.pack('<I%ss'%length, length, _x))
00176 _x = val1.bssid
00177
00178 if type(_x) in [list, tuple]:
00179 buff.write(_struct_6B.pack(*_x))
00180 else:
00181 buff.write(_struct_6s.pack(_x))
00182 _x = val1
00183 buff.write(_struct_i2h3i.pack(_x.frequency, _x.beacon_interval, _x.capabilities, _x.quality, _x.noise, _x.level))
00184 except struct.error, se: self._check_types(se)
00185 except TypeError, te: self._check_types(te)
00186
00187 def deserialize(self, str):
00188 """
00189 unpack serialized message in str into this message instance
00190 @param str: byte array of serialized message
00191 @type str: str
00192 """
00193 try:
00194 if self.header is None:
00195 self.header = std_msgs.msg._Header.Header()
00196 if self.status is None:
00197 self.status = actionlib_msgs.msg.GoalStatus()
00198 if self.result is None:
00199 self.result = wpa_supplicant_node.msg.ScanResult()
00200 end = 0
00201 _x = self
00202 start = end
00203 end += 12
00204 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00205 start = end
00206 end += 4
00207 (length,) = _struct_I.unpack(str[start:end])
00208 start = end
00209 end += length
00210 self.header.frame_id = str[start:end]
00211 _x = self
00212 start = end
00213 end += 8
00214 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00215 start = end
00216 end += 4
00217 (length,) = _struct_I.unpack(str[start:end])
00218 start = end
00219 end += length
00220 self.status.goal_id.id = str[start:end]
00221 start = end
00222 end += 1
00223 (self.status.status,) = _struct_B.unpack(str[start:end])
00224 start = end
00225 end += 4
00226 (length,) = _struct_I.unpack(str[start:end])
00227 start = end
00228 end += length
00229 self.status.text = str[start:end]
00230 start = end
00231 end += 1
00232 (self.result.success,) = _struct_B.unpack(str[start:end])
00233 self.result.success = bool(self.result.success)
00234 start = end
00235 end += 4
00236 (length,) = _struct_I.unpack(str[start:end])
00237 self.result.bss = []
00238 for i in xrange(0, length):
00239 val1 = wpa_supplicant_node.msg.Bss()
00240 _v2 = val1.stamp
00241 _x = _v2
00242 start = end
00243 end += 8
00244 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00245 start = end
00246 end += 4
00247 (length,) = _struct_I.unpack(str[start:end])
00248 start = end
00249 end += length
00250 val1.ssid = str[start:end]
00251 start = end
00252 end += 6
00253 val1.bssid = str[start:end]
00254 _x = val1
00255 start = end
00256 end += 20
00257 (_x.frequency, _x.beacon_interval, _x.capabilities, _x.quality, _x.noise, _x.level,) = _struct_i2h3i.unpack(str[start:end])
00258 self.result.bss.append(val1)
00259 return self
00260 except struct.error, e:
00261 raise roslib.message.DeserializationError(e)
00262
00263
00264 def serialize_numpy(self, buff, numpy):
00265 """
00266 serialize message with numpy array types into buffer
00267 @param buff: buffer
00268 @type buff: StringIO
00269 @param numpy: numpy python module
00270 @type numpy module
00271 """
00272 try:
00273 _x = self
00274 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00275 _x = self.header.frame_id
00276 length = len(_x)
00277 buff.write(struct.pack('<I%ss'%length, length, _x))
00278 _x = self
00279 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs))
00280 _x = self.status.goal_id.id
00281 length = len(_x)
00282 buff.write(struct.pack('<I%ss'%length, length, _x))
00283 buff.write(_struct_B.pack(self.status.status))
00284 _x = self.status.text
00285 length = len(_x)
00286 buff.write(struct.pack('<I%ss'%length, length, _x))
00287 buff.write(_struct_B.pack(self.result.success))
00288 length = len(self.result.bss)
00289 buff.write(_struct_I.pack(length))
00290 for val1 in self.result.bss:
00291 _v3 = val1.stamp
00292 _x = _v3
00293 buff.write(_struct_2I.pack(_x.secs, _x.nsecs))
00294 _x = val1.ssid
00295 length = len(_x)
00296 buff.write(struct.pack('<I%ss'%length, length, _x))
00297 _x = val1.bssid
00298
00299 if type(_x) in [list, tuple]:
00300 buff.write(_struct_6B.pack(*_x))
00301 else:
00302 buff.write(_struct_6s.pack(_x))
00303 _x = val1
00304 buff.write(_struct_i2h3i.pack(_x.frequency, _x.beacon_interval, _x.capabilities, _x.quality, _x.noise, _x.level))
00305 except struct.error, se: self._check_types(se)
00306 except TypeError, te: self._check_types(te)
00307
00308 def deserialize_numpy(self, str, numpy):
00309 """
00310 unpack serialized message in str into this message instance using numpy for array types
00311 @param str: byte array of serialized message
00312 @type str: str
00313 @param numpy: numpy python module
00314 @type numpy: module
00315 """
00316 try:
00317 if self.header is None:
00318 self.header = std_msgs.msg._Header.Header()
00319 if self.status is None:
00320 self.status = actionlib_msgs.msg.GoalStatus()
00321 if self.result is None:
00322 self.result = wpa_supplicant_node.msg.ScanResult()
00323 end = 0
00324 _x = self
00325 start = end
00326 end += 12
00327 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00328 start = end
00329 end += 4
00330 (length,) = _struct_I.unpack(str[start:end])
00331 start = end
00332 end += length
00333 self.header.frame_id = str[start:end]
00334 _x = self
00335 start = end
00336 end += 8
00337 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end])
00338 start = end
00339 end += 4
00340 (length,) = _struct_I.unpack(str[start:end])
00341 start = end
00342 end += length
00343 self.status.goal_id.id = str[start:end]
00344 start = end
00345 end += 1
00346 (self.status.status,) = _struct_B.unpack(str[start:end])
00347 start = end
00348 end += 4
00349 (length,) = _struct_I.unpack(str[start:end])
00350 start = end
00351 end += length
00352 self.status.text = str[start:end]
00353 start = end
00354 end += 1
00355 (self.result.success,) = _struct_B.unpack(str[start:end])
00356 self.result.success = bool(self.result.success)
00357 start = end
00358 end += 4
00359 (length,) = _struct_I.unpack(str[start:end])
00360 self.result.bss = []
00361 for i in xrange(0, length):
00362 val1 = wpa_supplicant_node.msg.Bss()
00363 _v4 = val1.stamp
00364 _x = _v4
00365 start = end
00366 end += 8
00367 (_x.secs, _x.nsecs,) = _struct_2I.unpack(str[start:end])
00368 start = end
00369 end += 4
00370 (length,) = _struct_I.unpack(str[start:end])
00371 start = end
00372 end += length
00373 val1.ssid = str[start:end]
00374 start = end
00375 end += 6
00376 val1.bssid = str[start:end]
00377 _x = val1
00378 start = end
00379 end += 20
00380 (_x.frequency, _x.beacon_interval, _x.capabilities, _x.quality, _x.noise, _x.level,) = _struct_i2h3i.unpack(str[start:end])
00381 self.result.bss.append(val1)
00382 return self
00383 except struct.error, e:
00384 raise roslib.message.DeserializationError(e)
00385
00386 _struct_I = roslib.message.struct_I
00387 _struct_6B = struct.Struct("<6B")
00388 _struct_B = struct.Struct("<B")
00389 _struct_i2h3i = struct.Struct("<i2h3i")
00390 _struct_3I = struct.Struct("<3I")
00391 _struct_6s = struct.Struct("<6s")
00392 _struct_2I = struct.Struct("<2I")