Esempio n. 1
0
/**
 * Checks whether the traffic intensity, i.e. number of packets per seconds, is higher
 * than the preconfigured threshold.
 * 
 * @param pMeasurementMgr A handle to the Measurement Manager module.
 * 
 * @return True iff the traffic intensity is high
 * 
 * @date 01-Jan-2006
 */
static TI_BOOL measurementMgr_isTrafficIntensityHigherThanThreshold(measurementMgr_t * pMeasurementMgr)
{
    TI_BOOL trafficIntensityHigh = TI_FALSE;
    int pcksPerSec;

    pcksPerSec = TrafficMonitor_GetFrameBandwidth(pMeasurementMgr->hTrafficMonitor);
    
    if (pcksPerSec >= pMeasurementMgr->trafficIntensityThreshold)
        trafficIntensityHigh = TI_TRUE;
    
    return trafficIntensityHigh;
}
/**
 * Checks whether the traffic intensity, i.e. number of packets per seconds, is higher
 * than the preconfigured threshold.
 * 
 * @param pMeasurementMgr A handle to the Measurement Manager module.
 * 
 * @return True iff the traffic intensity is high
 * 
 * @date 01-Jan-2006
 */
static TI_BOOL measurementMgr_isTrafficIntensityHigherThanThreshold(measurementMgr_t * pMeasurementMgr)
{
    TI_BOOL trafficIntensityHigh = TI_FALSE;
    int pcksPerSec;

    pcksPerSec = TrafficMonitor_GetFrameBandwidth(pMeasurementMgr->hTrafficMonitor);

    TRACE1(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": pcksPerSec = %d\n", pcksPerSec);
    
    if (pcksPerSec >= pMeasurementMgr->trafficIntensityThreshold)
        trafficIntensityHigh = TI_TRUE;
    
    return trafficIntensityHigh;
}