parameter value conversion on GUI

Tunde Oyeyemi toyeyemi at ipnxnigeria.net
Fri Jun 30 16:35:22 EDT 2017


I need advise on the integration of Parameters values conversion on the 
GUI. I have the values for the following parameters added to the summary 
list. However, the unit for the parameters is in mW but I need the 
values in dBm on the GUI using the formula below. Please how do I 
achieve this. I will appreciate your input on this.

InternetGatewayDevice.WANDevice.1.WANGponInterfaceConfig.RXPower
InternetGatewayDevice.WANDevice.1.WANGponInterfaceConfig.TXPower

=====================================

#!/usr/bin/perl

use POSIX qw(log10);

$P = shift;
$RxP = $P/10000000;
$log_10 = 10*log10($RxP*1000);
$rounded = sprintf "%.2f", $log_10;
print "\n";
print $rounded."dBm";
print "\n";

========================================

Tunde Oyeyemi.


More information about the Users mailing list