Go to the documentation of this file.
28 #if !defined(_SPANDSP_PRIVATE_T30_H_)
29 #define _SPANDSP_PRIVATE_T30_H_
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
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
Definition: t30.h:269
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
int retries
Current number of retries of the action in progress.
Definition: private/t30.h:238
uint8_t * nsf
Non-standard facilities (NSF).
Definition: t30.h:488
void t30_terminate(t30_state_t *s)
Cleanup a T.30 context if the call terminates.
Definition: t30.c:6196
int octets_per_ecm_frame
The number of octets to be used per ECM frame.
Definition: private/t30.h:248
@ T30_ERR_CANNOT_TRAIN
Definition: t30.h:239
int error_correcting_mode_retries
The number of HDLC frame retries, if error correcting mode is used.
Definition: private/t30.h:242
@ T30_SUPPORT_POLLED_SUB_ADDRESSING
Definition: t30.h:431
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
Definition: t30_fcf.h:69
const char * model
The model of the remote machine, if known, else NULL.
Definition: private/t30.h:93
@ T30_ERR_UNEXPECTED
Definition: t30.h:246
@ T30_TSI
Definition: t30_fcf.h:55
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
Definition: t30.h:433
@ T30_ERR_TX_BADPG
Definition: t30.h:250
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
Definition: t30_fcf.h:78
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
int calling_party
True if behaving as the calling party.
Definition: private/t30.h:47
char sub_address[20+1]
The sub-address string (SUB).
Definition: t30.h:478
@ T30_ERR_RX_T2EXPRR
Definition: t30.h:270
int t30_call_active(t30_state_t *s)
Check if a T.30 call is still active.
Definition: t30.c:6385
@ T30_DCS
Definition: t30_fcf.h:54
int bit_rate
The current bit rate for image transfer.
Definition: t30.h:521
@ T30_CSI
Definition: t30_fcf.h:36
int rtn_events
The number of RTN events.
Definition: private/t30.h:303
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
int ecm_block
The current block number, in ECM mode.
Definition: private/t30.h:261
@ T30_ERR_NOSIZESUPPORT
Definition: t30.h:245
@ T30_ERR_RETRYDCN
Definition: t30.h:289
@ T4_FCD
Definition: t30_fcf.h:116
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
#define T30_MAX_PAGE_HEADER_INFO
Definition: t30.h:146
@ T30_SUPPORT_FIELD_NOT_VALID
Definition: t30.h:447
int timer_t8
This is only used in full duplex (e.g. ISDN) modes.
Definition: private/t30.h:215
@ T30_SUPPORT_T85_L0_COMPRESSION
Definition: t30.h:366
@ T30_SUPPORT_T6_COMPRESSION
Definition: t30.h:362
void * phase_e_user_data
An opaque pointer supplied in event E callbacks.
Definition: private/t30.h:109
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
int rx_ecm_block_ok
True if all frames of the current received ECM block are now OK.
Definition: private/t30.h:295
#define FINAL_FLUSH_TIME
Definition: t30.c:372
@ T30_FRONT_END_RECEIVE_COMPLETE
Definition: t30.h:332
@ T30_PWD
Definition: t30_fcf.h:45
char ident[20+1]
The identifier string (CSI, TSI, CIG).
Definition: t30.h:476
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
Definition: t30_fcf.h:72
#define test_ctrl_bit(s, bit)
Definition: t30.c:449
@ T30_SUPPORT_T43_COMPRESSION
Definition: t30.h:368
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
Definition: t30.h:408
int span_log_test(logging_state_t *s, int level)
Test if logging of a specified severity level is enabled.
Definition: logging.c:76
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
Definition: t30.h:396
@ T30_ERR_RX_DCNNORTN
Definition: t30.h:277
#define DEFAULT_TIMER_T5
Definition: t30.c:351
@ T4_COMPRESSION_ITU_T85_L0
Definition: t4_rx.h:62
@ T30_PPS
Definition: t30_fcf.h:79
int error_correcting_mode_retries
The number of HDLC frame retries, if error correcting mode is used.
Definition: t30.h:547
@ SIG_STATUS_ABORT
An abort signal (e.g. an HDLC abort) has been received.
Definition: async.h:73
@ T30_MCF
Definition: t30_fcf.h:84
int y_resolution
The Y direction resolution of the current image, in pixels per metre.
Definition: private/t30.h:234
int x_resolution
The horizontal column-to-column resolution of the most recent page, in pixels per metre.
Definition: t30.h:531
void * phase_b_user_data
An opaque pointer supplied in event B callbacks.
Definition: private/t30.h:99
@ T30_ERR_RX_DCNRRD
Definition: t30.h:276
@ T30_CIA
Definition: t30_fcf.h:48
@ T30_PSA
Definition: t30_fcf.h:47
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
Definition: t30_fcf.h:62
int step
The step in sending a sequence of HDLC frames.
Definition: private/t30.h:148
int bad_rows
The number of bad pixel rows in the most recent page.
Definition: t4_rx.h:223
@ SIG_STATUS_CARRIER_UP
The carrier signal is up. This merely indicates that carrier energy has been seen....
Definition: async.h:58
int dcs_len
The length of the DCS message to be transmitted.
Definition: private/t30.h:153
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
Definition: t30.h:256
float power_meter_current_dbm0(power_meter_t *s)
Get the current power meter reading, in dBm0.
Definition: power_meter.c:120
uint8_t last_pps_fcf2
the FCF2 field of the last PPS message we received.
Definition: private/t30.h:293
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
Definition: t30.h:251
@ 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
#define DEFAULT_TIMER_T2A
Definition: t30.c:307
@ T30_CIG
Definition: t30_fcf.h:43
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
char sender_ident[20+1]
The sender identification (SID).
Definition: t30.h:484
int supported_compressions
A bit mask of the currently supported image compression modes.
Definition: private/t30.h:54
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
Definition: t30_fcf.h:117
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
#define DEFAULT_TIMER_T1
Definition: t30.c:295
@ T30_SUPPORT_COMMAND_REPEAT
Definition: t30.h:449
const char * vendor
The vendor of the remote machine, if known, else NULL.
Definition: private/t30.h:91
int ecm_allowed
True is ECM mode handling is enabled.
Definition: private/t30.h:62
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
Definition: t30.h:459
@ T30_ERR_TX_GOTDCN
Definition: t30.h:252
t30_send_hdlc_handler_t * send_hdlc_handler
The transmitted HDLC frame handler.
Definition: private/t30.h:132
@ T4_COMPRESSION_ITU_T85
Definition: t4_rx.h:60
void * real_time_frame_user_data
An opaque pointer supplied in real time frame callbacks.
Definition: private/t30.h:114
@ T30_SUB
Definition: t30_fcf.h:57
@ T4_COMPRESSION_ITU_T4_2D
Definition: t4_rx.h:56
char tx_file[256]
Image file name to be sent.
Definition: private/t30.h:284
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
const char * t30_frametype(uint8_t x)
Return a text name for a T.30 frame type.
Definition: t30_logging.c:241
@ T30_PIP
Definition: t30_fcf.h:87
void * document_user_data
An opaque pointer supplied in document callbacks.
Definition: private/t30.h:120
#define T30_V17_FALLBACK_START
Definition: t30.c:400
int short_train
True if the short training sequence should be used.
Definition: private/t30.h:166
int t30_restart(t30_state_t *s)
Restart a T.30 context.
Definition: t30.c:6287
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
int32_t power_meter_update(power_meter_t *s, int16_t amp)
Update a power meter.
Definition: power_meter.c:84
#define PPR_LIMIT_BEFORE_CTC_OR_EOR
Definition: t30.c:377
int y_resolution
The vertical row-to-row resolution of the most recent page, in pixels per metre.
Definition: t30.h:533
@ T30_ISP
Definition: t30_fcf.h:49
@ T30_SUPPORT_INTERNET_ROUTING_ADDRESS
Definition: t30.h:439
@ T30_NSS
Definition: t30_fcf.h:56
t30_exchanged_info_t tx_info
The information fields to be transmitted.
Definition: private/t30.h:87
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
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
Packet framing (e.g. HDLC framing) is OK.
Definition: async.h:69
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
int tx_stop_page
The last page to be sent from the image file. -1 means no restriction.
Definition: private/t30.h:288
int ppr_count
The current count of consecutive T30_PPR messages.
Definition: private/t30.h:244
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
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_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
int timer_t3
Procedural interrupt timeout (in audio samples).
Definition: private/t30.h:207
int t30_non_ecm_get_byte(void *user_data)
Get a byte of received non-ECM image data.
Definition: t30.c:5573
int next_phase
The T.30 phase to change to when the current phase ends.
Definition: private/t30.h:144
#define set_ctrl_bits(s, val, bit)
Definition: t30.c:453
const char * signal_status_to_str(int status)
Convert a signal status to a short text description.
Definition: async.c:42
int() t30_document_handler_t(t30_state_t *s, void *user_data, int status)
T.30 document handler.
Definition: t30.h:204
#define DEFAULT_TIMER_T4
Definition: t30.c:330
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
Definition: t30.h:462
#define DEFAULT_TIMER_T4A
Definition: t30.c:336
@ T30_SUPPORT_SUB_ADDRESSING
Definition: t30.h:435
@ T30_SUPPORT_SELECTIVE_POLLING
Definition: t30.h:429
int pages_transferred
The number of pages transferred so far.
Definition: t4_rx.h:215
int encoding
The type of compression used between the FAX machines.
Definition: t30.h:541
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
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
Definition: power_meter.h:49
@ T30_DTC
Definition: t30_fcf.h:42
t4_image_width_t
Definition: t4_rx.h:125
int next_tx_step
The transmission step queued to follow the one in progress.
Definition: private/t30.h:276
@ T30_ERR_RX_T2EXPD
Definition: t30.h:267
@ T30_SUPPORT_SYCC_T81_COMPRESSION
Definition: t30.h:374
union t30_state_s::@57 t4
T.4 context for reading or writing image data.
int length
The number of vertical pixels in the most recent page.
Definition: t4_rx.h:221
#define set_ctrl_bit(s, bit)
Definition: t30.c:451
@ T30_ERR_RX_INCAPABLE
Definition: t30.h:242
@ T30_ERR_TX_NODIS
Definition: t30.h:254
#define DEFAULT_TIMER_T2
Definition: t30.c:302
@ T30_MPS
Definition: t30_fcf.h:73
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
Definition: t30_fcf.h:91
uint8_t ecm_data[256][260]
The ECM partial page buffer.
Definition: private/t30.h:250
uint8_t min_scan_time_code
The current DCS message minimum scan time code.
Definition: private/t30.h:230
int timer_t5
This is only used in error correcting mode.
Definition: private/t30.h:209
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
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
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
void t30_timer_update(t30_state_t *s, int samples)
Report the passage of time to the T.30 engine.
Definition: t30.c:6127
int width
The number of horizontal pixels in the most recent page.
Definition: t4_rx.h:219
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
Definition: t30_fcf.h:67
#define DEFAULT_TIMER_T0
Definition: t30.c:283
@ T30_ERR_INCOMPATIBLE
Definition: t30.h:241
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
int error_correcting_mode
TRUE if error correcting mode is used.
Definition: t30.h:523
@ T30_ERR_RX_DCNWHY
Definition: t30.h:272
Definition: private/t4_tx.h:36
@ T30_SUPPORT_600_600_RESOLUTION
Definition: t30.h:400
@ T30_PRI_EOM
Definition: t30_fcf.h:75
@ T30_SUPPORT_300_600_RESOLUTION
Definition: t30.h:404
int timer_t6
This is only used in full duplex (e.g. ISDN) modes.
Definition: private/t30.h:211
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
@ SIG_STATUS_TRAINING_FAILED
The modem has failed to train.
Definition: async.h:67
int pages_in_file
The number of pages in the file (<0 if not known).
Definition: t30.h:529
@ T30_SUPPORT_T4_2D_COMPRESSION
Definition: t30.h:360
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
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
Definition: private/timezone.h:82
int tx_start_page
The first page to be sent from the image file. -1 means no restriction.
Definition: private/t30.h:286
int phase
The current T.30 phase.
Definition: private/t30.h:142
@ T30_SUPPORT_V29
Definition: t30.h:344
@ T30_SUPPORT_INTERNET_SELECTIVE_POLLING_ADDRESS
Definition: t30.h:443
int current_rx_type
Current reception mode.
Definition: private/t30.h:192
@ T30_SUPPORT_400_400_RESOLUTION
Definition: t30.h:398
@ T30_SUPPORT_T81_COMPRESSION
Definition: t30.h:372
@ SIG_STATUS_CARRIER_DOWN
The carrier signal has dropped.
Definition: async.h:54
@ T30_CFR
Definition: t30_fcf.h:66
int pages_in_file
The number of pages in the file (<0 if unknown).
Definition: t4_rx.h:217
uint8_t * nss
Non-standard facilities set-up (NSS).
Definition: t30.h:494
@ T30_ERR_TX_T5EXP
Definition: t30.h:257
@ T30_ERR_RX_DCNPHD
Definition: t30.h:275
int receiver_not_ready_count
The current count of consecutive T30_RNR messages.
Definition: private/t30.h:246
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
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
int tcf_current_zeros
The current count of consecutive received zero bits, during the trainability test.
Definition: private/t30.h:176
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
#define clr_ctrl_bit(s, bit)
Definition: t30.c:455
void t30_local_interrupt_request(t30_state_t *s, int state)
Request a local interrupt of FAX exchange.
Definition: t30.c:6269
int current_status
The current completion status.
Definition: private/t30.h:290
int image_size
The size of the image, in bytes.
Definition: t30.h:539
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
Definition: t30.h:342
@ T30_SUPPORT_R8_RESOLUTION
Definition: t30.h:391
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
Definition: t30.h:273
@ T30_SEP
Definition: t30_fcf.h:46
int remote_interrupts_allowed
True if remote T.30 procedural interrupts are allowed.
Definition: private/t30.h:82
@ T30_ERR_T3_EXPIRED
Definition: t30.h:237
@ T30_SUPPORT_NO_COMPRESSION
Definition: t30.h:356
@ T30_CRP
Definition: t30_fcf.h:96
char password[20+1]
The password (PWD).
Definition: t30.h:486
int state
The current state of the T.30 state machine.
Definition: private/t30.h:146
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
#define T30_MAX_DIS_DTC_DCS_LEN
Definition: t30.h:142
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
Definition: t30_fcf.h:85
int t4_rx_end_page(t4_rx_state_t *s)
Complete the reception of a page.
Definition: t4_rx.c:581
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
#define DEFAULT_TIMER_T3
Definition: t30.c:321
@ T30_ERR_CALLDROPPED
Definition: t30.h:290
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
#define DEFAULT_TIMER_T4B
Definition: t30.c:343
@ T30_SUPPORT_R16_RESOLUTION
Definition: t30.h:393
@ T30_PRI_MPS
Definition: t30_fcf.h:76
int dis_received
True if a valid DIS has been received from the far end.
Definition: private/t30.h:163
@ T30_ERR_T1_EXPIRED
Definition: t30.h:236
tz_t tz
Optional per instance time zone for the FAX page header timestamp.
Definition: private/t30.h:79
@ T30_PPR
Definition: t30_fcf.h:89
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
Definition: t30.h:384
@ T30_PRI_EOP
Definition: t30_fcf.h:77
int span_log(logging_state_t *s, int level, const char *format,...)
Generate a log entry.
Definition: logging.c:84
int t4_tx_end_page(t4_tx_state_t *s)
Complete the sending of a page.
Definition: t4_tx.c:1355
#define T30_V29_FALLBACK_START
Definition: t30.c:402
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
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
Definition: t30.h:263
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
Definition: t4_rx.h:58
@ T30_EOP
Definition: t30_fcf.h:74
void * send_hdlc_user_data
An opaque pointer passed to the transmitted HDLC frame handler.
Definition: private/t30.h:134
int local_dis_dtc_len
The length of the DIS or DTC message to be transmitted.
Definition: private/t30.h:157
@ T30_RR
Definition: t30_fcf.h:81
void t30_remote_interrupts_allowed(t30_state_t *s, int state)
Allow remote interrupts of FAX exchange.
Definition: t30.c:6281
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
int supported_image_sizes
A bit mask of the currently supported image sizes.
Definition: private/t30.h:58
@ T30_ERR_FILEERROR
Definition: t30.h:280
@ T30_SUPPORT_T45_COMPRESSION
Definition: t30.h:370
int t30_release(t30_state_t *s)
Release a T.30 context.
Definition: t30.c:6368
#define T30_MAX_IDENT_LEN
Definition: t30.h:144
@ T30_ERR_HDLC_CARRIER
Definition: t30.h:238
@ T30_ERR_RX_T2EXP
Definition: t30.h:271
logging_state_t logging
Error and flow logging control.
Definition: private/t30.h:306
uint8_t next_rx_step
The FCF for the next receive step.
Definition: private/t30.h:278
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
float power_meter_current_dbov(power_meter_t *s)
Get the current power meter reading, in dBOv.
Definition: power_meter.c:129
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
t4_image_width_t image_width
The width of the current image, in pixels.
Definition: private/t30.h:236
int ecm_current_tx_frame
The current ECM frame, during ECM transmission.
Definition: private/t30.h:267
@ T30_SUPPORT_1200_1200_RESOLUTION
Definition: t30.h:402
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
Definition: private/t30.h:36
@ T30_ERR_RX_DCNFAX
Definition: t30.h:274
@ T30_TSA
Definition: t30_fcf.h:61
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
Definition: t30.h:253
int line_encoding
The image coding being used on the line.
Definition: private/t30.h:226
int width
The number of horizontal pixels in the most recent page.
Definition: t30.h:535
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
Definition: t30_fcf.h:35
int timer_t7
This is only used in full duplex (e.g. ISDN) modes.
Definition: private/t30.h:213
int output_encoding
The image coding being used for output files.
Definition: private/t30.h:228
int ecm_frames
The number of frames in the current block number, in ECM mode.
Definition: private/t30.h:263
@ T30_PIN
Definition: t30_fcf.h:88
#define T30_V27TER_FALLBACK_START
Definition: t30.c:404
#define MAX_COMMAND_TRIES
Definition: t30.c:97
@ T30_ERR_RX_T2EXPDCN
Definition: t30.h:266
int rtp_events
The number of RTP events.
Definition: private/t30.h:301
int length
The number of vertical pixels in the most recent page.
Definition: t30.h:537
int local_interrupt_pending
True if a local T.30 interrupt is pending.
Definition: private/t30.h:224
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
int current_status
Current status.
Definition: t30.h:549
t30_exchanged_info_t rx_info
The information fields received.
Definition: private/t30.h:85
@ T30_ERR_NORESSUPPORT
Definition: t30.h:244
const char * t4_encoding_to_str(int encoding)
Get the short text name of an encoding format.
Definition: t4_rx.c:1148
int error_correcting_mode
True if error correcting mode is used.
Definition: private/t30.h:240
@ T30_RTN
Definition: t30_fcf.h:86
int encoding
The type of compression used between the FAX machines.
Definition: t4_rx.h:231
@ T30_ERR_RX_T2EXPFAX
Definition: t30.h:268
int x_resolution
The horizontal resolution of the page in pixels per metre.
Definition: t4_rx.h:227
int far_dis_dtc_len
The length of the last DIS or DTC message received form the far end.
Definition: private/t30.h:161
void * phase_d_user_data
An opaque pointer supplied in event D callbacks.
Definition: private/t30.h:104
void t30_set_status(t30_state_t *s, int status)
Set T.30 status.
Definition: t30_api.c:732
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
Definition: t30.h:386
int bad_rows
The number of bad pixel rows in the most recent page.
Definition: t30.h:543
int pages_rx
The number of pages received so far.
Definition: t30.h:527
Definition: private/swept_tone.h:30
t30_set_handler_t * set_tx_type_handler
The handler for changes to the transmit mode.
Definition: private/t30.h:127
t30_set_handler_t * set_rx_type_handler
The handler for changes to the receive mode.
Definition: private/t30.h:123
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
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
Definition: t30_fcf.h:68
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
int far_end_detected
True once the far end FAX entity has been detected.
Definition: private/t30.h:218
@ T30_SUPPORT_T4_1D_COMPRESSION
Definition: t30.h:358
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
Definition: t30_fcf.h:97
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
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
Definition: t30.h:382
int pages_tx
The number of pages sent so far.
Definition: t30.h:525
@ T30_SUPPORT_IDENTIFICATION
Definition: t30.h:427
int rx_signal_present
True if a carrier is present. Otherwise false.
Definition: private/t30.h:185
@ T30_NULL
Definition: t30_fcf.h:113
@ T30_ERR_TX_PHBDEAD
Definition: t30.h:255
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
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
Definition: t30_fcf.h:95
char selective_polling_address[20+1]
The selective polling sub-address (SEP).
Definition: t30.h:480
const char * country
The country of origin of the remote machine, if known, else NULL.
Definition: private/t30.h:89
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
char rx_file[256]
Image file name for image reception.
Definition: private/t30.h:280
int iaf
Internet aware FAX mode bit mask.
Definition: private/t30.h:50
int current_tx_type
Current transmission mode.
Definition: private/t30.h:194
@ T30_SPI
Definition: t30_fcf.h:109
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
int current_permitted_modems
The subset of supported modems allowed at the current time, allowing for negotiation.
Definition: private/t30.h:183
void t30_get_transfer_statistics(t30_state_t *s, t30_stats_t *t)
Get the current transfer statistics.
Definition: t30.c:6229
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
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
Definition: t30_fcf.h:37
char polled_sub_address[20+1]
The polled sub-address (PSA).
Definition: t30.h:482
@ T30_SUPPORT_V17
Definition: t30.h:346
void t30_non_ecm_put_byte(void *user_data, int byte)
Process a byte of received non-ECM image data.
Definition: t30.c:5457
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
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
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
int y_resolution
The vertical resolution of the page in pixels per metre.
Definition: t4_rx.h:229
power_meter_t * power_meter_init(power_meter_t *s, int shift)
Initialise a power meter context.
Definition: power_meter.c:50
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
Definition: t30.h:406
int rx_trained
True if a modem has trained correctly.
Definition: private/t30.h:187
@ SIG_STATUS_TRAINING_SUCCEEDED
The modem has trained, and is ready for data exchange.
Definition: async.h:65
@ T4_COMPRESSION_ITU_T4_1D
Definition: t4_rx.h:54
int current_fallback
The current fallback step for the fast message transfer modem.
Definition: private/t30.h:181
#define DEFAULT_TIMER_T2B
Definition: t30.c:314
@ T30_IAF_MODE_NO_FILL_BITS
Definition: t30.h:465
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
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
Definition: t30_fcf.h:90
Definition: private/logging.h:34
@ T30_ERR_RX_INVALCMD
Definition: t30.h:262
int supported_t30_features
A bit mask of the currently supported T.30 special features.
Definition: private/t30.h:60
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
Definition: t30.h:243
int supported_modems
A bit mask of the currently supported modem types.
Definition: private/t30.h:52
int use_own_tz
Use private timezone if true.
Definition: private/t30.h:77
@ T30_SUPPORT_T85_COMPRESSION
Definition: t30.h:364
int retransmit_capable
True if we are capable of retransmitting pages.
Definition: private/t30.h:64
@ T30_CTC
Definition: t30_fcf.h:60
@ T30_SID
Definition: t30_fcf.h:58
@ T30_ERR_RX_ECMPHD
Definition: t30.h:260
int end_of_procedure_detected
True once the end of procedure condition has been detected.
Definition: private/t30.h:221
@ T30_ERR_T0_EXPIRED
Definition: t30.h:235
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_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
uint8_t * nsc
Non-standard facilities command (NSC).
Definition: t30.h:491
int t30_free(t30_state_t *s)
Free a T.30 context.
Definition: t30.c:6377
@ T30_NSC
Definition: t30_fcf.h:44
@ T30_EOR
Definition: t30_fcf.h:80
@ SIG_STATUS_END_OF_DATA
The data stream has ended.
Definition: async.h:71
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
int x_resolution
The X direction resolution of the current image, in pixels per metre.
Definition: private/t30.h:232
int supported_resolutions
A bit mask of the currently supported image resolutions.
Definition: private/t30.h:56
int line_image_size
The size of the image on the line, in bytes.
Definition: t4_rx.h:233
@ T30_ERR_TX_BADDCS
Definition: t30.h:249
int operation_in_progress
The type of FAX operation currently in progress.
Definition: private/t30.h:44