|
spandsp 3.0.0
|
Go to the source code of this file.
Typedefs | |
| typedef struct v18_state_s | v18_state_t |
Enumerations | |
| enum | { V18_MODE_NONE = 0x0001 , V18_MODE_WEITBRECHT_5BIT_4545 = 0x0002 , V18_MODE_WEITBRECHT_5BIT_50 = 0x0004 , V18_MODE_DTMF = 0x0008 , V18_MODE_EDT = 0x0010 , V18_MODE_BELL103 = 0x0020 , V18_MODE_V23VIDEOTEX = 0x0040 , V18_MODE_V21TEXTPHONE = 0x0080 , V18_MODE_V18TEXTPHONE = 0x0100 , V18_MODE_WEITBRECHT_5BIT_476 = 0x0200 , V18_MODE_REPETITIVE_SHIFTS_OPTION = 0x1000 } |
| enum | v18_autobauding_modes_e { V18_AUTOMODING_GLOBAL = 0 , V18_AUTOMODING_NONE , V18_AUTOMODING_AUSTRALIA , V18_AUTOMODING_IRELAND , V18_AUTOMODING_GERMANY , V18_AUTOMODING_SWITZERLAND , V18_AUTOMODING_ITALY , V18_AUTOMODING_SPAIN , V18_AUTOMODING_AUSTRIA , V18_AUTOMODING_NETHERLANDS , V18_AUTOMODING_ICELAND , V18_AUTOMODING_NORWAY , V18_AUTOMODING_SWEDEN , V18_AUTOMODING_FINALND , V18_AUTOMODING_DENMARK , V18_AUTOMODING_UK , V18_AUTOMODING_USA , V18_AUTOMODING_FRANCE , V18_AUTOMODING_BELGIUM , V18_AUTOMODING_END } |
| enum | v18_status_e { V18_STATUS_SWITCH_TO_NONE , V18_STATUS_SWITCH_TO_WEITBRECHT_5BIT_4545 , V18_STATUS_SWITCH_TO_WEITBRECHT_5BIT_476 , V18_STATUS_SWITCH_TO_WEITBRECHT_5BIT_50 , V18_STATUS_SWITCH_TO_DTMF , V18_STATUS_SWITCH_TO_EDT , V18_STATUS_SWITCH_TO_BELL103 , V18_STATUS_SWITCH_TO_V23VIDEOTEX , V18_STATUS_SWITCH_TO_V21TEXTPHONE , V18_STATUS_SWITCH_TO_V18TEXTPHONE } |
Functions | |
| logging_state_t * | v18_get_logging_state (v18_state_t *s) |
| v18_state_t * | v18_init (v18_state_t *s, bool calling_party, int mode, int nation, span_put_msg_func_t put_msg, void *put_msg_user_data, span_modem_status_func_t status_handler, void *status_handler_user_data) |
| Initialise a V.18 context. | |
| int | v18_release (v18_state_t *s) |
| Release a V.18 context. | |
| int | v18_free (v18_state_t *s) |
| Release a V.18 context. | |
| int | v18_tx (v18_state_t *s, int16_t amp[], int max_len) |
| Generate a block of V.18 audio samples. | |
| int | v18_rx (v18_state_t *s, const int16_t amp[], int len) |
| Process a block of received V.18 audio samples. | |
| int | v18_rx_fillin (v18_state_t *s, int len) |
| Fake processing of a missing block of received V.18 audio samples. | |
| int | v18_put (v18_state_t *s, const char msg[], int len) |
| Put a string to a V.18 context's input buffer. | |
| int | v18_set_stored_message (v18_state_t *s, const char *msg) |
| Set the stored message, as per V.18/5.2.12.1. This message may be up to 80 bytes long. | |
| int | v18_get_current_mode (v18_state_t *s) |
| Get the current mode of a V.18 connection. | |
| const char * | v18_mode_to_str (int mode) |
| Return a short name for a V.18 mode. | |
| const char * | v18_status_to_str (int status) |
| int v18_free | ( | v18_state_t * | s | ) |
Release a V.18 context.
Free a V.18 context.
| s | The V.18 context. |
References queue_release(), and v18_free().
Referenced by v18_free().
| int v18_get_current_mode | ( | v18_state_t * | s | ) |
Get the current mode of a V.18 connection.
| s | The V.18 context. |
References v18_get_current_mode().
Referenced by v18_get_current_mode(), and v18_tx().
| v18_state_t * v18_init | ( | v18_state_t * | s, |
| bool | calling_party, | ||
| int | mode, | ||
| int | nation, | ||
| span_put_msg_func_t | put_msg, | ||
| void * | put_msg_user_data, | ||
| span_modem_status_func_t | status_handler, | ||
| void * | status_handler_user_data ) |
Initialise a V.18 context.
Initialise a V.18 context.
| s | The V.18 context. |
| calling_party | True if caller mode, else answerer mode. |
| mode | Mode of operation. |
| nation | National variant for automoding. |
| put_msg | A callback routine called to deliver the received text to the application. |
| put_msg_user_data | An opaque pointer for the put_msg callback routine. |
| status_handler | A callback routine called to deliver status reports. |
| status_handler_user_data | An opaque pointer for the status callback routine. |
References v18_state_s::calling_party, dtmf_rx_init(), MODEM_CONNECT_TONES_ANSAM_PR, modem_connect_tones_rx_init(), queue_init(), QUEUE_READ_ATOMIC, QUEUE_WRITE_ATOMIC, and v18_init().
Referenced by v18_init().
| const char * v18_mode_to_str | ( | int | mode | ) |
Return a short name for a V.18 mode.
| mode | The code for the V.18 mode. |
References v18_mode_to_str().
Referenced by v18_mode_to_str(), and v18_tx().
| int v18_put | ( | v18_state_t * | s, |
| const char | msg[], | ||
| int | len ) |
Put a string to a V.18 context's input buffer.
| s | The V.18 context. |
| msg | The string to be added. |
| len | The length of the string. If negative, the string is assumed to be a NULL terminated string. |
References v18_state_s::logging, queue_write(), span_log(), and v18_put().
| int v18_release | ( | v18_state_t * | s | ) |
Release a V.18 context.
Release a V.18 context.
| s | The V.18 context. |
References queue_release(), and v18_release().
Referenced by v18_release().
| int v18_rx | ( | v18_state_t * | s, |
| const int16_t | amp[], | ||
| int | len ) |
| int v18_rx_fillin | ( | v18_state_t * | s, |
| int | len ) |
Fake processing of a missing block of received V.18 audio samples.
Fake processing of a missing block of received V.18 audio samples. (e.g due to packet loss).
| s | The V.18 context. |
| len | The number of samples to fake. |
References dtmf_rx_fillin(), fsk_rx_fillin(), and v18_rx_fillin().
Referenced by v18_rx_fillin(), and v18_tx().
| int v18_set_stored_message | ( | v18_state_t * | s, |
| const char * | msg ) |
Set the stored message, as per V.18/5.2.12.1. This message may be up to 80 bytes long.
| s | The V.18 context. |
| msg | The string to be set. |
References v18_set_stored_message().
Referenced by v18_set_stored_message(), and v18_tx().
| int v18_tx | ( | v18_state_t * | s, |
| int16_t | amp[], | ||
| int | max_len ) |
Generate a block of V.18 audio samples.
Generate a block of V.18 audio samples.
| s | The V.18 context. |
| amp | The audio sample buffer. |
| max_len | The number of samples to be generated. |
References v18_get_current_mode(), v18_mode_to_str(), v18_put(), v18_rx(), v18_rx_fillin(), v18_set_stored_message(), and v18_tx().
Referenced by v18_tx().