Logo Search packages:      
Sourcecode: wicd version File versions

def wicd::wnettools::WirelessInterface::_FreqToChannel (   self,
  freq 
) [private]

Translate the specified frequency to a channel.

Note: This function is simply a lookup dict and therefore the
freq argument must be in the dict to provide a valid channel.

Keyword arguments:
freq -- string containing the specified frequency

Returns:
The channel number, or None if not found.

Definition at line 736 of file wnettools.py.

00736                                   :
        """ Translate the specified frequency to a channel.

        Note: This function is simply a lookup dict and therefore the
        freq argument must be in the dict to provide a valid channel.

        Keyword arguments:
        freq -- string containing the specified frequency

        Returns:
        The channel number, or None if not found.

        """
        ret = None
        freq_dict = {'2.412 GHz': 1, '2.417 GHz': 2, '2.422 GHz': 3,
                         '2.427 GHz': 4, '2.432 GHz': 5, '2.437 GHz': 6,
                         '2.442 GHz': 7, '2.447 GHz': 8, '2.452 GHz': 9,
                         '2.457 GHz': 10, '2.462 GHz': 11, '2.467 GHz': 12,
                         '2.472 GHz': 13, '2.484 GHz': 14 }
        try:
            ret = freq_dict[freq]
        except KeyError:
            print "Couldn't determine channel number for frequency: " + str(freq)
        
        return ret

    def _GetRalinkInfo(self):


Generated by  Doxygen 1.6.0   Back to index