Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

fskmodem.h

Go to the documentation of this file.
00001 /* 00002 * Asterisk -- A telephony toolkit for Linux. 00003 * 00004 * FSK Modem Support 00005 * 00006 * Copyright (C) 1999, Mark Spencer 00007 * 00008 * Mark Spencer <markster@linux-support.net> 00009 * 00010 * This program is free software, distributed under the terms of 00011 * the GNU General Public License. 00012 * 00013 * Includes code and algorithms from the Zapata library. 00014 * 00015 */ 00016 00017 #ifndef _FSKMODEM_H 00018 #define _FSKMODEM_H 00019 00020 #define PARITY_NONE 0 00021 #define PARITY_EVEN 1 00022 #define PARITY_ODD 2 00023 00024 00025 #define NCOLA 0x4000 00026 00027 typedef struct { 00028 float spb; /* Samples / Bit */ 00029 int nbit; /* Number of Data Bits (5,7,8) */ 00030 float nstop; /* Number of Stop Bits 1,1.5,2 */ 00031 int paridad; /* Parity 0=none 1=even 2=odd */ 00032 int hdlc; /* Modo Packet */ 00033 float x0; 00034 float x1; 00035 float x2; 00036 float cont; 00037 int bw; /* Ancho de Banda */ 00038 double fmxv[8],fmyv[8]; /* filter stuff for M filter */ 00039 int fmp; /* pointer for M filter */ 00040 double fsxv[8],fsyv[8]; /* filter stuff for S filter */ 00041 int fsp; /* pointer for S filter */ 00042 double flxv[8],flyv[8]; /* filter stuff for L filter */ 00043 int flp; /* pointer for L filter */ 00044 int f_mark_idx; /* Indice de frecuencia de marca (f_M-500)/5 */ 00045 int f_space_idx;/* Indice de frecuencia de espacio (f_S-500)/5 */ 00046 int state; 00047 int pcola; /* Puntero de las colas de datos */ 00048 float cola_in[NCOLA]; /* Cola de muestras de entrada */ 00049 float cola_filtro[NCOLA]; /* Cola de muestras tras filtros */ 00050 float cola_demod[NCOLA]; /* Cola de muestras demoduladas */ 00051 } fsk_data; 00052 00053 /* Retrieve a serial byte into outbyte. Buffer is a pointer into a series of 00054 shorts and len records the number of bytes in the buffer. len will be 00055 overwritten with the number of bytes left that were not consumed, and the 00056 return value is as follows: 00057 0: Still looking for something... 00058 1: An output byte was received and stored in outbyte 00059 -1: An error occured in the transmission 00060 He must be called with at least 80 bytes of buffer. */ 00061 extern int fsk_serie(fsk_data *fskd, short *buffer, int *len, int *outbyte); 00062 00063 #endif

Generated on Sat Jun 12 16:40:58 2004 for Asterisk by doxygen 1.3.7