1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html40/loose.dtd">
7 <title>HappyDoc Generated Documentation
</title>
10 <body bgcolor=
"#ffffff">
13 <table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
19 bgcolor=
"#88bbee"><font color=
"#000000">HappyDoc Generated Documentation
</font>
23 align=
"right"><font color=
"#000000">Class: ConnectionManager
</font>
30 /
<a href=
"../wifi-radar.html">wifi-radar.py
</a> /
ConnectionManager
</small></p>
34 <p>Manage a connection; including reporting connection state,
35 connecting/disconnecting from an AP, and returning current IP, ESSID, and BSSID.
</p>
36 <table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
45 <font color=
"#000000">
46 <a name=
"">Methods
</a>
54 <font color=
"#000000"> </font>
59 <table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
68 <font color=
"#000000">
69 <a name=
"if_change"></a>
77 <font color=
"#000000">if_change
</font>
83 if_change ( self, state )
86 <p>Change the interface state: up or down.
</p>
89 <dt> <code>state
</code></dt>
90 <dd>string - The state to which to change the interface.
</dd>
95 </table><table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
104 <font color=
"#000000">
105 <a name=
"get_current_bssid"></a>
108 <th bgcolor=
"#99ccff"
113 <font color=
"#000000">get_current_bssid
</font>
119 get_current_bssid ( self )
122 <p>Returns the current BSSID, if any, by calling iwconfig.
</p>
127 <dt> string or None
</dt>
128 <dd>the BSSID or None (if no there is no current association)
</dd>
131 </table><table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
134 <th bgcolor=
"#99ccff"
140 <font color=
"#000000">
141 <a name=
"connect_to_network"></a>
144 <th bgcolor=
"#99ccff"
149 <font color=
"#000000">connect_to_network
</font>
162 <p>Connect to the specified AP.
</p>
165 <dt> <code>profile
</code></dt>
166 <dd>dictionary - The profile for the AP (i.e. network) with which to connect.
</dd>
167 <dt> <code>status
</code></dt>
168 <dd>status implementer - Object which implements status interface.
</dd>
172 <table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
175 <th bgcolor=
"#99ccff"
181 <font color=
"#000000">
182 <a name=
"">Exceptions
</a>
185 <th bgcolor=
"#99ccff"
190 <font color=
"#000000"> </font>
196 TypeError(
"Empty AP address" )
<br>
200 </table><table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
203 <th bgcolor=
"#99ccff"
209 <font color=
"#000000">
210 <a name=
"__init__"></a>
213 <th bgcolor=
"#99ccff"
218 <font color=
"#000000">__init__
</font>
232 <p>Create a new connection manager which can read a config file and send to scanning thread
233 command Queue. A new manager checks for a pre-existing connection and takes
234 its AP profile from the ESSID and BSSID to which it is currently attached.
</p>
237 <dt> <code>confFile
</code></dt>
238 <dd>ConfigFile - Config file object
</dd>
239 <dt> <code>commandQueue
</code></dt>
240 <dd>Queue - The Queue on which to put commands to the scanning thread
</dd>
241 <dt> <code>logger
</code></dt>
242 <dd>Logger - Python's logging facility
</dd>
245 <p> ConnectionManager instance
</p>
247 </table><table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
250 <th bgcolor=
"#99ccff"
256 <font color=
"#000000">
257 <a name=
"get_current_essid"></a>
260 <th bgcolor=
"#99ccff"
265 <font color=
"#000000">get_current_essid
</font>
271 get_current_essid ( self )
274 <p>Returns the current ESSID, if any, by calling iwconfig.
</p>
279 <dt> string or None
</dt>
280 <dd>the ESSID or None (if no there is no current association)
</dd>
283 </table><table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
286 <th bgcolor=
"#99ccff"
292 <font color=
"#000000">
293 <a name=
"get_current_ip"></a>
296 <th bgcolor=
"#99ccff"
301 <font color=
"#000000">get_current_ip
</font>
307 get_current_ip ( self )
310 <p>Returns the current IP, if any, by calling ifconfig.
</p>
315 <dt> string or None
</dt>
316 <dd>the IP address or None (if no there is no current connection)
</dd>
319 </table><table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
322 <th bgcolor=
"#99ccff"
328 <font color=
"#000000">
329 <a name=
"disconnect_interface"></a>
332 <th bgcolor=
"#99ccff"
337 <font color=
"#000000">disconnect_interface
</font>
343 disconnect_interface ( self )
346 <p>Disconnect from the AP with which a connection has been established/attempted.
</p>
351 <table border=
"0" cellpadding=
"5" cellspacing=
"0" width=
"100%">
354 <th bgcolor=
"#99ccff"
360 <font color=
"#000000">
361 <a name=
"">Exceptions
</a>
364 <th bgcolor=
"#99ccff"
369 <font color=
"#000000"> </font>
387 <font size=
"-2"><i>This document was automatically generated
388 Sun Apr
19 14:
31:
33 2009 by
<a
389 href=
"http://happydoc.sourceforge.net">HappyDoc
</a> version