|
spandsp 0.0.6
|
Go to the source code of this file.
Macros | |
| #define | modem_rx_status_func_t modem_status_func_t |
| #define | modem_tx_status_func_t modem_status_func_t |
Typedefs | |
| typedef void(*) | put_msg_func_t(void *user_data, const uint8_t *msg, int len) |
| typedef int(*) | get_msg_func_t(void *user_data, uint8_t *msg, int max_len) |
| typedef void(*) | put_byte_func_t(void *user_data, int byte) |
| typedef int(*) | get_byte_func_t(void *user_data) |
| typedef void(*) | put_bit_func_t(void *user_data, int bit) |
| typedef int(*) | get_bit_func_t(void *user_data) |
| typedef void(*) | modem_status_func_t(void *user_data, int status) |
| typedef struct async_tx_state_s | async_tx_state_t |
| typedef struct async_rx_state_s | async_rx_state_t |
Enumerations | |
| enum | { SIG_STATUS_CARRIER_DOWN = -1 , SIG_STATUS_CARRIER_UP = -2 , SIG_STATUS_TRAINING_IN_PROGRESS = -3 , SIG_STATUS_TRAINING_SUCCEEDED = -4 , SIG_STATUS_TRAINING_FAILED = -5 , SIG_STATUS_FRAMING_OK = -6 , SIG_STATUS_END_OF_DATA = -7 , SIG_STATUS_ABORT = -8 , SIG_STATUS_BREAK = -9 , SIG_STATUS_SHUTDOWN_COMPLETE = -10 , SIG_STATUS_OCTET_REPORT = -11 , SIG_STATUS_POOR_SIGNAL_QUALITY = -12 , SIG_STATUS_MODEM_RETRAIN_OCCURRED = -13 , SIG_STATUS_LINK_CONNECTED = -14 , SIG_STATUS_LINK_DISCONNECTED = -15 , SIG_STATUS_LINK_ERROR = -16 } |
| enum | { ASYNC_PARITY_NONE = 0 , ASYNC_PARITY_EVEN , ASYNC_PARITY_ODD } |
Functions | |
| const char * | signal_status_to_str (int status) |
| Convert a signal status to a short text description. | |
| async_tx_state_t * | async_tx_init (async_tx_state_t *s, int data_bits, int parity_bits, int stop_bits, int use_v14, get_byte_func_t get_byte, void *user_data) |
| Initialise an asynchronous data transmit context. | |
| int | async_tx_release (async_tx_state_t *s) |
| int | async_tx_free (async_tx_state_t *s) |
| SPAN_DECLARE_NONSTD (int) async_tx_get_bit(void *user_data) | |
| Get the next bit of a transmitted serial bit stream. | |
| async_rx_state_t * | async_rx_init (async_rx_state_t *s, int data_bits, int parity_bits, int stop_bits, int use_v14, put_byte_func_t put_byte, void *user_data) |
| Initialise an asynchronous data receiver context. | |
| int | async_rx_release (async_rx_state_t *s) |
| int | async_rx_free (async_rx_state_t *s) |
| SPAN_DECLARE_NONSTD (void) async_rx_put_bit(void *user_data | |
| Accept a bit from a received serial bit stream. | |
Variables | |
| int | bit |
| typedef struct async_rx_state_s async_rx_state_t |
Asynchronous data receive descriptor. This defines the state of a single working instance of an asynchronous serial to byte converter, for use in FSK modems.
| typedef struct async_tx_state_s async_tx_state_t |
Asynchronous data transmit descriptor. This defines the state of a single working instance of a byte to asynchronous serial converter, for use in FSK modems.
| typedef int(*) get_bit_func_t(void *user_data) |
Bit get function for data pumps
| typedef int(*) get_byte_func_t(void *user_data) |
Byte get function for data pumps
| typedef int(*) get_msg_func_t(void *user_data, uint8_t *msg, int max_len) |
Message get function for data pumps
| typedef void(*) modem_status_func_t(void *user_data, int status) |
Status change callback function for data pumps
| typedef void(*) put_bit_func_t(void *user_data, int bit) |
Bit put function for data pumps
| typedef void(*) put_byte_func_t(void *user_data, int byte) |
Byte put function for data pumps
| typedef void(*) put_msg_func_t(void *user_data, const uint8_t *msg, int len) |
Message put function for data pumps
| anonymous enum |
| anonymous enum |
Special "bit" values for the bitstream put and get functions, and the signal status functions.
| async_rx_state_t * async_rx_init | ( | async_rx_state_t * | s, |
| int | data_bits, | ||
| int | parity_bits, | ||
| int | stop_bits, | ||
| int | use_v14, | ||
| put_byte_func_t | put_byte, | ||
| void * | user_data ) |
Initialise an asynchronous data receiver context.
Initialise an asynchronous data receiver context.
| s | The receiver context. |
| data_bits | The number of data bits. |
| parity_bits | The type of parity. |
| stop_bits | The number of stop bits. |
| use_v14 | TRUE if V.14 rate adaption processing should be used. |
| put_byte | The callback routine used to put the received data. |
| user_data | An opaque pointer. |
References async_rx_init(), async_rx_state_s::bitpos, async_rx_state_s::byte_in_progress, async_rx_state_s::data_bits, async_rx_state_s::framing_errors, async_rx_state_s::parity, async_rx_state_s::parity_bit, async_rx_state_s::parity_errors, async_rx_state_s::put_byte, async_rx_state_s::stop_bits, async_rx_state_s::use_v14, and async_rx_state_s::user_data.
Referenced by async_rx_init(), and SPAN_DECLARE_NONSTD().
| async_tx_state_t * async_tx_init | ( | async_tx_state_t * | s, |
| int | data_bits, | ||
| int | parity_bits, | ||
| int | stop_bits, | ||
| int | use_v14, | ||
| get_byte_func_t | get_byte, | ||
| void * | user_data ) |
Initialise an asynchronous data transmit context.
Initialise an asynchronous data transmit context.
| s | The transmitter context. |
| data_bits | The number of data bit. |
| parity_bits | The type of parity. |
| stop_bits | The number of stop bits. |
| use_v14 | TRUE if V.14 rate adaption processing should be used. |
| get_byte | The callback routine used to get the data to be transmitted. |
| user_data | An opaque pointer. |
References ASYNC_PARITY_NONE, async_tx_init(), async_tx_state_s::bitpos, async_tx_state_s::byte_in_progress, async_tx_state_s::data_bits, async_tx_state_s::get_byte, async_tx_state_s::parity, async_tx_state_s::parity_bit, async_tx_state_s::stop_bits, and async_tx_state_s::user_data.
Referenced by async_tx_init(), and v18_init().
| const char * signal_status_to_str | ( | int | status | ) |
Convert a signal status to a short text description.
Convert a signal status to a short text description.
| status | The modem signal status. |
References SIG_STATUS_ABORT, SIG_STATUS_BREAK, SIG_STATUS_CARRIER_DOWN, SIG_STATUS_CARRIER_UP, SIG_STATUS_END_OF_DATA, SIG_STATUS_FRAMING_OK, SIG_STATUS_LINK_CONNECTED, SIG_STATUS_LINK_DISCONNECTED, SIG_STATUS_LINK_ERROR, SIG_STATUS_MODEM_RETRAIN_OCCURRED, SIG_STATUS_OCTET_REPORT, SIG_STATUS_POOR_SIGNAL_QUALITY, SIG_STATUS_SHUTDOWN_COMPLETE, SIG_STATUS_TRAINING_FAILED, SIG_STATUS_TRAINING_IN_PROGRESS, SIG_STATUS_TRAINING_SUCCEEDED, and signal_status_to_str().
Referenced by signal_status_to_str().
| SPAN_DECLARE_NONSTD | ( | int | ) |
Get the next bit of a transmitted serial bit stream.
Apply T.30 receive processing to a block of audio samples.
Process a block of received V.8 audio samples.
Fake processing of a missing block of received V.29 modem audio samples.
Fake processing of a missing block of received V.27ter modem audio samples.
Generate a block of V.22bis modem audio samples.
Fake processing of a missing block of received V.22bis modem audio samples.
Process a block of received V.18 audio samples.
Fake processing of a missing block of received V.17 modem audio samples.
Generate a block of FAX audio samples.
Apply fake received audio processing.
Process a received T.38 IFP packet from a reliable stream (e.g. TCP).
Generate a block of T.31 modem audio samples.
Fake processing of a missing block of received T.31 modem audio samples.
Dummy receive fillin callback.
Dummy receive callback.
Process a block of samples through an instance of the modem connect tones detector.
Get the next sequence of bytes for transmission.
Get the next byte for transmission.
Fake processing of a missing block of received FSK modem audio samples.
Process a block of received FSK modem audio samples.
Apply T.30 transmit processing to generate a block of audio samples.
Apply fake T.30 receive processing.
Get the next bit of a transmitted serial bit stream.
| user_data | An opaque point which must point to a transmitter context. |
Apply fake T.30 receive processing when a block of audio samples is missing (e.g due to packet loss).
| s | The FAX context. |
| len | The number of samples to fake. |
Apply T.30 transmit processing to generate a block of audio samples.
| s | The FAX context. |
| amp | The audio sample buffer. |
| max_len | The number of samples to be generated. |
Process a block of received FSK modem audio samples.
| s | The modem context. |
| amp | The audio sample buffer. |
| len | The number of samples in the buffer. |
Fake processing of a missing block of received FSK modem audio samples (e.g due to packet loss).
| s | The modem context. |
| len | The number of samples to fake. |
| s | A pointer to an HDLC transmitter context. |
| s | A pointer to an HDLC transmitter context. |
| buf | The buffer for the data. |
| max_len | The number of bytes to get. |
| s | The context. |
| amp | An array of signal samples. |
| len | The number of samples in the array. |
A dummy routine to use as a receive callback, when we aren't really trying to process what is received. It just absorbs and ignores the data.
| user_data | The context. |
| amp | The signal.buffer |
| len | The length of the signal buffer |
A dummy routine to use as a receive fillin callback, when we aren't really trying to process what is received. It just absorbs and ignores the request.
| user_data | The context. |
| len | The length of the signal buffer |
Fake processing of a missing block of received T.31 modem audio samples (e.g due to packet loss).
| s | The T.31 modem context. |
| len | The number of samples to fake. |
Generate a block of T.31 modem audio samples.
| s | The T.31 modem context. |
| amp | The audio sample buffer. |
| max_len | The number of samples to be generated. |
| s | The T.38 context. |
| buf | The packet contents. |
| len | The length of the packet contents. |
| seq_no | The packet sequence number, used for logging purposes. |
Apply fake processing when a block of audio samples is missing (e.g due to packet loss).
| s | The T.38 context. |
| len | The number of samples to fake. |
Generate a block of FAX audio samples.
| s | The T.38 context. |
| amp | The audio sample buffer. |
| max_len | The number of samples to be generated. |
Fake processing of a missing block of received V.17 modem audio samples. (e.g due to packet loss).
| s | The modem context. |
| len | The number of samples to fake. |
Process a block of received V.18 audio samples.
| s | The V.18 context. |
| amp | The audio sample buffer. |
| len | The number of samples in the buffer. |
Fake processing of a missing block of received V.22bis modem audio samples. (e.g due to packet loss).
| s | The modem context. |
| len | The number of samples to fake. |
Generate a block of V.22bis modem audio samples.
| s | The modem context. |
| amp | The audio sample buffer. |
| len | The number of samples to be generated. |
Fake processing of a missing block of received V.27ter modem audio samples. (e.g due to packet loss).
| s | The modem context. |
| len | The number of samples to fake. |
Fake processing of a missing block of received V.29 modem audio samples. (e.g due to packet loss).
| s | The modem context. |
| len | The number of samples to fake. |
Process a block of received V.8 audio samples.
| s | The V.8 context. |
| amp | The audio sample buffer. |
| len | The number of samples in the buffer. |
Get the next bit of a transmitted serial bit stream.
Apply T.30 transmit processing to generate a block of audio samples.
Apply fake T.30 receive processing.
Apply T.30 receive processing to a block of audio samples.
| s | The FAX context. |
| amp | The audio sample buffer. |
| len | The number of samples in the buffer. |
Apply fake T.30 receive processing when a block of audio samples is missing (e.g due to packet loss).
| s | The FAX context. |
| len | The number of samples to fake. |
Apply T.30 transmit processing to generate a block of audio samples.
| s | The FAX context. |
| amp | The audio sample buffer. |
| max_len | The number of samples to be generated. |
References async_rx_init(), fax_modems_get_logging_state(), fsk_rx_init(), fsk_rx_set_modem_status_handler(), fsk_rx_signal_cutoff(), fsk_rx_signal_power(), modem_connect_tones_rx_free(), modem_connect_tones_rx_get(), modem_connect_tones_rx_init(), modem_connect_tones_rx_release(), t31_free(), t31_get_logging_state(), t31_init(), t31_release(), t31_set_t38_config(), t31_set_tep_mode(), t31_set_transmit_on_idle(), t38_core_free(), t38_core_get_logging_state(), t38_core_init(), t38_core_release(), t38_core_restart(), t38_gateway_get_logging_state(), t38_gateway_get_t38_core_state(), t38_gateway_get_transfer_statistics(), t38_gateway_set_ecm_capability(), t38_gateway_set_fill_bit_removal(), t38_gateway_set_nsx_suppression(), t38_gateway_set_real_time_frame_handler(), t38_gateway_set_supported_modems(), t38_gateway_set_tep_mode(), t38_gateway_set_transmit_on_idle(), t38_set_data_rate_management_method(), t38_set_data_transport_protocol(), t38_set_fill_bit_removal(), t38_set_jbig_transcoding(), t38_set_max_buffer_size(), t38_set_max_datagram_size(), t38_set_mmr_transcoding(), t38_set_redundancy_control(), t38_set_sequence_number_handling(), t38_set_t38_version(), t38_set_tep_handling(), v17_rx_carrier_frequency(), v17_rx_equalizer_state(), v17_rx_set_qam_report_handler(), v17_rx_signal_cutoff(), v17_rx_signal_power(), v17_rx_symbol_timing_correction(), v18_decode_dtmf(), v18_encode_dtmf(), v18_mode_to_str(), v18_put(), v22bis_free(), v22bis_get_current_bit_rate(), v22bis_get_logging_state(), v22bis_init(), v22bis_release(), v22bis_remote_loopback(), v22bis_request_retrain(), v22bis_restart(), v22bis_rx_carrier_frequency(), v22bis_rx_equalizer_state(), v22bis_rx_set_qam_report_handler(), v22bis_rx_signal_cutoff(), v22bis_rx_signal_power(), v22bis_rx_symbol_timing_correction(), v22bis_set_get_bit(), v22bis_set_modem_status_handler(), v22bis_set_put_bit(), v22bis_tx_power(), v27ter_rx_carrier_frequency(), v27ter_rx_equalizer_state(), v27ter_rx_set_qam_report_handler(), v27ter_rx_signal_cutoff(), v27ter_rx_signal_power(), v27ter_rx_symbol_timing_correction(), v29_rx_carrier_frequency(), v29_rx_equalizer_state(), v29_rx_set_qam_report_handler(), v29_rx_signal_cutoff(), v29_rx_signal_power(), v29_rx_symbol_timing_correction(), and v8_log_supported_modulations().
| SPAN_DECLARE_NONSTD | ( | void | ) |
Accept a bit from a received serial bit stream.
Process a received HDLC frame.
Put a series of bytes of data to an HDLC receiver.
Put a byte of data to an HDLC receiver.
Accept a bit from a received serial bit stream
| user_data | An opaque point which must point to a receiver context. |
| bit | The new bit. Some special values are supported for this field.
|
| s | A pointer to an HDLC receiver context. |
| new_byte | The byte of data. |
| s | A pointer to an HDLC receiver context. |
| buf | The buffer of data. |
| len | The length of the data in the buffer. |
Process a received HDLC frame.
| user_data | The T.30 context. |
| msg | The HDLC message. |
| len | The length of the message, in octets. |
| ok | TRUE if the frame was received without error. |