_AccessPoint.py
Go to the documentation of this file.
00001 """autogenerated by genpy from pr2_msgs/AccessPoint.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 std_msgs.msg
00008 
00009 class AccessPoint(genpy.Message):
00010   _md5sum = "810217d9e35df31ffb396ea5673d7d1b"
00011   _type = "pr2_msgs/AccessPoint"
00012   _has_header = True #flag to mark the presence of a Header object
00013   _full_text = """# This message communicates the state of the PR2's wifi access point.
00014 Header header
00015 string essid
00016 string macaddr
00017 int32 signal
00018 int32 noise
00019 int32 snr
00020 int32 channel
00021 string rate
00022 string tx_power
00023 int32 quality
00024 
00025 ================================================================================
00026 MSG: std_msgs/Header
00027 # Standard metadata for higher-level stamped data types.
00028 # This is generally used to communicate timestamped data 
00029 # in a particular coordinate frame.
00030 # 
00031 # sequence ID: consecutively increasing ID 
00032 uint32 seq
00033 #Two-integer timestamp that is expressed as:
00034 # * stamp.secs: seconds (stamp_secs) since epoch
00035 # * stamp.nsecs: nanoseconds since stamp_secs
00036 # time-handling sugar is provided by the client library
00037 time stamp
00038 #Frame this data is associated with
00039 # 0: no frame
00040 # 1: global frame
00041 string frame_id
00042 
00043 """
00044   __slots__ = ['header','essid','macaddr','signal','noise','snr','channel','rate','tx_power','quality']
00045   _slot_types = ['std_msgs/Header','string','string','int32','int32','int32','int32','string','string','int32']
00046 
00047   def __init__(self, *args, **kwds):
00048     """
00049     Constructor. Any message fields that are implicitly/explicitly
00050     set to None will be assigned a default value. The recommend
00051     use is keyword arguments as this is more robust to future message
00052     changes.  You cannot mix in-order arguments and keyword arguments.
00053 
00054     The available fields are:
00055        header,essid,macaddr,signal,noise,snr,channel,rate,tx_power,quality
00056 
00057     :param args: complete set of field values, in .msg order
00058     :param kwds: use keyword arguments corresponding to message field names
00059     to set specific fields.
00060     """
00061     if args or kwds:
00062       super(AccessPoint, self).__init__(*args, **kwds)
00063       #message fields cannot be None, assign default values for those that are
00064       if self.header is None:
00065         self.header = std_msgs.msg.Header()
00066       if self.essid is None:
00067         self.essid = ''
00068       if self.macaddr is None:
00069         self.macaddr = ''
00070       if self.signal is None:
00071         self.signal = 0
00072       if self.noise is None:
00073         self.noise = 0
00074       if self.snr is None:
00075         self.snr = 0
00076       if self.channel is None:
00077         self.channel = 0
00078       if self.rate is None:
00079         self.rate = ''
00080       if self.tx_power is None:
00081         self.tx_power = ''
00082       if self.quality is None:
00083         self.quality = 0
00084     else:
00085       self.header = std_msgs.msg.Header()
00086       self.essid = ''
00087       self.macaddr = ''
00088       self.signal = 0
00089       self.noise = 0
00090       self.snr = 0
00091       self.channel = 0
00092       self.rate = ''
00093       self.tx_power = ''
00094       self.quality = 0
00095 
00096   def _get_types(self):
00097     """
00098     internal API method
00099     """
00100     return self._slot_types
00101 
00102   def serialize(self, buff):
00103     """
00104     serialize message into buffer
00105     :param buff: buffer, ``StringIO``
00106     """
00107     try:
00108       _x = self
00109       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00110       _x = self.header.frame_id
00111       length = len(_x)
00112       if python3 or type(_x) == unicode:
00113         _x = _x.encode('utf-8')
00114         length = len(_x)
00115       buff.write(struct.pack('<I%ss'%length, length, _x))
00116       _x = self.essid
00117       length = len(_x)
00118       if python3 or type(_x) == unicode:
00119         _x = _x.encode('utf-8')
00120         length = len(_x)
00121       buff.write(struct.pack('<I%ss'%length, length, _x))
00122       _x = self.macaddr
00123       length = len(_x)
00124       if python3 or type(_x) == unicode:
00125         _x = _x.encode('utf-8')
00126         length = len(_x)
00127       buff.write(struct.pack('<I%ss'%length, length, _x))
00128       _x = self
00129       buff.write(_struct_4i.pack(_x.signal, _x.noise, _x.snr, _x.channel))
00130       _x = self.rate
00131       length = len(_x)
00132       if python3 or type(_x) == unicode:
00133         _x = _x.encode('utf-8')
00134         length = len(_x)
00135       buff.write(struct.pack('<I%ss'%length, length, _x))
00136       _x = self.tx_power
00137       length = len(_x)
00138       if python3 or type(_x) == unicode:
00139         _x = _x.encode('utf-8')
00140         length = len(_x)
00141       buff.write(struct.pack('<I%ss'%length, length, _x))
00142       buff.write(_struct_i.pack(self.quality))
00143     except struct.error as se: self._check_types(se)
00144     except TypeError as te: self._check_types(te)
00145 
00146   def deserialize(self, str):
00147     """
00148     unpack serialized message in str into this message instance
00149     :param str: byte array of serialized message, ``str``
00150     """
00151     try:
00152       if self.header is None:
00153         self.header = std_msgs.msg.Header()
00154       end = 0
00155       _x = self
00156       start = end
00157       end += 12
00158       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00159       start = end
00160       end += 4
00161       (length,) = _struct_I.unpack(str[start:end])
00162       start = end
00163       end += length
00164       if python3:
00165         self.header.frame_id = str[start:end].decode('utf-8')
00166       else:
00167         self.header.frame_id = str[start:end]
00168       start = end
00169       end += 4
00170       (length,) = _struct_I.unpack(str[start:end])
00171       start = end
00172       end += length
00173       if python3:
00174         self.essid = str[start:end].decode('utf-8')
00175       else:
00176         self.essid = str[start:end]
00177       start = end
00178       end += 4
00179       (length,) = _struct_I.unpack(str[start:end])
00180       start = end
00181       end += length
00182       if python3:
00183         self.macaddr = str[start:end].decode('utf-8')
00184       else:
00185         self.macaddr = str[start:end]
00186       _x = self
00187       start = end
00188       end += 16
00189       (_x.signal, _x.noise, _x.snr, _x.channel,) = _struct_4i.unpack(str[start:end])
00190       start = end
00191       end += 4
00192       (length,) = _struct_I.unpack(str[start:end])
00193       start = end
00194       end += length
00195       if python3:
00196         self.rate = str[start:end].decode('utf-8')
00197       else:
00198         self.rate = str[start:end]
00199       start = end
00200       end += 4
00201       (length,) = _struct_I.unpack(str[start:end])
00202       start = end
00203       end += length
00204       if python3:
00205         self.tx_power = str[start:end].decode('utf-8')
00206       else:
00207         self.tx_power = str[start:end]
00208       start = end
00209       end += 4
00210       (self.quality,) = _struct_i.unpack(str[start:end])
00211       return self
00212     except struct.error as e:
00213       raise genpy.DeserializationError(e) #most likely buffer underfill
00214 
00215 
00216   def serialize_numpy(self, buff, numpy):
00217     """
00218     serialize message with numpy array types into buffer
00219     :param buff: buffer, ``StringIO``
00220     :param numpy: numpy python module
00221     """
00222     try:
00223       _x = self
00224       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00225       _x = self.header.frame_id
00226       length = len(_x)
00227       if python3 or type(_x) == unicode:
00228         _x = _x.encode('utf-8')
00229         length = len(_x)
00230       buff.write(struct.pack('<I%ss'%length, length, _x))
00231       _x = self.essid
00232       length = len(_x)
00233       if python3 or type(_x) == unicode:
00234         _x = _x.encode('utf-8')
00235         length = len(_x)
00236       buff.write(struct.pack('<I%ss'%length, length, _x))
00237       _x = self.macaddr
00238       length = len(_x)
00239       if python3 or type(_x) == unicode:
00240         _x = _x.encode('utf-8')
00241         length = len(_x)
00242       buff.write(struct.pack('<I%ss'%length, length, _x))
00243       _x = self
00244       buff.write(_struct_4i.pack(_x.signal, _x.noise, _x.snr, _x.channel))
00245       _x = self.rate
00246       length = len(_x)
00247       if python3 or type(_x) == unicode:
00248         _x = _x.encode('utf-8')
00249         length = len(_x)
00250       buff.write(struct.pack('<I%ss'%length, length, _x))
00251       _x = self.tx_power
00252       length = len(_x)
00253       if python3 or type(_x) == unicode:
00254         _x = _x.encode('utf-8')
00255         length = len(_x)
00256       buff.write(struct.pack('<I%ss'%length, length, _x))
00257       buff.write(_struct_i.pack(self.quality))
00258     except struct.error as se: self._check_types(se)
00259     except TypeError as te: self._check_types(te)
00260 
00261   def deserialize_numpy(self, str, numpy):
00262     """
00263     unpack serialized message in str into this message instance using numpy for array types
00264     :param str: byte array of serialized message, ``str``
00265     :param numpy: numpy python module
00266     """
00267     try:
00268       if self.header is None:
00269         self.header = std_msgs.msg.Header()
00270       end = 0
00271       _x = self
00272       start = end
00273       end += 12
00274       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00275       start = end
00276       end += 4
00277       (length,) = _struct_I.unpack(str[start:end])
00278       start = end
00279       end += length
00280       if python3:
00281         self.header.frame_id = str[start:end].decode('utf-8')
00282       else:
00283         self.header.frame_id = str[start:end]
00284       start = end
00285       end += 4
00286       (length,) = _struct_I.unpack(str[start:end])
00287       start = end
00288       end += length
00289       if python3:
00290         self.essid = str[start:end].decode('utf-8')
00291       else:
00292         self.essid = str[start:end]
00293       start = end
00294       end += 4
00295       (length,) = _struct_I.unpack(str[start:end])
00296       start = end
00297       end += length
00298       if python3:
00299         self.macaddr = str[start:end].decode('utf-8')
00300       else:
00301         self.macaddr = str[start:end]
00302       _x = self
00303       start = end
00304       end += 16
00305       (_x.signal, _x.noise, _x.snr, _x.channel,) = _struct_4i.unpack(str[start:end])
00306       start = end
00307       end += 4
00308       (length,) = _struct_I.unpack(str[start:end])
00309       start = end
00310       end += length
00311       if python3:
00312         self.rate = str[start:end].decode('utf-8')
00313       else:
00314         self.rate = str[start:end]
00315       start = end
00316       end += 4
00317       (length,) = _struct_I.unpack(str[start:end])
00318       start = end
00319       end += length
00320       if python3:
00321         self.tx_power = str[start:end].decode('utf-8')
00322       else:
00323         self.tx_power = str[start:end]
00324       start = end
00325       end += 4
00326       (self.quality,) = _struct_i.unpack(str[start:end])
00327       return self
00328     except struct.error as e:
00329       raise genpy.DeserializationError(e) #most likely buffer underfill
00330 
00331 _struct_I = genpy.struct_I
00332 _struct_i = struct.Struct("<i")
00333 _struct_3I = struct.Struct("<3I")
00334 _struct_4i = struct.Struct("<4i")


pr2_msgs
Author(s): Eric Berger and many others
autogenerated on Mon Jan 6 2014 11:34:07