HappyDoc Generated Documentation | Class: ConnectionManager
--- | ---
/ wifi-radar.py / ConnectionManager Manage a connection; including reporting connection state, connecting/disconnecting from an AP, and returning current IP, ESSID, and BSSID.
Methods |
--- | ---
| if_change
--- | ---
    if_change ( self,  state )
Change the interface state: up or down. #### Parameters: `state` string - The state to which to change the interface. #### Returns: nothing
| get_current_bssid
--- | ---
    get_current_bssid ( self )
Returns the current BSSID, if any, by calling iwconfig. #### Parameters: nothing #### Returns: string or None the BSSID or None (if no there is no current association)
| connect_to_network
--- | ---
    connect_to_network (
            self,
            profile,
            status,
            )
Connect to the specified AP. #### Parameters: `profile` dictionary - The profile for the AP (i.e. network) with which to connect. `status` status implementer - Object which implements status interface. #### Returns: nothing
Exceptions |
--- | ---
TypeError( "Empty AP address" )
| __init__
--- | ---
    __init__ (
            self,
            confFile,
            commandQueue,
            logger,
            )
Create a new connection manager which can read a config file and send to scanning thread command Queue. A new manager checks for a pre-existing connection and takes its AP profile from the ESSID and BSSID to which it is currently attached. #### Parameters: `confFile` ConfigFile - Config file object `commandQueue` Queue - The Queue on which to put commands to the scanning thread `logger` Logger - Python's logging facility #### Returns: ConnectionManager instance
| get_current_essid
--- | ---
    get_current_essid ( self )
Returns the current ESSID, if any, by calling iwconfig. #### Parameters: nothing #### Returns: string or None the ESSID or None (if no there is no current association)
| get_current_ip
--- | ---
    get_current_ip ( self )
Returns the current IP, if any, by calling ifconfig. #### Parameters: nothing #### Returns: string or None the IP address or None (if no there is no current connection)
| disconnect_interface
--- | ---
    disconnect_interface ( self )
Disconnect from the AP with which a connection has been established/attempted. #### Parameters: nothing #### Returns: nothing
Exceptions |
--- | ---
KeyError

This document was automatically generated Thu May 21 05:32:36 2009 by HappyDoc version 3.1