power_meter.c File Reference

#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
#include <float.h>
#include "floating_fudge.h"
#include <assert.h>
#include "spandsp/telephony.h"
#include "spandsp/power_meter.h"

Functions

power_meter_tpower_meter_init (power_meter_t *s, int shift)
 Initialise a power meter context.
power_meter_tpower_meter_damping (power_meter_t *s, int shift)
 Change the damping factor of a power meter context.
int32_t power_meter_update (power_meter_t *s, int16_t amp)
 Update a power meter.
int32_t power_meter_level_dbm0 (float level)
 Get the current power meter reading, in dBm0.
int32_t power_meter_level_dbov (float level)
 Get the current power meter reading, in dBOv.
int32_t power_meter_current (power_meter_t *s)
 Get the current power meter reading.
float power_meter_current_dbm0 (power_meter_t *s)
 Get the current power meter reading, in dBm0.
float power_meter_current_dbov (power_meter_t *s)
 Get the current power meter reading, in dBOv.

Detailed Description


Function Documentation

int32_t power_meter_current ( power_meter_t s  ) 

Get the current power meter reading.

Get the current power meter reading.

Parameters:
s The power meter context.
Returns:
The current power meter reading.

References power_meter_t::reading.

float power_meter_current_dbm0 ( power_meter_t s  ) 

Get the current power meter reading, in dBm0.

Get the current power meter reading, in dBm0.

Parameters:
s The power meter context.
Returns:
The current power meter reading, in dBm0.

References power_meter_t::reading.

Referenced by fsk_rx_signal_power(), v17_rx_signal_power(), v22bis_rx_signal_power(), v27ter_rx_signal_power(), v29_rx_signal_power(), and v32bis_rx_signal_power().

float power_meter_current_dbov ( power_meter_t s  ) 

Get the current power meter reading, in dBOv.

Get the current power meter reading, in dBOv.

Parameters:
s The power meter context.
Returns:
The current power meter reading, in dBOv.

References power_meter_t::reading.

power_meter_t* power_meter_damping ( power_meter_t s,
int  shift 
)

Change the damping factor of a power meter context.

Change the damping factor of a power meter context.

Parameters:
s The power meter context.
shift The new shift to be used by the IIR filter.
Returns:
The power meter context.

References power_meter_t::shift.

power_meter_t* power_meter_init ( power_meter_t s,
int  shift 
)

Initialise a power meter context.

Initialise a power meter context.

Parameters:
s The power meter context.
shift The shift to be used by the IIR filter.
Returns:
The power meter context.

References power_meter_t::reading, and power_meter_t::shift.

Referenced by fsk_rx_init(), t31_init(), v17_rx(), v17_rx_restart(), v22bis_rx_restart(), v27ter_rx(), v27ter_rx_restart(), v29_rx(), v29_rx_restart(), v32bis_restart(), and v32bis_rx().

int32_t power_meter_level_dbm0 ( float  level  ) 

Get the current power meter reading, in dBm0.

Get the power meter reading which represents a specified power level in dBm0.

Parameters:
level A power level, in dB0m.
Returns:
The equivalent power meter reading.

Referenced by fsk_rx_signal_cutoff(), t31_init(), v17_rx_signal_cutoff(), v22bis_rx_restart(), v27ter_rx_signal_cutoff(), v29_rx_signal_cutoff(), and v32bis_rx_signal_cutoff().

int32_t power_meter_level_dbov ( float  level  ) 

Get the current power meter reading, in dBOv.

Get the power meter reading which represents a specified power level in dBOv.

Parameters:
level A power level, in dBOv.
Returns:
The equivalent power meter reading.

int32_t power_meter_update ( power_meter_t s,
int16_t  amp 
)

Update a power meter.

Update a power meter.

Parameters:
s The power meter context.
amp The amplitude of the new audio sample.
Returns:
The current power meter reading.

References power_meter_t::reading, and power_meter_t::shift.

Referenced by fsk_rx(), t31_rx(), v17_rx(), v22bis_rx(), v27ter_rx(), v29_rx(), and v32bis_rx().


Generated on Tue Oct 7 20:25:51 2008 for spandsp by  doxygen 1.5.6