spandsp  0.0.6
private/t30.h
Go to the documentation of this file.
1 /*
2  * SpanDSP - a series of DSP components for telephony
3  *
4  * private/t30.h - definitions for T.30 fax processing
5  *
6  * Written by Steve Underwood <steveu@coppice.org>
7  *
8  * Copyright (C) 2003 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_T30_H_)
29 #define _SPANDSP_PRIVATE_T30_H_
30 
31 /*!
32  T.30 FAX channel descriptor. This defines the state of a single working
33  instance of a T.30 FAX channel.
34 */
36 {
37  /*! \brief T.4 context for reading or writing image data. */
38  union
39  {
40  t4_rx_state_t rx;
41  t4_tx_state_t tx;
42  } t4;
43  /*! \brief The type of FAX operation currently in progress */
45 
46  /*! \brief True if behaving as the calling party */
48 
49  /*! \brief Internet aware FAX mode bit mask. */
50  int iaf;
51  /*! \brief A bit mask of the currently supported modem types. */
53  /*! \brief A bit mask of the currently supported image compression modes. */
55  /*! \brief A bit mask of the currently supported image resolutions. */
57  /*! \brief A bit mask of the currently supported image sizes. */
59  /*! \brief A bit mask of the currently supported T.30 special features. */
61  /*! \brief True is ECM mode handling is enabled. */
63  /*! \brief True if we are capable of retransmitting pages */
65 
66  /*! \brief The received DCS, formatted as an ASCII string, for inclusion
67  in the TIFF file. */
69  /*! \brief The text which will be used in FAX page header. No text results
70  in no header line. */
72  /*! \brief True for FAX page headers to overlay (i.e. replace) the beginning of the
73  page image. False for FAX page headers to add to the overall length of
74  the page. */
76  /*! \brief Use private timezone if true */
78  /*! \brief Optional per instance time zone for the FAX page header timestamp. */
80 
81  /*! \brief True if remote T.30 procedural interrupts are allowed. */
83 
84  /*! \brief The information fields received. */
86  /*! \brief The information fields to be transmitted. */
88  /*! \brief The country of origin of the remote machine, if known, else NULL. */
89  const char *country;
90  /*! \brief The vendor of the remote machine, if known, else NULL. */
91  const char *vendor;
92  /*! \brief The model of the remote machine, if known, else NULL. */
93  const char *model;
94 
95  /*! \brief A pointer to a callback routine to be called when phase B events
96  occur. */
98  /*! \brief An opaque pointer supplied in event B callbacks. */
100  /*! \brief A pointer to a callback routine to be called when phase D events
101  occur. */
103  /*! \brief An opaque pointer supplied in event D callbacks. */
105  /*! \brief A pointer to a callback routine to be called when phase E events
106  occur. */
108  /*! \brief An opaque pointer supplied in event E callbacks. */
110  /*! \brief A pointer to a callback routine to be called when frames are
111  exchanged. */
113  /*! \brief An opaque pointer supplied in real time frame callbacks. */
115 
116  /*! \brief A pointer to a callback routine to be called when document events
117  (e.g. end of transmitted document) occur. */
119  /*! \brief An opaque pointer supplied in document callbacks. */
121 
122  /*! \brief The handler for changes to the receive mode */
124  /*! \brief An opaque pointer passed to the handler for changes to the receive mode */
126  /*! \brief The handler for changes to the transmit mode */
128  /*! \brief An opaque pointer passed to the handler for changes to the transmit mode */
130 
131  /*! \brief The transmitted HDLC frame handler. */
133  /*! \brief An opaque pointer passed to the transmitted HDLC frame handler. */
135 
136  /*! \brief The DIS code for the minimum scan row time we require. This is usually 0ms,
137  but if we are trying to simulate another type of FAX machine, we may need a non-zero
138  value here. */
140 
141  /*! \brief The current T.30 phase. */
142  int phase;
143  /*! \brief The T.30 phase to change to when the current phase ends. */
145  /*! \brief The current state of the T.30 state machine. */
146  int state;
147  /*! \brief The step in sending a sequence of HDLC frames. */
148  int step;
149 
150  /*! \brief The preparation buffer for the DCS message to be transmitted. */
152  /*! \brief The length of the DCS message to be transmitted. */
153  int dcs_len;
154  /*! \brief The preparation buffer for DIS or DTC message to be transmitted. */
156  /*! \brief The length of the DIS or DTC message to be transmitted. */
158  /*! \brief The last DIS or DTC message received form the far end. */
160  /*! \brief The length of the last DIS or DTC message received form the far end. */
162  /*! \brief True if a valid DIS has been received from the far end. */
164 
165  /*! \brief True if the short training sequence should be used. */
167 
168  /*! \brief True if an image carrier appears to have been received, even if it did not successfully
169  train. */
171 
172  /*! \brief A count of the number of bits in the trainability test. This counts down to zero when
173  sending TCF, and counts up when receiving it. */
175  /*! \brief The current count of consecutive received zero bits, during the trainability test. */
177  /*! \brief The maximum consecutive received zero bits seen to date, during the trainability test. */
179 
180  /*! \brief The current fallback step for the fast message transfer modem. */
182  /*! \brief The subset of supported modems allowed at the current time, allowing for negotiation. */
184  /*! \brief True if a carrier is present. Otherwise false. */
186  /*! \brief True if a modem has trained correctly. */
188  /*! \brief True if a valid HDLC frame has been received in the current reception period. */
190 
191  /*! \brief Current reception mode. */
193  /*! \brief Current transmission mode. */
195 
196  /*! \brief T0 is the answer timeout when calling another FAX machine.
197  Placing calls is handled outside the FAX processing, but this timeout keeps
198  running until V.21 modulation is sent or received.
199  T1 is the remote terminal identification timeout (in audio samples). */
201  /*! \brief T2, T2A and T2B are the HDLC command timeouts.
202  T4, T4A and T4B are the HDLC response timeouts (in audio samples). */
204  /*! \brief A value specifying which of the possible timers is currently running in timer_t2_t4 */
206  /*! \brief Procedural interrupt timeout (in audio samples). */
207  int timer_t3;
208  /*! \brief This is only used in error correcting mode. */
209  int timer_t5;
210  /*! \brief This is only used in full duplex (e.g. ISDN) modes. */
211  int timer_t6;
212  /*! \brief This is only used in full duplex (e.g. ISDN) modes. */
213  int timer_t7;
214  /*! \brief This is only used in full duplex (e.g. ISDN) modes. */
215  int timer_t8;
216 
217  /*! \brief True once the far end FAX entity has been detected. */
219 
220  /*! \brief True once the end of procedure condition has been detected. */
222 
223  /*! \brief True if a local T.30 interrupt is pending. */
225  /*! \brief The image coding being used on the line. */
227  /*! \brief The image coding being used for output files. */
229  /*! \brief The current DCS message minimum scan time code. */
231  /*! \brief The X direction resolution of the current image, in pixels per metre. */
233  /*! \brief The Y direction resolution of the current image, in pixels per metre. */
235  /*! \brief The width of the current image, in pixels. */
237  /*! \brief Current number of retries of the action in progress. */
238  int retries;
239  /*! \brief True if error correcting mode is used. */
241  /*! \brief The number of HDLC frame retries, if error correcting mode is used. */
243  /*! \brief The current count of consecutive T30_PPR messages. */
245  /*! \brief The current count of consecutive T30_RNR messages. */
247  /*! \brief The number of octets to be used per ECM frame. */
249  /*! \brief The ECM partial page buffer. */
250  uint8_t ecm_data[256][260];
251  /*! \brief The lengths of the frames in the ECM partial page buffer. */
252  int16_t ecm_len[256];
253  /*! \brief A bit map of the OK ECM frames, constructed as a PPR frame. */
254  uint8_t ecm_frame_map[3 + 32];
255 
256  /*! \brief The current page number for receiving, in ECM or non-ECM mode. This is reset at the start of a call. */
258  /*! \brief The current page number for sending, in ECM or non-ECM mode. This is reset at the start of a call. */
260  /*! \brief The current block number, in ECM mode */
262  /*! \brief The number of frames in the current block number, in ECM mode */
264  /*! \brief The number of frames sent in the current burst of image transmission, in ECM mode */
266  /*! \brief The current ECM frame, during ECM transmission. */
268  /*! \brief True if we are at the end of an ECM page to se sent - i.e. there are no more
269  partial pages still to come. */
271 
272  /*! \brief The last result for a received non-ECM page - T30_MPS, T30_RTP, or T30_RTN. */
274 
275  /*! \brief The transmission step queued to follow the one in progress. */
277  /*! \brief The FCF for the next receive step. */
278  uint8_t next_rx_step;
279  /*! \brief Image file name for image reception. */
280  char rx_file[256];
281  /*! \brief The last page we are prepared accept for a received image file. -1 means no restriction. */
283  /*! \brief Image file name to be sent. */
284  char tx_file[256];
285  /*! \brief The first page to be sent from the image file. -1 means no restriction. */
287  /*! \brief The last page to be sent from the image file. -1 means no restriction. */
289  /*! \brief The current completion status. */
291 
292  /*! \brief the FCF2 field of the last PPS message we received. */
293  uint8_t last_pps_fcf2;
294  /*! \brief True if all frames of the current received ECM block are now OK */
296  /*! \brief A count of successfully received ECM frames, to assess progress as a basis for
297  deciding whether to continue error correction when PPRs keep repeating. */
299 
300  /*! \brief The number of RTP events */
302  /*! \brief The number of RTN events */
304 
305  /*! \brief Error and flow logging control */
307 };
308 
309 #endif
310 /*- End of file ------------------------------------------------------------*/
t30_state_s::ecm_progress
int ecm_progress
A count of successfully received ECM frames, to assess progress as a basis for deciding whether to co...
Definition: private/t30.h:298
t30_state_s::image_carrier_attempted
int image_carrier_attempted
True if an image carrier appears to have been received, even if it did not successfully train.
Definition: private/t30.h:170
T30_ERR_RX_T2EXPMPS
@ T30_ERR_RX_T2EXPMPS
Definition: t30.h:269
t30_state_s::timer_t2_t4_is
int timer_t2_t4_is
A value specifying which of the possible timers is currently running in timer_t2_t4.
Definition: private/t30.h:205
t30_state_s::retries
int retries
Current number of retries of the action in progress.
Definition: private/t30.h:238
t30_exchanged_info_t::nsf
uint8_t * nsf
Non-standard facilities (NSF).
Definition: t30.h:488
t30_terminate
void t30_terminate(t30_state_t *s)
Cleanup a T.30 context if the call terminates.
Definition: t30.c:6196
t30_state_s::octets_per_ecm_frame
int octets_per_ecm_frame
The number of octets to be used per ECM frame.
Definition: private/t30.h:248
T30_ERR_CANNOT_TRAIN
@ T30_ERR_CANNOT_TRAIN
Definition: t30.h:239
t30_state_s::error_correcting_mode_retries
int error_correcting_mode_retries
The number of HDLC frame retries, if error correcting mode is used.
Definition: private/t30.h:242
t4_stats_t
Definition: t4_rx.h:212
T30_SUPPORT_POLLED_SUB_ADDRESSING
@ T30_SUPPORT_POLLED_SUB_ADDRESSING
Definition: t30.h:431
t4_rx_set_sub_address
void t4_rx_set_sub_address(t4_rx_state_t *s, const char *sub_address)
Set the sub-address of the fax, for inclusion in the file.
Definition: t4_rx.c:1109
T30_CSA
@ T30_CSA
Definition: t30_fcf.h:69
t30_state_s::model
const char * model
The model of the remote machine, if known, else NULL.
Definition: private/t30.h:93
T30_ERR_UNEXPECTED
@ T30_ERR_UNEXPECTED
Definition: t30.h:246
T30_TSI
@ T30_TSI
Definition: t30_fcf.h:55
t30_state_s::timer_t0_t1
int timer_t0_t1
T0 is the answer timeout when calling another FAX machine. Placing calls is handled outside the FAX p...
Definition: private/t30.h:200
T30_SUPPORT_MULTIPLE_SELECTIVE_POLLING
@ T30_SUPPORT_MULTIPLE_SELECTIVE_POLLING
Definition: t30.h:433
T30_ERR_TX_BADPG
@ T30_ERR_TX_BADPG
Definition: t30.h:250
t30_init
t30_state_t * t30_init(t30_state_t *s, int calling_party, t30_set_handler_t *set_rx_type_handler, void *set_rx_type_user_data, t30_set_handler_t *set_tx_type_handler, void *set_tx_type_user_data, t30_send_hdlc_handler_t *send_hdlc_handler, void *send_hdlc_user_data)
Initialise a T.30 context.
Definition: t30.c:6327
T30_EOS
@ T30_EOS
Definition: t30_fcf.h:78
t4_tx_start_page
int t4_tx_start_page(t4_tx_state_t *s)
Prepare to send the next page of the current document.
Definition: t4_tx.c:1221
t30_state_s::calling_party
int calling_party
True if behaving as the calling party.
Definition: private/t30.h:47
t30_exchanged_info_t::sub_address
char sub_address[20+1]
The sub-address string (SUB).
Definition: t30.h:478
T30_ERR_RX_T2EXPRR
@ T30_ERR_RX_T2EXPRR
Definition: t30.h:270
t30_call_active
int t30_call_active(t30_state_t *s)
Check if a T.30 call is still active.
Definition: t30.c:6385
T30_DCS
@ T30_DCS
Definition: t30_fcf.h:54
t30_stats_t::bit_rate
int bit_rate
The current bit rate for image transfer.
Definition: t30.h:521
t4_tx.h
T30_CSI
@ T30_CSI
Definition: t30_fcf.h:36
tone_generate.h
t30_dis_dtc_dcs_bits.h
t30_state_s::rtn_events
int rtn_events
The number of RTN events.
Definition: private/t30.h:303
t30_phase_b_handler_t
int() t30_phase_b_handler_t(t30_state_t *s, void *user_data, int result)
T.30 phase B callback handler.
Definition: t30.h:161
t30_state_s::ecm_block
int ecm_block
The current block number, in ECM mode.
Definition: private/t30.h:261
T30_ERR_NOSIZESUPPORT
@ T30_ERR_NOSIZESUPPORT
Definition: t30.h:245
T30_ERR_RETRYDCN
@ T30_ERR_RETRYDCN
Definition: t30.h:289
T4_FCD
@ T4_FCD
Definition: t30_fcf.h:116
t30_non_ecm_put_chunk
void t30_non_ecm_put_chunk(void *user_data, const uint8_t buf[], int len)
Process a chunk of received non-ECM image data.
Definition: t30.c:5498
T30_MAX_PAGE_HEADER_INFO
#define T30_MAX_PAGE_HEADER_INFO
Definition: t30.h:146
T30_SUPPORT_FIELD_NOT_VALID
@ T30_SUPPORT_FIELD_NOT_VALID
Definition: t30.h:447
t30_state_s::timer_t8
int timer_t8
This is only used in full duplex (e.g. ISDN) modes.
Definition: private/t30.h:215
T30_SUPPORT_T85_L0_COMPRESSION
@ T30_SUPPORT_T85_L0_COMPRESSION
Definition: t30.h:366
T30_SUPPORT_T6_COMPRESSION
@ T30_SUPPORT_T6_COMPRESSION
Definition: t30.h:362
t30_state_s::phase_e_user_data
void * phase_e_user_data
An opaque pointer supplied in event E callbacks.
Definition: private/t30.h:109
t30_state_s::rx_page_number
int rx_page_number
The current page number for receiving, in ECM or non-ECM mode. This is reset at the start of a call.
Definition: private/t30.h:257
t30_state_s::rx_ecm_block_ok
int rx_ecm_block_ok
True if all frames of the current received ECM block are now OK.
Definition: private/t30.h:295
FINAL_FLUSH_TIME
#define FINAL_FLUSH_TIME
Definition: t30.c:372
T30_FRONT_END_RECEIVE_COMPLETE
@ T30_FRONT_END_RECEIVE_COMPLETE
Definition: t30.h:332
T30_PWD
@ T30_PWD
Definition: t30_fcf.h:45
t30_exchanged_info_t::ident
char ident[20+1]
The identifier string (CSI, TSI, CIG).
Definition: t30.h:476
t4_tx_get_chunk
int t4_tx_get_chunk(t4_tx_state_t *s, uint8_t buf[], int max_len)
Get the next chunk of the current document page. The document will be padded for the current minimum ...
Definition: t4_tx.c:1386
T30_EOM
@ T30_EOM
Definition: t30_fcf.h:72
test_ctrl_bit
#define test_ctrl_bit(s, bit)
Definition: t30.c:449
T30_SUPPORT_T43_COMPRESSION
@ T30_SUPPORT_T43_COMPRESSION
Definition: t30.h:368
t30_logging.h
t30_completion_code_to_str
const char * t30_completion_code_to_str(int result)
Convert a phase E completion code to a short text description.
Definition: t30_logging.c:108
T30_SUPPORT_600_1200_RESOLUTION
@ T30_SUPPORT_600_1200_RESOLUTION
Definition: t30.h:408
span_log_test
int span_log_test(logging_state_t *s, int level)
Test if logging of a specified severity level is enabled.
Definition: logging.c:76
t4_tx_restart_page
int t4_tx_restart_page(t4_tx_state_t *s)
Prepare the current page for a resend.
Definition: t4_tx.c:1347
T30_SUPPORT_300_300_RESOLUTION
@ T30_SUPPORT_300_300_RESOLUTION
Definition: t30.h:396
T30_ERR_RX_DCNNORTN
@ T30_ERR_RX_DCNNORTN
Definition: t30.h:277
DEFAULT_TIMER_T5
#define DEFAULT_TIMER_T5
Definition: t30.c:351
T4_COMPRESSION_ITU_T85_L0
@ T4_COMPRESSION_ITU_T85_L0
Definition: t4_rx.h:62
T30_PPS
@ T30_PPS
Definition: t30_fcf.h:79
t30_stats_t::error_correcting_mode_retries
int error_correcting_mode_retries
The number of HDLC frame retries, if error correcting mode is used.
Definition: t30.h:547
SIG_STATUS_ABORT
@ SIG_STATUS_ABORT
An abort signal (e.g. an HDLC abort) has been received.
Definition: async.h:73
T30_MCF
@ T30_MCF
Definition: t30_fcf.h:84
t30_state_s::y_resolution
int y_resolution
The Y direction resolution of the current image, in pixels per metre.
Definition: private/t30.h:234
t30_stats_t::x_resolution
int x_resolution
The horizontal column-to-column resolution of the most recent page, in pixels per metre.
Definition: t30.h:531
t30_state_s::phase_b_user_data
void * phase_b_user_data
An opaque pointer supplied in event B callbacks.
Definition: private/t30.h:99
T30_ERR_RX_DCNRRD
@ T30_ERR_RX_DCNRRD
Definition: t30.h:276
T30_CIA
@ T30_CIA
Definition: t30_fcf.h:48
T30_PSA
@ T30_PSA
Definition: t30_fcf.h:47
t30_decode_dis_dtc_dcs
void t30_decode_dis_dtc_dcs(t30_state_t *s, const uint8_t *dis, int len)
Decode a DIS, DTC or DCS frame, and log the contents.
Definition: t30_logging.c:506
T30_IRA
@ T30_IRA
Definition: t30_fcf.h:62
t30_state_s::step
int step
The step in sending a sequence of HDLC frames.
Definition: private/t30.h:148
t4_stats_t::bad_rows
int bad_rows
The number of bad pixel rows in the most recent page.
Definition: t4_rx.h:223
SIG_STATUS_CARRIER_UP
@ SIG_STATUS_CARRIER_UP
The carrier signal is up. This merely indicates that carrier energy has been seen....
Definition: async.h:58
t30_state_s::dcs_len
int dcs_len
The length of the DCS message to be transmitted.
Definition: private/t30.h:153
t4_rx_get_transfer_statistics
void t4_rx_get_transfer_statistics(t4_rx_state_t *s, t4_stats_t *t)
Get the current transfer statistics.
Definition: t4_rx.c:1133
T30_ERR_TX_PHDDEAD
@ T30_ERR_TX_PHDDEAD
Definition: t30.h:256
async.h
power_meter_current_dbm0
float power_meter_current_dbm0(power_meter_t *s)
Get the current power meter reading, in dBm0.
Definition: power_meter.c:120
hdlc.h
t30_state_s::last_pps_fcf2
uint8_t last_pps_fcf2
the FCF2 field of the last PPS message we received.
Definition: private/t30.h:293
t30_state_s::set_rx_type_user_data
void * set_rx_type_user_data
An opaque pointer passed to the handler for changes to the receive mode.
Definition: private/t30.h:125
T30_ERR_TX_ECMPHD
@ T30_ERR_TX_ECMPHD
Definition: t30.h:251
t30_stats_t
Definition: t30.h:518
SIG_STATUS_TRAINING_IN_PROGRESS
@ SIG_STATUS_TRAINING_IN_PROGRESS
The modem is training. This is an early indication that the signal seems to be of the right type....
Definition: async.h:63
DEFAULT_TIMER_T2A
#define DEFAULT_TIMER_T2A
Definition: t30.c:307
t30.h
T30_CIG
@ T30_CIG
Definition: t30_fcf.h:43
t4_tx_next_page_has_different_format
int t4_tx_next_page_has_different_format(t4_tx_state_t *s)
Check for the existance of the next page, and whether its format is like the current one....
Definition: t4_tx.c:1328
t30_exchanged_info_t::sender_ident
char sender_ident[20+1]
The sender identification (SID).
Definition: t30.h:484
t30_state_s::supported_compressions
int supported_compressions
A bit mask of the currently supported image compression modes.
Definition: private/t30.h:54
t35_decode
int t35_decode(const uint8_t *msg, int len, const char **country, const char **vendor, const char **model)
Decode an NSF field.
Definition: t35.c:909
T4_RCP
@ T4_RCP
Definition: t30_fcf.h:117
t30_state_s::tx_page_number
int tx_page_number
The current page number for sending, in ECM or non-ECM mode. This is reset at the start of a call.
Definition: private/t30.h:259
DEFAULT_TIMER_T1
#define DEFAULT_TIMER_T1
Definition: t30.c:295
T30_SUPPORT_COMMAND_REPEAT
@ T30_SUPPORT_COMMAND_REPEAT
Definition: t30.h:449
t30_state_s::vendor
const char * vendor
The vendor of the remote machine, if known, else NULL.
Definition: private/t30.h:91
t4_rx.h
t30_state_s::ecm_allowed
int ecm_allowed
True is ECM mode handling is enabled.
Definition: private/t30.h:62
t30_non_ecm_get_chunk
int t30_non_ecm_get_chunk(void *user_data, uint8_t buf[], int max_len)
Get a bit of received non-ECM image data.
Definition: t30.c:5608
T30_IAF_MODE_CONTINUOUS_FLOW
@ T30_IAF_MODE_CONTINUOUS_FLOW
Definition: t30.h:459
T30_ERR_TX_GOTDCN
@ T30_ERR_TX_GOTDCN
Definition: t30.h:252
t30_state_s::send_hdlc_handler
t30_send_hdlc_handler_t * send_hdlc_handler
The transmitted HDLC frame handler.
Definition: private/t30.h:132
T4_COMPRESSION_ITU_T85
@ T4_COMPRESSION_ITU_T85
Definition: t4_rx.h:60
t30_state_s::real_time_frame_user_data
void * real_time_frame_user_data
An opaque pointer supplied in real time frame callbacks.
Definition: private/t30.h:114
T30_SUB
@ T30_SUB
Definition: t30_fcf.h:57
T4_COMPRESSION_ITU_T4_2D
@ T4_COMPRESSION_ITU_T4_2D
Definition: t4_rx.h:56
stdbool.h
t30_state_s::tx_file
char tx_file[256]
Image file name to be sent.
Definition: private/t30.h:284
t30_state_s::rx_dcs_string
char rx_dcs_string[T30_MAX_DIS_DTC_DCS_LEN *3+1]
The received DCS, formatted as an ASCII string, for inclusion in the TIFF file.
Definition: private/t30.h:68
t30_frametype
const char * t30_frametype(uint8_t x)
Return a text name for a T.30 frame type.
Definition: t30_logging.c:241
T30_PIP
@ T30_PIP
Definition: t30_fcf.h:87
t30_state_s::document_user_data
void * document_user_data
An opaque pointer supplied in document callbacks.
Definition: private/t30.h:120
T30_V17_FALLBACK_START
#define T30_V17_FALLBACK_START
Definition: t30.c:400
t30_state_s::short_train
int short_train
True if the short training sequence should be used.
Definition: private/t30.h:166
t30_restart
int t30_restart(t30_state_t *s)
Restart a T.30 context.
Definition: t30.c:6287
t4_tx_set_tx_encoding
void t4_tx_set_tx_encoding(t4_tx_state_t *s, int encoding)
Set the encoding for the encoded data.
Definition: t4_tx.c:1409
power_meter_update
int32_t power_meter_update(power_meter_t *s, int16_t amp)
Update a power meter.
Definition: power_meter.c:84
v27ter_tx.h
PPR_LIMIT_BEFORE_CTC_OR_EOR
#define PPR_LIMIT_BEFORE_CTC_OR_EOR
Definition: t30.c:377
t30_stats_t::y_resolution
int y_resolution
The vertical row-to-row resolution of the most recent page, in pixels per metre.
Definition: t30.h:533
T30_ISP
@ T30_ISP
Definition: t30_fcf.h:49
T30_SUPPORT_INTERNET_ROUTING_ADDRESS
@ T30_SUPPORT_INTERNET_ROUTING_ADDRESS
Definition: t30.h:439
T30_NSS
@ T30_NSS
Definition: t30_fcf.h:56
t30_state_s::tx_info
t30_exchanged_info_t tx_info
The information fields to be transmitted.
Definition: private/t30.h:87
t30_state_s::document_handler
t30_document_handler_t * document_handler
A pointer to a callback routine to be called when document events (e.g. end of transmitted document) ...
Definition: private/t30.h:118
t4_rx_start_page
int t4_rx_start_page(t4_rx_state_t *s)
Prepare to receive the next page of the current document.
Definition: t4_rx.c:1010
SIG_STATUS_FRAMING_OK
@ SIG_STATUS_FRAMING_OK
Packet framing (e.g. HDLC framing) is OK.
Definition: async.h:69
t30_state_s::header_overlays_image
int header_overlays_image
True for FAX page headers to overlay (i.e. replace) the beginning of the page image....
Definition: private/t30.h:75
t30_state_s::tx_stop_page
int tx_stop_page
The last page to be sent from the image file. -1 means no restriction.
Definition: private/t30.h:288
t30_state_s::ppr_count
int ppr_count
The current count of consecutive T30_PPR messages.
Definition: private/t30.h:244
t30.h
t30_real_time_frame_handler_t
void() t30_real_time_frame_handler_t(t30_state_t *s, void *user_data, int direction, const uint8_t msg[], int len)
T.30 real time frame handler.
Definition: t30.h:191
t4_rx_set_x_resolution
void t4_rx_set_x_resolution(t4_rx_state_t *s, int resolution)
Set the column-to-column (x) resolution to expect for a received image.
Definition: t4_rx.c:1097
t30_state_s::phase_e_handler
t30_phase_e_handler_t * phase_e_handler
A pointer to a callback routine to be called when phase E events occur.
Definition: private/t30.h:107
t30_state_s::timer_t3
int timer_t3
Procedural interrupt timeout (in audio samples).
Definition: private/t30.h:207
t30_non_ecm_get_byte
int t30_non_ecm_get_byte(void *user_data)
Get a byte of received non-ECM image data.
Definition: t30.c:5573
t30_state_s::next_phase
int next_phase
The T.30 phase to change to when the current phase ends.
Definition: private/t30.h:144
set_ctrl_bits
#define set_ctrl_bits(s, val, bit)
Definition: t30.c:453
signal_status_to_str
const char * signal_status_to_str(int status)
Convert a signal status to a short text description.
Definition: async.c:42
t30_document_handler_t
int() t30_document_handler_t(t30_state_t *s, void *user_data, int status)
T.30 document handler.
Definition: t30.h:204
DEFAULT_TIMER_T4
#define DEFAULT_TIMER_T4
Definition: t30.c:330
SPAN_DECLARE_NONSTD
SPAN_DECLARE_NONSTD(int) async_tx_get_bit(void *user_data)
Get the next bit of a transmitted serial bit stream.
T30_IAF_MODE_NO_TCF
@ T30_IAF_MODE_NO_TCF
Definition: t30.h:462
DEFAULT_TIMER_T4A
#define DEFAULT_TIMER_T4A
Definition: t30.c:336
T30_SUPPORT_SUB_ADDRESSING
@ T30_SUPPORT_SUB_ADDRESSING
Definition: t30.h:435
T30_SUPPORT_SELECTIVE_POLLING
@ T30_SUPPORT_SELECTIVE_POLLING
Definition: t30.h:429
timezone.h
t4_stats_t::pages_transferred
int pages_transferred
The number of pages transferred so far.
Definition: t4_rx.h:215
t30_stats_t::encoding
int encoding
The type of compression used between the FAX machines.
Definition: t30.h:541
t4_tx_set_local_ident
void t4_tx_set_local_ident(t4_tx_state_t *s, const char *ident)
Set the identity of the local machine, for inclusion in page headers.
Definition: t4_tx.c:1423
t30_state_s::last_rx_page_result
int last_rx_page_result
The last result for a received non-ECM page - T30_MPS, T30_RTP, or T30_RTN.
Definition: private/t30.h:273
power_meter_t
Definition: power_meter.h:48
t30_api.h
T30_DTC
@ T30_DTC
Definition: t30_fcf.h:42
complex.h
t4_image_width_t
t4_image_width_t
Definition: t4_rx.h:124
t30_state_s::next_tx_step
int next_tx_step
The transmission step queued to follow the one in progress.
Definition: private/t30.h:276
T30_ERR_RX_T2EXPD
@ T30_ERR_RX_T2EXPD
Definition: t30.h:267
T30_SUPPORT_SYCC_T81_COMPRESSION
@ T30_SUPPORT_SYCC_T81_COMPRESSION
Definition: t30.h:374
t30_state_s::t4
union t30_state_s::@57 t4
T.4 context for reading or writing image data.
t4_stats_t::length
int length
The number of vertical pixels in the most recent page.
Definition: t4_rx.h:221
set_ctrl_bit
#define set_ctrl_bit(s, bit)
Definition: t30.c:451
T30_ERR_RX_INCAPABLE
@ T30_ERR_RX_INCAPABLE
Definition: t30.h:242
T30_ERR_TX_NODIS
@ T30_ERR_TX_NODIS
Definition: t30.h:254
DEFAULT_TIMER_T2
#define DEFAULT_TIMER_T2
Definition: t30.c:302
T30_MPS
@ T30_MPS
Definition: t30_fcf.h:73
t4_tx_init
t4_tx_state_t * t4_tx_init(t4_tx_state_t *s, const char *file, int start_page, int stop_page)
Prepare for transmission of a document.
Definition: t4_tx.c:1493
T30_ERR
@ T30_ERR
Definition: t30_fcf.h:91
t30_state_s::ecm_data
uint8_t ecm_data[256][260]
The ECM partial page buffer.
Definition: private/t30.h:250
t30_state_s::min_scan_time_code
uint8_t min_scan_time_code
The current DCS message minimum scan time code.
Definition: private/t30.h:230
t30_state_s::timer_t5
int timer_t5
This is only used in error correcting mode.
Definition: private/t30.h:209
t30_state_s::header_info
char header_info[T30_MAX_PAGE_HEADER_INFO+1]
The text which will be used in FAX page header. No text results in no header line.
Definition: private/t30.h:71
t4_rx_put_byte
int t4_rx_put_byte(t4_rx_state_t *s, uint8_t byte)
Put a byte of the current document page.
Definition: t4_rx.c:981
t30_state_s::far_dis_dtc_frame
uint8_t far_dis_dtc_frame[T30_MAX_DIS_DTC_DCS_LEN]
The last DIS or DTC message received form the far end.
Definition: private/t30.h:159
t30_timer_update
void t30_timer_update(t30_state_t *s, int samples)
Report the passage of time to the T.30 engine.
Definition: t30.c:6127
t4_stats_t::width
int width
The number of horizontal pixels in the most recent page.
Definition: t4_rx.h:219
t30_state_s::ecm_frames_this_tx_burst
int ecm_frames_this_tx_burst
The number of frames sent in the current burst of image transmission, in ECM mode.
Definition: private/t30.h:265
T30_FTT
@ T30_FTT
Definition: t30_fcf.h:67
DEFAULT_TIMER_T0
#define DEFAULT_TIMER_T0
Definition: t30.c:283
T30_ERR_INCOMPATIBLE
@ T30_ERR_INCOMPATIBLE
Definition: t30.h:241
t30_state_s::timer_t2_t4
int timer_t2_t4
T2, T2A and T2B are the HDLC command timeouts. T4, T4A and T4B are the HDLC response timeouts (in aud...
Definition: private/t30.h:203
t30_stats_t::error_correcting_mode
int error_correcting_mode
TRUE if error correcting mode is used.
Definition: t30.h:523
T30_ERR_RX_DCNWHY
@ T30_ERR_RX_DCNWHY
Definition: t30.h:272
t30_exchanged_info_t
Definition: t30.h:473
t4_state_s
Definition: private/t4_tx.h:35
T30_SUPPORT_600_600_RESOLUTION
@ T30_SUPPORT_600_600_RESOLUTION
Definition: t30.h:400
T30_PRI_EOM
@ T30_PRI_EOM
Definition: t30_fcf.h:75
T30_SUPPORT_300_600_RESOLUTION
@ T30_SUPPORT_300_600_RESOLUTION
Definition: t30.h:404
t30_state_s::timer_t6
int timer_t6
This is only used in full duplex (e.g. ISDN) modes.
Definition: private/t30.h:211
t4_t6_encode.h
t4_tx_get_x_resolution
int t4_tx_get_x_resolution(t4_tx_state_t *s)
Get the column-to-column (x) resolution of the current page.
Definition: t4_tx.c:1447
v27ter_rx.h
SIG_STATUS_TRAINING_FAILED
@ SIG_STATUS_TRAINING_FAILED
The modem has failed to train.
Definition: async.h:67
t30_stats_t::pages_in_file
int pages_in_file
The number of pages in the file (<0 if not known).
Definition: t30.h:529
T30_SUPPORT_T4_2D_COMPRESSION
@ T30_SUPPORT_T4_2D_COMPRESSION
Definition: t30.h:360
t30_state_s::phase_d_handler
t30_phase_d_handler_t * phase_d_handler
A pointer to a callback routine to be called when phase D events occur.
Definition: private/t30.h:102
t4_tx_get_byte
int t4_tx_get_byte(t4_tx_state_t *s)
Get the next byte of the current document page. The document will be padded for the current minimum s...
Definition: t4_tx.c:1378
tz_s
Definition: private/timezone.h:81
t30_state_s::tx_start_page
int tx_start_page
The first page to be sent from the image file. -1 means no restriction.
Definition: private/t30.h:286
t30_state_s::phase
int phase
The current T.30 phase.
Definition: private/t30.h:142
T30_SUPPORT_V29
@ T30_SUPPORT_V29
Definition: t30.h:344
T30_SUPPORT_INTERNET_SELECTIVE_POLLING_ADDRESS
@ T30_SUPPORT_INTERNET_SELECTIVE_POLLING_ADDRESS
Definition: t30.h:443
t30_state_s::current_rx_type
int current_rx_type
Current reception mode.
Definition: private/t30.h:192
T30_SUPPORT_400_400_RESOLUTION
@ T30_SUPPORT_400_400_RESOLUTION
Definition: t30.h:398
T30_SUPPORT_T81_COMPRESSION
@ T30_SUPPORT_T81_COMPRESSION
Definition: t30.h:372
t30_local.h
SIG_STATUS_CARRIER_DOWN
@ SIG_STATUS_CARRIER_DOWN
The carrier signal has dropped.
Definition: async.h:54
T30_CFR
@ T30_CFR
Definition: t30_fcf.h:66
t4_stats_t::pages_in_file
int pages_in_file
The number of pages in the file (<0 if unknown).
Definition: t4_rx.h:217
t4_t6_decode.h
t30_exchanged_info_t::nss
uint8_t * nss
Non-standard facilities set-up (NSS).
Definition: t30.h:494
T30_ERR_TX_T5EXP
@ T30_ERR_TX_T5EXP
Definition: t30.h:257
T30_ERR_RX_DCNPHD
@ T30_ERR_RX_DCNPHD
Definition: t30.h:275
t30_state_s::receiver_not_ready_count
int receiver_not_ready_count
The current count of consecutive T30_RNR messages.
Definition: private/t30.h:246
t4_rx_set_dcs
void t4_rx_set_dcs(t4_rx_state_t *s, const char *dcs)
Set the DCS information of the fax, for inclusion in the file.
Definition: t4_rx.c:1103
t4_tx_release
int t4_tx_release(t4_tx_state_t *s)
End the transmission of a document. Tidy up and close the file. This should be used to end T....
Definition: t4_tx.c:1574
t30_state_s::tcf_current_zeros
int tcf_current_zeros
The current count of consecutive received zero bits, during the trainability test.
Definition: private/t30.h:176
t4_rx_put_bit
int t4_rx_put_bit(t4_rx_state_t *s, int bit)
Put a bit of the current document page.
Definition: t4_rx.c:975
clr_ctrl_bit
#define clr_ctrl_bit(s, bit)
Definition: t30.c:455
t30_local_interrupt_request
void t30_local_interrupt_request(t30_state_t *s, int state)
Request a local interrupt of FAX exchange.
Definition: t30.c:6269
t30_state_s::current_status
int current_status
The current completion status.
Definition: private/t30.h:290
t30_stats_t::image_size
int image_size
The size of the image, in bytes.
Definition: t30.h:539
t30_state_s::local_min_scan_time_code
uint8_t local_min_scan_time_code
The DIS code for the minimum scan row time we require. This is usually 0ms, but if we are trying to s...
Definition: private/t30.h:139
T30_SUPPORT_V27TER
@ T30_SUPPORT_V27TER
Definition: t30.h:342
T30_SUPPORT_R8_RESOLUTION
@ T30_SUPPORT_R8_RESOLUTION
Definition: t30.h:391
bit_operations.h
t30_state_s::ecm_frame_map
uint8_t ecm_frame_map[3+32]
A bit map of the OK ECM frames, constructed as a PPR frame.
Definition: private/t30.h:254
T30_ERR_RX_DCNDATA
@ T30_ERR_RX_DCNDATA
Definition: t30.h:273
T30_SEP
@ T30_SEP
Definition: t30_fcf.h:46
t30_state_s::remote_interrupts_allowed
int remote_interrupts_allowed
True if remote T.30 procedural interrupts are allowed.
Definition: private/t30.h:82
T30_ERR_T3_EXPIRED
@ T30_ERR_T3_EXPIRED
Definition: t30.h:237
T30_SUPPORT_NO_COMPRESSION
@ T30_SUPPORT_NO_COMPRESSION
Definition: t30.h:356
T30_CRP
@ T30_CRP
Definition: t30_fcf.h:96
t30_exchanged_info_t::password
char password[20+1]
The password (PWD).
Definition: t30.h:486
t30_state_s::state
int state
The current state of the T.30 state machine.
Definition: private/t30.h:146
queue.h
t4_tx_get_current_page_in_file
int t4_tx_get_current_page_in_file(t4_tx_state_t *s)
Get the currnet page number in the file.
Definition: t4_tx.c:1472
T30_MAX_DIS_DTC_DCS_LEN
#define T30_MAX_DIS_DTC_DCS_LEN
Definition: t30.h:142
t4_tx_set_header_tz
void t4_tx_set_header_tz(t4_tx_state_t *s, tz_t *tz)
Set the header timezone.
Definition: t4_tx.c:1435
T30_RTP
@ T30_RTP
Definition: t30_fcf.h:85
t4_rx_end_page
int t4_rx_end_page(t4_rx_state_t *s)
Complete the reception of a page.
Definition: t4_rx.c:581
t4_tx_get_pages_in_file
int t4_tx_get_pages_in_file(t4_tx_state_t *s)
Get the number of pages in the file.
Definition: t4_tx.c:1459
DEFAULT_TIMER_T3
#define DEFAULT_TIMER_T3
Definition: t30.c:321
T30_ERR_CALLDROPPED
@ T30_ERR_CALLDROPPED
Definition: t30.h:290
t30_state_s::tcf_test_bits
int tcf_test_bits
A count of the number of bits in the trainability test. This counts down to zero when sending TCF,...
Definition: private/t30.h:174
DEFAULT_TIMER_T4B
#define DEFAULT_TIMER_T4B
Definition: t30.c:343
T30_SUPPORT_R16_RESOLUTION
@ T30_SUPPORT_R16_RESOLUTION
Definition: t30.h:393
T30_PRI_MPS
@ T30_PRI_MPS
Definition: t30_fcf.h:76
t30_state_s::dis_received
int dis_received
True if a valid DIS has been received from the far end.
Definition: private/t30.h:163
T30_ERR_T1_EXPIRED
@ T30_ERR_T1_EXPIRED
Definition: t30.h:236
t30_state_s::tz
tz_t tz
Optional per instance time zone for the FAX page header timestamp.
Definition: private/t30.h:79
T30_PPR
@ T30_PPR
Definition: t30_fcf.h:89
t30_send_hdlc_handler_t
void() t30_send_hdlc_handler_t(void *user_data, const uint8_t msg[], int len)
T.30 send HDLC handler.
Definition: t30.h:224
T30_SUPPORT_FINE_RESOLUTION
@ T30_SUPPORT_FINE_RESOLUTION
Definition: t30.h:384
T30_PRI_EOP
@ T30_PRI_EOP
Definition: t30_fcf.h:77
span_log
int span_log(logging_state_t *s, int level, const char *format,...)
Generate a log entry.
Definition: logging.c:84
t4_tx_end_page
int t4_tx_end_page(t4_tx_state_t *s)
Complete the sending of a page.
Definition: t4_tx.c:1355
T30_V29_FALLBACK_START
#define T30_V29_FALLBACK_START
Definition: t30.c:402
t4_rx_set_vendor
void t4_rx_set_vendor(t4_rx_state_t *s, const char *vendor)
Set the vendor of the remote machine, for inclusion in the file.
Definition: t4_rx.c:1121
t30_state_s::tcf_most_zeros
int tcf_most_zeros
The maximum consecutive received zero bits seen to date, during the trainability test.
Definition: private/t30.h:178
T30_ERR_RX_NOCARRIER
@ T30_ERR_RX_NOCARRIER
Definition: t30.h:263
t30_state_s::ecm_len
int16_t ecm_len[256]
The lengths of the frames in the ECM partial page buffer.
Definition: private/t30.h:252
T4_COMPRESSION_ITU_T6
@ T4_COMPRESSION_ITU_T6
Definition: t4_rx.h:58
T30_EOP
@ T30_EOP
Definition: t30_fcf.h:74
t30_state_s::send_hdlc_user_data
void * send_hdlc_user_data
An opaque pointer passed to the transmitted HDLC frame handler.
Definition: private/t30.h:134
t30_state_s::local_dis_dtc_len
int local_dis_dtc_len
The length of the DIS or DTC message to be transmitted.
Definition: private/t30.h:157
T30_RR
@ T30_RR
Definition: t30_fcf.h:81
t30_remote_interrupts_allowed
void t30_remote_interrupts_allowed(t30_state_t *s, int state)
Allow remote interrupts of FAX exchange.
Definition: t30.c:6281
t4_tx_get_y_resolution
int t4_tx_get_y_resolution(t4_tx_state_t *s)
Get the row-to-row (y) resolution of the current page.
Definition: t4_tx.c:1441
t30_state_s::supported_image_sizes
int supported_image_sizes
A bit mask of the currently supported image sizes.
Definition: private/t30.h:58
v29rx.h
T30_ERR_FILEERROR
@ T30_ERR_FILEERROR
Definition: t30.h:280
T30_SUPPORT_T45_COMPRESSION
@ T30_SUPPORT_T45_COMPRESSION
Definition: t30.h:370
t30_release
int t30_release(t30_state_t *s)
Release a T.30 context.
Definition: t30.c:6368
T30_MAX_IDENT_LEN
#define T30_MAX_IDENT_LEN
Definition: t30.h:144
T30_ERR_HDLC_CARRIER
@ T30_ERR_HDLC_CARRIER
Definition: t30.h:238
T30_ERR_RX_T2EXP
@ T30_ERR_RX_T2EXP
Definition: t30.h:271
t30_state_s::logging
logging_state_t logging
Error and flow logging control.
Definition: private/t30.h:306
t30_state_s::next_rx_step
uint8_t next_rx_step
The FCF for the next receive step.
Definition: private/t30.h:278
t4_rx_init
t4_rx_state_t * t4_rx_init(t4_rx_state_t *s, const char *file, int output_encoding)
Prepare for reception of a document.
Definition: t4_rx.c:1177
power_meter_current_dbov
float power_meter_current_dbov(power_meter_t *s)
Get the current power meter reading, in dBOv.
Definition: power_meter.c:129
t4_tx_get_bit
int t4_tx_get_bit(t4_tx_state_t *s)
Get the next bit of the current document page. The document will be padded for the current minimum sc...
Definition: t4_tx.c:1362
t30_state_s::image_width
t4_image_width_t image_width
The width of the current image, in pixels.
Definition: private/t30.h:236
t30_state_s::ecm_current_tx_frame
int ecm_current_tx_frame
The current ECM frame, during ECM transmission.
Definition: private/t30.h:267
T30_SUPPORT_1200_1200_RESOLUTION
@ T30_SUPPORT_1200_1200_RESOLUTION
Definition: t30.h:402
t4_rx_set_model
void t4_rx_set_model(t4_rx_state_t *s, const char *model)
Set the model of the remote machine, for inclusion in the file.
Definition: t4_rx.c:1127
spandsp-sim.h
t30_state_s
Definition: private/t30.h:35
T30_ERR_RX_DCNFAX
@ T30_ERR_RX_DCNFAX
Definition: t30.h:274
T30_TSA
@ T30_TSA
Definition: t30_fcf.h:61
t30_state_s::rx_frame_received
int rx_frame_received
True if a valid HDLC frame has been received in the current reception period.
Definition: private/t30.h:189
T30_ERR_TX_INVALRSP
@ T30_ERR_TX_INVALRSP
Definition: t30.h:253
t30_state_s::line_encoding
int line_encoding
The image coding being used on the line.
Definition: private/t30.h:226
t30_stats_t::width
int width
The number of horizontal pixels in the most recent page.
Definition: t30.h:535
t4_stats_t::longest_bad_row_run
int longest_bad_row_run
The largest number of bad pixel rows in a block in the most recent page.
Definition: t4_rx.h:225
T30_DIS
@ T30_DIS
Definition: t30_fcf.h:35
t30_state_s::timer_t7
int timer_t7
This is only used in full duplex (e.g. ISDN) modes.
Definition: private/t30.h:213
t30_state_s::output_encoding
int output_encoding
The image coding being used for output files.
Definition: private/t30.h:228
t30_state_s::ecm_frames
int ecm_frames
The number of frames in the current block number, in ECM mode.
Definition: private/t30.h:263
T30_PIN
@ T30_PIN
Definition: t30_fcf.h:88
T30_V27TER_FALLBACK_START
#define T30_V27TER_FALLBACK_START
Definition: t30.c:404
MAX_COMMAND_TRIES
#define MAX_COMMAND_TRIES
Definition: t30.c:97
T30_ERR_RX_T2EXPDCN
@ T30_ERR_RX_T2EXPDCN
Definition: t30.h:266
t30_state_s::rtp_events
int rtp_events
The number of RTP events.
Definition: private/t30.h:301
t30_stats_t::length
int length
The number of vertical pixels in the most recent page.
Definition: t30.h:537
t30_state_s::local_interrupt_pending
int local_interrupt_pending
True if a local T.30 interrupt is pending.
Definition: private/t30.h:224
t30_state_s::ecm_at_page_end
int ecm_at_page_end
True if we are at the end of an ECM page to se sent - i.e. there are no more partial pages still to c...
Definition: private/t30.h:270
t30_stats_t::current_status
int current_status
Current status.
Definition: t30.h:549
t30_state_s::rx_info
t30_exchanged_info_t rx_info
The information fields received.
Definition: private/t30.h:85
T30_ERR_NORESSUPPORT
@ T30_ERR_NORESSUPPORT
Definition: t30.h:244
fsk.h
t4_encoding_to_str
const char * t4_encoding_to_str(int encoding)
Get the short text name of an encoding format.
Definition: t4_rx.c:1148
t30_state_s::error_correcting_mode
int error_correcting_mode
True if error correcting mode is used.
Definition: private/t30.h:240
T30_RTN
@ T30_RTN
Definition: t30_fcf.h:86
t4_stats_t::encoding
int encoding
The type of compression used between the FAX machines.
Definition: t4_rx.h:231
T30_ERR_RX_T2EXPFAX
@ T30_ERR_RX_T2EXPFAX
Definition: t30.h:268
t4_stats_t::x_resolution
int x_resolution
The horizontal resolution of the page in pixels per metre.
Definition: t4_rx.h:227
t30_state_s::far_dis_dtc_len
int far_dis_dtc_len
The length of the last DIS or DTC message received form the far end.
Definition: private/t30.h:161
t30_state_s::phase_d_user_data
void * phase_d_user_data
An opaque pointer supplied in event D callbacks.
Definition: private/t30.h:104
logging.h
t30_set_status
void t30_set_status(t30_state_t *s, int status)
Set T.30 status.
Definition: t30_api.c:732
t4_tx_set_header_info
void t4_tx_set_header_info(t4_tx_state_t *s, const char *info)
Set the header info.
Definition: t4_tx.c:1429
T30_SUPPORT_SUPERFINE_RESOLUTION
@ T30_SUPPORT_SUPERFINE_RESOLUTION
Definition: t30.h:386
t30_stats_t::bad_rows
int bad_rows
The number of bad pixel rows in the most recent page.
Definition: t30.h:543
t30_stats_t::pages_rx
int pages_rx
The number of pages received so far.
Definition: t30.h:527
swept_tone_state_s
Definition: private/swept_tone.h:29
t30_state_s::set_tx_type_handler
t30_set_handler_t * set_tx_type_handler
The handler for changes to the transmit mode.
Definition: private/t30.h:127
t30_state_s::set_rx_type_handler
t30_set_handler_t * set_rx_type_handler
The handler for changes to the receive mode.
Definition: private/t30.h:123
t4_rx_set_y_resolution
void t4_rx_set_y_resolution(t4_rx_state_t *s, int resolution)
Set the row-to-row (y) resolution to expect for a received image.
Definition: t4_rx.c:1091
t30_phase_d_handler_t
int() t30_phase_d_handler_t(t30_state_t *s, void *user_data, int result)
T.30 phase D callback handler.
Definition: t30.h:171
T30_CTR
@ T30_CTR
Definition: t30_fcf.h:68
span_log_buf
int span_log_buf(logging_state_t *s, int level, const char *tag, const uint8_t *buf, int len)
Generate a log entry displaying the contents of a buffer.
Definition: logging.c:158
t30_state_s::far_end_detected
int far_end_detected
True once the far end FAX entity has been detected.
Definition: private/t30.h:218
T30_SUPPORT_T4_1D_COMPRESSION
@ T30_SUPPORT_T4_1D_COMPRESSION
Definition: t30.h:358
t4_rx_set_image_width
void t4_rx_set_image_width(t4_rx_state_t *s, int width)
Set the expected width of the received image, in pixel columns.
Definition: t4_rx.c:1085
T30_FNV
@ T30_FNV
Definition: t30_fcf.h:97
t4_tx_get_image_width
int t4_tx_get_image_width(t4_tx_state_t *s)
Get the width of the current page, in pixel columns.
Definition: t4_tx.c:1453
t30_state_s::set_tx_type_user_data
void * set_tx_type_user_data
An opaque pointer passed to the handler for changes to the transmit mode.
Definition: private/t30.h:129
T30_SUPPORT_STANDARD_RESOLUTION
@ T30_SUPPORT_STANDARD_RESOLUTION
Definition: t30.h:382
t30_stats_t::pages_tx
int pages_tx
The number of pages sent so far.
Definition: t30.h:525
T30_SUPPORT_IDENTIFICATION
@ T30_SUPPORT_IDENTIFICATION
Definition: t30.h:427
v29tx.h
t30_state_s::rx_signal_present
int rx_signal_present
True if a carrier is present. Otherwise false.
Definition: private/t30.h:185
T30_NULL
@ T30_NULL
Definition: t30_fcf.h:113
T30_ERR_TX_PHBDEAD
@ T30_ERR_TX_PHBDEAD
Definition: t30.h:255
t30_state_s::dcs_frame
uint8_t dcs_frame[T30_MAX_DIS_DTC_DCS_LEN]
The preparation buffer for the DCS message to be transmitted.
Definition: private/t30.h:151
t4_rx_put_chunk
int t4_rx_put_chunk(t4_rx_state_t *s, const uint8_t buf[], int len)
Put a byte of the current document page.
Definition: t4_rx.c:987
T30_DCN
@ T30_DCN
Definition: t30_fcf.h:95
t30_exchanged_info_t::selective_polling_address
char selective_polling_address[20+1]
The selective polling sub-address (SEP).
Definition: t30.h:480
t30_state_s::country
const char * country
The country of origin of the remote machine, if known, else NULL.
Definition: private/t30.h:89
t4_tx_get_transfer_statistics
void t4_tx_get_transfer_statistics(t4_tx_state_t *s, t4_stats_t *t)
Get the current transfer statistics.
Definition: t4_tx.c:1478
t30_state_s::rx_file
char rx_file[256]
Image file name for image reception.
Definition: private/t30.h:280
t30_state_s::iaf
int iaf
Internet aware FAX mode bit mask.
Definition: private/t30.h:50
t30_state_s::current_tx_type
int current_tx_type
Current transmission mode.
Definition: private/t30.h:194
T30_SPI
@ T30_SPI
Definition: t30_fcf.h:109
t4_rx_set_rx_encoding
void t4_rx_set_rx_encoding(t4_rx_state_t *s, int encoding)
Set the encoding for the received data.
Definition: t4_rx.c:1079
t30_state_s::current_permitted_modems
int current_permitted_modems
The subset of supported modems allowed at the current time, allowing for negotiation.
Definition: private/t30.h:183
t30_get_transfer_statistics
void t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t)
Get the current transfer statistics.
Definition: t30.c:6229
t30_front_end_status
void t30_front_end_status(void *user_data, int status)
Inform the T.30 engine of a status change in the front end (end of tx, rx signal change,...
Definition: t30.c:5833
t30_set_handler_t
void() t30_set_handler_t(void *user_data, int type, int bit_rate, int short_train, int use_hdlc)
T.30 set a receive or transmit type handler.
Definition: t30.h:215
T30_NSF
@ T30_NSF
Definition: t30_fcf.h:37
t30_exchanged_info_t::polled_sub_address
char polled_sub_address[20+1]
The polled sub-address (PSA).
Definition: t30.h:482
T30_SUPPORT_V17
@ T30_SUPPORT_V17
Definition: t30.h:346
t30_non_ecm_put_byte
void t30_non_ecm_put_byte(void *user_data, int byte)
Process a byte of received non-ECM image data.
Definition: t30.c:5457
t4_tx_set_min_bits_per_row
void t4_tx_set_min_bits_per_row(t4_tx_state_t *s, int bits)
Set the minimum number of encoded bits per row. This allows the makes the encoding process to be set ...
Definition: t4_tx.c:1417
t30_fcf.h
t30_state_s::local_dis_dtc_frame
uint8_t local_dis_dtc_frame[T30_MAX_DIS_DTC_DCS_LEN]
The preparation buffer for DIS or DTC message to be transmitted.
Definition: private/t30.h:155
t4_tx_check_bit
int t4_tx_check_bit(t4_tx_state_t *s)
Return the next bit of the current document page, without actually moving forward in the buffer....
Definition: t4_tx.c:1398
t4_stats_t::y_resolution
int y_resolution
The vertical resolution of the page in pixels per metre.
Definition: t4_rx.h:229
power_meter_init
power_meter_t * power_meter_init(power_meter_t *s, int shift)
Initialise a power meter context.
Definition: power_meter.c:50
t30_stats_t::longest_bad_row_run
int longest_bad_row_run
The largest number of bad pixel rows in a block in the most recent page.
Definition: t30.h:545
T30_SUPPORT_400_800_RESOLUTION
@ T30_SUPPORT_400_800_RESOLUTION
Definition: t30.h:406
t30_state_s::rx_trained
int rx_trained
True if a modem has trained correctly.
Definition: private/t30.h:187
SIG_STATUS_TRAINING_SUCCEEDED
@ SIG_STATUS_TRAINING_SUCCEEDED
The modem has trained, and is ready for data exchange.
Definition: async.h:65
T4_COMPRESSION_ITU_T4_1D
@ T4_COMPRESSION_ITU_T4_1D
Definition: t4_rx.h:54
t30_state_s::current_fallback
int current_fallback
The current fallback step for the fast message transfer modem.
Definition: private/t30.h:181
DEFAULT_TIMER_T2B
#define DEFAULT_TIMER_T2B
Definition: t30.c:314
T30_IAF_MODE_NO_FILL_BITS
@ T30_IAF_MODE_NO_FILL_BITS
Definition: t30.h:465
t30_phase_e_handler_t
void() t30_phase_e_handler_t(t30_state_t *s, void *user_data, int completion_code)
T.30 phase E callback handler.
Definition: t30.h:180
t30_state_s::rx_stop_page
int rx_stop_page
The last page we are prepared accept for a received image file. -1 means no restriction.
Definition: private/t30.h:282
T30_RNR
@ T30_RNR
Definition: t30_fcf.h:90
t35.h
logging_state_s
Definition: private/logging.h:33
T30_ERR_RX_INVALCMD
@ T30_ERR_RX_INVALCMD
Definition: t30.h:262
t30_state_s::supported_t30_features
int supported_t30_features
A bit mask of the currently supported T.30 special features.
Definition: private/t30.h:60
t4_rx_release
int t4_rx_release(t4_rx_state_t *s)
End reception of a document. Tidy up and close the file. This should be used to end T....
Definition: t4_rx.c:1235
T30_ERR_TX_INCAPABLE
@ T30_ERR_TX_INCAPABLE
Definition: t30.h:243
t30_state_s::supported_modems
int supported_modems
A bit mask of the currently supported modem types.
Definition: private/t30.h:52
t30_state_s::use_own_tz
int use_own_tz
Use private timezone if true.
Definition: private/t30.h:77
T30_SUPPORT_T85_COMPRESSION
@ T30_SUPPORT_T85_COMPRESSION
Definition: t30.h:364
t30_state_s::retransmit_capable
int retransmit_capable
True if we are capable of retransmitting pages.
Definition: private/t30.h:64
T30_CTC
@ T30_CTC
Definition: t30_fcf.h:60
T30_SID
@ T30_SID
Definition: t30_fcf.h:58
T30_ERR_RX_ECMPHD
@ T30_ERR_RX_ECMPHD
Definition: t30.h:260
t30_state_s::end_of_procedure_detected
int end_of_procedure_detected
True once the end of procedure condition has been detected.
Definition: private/t30.h:221
T30_ERR_T0_EXPIRED
@ T30_ERR_T0_EXPIRED
Definition: t30.h:235
t4_rx_set_far_ident
void t4_rx_set_far_ident(t4_rx_state_t *s, const char *ident)
Set the identity of the remote machine, for inclusion in the file.
Definition: t4_rx.c:1115
t30_state_s::phase_b_handler
t30_phase_b_handler_t * phase_b_handler
A pointer to a callback routine to be called when phase B events occur.
Definition: private/t30.h:97
t30_exchanged_info_t::nsc
uint8_t * nsc
Non-standard facilities command (NSC).
Definition: t30.h:491
t30_free
int t30_free(t30_state_t *s)
Free a T.30 context.
Definition: t30.c:6377
T30_NSC
@ T30_NSC
Definition: t30_fcf.h:44
T30_EOR
@ T30_EOR
Definition: t30_fcf.h:80
SIG_STATUS_END_OF_DATA
@ SIG_STATUS_END_OF_DATA
The data stream has ended.
Definition: async.h:71
t30_state_s::real_time_frame_handler
t30_real_time_frame_handler_t * real_time_frame_handler
A pointer to a callback routine to be called when frames are exchanged.
Definition: private/t30.h:112
t30_state_s::x_resolution
int x_resolution
The X direction resolution of the current image, in pixels per metre.
Definition: private/t30.h:232
t30_state_s::supported_resolutions
int supported_resolutions
A bit mask of the currently supported image resolutions.
Definition: private/t30.h:56
t4_stats_t::line_image_size
int line_image_size
The size of the image on the line, in bytes.
Definition: t4_rx.h:233
T30_ERR_TX_BADDCS
@ T30_ERR_TX_BADDCS
Definition: t30.h:249
t30_state_s::operation_in_progress
int operation_in_progress
The type of FAX operation currently in progress.
Definition: private/t30.h:44