otg_kpi.h 3.28 KB
Newer Older
1
/*******************************************************************************
2 3
    OpenAirInterface
    Copyright(c) 1999 - 2014 Eurecom
4

5 6 7 8
    OpenAirInterface is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
9 10


11 12 13 14
    OpenAirInterface is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
15

16 17 18 19
    You should have received a copy of the GNU General Public License
    along with OpenAirInterface.The full GNU General Public License is
    included in this distribution in the file called "COPYING". If not,
    see <http://www.gnu.org/licenses/>.
20 21

  Contact Information
22 23 24 25
  OpenAirInterface Admin: openair_admin@eurecom.fr
  OpenAirInterface Tech : openair_tech@eurecom.fr
  OpenAirInterface Dev  : openair4g-devel@eurecom.fr

ghaddab's avatar
ghaddab committed
26
  Address      : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
27 28 29 30

*******************************************************************************/

/*! \file otg_kpi.h functions to compute OTG KPIs
31
* \brief desribe function for KPIs computation
32
* \author navid nikaein and A. Hafsaoui
33 34 35
* \date 2012
* \version 0.1
* \company Eurecom
36
* \email: navid.nikaein@eurecom.fr
37 38 39 40 41 42
* \note
* \warning

*/

#ifndef __OTG_KPI_H__
43
# define __OTG_KPI_H__
44 45 46 47 48 49 50 51


#include <stdio.h>
#include <stdlib.h>
#include "otg.h"
#include "otg_externs.h" // not needed, you should compute kpi from the pkt header


52 53 54 55 56
extern unsigned int start_log_latency;
extern unsigned int start_log_latency_bg;
extern unsigned int start_log_GP;
extern unsigned int start_log_GP_bg;
extern unsigned int start_log_jitter;
57 58 59 60 61

/*! \fn void tx_throughput( int src, int dst, int application)
* \brief compute the transmitter throughput in bytes per seconds
* \param[in] Source, destination, application
* \param[out]
62
* \note
63 64 65 66 67 68
* @ingroup  _otg
*/
void tx_throughput( int src, int dst, int application);

/*! \fn void rx_goodput( int src, int dst)
* \brief compute the receiver goodput in bytes per seconds
69 70 71
* \param[in] Source, destination, application
* \param[out]
* \note
72 73 74 75
* @ingroup  _otg
*/
void rx_goodput( int src, int dst,int application);

76

77 78 79
/*void rx_loss_rate_pkts(int src, int dst, int application)
* \brief compute the loss rate in bytes at the server bytes
* \param[in] Source, destination, application
80 81
* \param[out]
* \note
82 83 84 85 86 87 88
* @ingroup  _otg
*/
void rx_loss_rate_pkts(int src, int dst, int application);

/*void rx_loss_rate_bytes(int src, int dst, int application)
* \brief compute the loss rate in pkts at the server bytes
* \param[in] Source, destination, application
89 90
* \param[out]
* \note
91 92 93 94 95
* @ingroup  _otg
*/
void rx_loss_rate_bytes(int src, int dst, int application);

/*void kpi_gen(void)
96 97 98 99
* \brief compute KPIs after the end of the simulation
* \param[in]
* \param[out]
* \note
100 101 102 103 104 105 106 107
* @ingroup  _otg
*/
void kpi_gen(void);

void add_log_metric(int src, int dst, int ctime, double metric, unsigned int label);

void  add_log_label(unsigned int label, unsigned int * start_log_metric);

108
void otg_kpi_nb_loss_pkts(void);
109

110
void average_total_jitter(void);
111
#endif