netGetSignalLevel (Function) |
Top Previous Next |
netGetSignalLevel will return the signal strength for a connected network interface. The returned value will either be the real signal strength (expressed in dBm) or as a percentage (between 0 and 100), depending of the value of the "dbm" input parameter. Please note that the signal level is logarithmic in nature and that the value in percentage is just a linear representation of the real signal level from the lowest to the highest level. 10 dB (which is 10 times the RF power) of extra signal will only give an extra percentage reading of 16.
The range of the real signal level depends on the type of interface:
Input: iface : SINT The network interface to read configuration for. 1 = Mobile network, 2 = LAN 1 network, etc. (See Network). Note that the values for the LAN networks are simulated and are only included for completeness.
dbm : BOOL (default FALSE) Set to true to get the level as the real signal strength in dBm, set to false to get it as a percentage.
Output: ssid : STRING The SSID of the network, if the network is WLAN.
level : SINT The signal strength.
Returns: INT
Declaration: FUNCTION netGetSignalLevel : INT;
Example: INCLUDE rtcu.inc |