comparison spandsp-0.0.6pre17/src/spandsp/private/bert.h @ 4:26cd8f1ef0b1

import spandsp-0.0.6pre17
author Peter Meerwald <pmeerw@cosy.sbg.ac.at>
date Fri, 25 Jun 2010 15:50:58 +0200
parents
children
comparison
equal deleted inserted replaced
3:c6c5a16ce2f2 4:26cd8f1ef0b1
1 /*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * private/bert.h - Bit error rate tests.
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2004 Steve Underwood
9 *
10 * All rights reserved.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 2.1,
14 * as published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 *
25 * $Id: bert.h,v 1.2 2009/04/14 16:04:54 steveu Exp $
26 */
27
28 #if !defined(_SPANDSP_PRIVATE_BERT_H_)
29 #define _SPANDSP_PRIVATE_BERT_H_
30
31 typedef struct
32 {
33 uint32_t reg;
34 int step;
35 int step_bit;
36 int bits;
37 int zeros;
38 } bert_tx_state_t;
39
40 typedef struct
41 {
42 uint32_t reg;
43 uint32_t ref_reg;
44 uint32_t master_reg;
45 int step;
46 int step_bit;
47 int resync;
48 int bits;
49 int zeros;
50 int resync_len;
51 int resync_percent;
52 int resync_bad_bits;
53 int resync_cnt;
54 int report_countdown;
55 int measurement_step;
56 } bert_rx_state_t;
57
58 /*!
59 Bit error rate tester (BERT) descriptor. This defines the working state for a
60 single instance of the BERT.
61 */
62 struct bert_state_s
63 {
64 int pattern;
65 int pattern_class;
66 bert_report_func_t reporter;
67 void *user_data;
68 int report_frequency;
69 int limit;
70
71 uint32_t mask;
72 int shift;
73 int shift2;
74 int max_zeros;
75 int invert;
76 int resync_time;
77
78 int decade_ptr[9];
79 int decade_bad[9][10];
80 int error_rate;
81
82 bert_tx_state_t tx;
83 bert_rx_state_t rx;
84
85 bert_results_t results;
86
87 /*! \brief Error and flow logging control */
88 logging_state_t logging;
89 };
90
91 #endif
92 /*- End of file ------------------------------------------------------------*/

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.