Asterisk - The Open Source Telephony Project
GIT-master-a63eec2
Loading...
Searching...
No Matches
include
asterisk
fskmodem_float.h
Go to the documentation of this file.
1
/*
2
* Asterisk -- An open source telephony toolkit.
3
*
4
* Copyright (C) 1999 - 2005, Digium, Inc.
5
*
6
* Mark Spencer <markster@digium.com>
7
*
8
* See http://www.asterisk.org for more information about
9
* the Asterisk project. Please do not directly contact
10
* any of the maintainers of this project for assistance;
11
* the project provides a web site, mailing lists and IRC
12
* channels for your use.
13
*
14
* This program is free software, distributed under the terms of
15
* the GNU General Public License Version 2. See the LICENSE file
16
* at the top of the source tree.
17
*/
18
19
/*! \file
20
* \brief FSK Modem Support
21
* \note Includes code and algorithms from the Zapata library.
22
*/
23
24
#ifndef _ASTERISK_FSKMODEM_H
25
#define _ASTERISK_FSKMODEM_H
26
27
#define PARITY_NONE 0
28
#define PARITY_EVEN 1
29
#define PARITY_ODD 2
30
31
32
#define NCOLA 0x4000
33
34
typedef
struct
{
35
float
spb
;
/*!< Samples / Bit */
36
int
nbit
;
/*!< Number of Data Bits (5,7,8) */
37
float
nstop
;
/*!< Number of Stop Bits 1,1.5,2 */
38
int
parity
;
/*!< Parity 0=none 1=even 2=odd */
39
int
hdlc
;
/*!< Modo Packet */
40
float
x0
;
41
float
x1
;
42
float
x2
;
43
float
cont
;
44
int
bw
;
/*!< Bandwidth */
45
double
fmxv[8],fmyv[8];
/*!< filter stuff for M filter */
46
int
fmp
;
/*!< pointer for M filter */
47
double
fsxv[8],fsyv[8];
/*!< filter stuff for S filter */
48
int
fsp
;
/*!< pointer for S filter */
49
double
flxv[8],flyv[8];
/*!< filter stuff for L filter */
50
int
flp
;
/*!< pointer for L filter */
51
int
f_mark_idx
;
/*!< Mark frequency index (f_M-500)/5 */
52
int
f_space_idx
;
/*!< Space frequency index (f_S-500)/5 */
53
int
state
;
54
int
pcola
;
/*!< Pointer to data queues */
55
float
cola_in[
NCOLA
];
/*!< Queue of input samples */
56
float
cola_filter[
NCOLA
];
/*!< Queue of samples after filters */
57
float
cola_demod[
NCOLA
];
/*!< Queue of demodulated samples */
58
}
fsk_data
;
59
60
/*! \brief Retrieve a serial byte into outbyte.
61
Buffer is a pointer into a series of
62
shorts and len records the number of bytes in the buffer. len will be
63
overwritten with the number of bytes left that were not consumed.
64
\retval 0 Still looking for something...
65
\retval 1 An output byte was received and stored in outbyte
66
\retval -1 An error occured in the transmission
67
He must be called with at least 80 bytes of buffer. */
68
int
fsk_serial
(
fsk_data
*fskd,
short
*buffer,
int
*
len
,
int
*outbyte);
69
70
#endif
/* _ASTERISK_FSKMODEM_H */
fsk_serial
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 ...
Definition
fskmodem_float.c:224
NCOLA
#define NCOLA
Definition
fskmodem_float.h:32
len
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
Definition
func_strings.c:1669
fsk_data
Definition
fskmodem_float.h:34
fsk_data::bw
int bw
Definition
fskmodem_float.h:44
fsk_data::parity
int parity
Definition
fskmodem_float.h:38
fsk_data::hdlc
int hdlc
Definition
fskmodem_float.h:39
fsk_data::x2
float x2
Definition
fskmodem_float.h:42
fsk_data::x1
float x1
Definition
fskmodem_float.h:41
fsk_data::x0
float x0
Definition
fskmodem_float.h:40
fsk_data::spb
float spb
Definition
fskmodem_float.h:35
fsk_data::f_mark_idx
int f_mark_idx
Definition
fskmodem_float.h:51
fsk_data::nstop
float nstop
Definition
fskmodem_float.h:37
fsk_data::cont
float cont
Definition
fskmodem_float.h:43
fsk_data::pcola
int pcola
Definition
fskmodem_float.h:54
fsk_data::state
int state
Definition
fskmodem_float.h:53
fsk_data::fmp
int fmp
Definition
fskmodem_float.h:46
fsk_data::fsp
int fsp
Definition
fskmodem_float.h:48
fsk_data::nbit
int nbit
Definition
fskmodem_float.h:36
fsk_data::f_space_idx
int f_space_idx
Definition
fskmodem_float.h:52
fsk_data::flp
int flp
Definition
fskmodem_float.h:50
Generated on Wed Oct 8 2025 20:04:17 for Asterisk - The Open Source Telephony Project by
1.9.8