Go to the source code of this file.
|
#define | AGC_SAMPLES_PER_CHUNK 40 |
|
agcf_descriptor_t * | agcf_make_descriptor (agcf_descriptor_t *s, float signal_target_power, float signal_on_power_threshold, float signal_off_power_threshold, int signal_on_persistence_check, int signal_off_persistence_check) |
| Create an AGC descriptor.
|
int | agcf_free_descriptor (agcf_descriptor_t *s) |
bool | agcf_rx (agcf_state_t *s, float out[], const float in[], int len) |
| Process a block of received samples.
|
bool | agcf_from_int16_rx (agcf_state_t *s, float out[], const int16_t in[], int len) |
| Process a block of received samples.
|
float | agcf_current_power_dbm0 (agcf_state_t *s) |
float | agcf_get_scaling (agcf_state_t *s) |
void | agcf_set_scaling (agcf_state_t *s, float scaling) |
void | agcf_set_adaption (agcf_state_t *s, bool adapt) |
logging_state_t * | agcf_get_logging_state (agcf_state_t *s) |
| Get the logging context associated with an AGC context.
|
agcf_state_t * | agcf_init (agcf_state_t *s, const agcf_descriptor_t *desc) |
| Initialise an AGC context.
|
int | agcf_release (agcf_state_t *s) |
| Release an AGC receive context.
|
int | agcf_free (agcf_state_t *s) |
| Free the resources of an ADSI receive context.
|
◆ agcf_free()
Free the resources of an ADSI receive context.
- Parameters
-
s | The ADSI receive context. |
- Returns
- 0 for OK.
◆ agcf_from_int16_rx()
bool agcf_from_int16_rx |
( |
agcf_state_t * | s, |
|
|
float | out[], |
|
|
const int16_t | in[], |
|
|
int | len ) |
Process a block of received samples.
Process a block of received samples.
- Parameters
-
out | The output buffer for the scaled samples. |
in | The input buffer for the samples. |
len | The length of the in and out buffers. |
- Returns
- True if a signal is present.
◆ agcf_get_logging_state()
Get the logging context associated with an AGC context.
Get the logging context associated with an AGC context.
- Parameters
-
- Returns
- A pointer to the logging context
◆ agcf_get_scaling()
◆ agcf_init()
Initialise an AGC context.
- Parameters
-
- Returns
- A pointer to the initialised context, or NULL if there was a problem.
◆ agcf_make_descriptor()
agcf_descriptor_t * agcf_make_descriptor |
( |
agcf_descriptor_t * | s, |
|
|
float | signal_target_power, |
|
|
float | signal_on_power_threshold, |
|
|
float | signal_off_power_threshold, |
|
|
int | signal_on_persistence_check, |
|
|
int | signal_off_persistence_check ) |
Create an AGC descriptor.
- Parameters
-
s | The AGC context. |
signal_target_power | The power to normalize to, in dBm0. |
signal_on_power_threshold | The minimum power to declare signal on, in dBm0. |
signal_off_power_threshold | The maximum power to declare signal off, in dBm0. |
signal_on_persistence_check | Persistence check count for signal on. |
signal_off_persistence_check | Persistence check count for signal off. |
- Returns
- A pointer to the initialised context, or NULL if there was a problem.
◆ agcf_release()
Release an AGC receive context.
- Parameters
-
s | The ADSI receive context. |
- Returns
- 0 for OK.
◆ agcf_rx()
bool agcf_rx |
( |
agcf_state_t * | s, |
|
|
float | out[], |
|
|
const float | in[], |
|
|
int | len ) |
Process a block of received samples.
Process a block of received samples.
- Parameters
-
out | The output buffer for the scaled samples. |
in | The input buffer for the samples. |
len | The length of the in and out buffers. |
- Returns
- True if a signal is present.
◆ agcf_set_adaption()
Enable or disable AGC adpation.
◆ agcf_set_scaling()
Set the scaling, instead of adapting it. This allows a known good scaling factor to be resused within a session.