00001 """autogenerated by genmsg_py from AssociateFeedback.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import wpa_supplicant_node.msg
00006 import roslib.rostime
00007
00008 class AssociateFeedback(roslib.message.Message):
00009 _md5sum = "1d8b15104cb8eeade34dcbb57206df8c"
00010 _type = "wpa_supplicant_node/AssociateFeedback"
00011 _has_header = False
00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 bool associated
00014 Bss bss
00015
00016
00017 ================================================================================
00018 MSG: wpa_supplicant_node/Bss
00019 time stamp
00020 string ssid
00021 uint8[6] bssid
00022 int32 frequency # In MHz
00023 int16 beacon_interval
00024 int16 capabilities
00025 int32 quality
00026 int32 noise
00027 int32 level
00028
00029 #InformationElement []ies
00030 #InformationElement []beacon_ies
00031 # flags
00032 # tsf
00033 # age
00034
00035 """
00036 __slots__ = ['associated','bss']
00037 _slot_types = ['bool','wpa_supplicant_node/Bss']
00038
00039 def __init__(self, *args, **kwds):
00040 """
00041 Constructor. Any message fields that are implicitly/explicitly
00042 set to None will be assigned a default value. The recommend
00043 use is keyword arguments as this is more robust to future message
00044 changes. You cannot mix in-order arguments and keyword arguments.
00045
00046 The available fields are:
00047 associated,bss
00048
00049 @param args: complete set of field values, in .msg order
00050 @param kwds: use keyword arguments corresponding to message field names
00051 to set specific fields.
00052 """
00053 if args or kwds:
00054 super(AssociateFeedback, self).__init__(*args, **kwds)
00055
00056 if self.associated is None:
00057 self.associated = False
00058 if self.bss is None:
00059 self.bss = wpa_supplicant_node.msg.Bss()
00060 else:
00061 self.associated = False
00062 self.bss = wpa_supplicant_node.msg.Bss()
00063
00064 def _get_types(self):
00065 """
00066 internal API method
00067 """
00068 return self._slot_types
00069
00070 def serialize(self, buff):
00071 """
00072 serialize message into buffer
00073 @param buff: buffer
00074 @type buff: StringIO
00075 """
00076 try:
00077 _x = self
00078 buff.write(_struct_B2I.pack(_x.associated, _x.bss.stamp.secs, _x.bss.stamp.nsecs))
00079 _x = self.bss.ssid
00080 length = len(_x)
00081 buff.write(struct.pack('<I%ss'%length, length, _x))
00082 _x = self.bss.bssid
00083
00084 if type(_x) in [list, tuple]:
00085 buff.write(_struct_6B.pack(*_x))
00086 else:
00087 buff.write(_struct_6s.pack(_x))
00088 _x = self
00089 buff.write(_struct_i2h3i.pack(_x.bss.frequency, _x.bss.beacon_interval, _x.bss.capabilities, _x.bss.quality, _x.bss.noise, _x.bss.level))
00090 except struct.error, se: self._check_types(se)
00091 except TypeError, te: self._check_types(te)
00092
00093 def deserialize(self, str):
00094 """
00095 unpack serialized message in str into this message instance
00096 @param str: byte array of serialized message
00097 @type str: str
00098 """
00099 try:
00100 if self.bss is None:
00101 self.bss = wpa_supplicant_node.msg.Bss()
00102 end = 0
00103 _x = self
00104 start = end
00105 end += 9
00106 (_x.associated, _x.bss.stamp.secs, _x.bss.stamp.nsecs,) = _struct_B2I.unpack(str[start:end])
00107 self.associated = bool(self.associated)
00108 start = end
00109 end += 4
00110 (length,) = _struct_I.unpack(str[start:end])
00111 start = end
00112 end += length
00113 self.bss.ssid = str[start:end]
00114 start = end
00115 end += 6
00116 self.bss.bssid = str[start:end]
00117 _x = self
00118 start = end
00119 end += 20
00120 (_x.bss.frequency, _x.bss.beacon_interval, _x.bss.capabilities, _x.bss.quality, _x.bss.noise, _x.bss.level,) = _struct_i2h3i.unpack(str[start:end])
00121 return self
00122 except struct.error, e:
00123 raise roslib.message.DeserializationError(e)
00124
00125
00126 def serialize_numpy(self, buff, numpy):
00127 """
00128 serialize message with numpy array types into buffer
00129 @param buff: buffer
00130 @type buff: StringIO
00131 @param numpy: numpy python module
00132 @type numpy module
00133 """
00134 try:
00135 _x = self
00136 buff.write(_struct_B2I.pack(_x.associated, _x.bss.stamp.secs, _x.bss.stamp.nsecs))
00137 _x = self.bss.ssid
00138 length = len(_x)
00139 buff.write(struct.pack('<I%ss'%length, length, _x))
00140 _x = self.bss.bssid
00141
00142 if type(_x) in [list, tuple]:
00143 buff.write(_struct_6B.pack(*_x))
00144 else:
00145 buff.write(_struct_6s.pack(_x))
00146 _x = self
00147 buff.write(_struct_i2h3i.pack(_x.bss.frequency, _x.bss.beacon_interval, _x.bss.capabilities, _x.bss.quality, _x.bss.noise, _x.bss.level))
00148 except struct.error, se: self._check_types(se)
00149 except TypeError, te: self._check_types(te)
00150
00151 def deserialize_numpy(self, str, numpy):
00152 """
00153 unpack serialized message in str into this message instance using numpy for array types
00154 @param str: byte array of serialized message
00155 @type str: str
00156 @param numpy: numpy python module
00157 @type numpy: module
00158 """
00159 try:
00160 if self.bss is None:
00161 self.bss = wpa_supplicant_node.msg.Bss()
00162 end = 0
00163 _x = self
00164 start = end
00165 end += 9
00166 (_x.associated, _x.bss.stamp.secs, _x.bss.stamp.nsecs,) = _struct_B2I.unpack(str[start:end])
00167 self.associated = bool(self.associated)
00168 start = end
00169 end += 4
00170 (length,) = _struct_I.unpack(str[start:end])
00171 start = end
00172 end += length
00173 self.bss.ssid = str[start:end]
00174 start = end
00175 end += 6
00176 self.bss.bssid = str[start:end]
00177 _x = self
00178 start = end
00179 end += 20
00180 (_x.bss.frequency, _x.bss.beacon_interval, _x.bss.capabilities, _x.bss.quality, _x.bss.noise, _x.bss.level,) = _struct_i2h3i.unpack(str[start:end])
00181 return self
00182 except struct.error, e:
00183 raise roslib.message.DeserializationError(e)
00184
00185 _struct_I = roslib.message.struct_I
00186 _struct_6B = struct.Struct("<6B")
00187 _struct_6s = struct.Struct("<6s")
00188 _struct_i2h3i = struct.Struct("<i2h3i")
00189 _struct_B2I = struct.Struct("<B2I")