26#if !defined(_SPANDSP_PRIVATE_T31_H_)
27#define _SPANDSP_PRIVATE_T31_H_
29#define T31_TX_BUF_LEN (4096)
30#define T31_TX_BUF_HIGH_TIDE (4096 - 1024)
31#define T31_TX_BUF_LOW_TIDE (1024)
33#define T31_MAX_HDLC_LEN 284
35#define T31_T38_MAX_HDLC_LEN 260
37#define T31_TX_HDLC_BUFS 256
45 uint8_t
buf[T31_MAX_HDLC_LEN];
74 void *next_tx_user_data;
120 uint8_t buf[T31_T38_MAX_HDLC_LEN];
170 t31_modem_control_handler_t modem_control_handler;
171 void *modem_control_user_data;
183 uint8_t
buf[T31_MAX_HDLC_LEN];
193 uint8_t buf[T31_TX_BUF_LEN];
219 int64_t dte_data_timeout;
struct fax_modems_state_s fax_modems_state_t
Definition fax_modems.h:59
struct hdlc_rx_state_s hdlc_rx_state_t
Definition hdlc.h:54
struct hdlc_tx_state_s hdlc_tx_state_t
Definition hdlc.h:77
struct logging_state_s logging_state_t
Definition logging.h:72
struct queue_state_s queue_state_t
Definition queue.h:54
Definition private/t31.h:68
int32_t silence_threshold_power
The current silence threshold.
Definition private/t31.h:86
int16_t last_sample
Last sample, used for an elementary HPF for the power meter.
Definition private/t31.h:84
int bit_no
No of data bits in current_byte.
Definition private/t31.h:77
span_tx_handler_t next_tx_handler
Definition private/t31.h:73
int silence_heard
Samples of silence heard.
Definition private/t31.h:89
int current_byte
The current data byte in progress.
Definition private/t31.h:79
power_meter_t rx_power
Rx power meter, used to detect silence.
Definition private/t31.h:82
Definition private/t31.h:43
uint8_t buf[284]
HDLC message buffers.
Definition private/t31.h:45
int16_t len
HDLC message lengths.
Definition private/t31.h:47
Definition private/t31.h:54
int out
HDLC buffer number for output.
Definition private/t31.h:60
t31_hdlc_buf_t buf[256]
HDLC message buffers.
Definition private/t31.h:56
int in
HDLC buffer number for input.
Definition private/t31.h:58
Definition private/t31.h:168
struct t31_state_s::@004043224223272374311162132031145264065275035053 non_ecm_tx
bool rx_frame_received
True if a valid HDLC frame has been received in the current reception period.
Definition private/t31.h:215
logging_state_t logging
Error and flow logging control.
Definition private/t31.h:228
int bit_rate
The current bit rate for the FAX fast message transfer modem.
Definition private/t31.h:213
int out_bytes
The number of bytes sent from the transmit buffer.
Definition private/t31.h:197
int in_bytes
The number of bytes stored in the transmit buffer.
Definition private/t31.h:195
int64_t call_samples
Samples elapsed in the current call.
Definition private/t31.h:218
int silence_awaited
Samples of silence awaited, as specified in a "wait for silence" command.
Definition private/t31.h:210
bool t38_mode
Definition private/t31.h:177
bool short_train
True when short training mode has been selected by the computer.
Definition private/t31.h:224
int modem
The currently queued modem type.
Definition private/t31.h:222
bool holding
True if holding up further data into the buffer, for flow control.
Definition private/t31.h:201
bool data_started
True if the flow of real data has started.
Definition private/t31.h:199
bool dled
Definition private/t31.h:207
uint8_t buf[284]
The HDLC transmit buffer.
Definition private/t31.h:183
struct t31_state_s::@333231200000143107102243156176173022017025240076 hdlc_tx
Definition private/t31.h:97
hdlc_rx_state_t hdlc_rx_non_ecm
An HDLC context used when receiving HDLC messages from the terminal port. as if it were non-ECM data ...
Definition private/t31.h:116
int timed_step
The current transmit step being timed.
Definition private/t31.h:102
int non_ecm_trailer_bytes
Counter for trailing non-ECM bytes, used to flush out the far end's modem.
Definition private/t31.h:139
int current_tx_type
The current operating mode of the transmitter.
Definition private/t31.h:149
int ecm_mode
True if we are using ECM mode. This is used to select HDLC faking, which is necessary with clunky cla...
Definition private/t31.h:136
int current_tx_data_type
The current T.38 data type being transmitted.
Definition private/t31.h:144
bool rx_data_missing
True is there has been some T.38 data missed.
Definition private/t31.h:105
int next_tx_indicator
The next queued tramsit indicator.
Definition private/t31.h:142
t38_core_state_t t38
Core T.38 IFP support.
Definition private/t31.h:99
int current_rx_type
The current operating mode of the receiver.
Definition private/t31.h:147
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/t31.h:109
int tx_bit_rate
Current transmission bit rate.
Definition private/t31.h:152
int extra_bits
The number of extra bits in a fully stuffed version of the contents of the HDLC transmit buffer....
Definition private/t31.h:129
span_sample_timer_t timeout_rx_samples
The current receive timeout.
Definition private/t31.h:160
span_sample_timer_t next_tx_samples
The value for samples at the next transmission point.
Definition private/t31.h:156
span_sample_timer_t timeout_tx_samples
The current transmit timeout.
Definition private/t31.h:158
hdlc_tx_state_t hdlc_tx_non_ecm
An HDLC context used when sending HDLC messages to the terminal port as if it were non-ECM data (ECM ...
Definition private/t31.h:113
span_sample_timer_t samples
A "sample" count, used to time events.
Definition private/t31.h:154
struct t38_core_state_s t38_core_state_t
Definition t38_core.h:216