html_gen.pl
上传用户:wzkunzhan
上传日期:2022-04-23
资源大小:2618k
文件大小:4k
- # File: html_gen.pl
- #
- # Modified OpenPhone based Voice Evaluation Tool (MOBVET) Version 0.1
- # --------------------------------------------------------------------
- # Voice Over IP Laboratory (http://www.voip.nce.ufrj.br)
- # Federal University of Rio de Janeiro
- # Copyright (c) 2002-2004 UFRJ (Federal University of Rio de Janeiro).
- # The contents of this file are subject to the Mozilla Public License
- # Version 1.0 (the "License"); you may not use this file except in
- # compliance with the License. You may obtain a copy of the License at
- # http://www.mozilla.org/MPL/
- use Sys::Hostname;
- use Socket;
- sub html_gen
- {
- my @args = split ' ',shift;
- my $side = @args[0];
- my $file_html = "side" . $side . ".html" ;
- my $file_mos = "side" . $side . ".mos" ;
- my $mos;
- my $host = hostname();
- my $addr = inet_ntoa(scalar gethostbyname($host || 'localhost'));
-
- if ($side eq 'A'){
- $side_string = "LocalHost (IP: " . $addr . ")";
- #print "$side: $side_string n";
- }
- else {
- $side_string = "RemoteHost (IP: " . @args[2] . ")";
- #print "$side: $side_string n";
- }
- open (MOS, "$file_mos");
- $mos = readline(MOS);
- close(MOS);
-
-
-
- open (HTML, ">$file_html");
-
- #Get the Date
- $date = localtime time;
- $sdate = localtime @args[1];
- print HTML "
- <html>
- <head>
- <title>H.323 Beacon Server-to-Server Test Module Version 1.4</title>
-
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-
- </head>
- <body bgcolor="#ffffff" text="#000000">
- <center>
- <h1>H.323 Beacon Server-to-Server Test Module Version 1.4 </h1>
-
- <h3>Test Started at: $sdate <br> Test Ended at: $date </h3>
-
- <h2> Voice Quality Evaluation of $side_string </h2>
- </center>
-
-
- <h3>Network Statistics Information </h3>
- <IMG src="side" . $side . "Net-Delay.png" >
- <IMG src="side" . $side . "Net-loss.png" ><br>
- <IMG src="side" . $side . "Buffer-loss.png" >
- <IMG src="side" . $side . "Jitter.png" >
- <br><h3>G.107 E-Model</h3>
- <IMG src="side" . $side . "ID-Emodel.png" >
- <IMG src="side" . $side . "IE-Emodel.png" ><br>
- <IMG src="side" . $side . "R-Emodel.png" >
- <IMG src="side" . $side . "MOS-E-model.png" >
-
-
- <br><h3>MOS value at End of call: $mos</h3><br>
-
- <h3>Note:</h3>
-
- In the cases where result plots are not generated or if erraneous,
- please verify the server acceptor IP address. <br>
-
- <h3>Credits:</h3>
-
- The graphs in this page have been generated using the E-Model implementation developed
- by Leandro C. G. Lustosa - <a href="mailto:leandro@nce.ufrj.br">leandro@nce.ufrj.br</a>
- and Paulo H. A. Rodrigues - <a href="mailto:aguiar@nce.ufrj.br">aguiar@nce.ufrj.br</a>
- ,Voice Over IP Laboratory, Federal University of Rio de Janeiro, Brazil.
-
- <br> <br>
- <center><b><i>Copyright (c) 2002-2004<br>
- Voice Over IP Laboratory, Federal University of Rio de Janeiro, Brazil.<br>
- ITEC-Ohio, Division of OARnet, Columbus, Ohio, USA.<br>
- All Rights Reserved.
- </center></i></b>
- </body>
- </html>
- "; #end print
-
- #Put this inside the print to get the Extended E-model graphs
- #<br><h3>Extended E-Model (UFRJ/UFAM Extension)</h3>
- #<IMG src="side" . $side . "ID-Emodel-ext.png" >
- #<IMG src="side" . $side . "IE-Emodel-ext.png" >
- #<IMG src="side" . $side . "R-Emodel-ext.png" >
- #<IMG src="side" . $side . "MOS-Emodel-ext.png" >
-
- #<IMG src="side" . $side . "I1.png" >
- #<IMG src="side" . $side . "I2.png" >
- #<IMG src="side" . $side . "Ieav.png" >
-
- close (HTML);
- }
- html_gen("A $ARGV[0]");
- html_gen("B $ARGV[0] $ARGV[1]");