spandsp 3.0.0
private/t38_terminal.h
Go to the documentation of this file.
1/*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * private/t38_terminal.h - T.38 termination, less the packet exchange part
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2005 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
26/*! \file */
27
28#if !defined(_SPANDSP_PRIVATE_T38_TERMINAL_H_)
29#define _SPANDSP_PRIVATE_T38_TERMINAL_H_
30
31typedef struct
32{
33 /*! \brief Core T.38 IFP support */
35
36 /*! \brief The current transmit step being timed */
38
39 /*! \brief The timed step to go to when we reach idle from the current timed step */
41
42 /*! \brief True is there has been some T.38 data missed (i.e. lost packets) in the current
43 reception period. */
45
46 /*! \brief The number of octets to send in each image packet (non-ECM or ECM) at the current
47 rate and the current specified packet interval. */
49
50 struct
51 {
52 /*! \brief HDLC receive buffer */
54 /*! \brief The length of the contents of the HDLC receive buffer */
55 int len;
56 } hdlc_rx;
57
58 struct
59 {
60 /*! \brief HDLC transmit buffer */
61 uint8_t buf[T38_MAX_HDLC_LEN];
62 /*! \brief The length of the contents of the HDLC transmit buffer */
63 int len;
64 /*! \brief Current pointer within the contents of the HDLC transmit buffer */
65 int ptr;
66 /*! \brief The number of extra bits in a fully stuffed version of the
67 contents of the HDLC transmit buffer. This is needed to accurately
68 estimate the playout time for this frame, through an analogue modem. */
70 } hdlc_tx;
71
72 /*! \brief Counter for trailing non-ECM bytes, used to flush out the far end's modem. */
74
75 /*! \brief The next T.38 indicator queued for transmission. */
77 /*! \brief The current T.38 data type being transmitted. */
79
80 /*! \brief True if a carrier is present. Otherwise false. */
82
83 /*! \brief The current operating mode of the receiver. */
85 /*! \brief The current operating mode of the transmitter. */
87
88 /*! \brief Current transmission bit rate. */
90 /*! \brief A "sample" count, used to time events. */
91 span_sample_timer_t samples;
92 /*! \brief The value for samples at the next transmission point. */
93 span_sample_timer_t next_tx_samples;
94 /*! \brief The current transmit timeout. */
95 span_sample_timer_t timeout_tx_samples;
96 /*! \brief The current receive timeout. */
97 span_sample_timer_t timeout_rx_samples;
99
100/*!
101 T.38 terminal state.
102*/
104{
105 /*! \brief The T.30 back-end */
106 t30_state_t t30;
107
108 /*! \brief The T.38 front-end */
110
111 /*! \brief Error and flow logging control */
113};
114
115#endif
116/*- End of file ------------------------------------------------------------*/
struct logging_state_s logging_state_t
Definition logging.h:72
#define T38_MAX_HDLC_LEN
Definition private/t38_gateway.h:34
Definition private/t38_terminal.h:32
bool rx_data_missing
True is there has been some T.38 data missed (i.e. lost packets) in the current reception period.
Definition private/t38_terminal.h:44
int ptr
Current pointer within the contents of the HDLC transmit buffer.
Definition private/t38_terminal.h:65
int non_ecm_trailer_bytes
Counter for trailing non-ECM bytes, used to flush out the far end's modem.
Definition private/t38_terminal.h:73
span_sample_timer_t timeout_tx_samples
The current transmit timeout.
Definition private/t38_terminal.h:95
uint8_t buf[T38_MAX_HDLC_LEN]
HDLC receive buffer.
Definition private/t38_terminal.h:53
t38_core_state_t t38
Core T.38 IFP support.
Definition private/t38_terminal.h:34
int next_tx_indicator
The next T.38 indicator queued for transmission.
Definition private/t38_terminal.h:76
bool rx_signal_present
True if a carrier is present. Otherwise false.
Definition private/t38_terminal.h:81
int octets_per_data_packet
The number of octets to send in each image packet (non-ECM or ECM) at the current rate and the curren...
Definition private/t38_terminal.h:48
int len
The length of the contents of the HDLC receive buffer.
Definition private/t38_terminal.h:55
int queued_timed_step
The timed step to go to when we reach idle from the current timed step.
Definition private/t38_terminal.h:40
int current_tx_type
The current operating mode of the transmitter.
Definition private/t38_terminal.h:86
int tx_bit_rate
Current transmission bit rate.
Definition private/t38_terminal.h:89
int current_tx_data_type
The current T.38 data type being transmitted.
Definition private/t38_terminal.h:78
int current_rx_type
The current operating mode of the receiver.
Definition private/t38_terminal.h:84
span_sample_timer_t timeout_rx_samples
The current receive timeout.
Definition private/t38_terminal.h:97
int extra_bits
The number of extra bits in a fully stuffed version of the contents of the HDLC transmit buffer....
Definition private/t38_terminal.h:69
span_sample_timer_t next_tx_samples
The value for samples at the next transmission point.
Definition private/t38_terminal.h:93
span_sample_timer_t samples
A "sample" count, used to time events.
Definition private/t38_terminal.h:91
int timed_step
The current transmit step being timed.
Definition private/t38_terminal.h:37
Definition private/t38_terminal.h:104
logging_state_t logging
Error and flow logging control.
Definition private/t38_terminal.h:112
t38_terminal_front_end_state_t t38_fe
The T.38 front-end.
Definition private/t38_terminal.h:109
t30_state_t t30
The T.30 back-end.
Definition private/t38_terminal.h:106
struct t38_core_state_s t38_core_state_t
Definition t38_core.h:216