Logo Search packages:      
Sourcecode: wicd version File versions

def wicd::wnettools::WirelessInterface::GetSignalStrength (   self,
  iwconfig = None 
)

Get the signal strength of the current network.

Returns:
The signal strength.

Definition at line 1109 of file wnettools.py.

01109                                               :
        """ Get the signal strength of the current network.

        Returns:
        The signal strength.

        """
        if not self.iface: return -1
        if not iwconfig:
            cmd = 'iwconfig ' + self.iface
            if self.verbose: print cmd
            output = misc.Run(cmd)
        else:
            output = iwconfig

        [(strength, max_strength)] = strength_pattern.findall(output)
        if max_strength and strength:
            return 100 * int(strength) // int(max_strength)
        
        if strength is None:
            strength = misc.RunRegex(altstrength_pattern, output)
        
        return strength

    def GetDBMStrength(self, iwconfig=None):


Generated by  Doxygen 1.6.0   Back to index