spandsp  0.0.6
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 
31 typedef struct
32 {
33  /*! \brief Internet Aware FAX mode bit mask. */
34  int iaf;
35  /*! \brief Required time between T.38 transmissions, in ms. */
37  /*! \brief Bit fields controlling the way data is packed into chunked for transmission. */
39 
40  /*! \brief Core T.38 IFP support */
42 
43  /*! \brief The current transmit step being timed */
45 
46  /*! \brief TRUE is there has been some T.38 data missed (i.e. lost packets) in the current
47  reception period. */
49 
50  /*! \brief The number of octets to send in each image packet (non-ECM or ECM) at the current
51  rate and the current specified packet interval. */
53 
54  struct
55  {
56  /*! \brief HDLC receive buffer */
57  uint8_t buf[T38_MAX_HDLC_LEN];
58  /*! \brief The length of the contents of the HDLC receive buffer */
59  int len;
60  } hdlc_rx;
61 
62  struct
63  {
64  /*! \brief HDLC transmit buffer */
65  uint8_t buf[T38_MAX_HDLC_LEN];
66  /*! \brief The length of the contents of the HDLC transmit buffer */
67  int len;
68  /*! \brief Current pointer within the contents of the HDLC transmit buffer */
69  int ptr;
70  /*! \brief The number of extra bits in a fully stuffed version of the
71  contents of the HDLC transmit buffer. This is needed to accurately
72  estimate the playout time for this frame, through an analogue modem. */
74  } hdlc_tx;
75 
76  /*! \brief Counter for trailing non-ECM bytes, used to flush out the far end's modem. */
78 
79  /*! \brief The next T.38 indicator queued for transmission. */
81  /*! \brief The current T.38 data type being transmitted. */
83 
84  /*! \brief TRUE if a carrier is present. Otherwise FALSE. */
86 
87  /*! \brief The current operating mode of the receiver. */
89  /*! \brief The current operating mode of the transmitter. */
91 
92  /*! \brief Current transmission bit rate. */
94  /*! \brief A "sample" count, used to time events. */
95  int32_t samples;
96  /*! \brief The value for samples at the next transmission point. */
97  int32_t next_tx_samples;
98  /*! \brief The current transmit timeout. */
99  //int32_t timeout_tx_samples;
100  /*! \brief The current receive timeout. */
103 
104 /*!
105  T.38 terminal state.
106 */
108 {
109  /*! \brief The T.30 back-end */
111 
112  /*! \brief The T.38 front-end */
114 
115  /*! \brief Error and flow logging control */
117 };
118 
119 #endif
120 /*- End of file ------------------------------------------------------------*/
t38_terminal_front_end_state_t t38_fe
The T.38 front-end.
Definition: private/t38_terminal.h:113
Definition: private/t38_terminal.h:107
Definition: private/t30.h:35
int non_ecm_trailer_bytes
Counter for trailing non-ECM bytes, used to flush out the far end&#39;s modem.
Definition: private/t38_terminal.h:77
int next_tx_indicator
The next T.38 indicator queued for transmission.
Definition: private/t38_terminal.h:80
int timed_step
The current transmit step being timed.
Definition: private/t38_terminal.h:44
int ptr
Current pointer within the contents of the HDLC transmit buffer.
Definition: private/t38_terminal.h:69
t30_state_t t30
The T.30 back-end.
Definition: private/t38_terminal.h:110
int ms_per_tx_chunk
Required time between T.38 transmissions, in ms.
Definition: private/t38_terminal.h:36
int32_t samples
A &quot;sample&quot; count, used to time events.
Definition: private/t38_terminal.h:95
t38_core_state_t t38
Core T.38 IFP support.
Definition: private/t38_terminal.h:41
logging_state_t logging
Error and flow logging control.
Definition: private/t38_terminal.h:116
int current_rx_type
The current operating mode of the receiver.
Definition: private/t38_terminal.h:88
int tx_bit_rate
Current transmission bit rate.
Definition: private/t38_terminal.h:93
int 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:48
int iaf
Internet Aware FAX mode bit mask.
Definition: private/t38_terminal.h:34
int current_tx_type
The current operating mode of the transmitter.
Definition: private/t38_terminal.h:90
int current_tx_data_type
The current T.38 data type being transmitted.
Definition: private/t38_terminal.h:82
Definition: private/logging.h:33
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:52
int chunking_modes
Bit fields controlling the way data is packed into chunked for transmission.
Definition: private/t38_terminal.h:38
int rx_signal_present
TRUE if a carrier is present. Otherwise FALSE.
Definition: private/t38_terminal.h:85
#define T38_MAX_HDLC_LEN
Definition: t38_gateway.h:46
int32_t timeout_rx_samples
The current transmit timeout.
Definition: private/t38_terminal.h:101
int32_t next_tx_samples
The value for samples at the next transmission point.
Definition: private/t38_terminal.h:97
Definition: private/t38_core.h:32
int len
The length of the contents of the HDLC receive buffer.
Definition: private/t38_terminal.h:59
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:73
Definition: private/t38_terminal.h:31