|
Asterisk - The Open Source Telephony Project GIT-master-9647a4f
|
FSK Modulator/Demodulator. More...


Go to the source code of this file.
Macros | |
| #define | BWLIST {75,800} |
| #define | FLIST {1400,1800,1200,2200,1300,2100} |
| #define | GET_SAMPLE get_sample(&buffer, len) |
| #define | NBW 2 |
| #define | NF 6 |
| #define | STATE_GET_BYTE 3 |
| #define | STATE_SEARCH_STARTBIT 0 |
| #define | STATE_SEARCH_STARTBIT2 1 |
| #define | STATE_SEARCH_STARTBIT3 2 |
Functions | |
| static int | demodulator (fsk_data *fskd, float *retval, float x) |
| static float | filterL (fsk_data *fskd, float in) |
| static float | filterM (fsk_data *fskd, float in) |
| static float | filterS (fsk_data *fskd, float in) |
| int | fsk_serial (fsk_data *fskd, short *buffer, int *len, int *outbyte) |
| Retrieve a serial byte into outbyte. Buffer is a pointer into a series of shorts and len records the number of bytes in the buffer. len will be overwritten with the number of bytes left that were not consumed. | |
| static int | get_bit_raw (fsk_data *fskd, short *buffer, int *len) |
| static float | get_sample (short **buffer, int *len) |
Variables | |
| static double | coef_in [NF][NBW][8] |
| Coefficients for input filters Coefficients table, generated by program "mkfilter" mkfilter is part of the zapatatelephony.org distribution Format: coef[IDX_FREC][IDX_BW][IDX_COEF] IDX_COEF = 0 => 1/GAIN IDX_COEF = 1-6 => Coefficientes y[n]. | |
| static double | coef_out [NBW][8] |
| Coefficients for output filter Coefficients table, generated by program "mkfilter" Format: coef[IDX_BW][IDX_COEF] IDX_COEF = 0 => 1/GAIN IDX_COEF = 1-6 => Coefficientes y[n]. | |
FSK Modulator/Demodulator.
Definition in file fskmodem_float.c.
| #define BWLIST {75,800} |
Definition at line 42 of file fskmodem_float.c.
| #define FLIST {1400,1800,1200,2200,1300,2100} |
Definition at line 44 of file fskmodem_float.c.
| #define GET_SAMPLE get_sample(&buffer, len) |
Definition at line 60 of file fskmodem_float.c.
| #define NBW 2 |
Definition at line 41 of file fskmodem_float.c.
| #define NF 6 |
Definition at line 43 of file fskmodem_float.c.
| #define STATE_GET_BYTE 3 |
Definition at line 49 of file fskmodem_float.c.
| #define STATE_SEARCH_STARTBIT 0 |
Definition at line 46 of file fskmodem_float.c.
| #define STATE_SEARCH_STARTBIT2 1 |
Definition at line 47 of file fskmodem_float.c.
| #define STATE_SEARCH_STARTBIT3 2 |
Definition at line 48 of file fskmodem_float.c.
|
inlinestatic |
Definition at line 169 of file fskmodem_float.c.
References fsk_data::cola_demod, fsk_data::cola_filter, fsk_data::cola_in, filterL(), filterM(), filterS(), NCOLA, and fsk_data::pcola.
Referenced by fsk_serial(), and get_bit_raw().
|
inlinestatic |
Low-pass filter for demodulated data
Definition at line 147 of file fskmodem_float.c.
References fsk_data::bw, coef_out, fsk_data::flp, fsk_data::flxv, fsk_data::flyv, and in.
Referenced by demodulator().
|
inlinestatic |
Band-pass filter for MARK frequency
Definition at line 109 of file fskmodem_float.c.
References fsk_data::bw, coef_in, fsk_data::f_mark_idx, fsk_data::fmp, fsk_data::fmxv, fsk_data::fmyv, and in.
Referenced by demodulator().
|
inlinestatic |
Band-pass filter for SPACE frequency
Definition at line 128 of file fskmodem_float.c.
References fsk_data::bw, coef_in, fsk_data::f_space_idx, fsk_data::fsp, fsk_data::fsxv, fsk_data::fsyv, and in.
Referenced by demodulator().
| int fsk_serial | ( | fsk_data * | fskd, |
| short * | buffer, | ||
| int * | len, | ||
| int * | outbyte | ||
| ) |
Retrieve a serial byte into outbyte. Buffer is a pointer into a series of shorts and len records the number of bytes in the buffer. len will be overwritten with the number of bytes left that were not consumed.
| 0 | Still looking for something... |
| 1 | An output byte was received and stored in outbyte |
| -1 | An error occured in the transmission He must be called with at least 80 bytes of buffer. |
Definition at line 224 of file fskmodem_float.c.
|
static |
Definition at line 189 of file fskmodem_float.c.
References fsk_data::cont, demodulator(), GET_SAMPLE, fsk_data::spb, and fsk_data::x0.
Referenced by fsk_serial().
|
inlinestatic |
Definition at line 51 of file fskmodem_float.c.
Coefficients for input filters Coefficients table, generated by program "mkfilter" mkfilter is part of the zapatatelephony.org distribution Format: coef[IDX_FREC][IDX_BW][IDX_COEF] IDX_COEF = 0 => 1/GAIN IDX_COEF = 1-6 => Coefficientes y[n].
Definition at line 69 of file fskmodem_float.c.
|
static |
Coefficients for output filter Coefficients table, generated by program "mkfilter" Format: coef[IDX_BW][IDX_COEF] IDX_COEF = 0 => 1/GAIN IDX_COEF = 1-6 => Coefficientes y[n].
Definition at line 102 of file fskmodem_float.c.
Referenced by filterL().