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