#include <inttypes.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "spandsp/telephony.h"
#include "spandsp/async.h"
#include "spandsp/private/async.h"
Functions | |
const char * | signal_status_to_str (int status) |
Convert a signal status to a short text description. | |
async_rx_state_t * | async_rx_init (async_rx_state_t *s, int data_bits, int parity, 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) | |
Put a byte of data to an HDLC receiver. | |
async_tx_state_t * | async_tx_init (async_tx_state_t *s, int data_bits, int parity, 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) | |
Apply fake T.30 receive processing. |
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. |
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.
Referenced by 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_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, and SIG_STATUS_TRAINING_SUCCEEDED.
SPAN_DECLARE_NONSTD | ( | int | ) |
Apply fake T.30 receive processing.
Get the next bit of data from a T.38 rate adapting non-ECM buffer context.
Get a bit of received non-ECM image data.
Get the next bit of a transmitted serial bit stream.
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.
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 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. |
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. |
SPAN_DECLARE_NONSTD | ( | void | ) |
Put a byte of data to an HDLC receiver.
Process a received HDLC frame.
Put a series of bytes of data to an HDLC receiver.
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. |
References ASYNC_PARITY_ODD, 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, SIG_STATUS_CARRIER_DOWN, SIG_STATUS_CARRIER_UP, SIG_STATUS_END_OF_DATA, SIG_STATUS_TRAINING_FAILED, SIG_STATUS_TRAINING_IN_PROGRESS, SIG_STATUS_TRAINING_SUCCEEDED, async_rx_state_s::use_v14, and async_rx_state_s::user_data.